2020-06-13, post № 230
C, games, #generator, #maze
I wanted to create a maze generator for quite some while now and recently picked up the project again, using a naive approach consisting of applying a randomized depth-first search algorithm on a given rectangle. Thus, the resulting maze’s internal path structure is quite shallow, with most path forks having one degenerated short section.
Nevertheless, mazes are generated:
jt maze --ppm 32 32 | convert - -sample 1000% maze.png
You can generate your own mazes either by building maze.c natively or by using my newly developed package manager jt.
2020-05-16, post № 229
2020-04-22, post № 228
Java, programming, #anti-pattern, #anti-patternism
Whilst pondering the lost control one has over pastebin posts as a guest; the inability to remove a text one has published themselves and the entailed virtually temporally unbounded availability to anyone of this text, I decided to look at pastebin’s “archive” site — a chronologically sorted collection of the most recent public pastebin posts.
One interesting post was titled Filter — Stringrid — Delphi and appears to be a Delphi program with German comments accomplishing some two-dimensional array manipulation task.
However, when looking further down the archive, a post published around two minutes earlier caught my attention — exmp1. This innocuously titled Java source file upon closer contains inspection an impressive 𝟥𝟦𝟫 lines of code. Now, source files of such a line count are not unreasonable (especially when writing Java), however it is not the typical size of an example — as this paste’s title suggests.
Thus, I decided to read it to know what it is meant to accomplish and how it is written — the source’s line count is highly misleading regarding its functionality.
Jonathan Frech's blog; built 2021/04/16 20:21:20 CEST