Measly Mazes

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.

Java’s terseness

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.¬†[the paste unfortunately has been removed as of the 17th of May 2020 with its author not having the above mentioned limitations; you can, however, still view it on TIO.]¬†This innocuously titled Java source file upon closer contains inspection an impressive 349 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.

Continue reading