←back to thread

296 points reverseCh | 3 comments | | HN request time: 0.625s | source

I recently came across the concept of "useless" programs - pieces of code that serve no practical purpose but are fun, creative, or challenging to write. These could be anything from elaborate ASCII art generators to programs that solve imaginary problems. I'm curious to hear about the most interesting or creative "useless" programs the HN community has written. What was your motivation? What unexpected challenges did you face? Did you learn anything valuable from the experience? Some examples to get the ball rolling: 1. A program that prints the lyrics of "99 Bottles of Beer" in binary. A text-based game where you play as a semicolon trying to find its way to the end of a line of code. A script that translates English text into Shakespearean insults. Share your creations, no matter how quirky or impractical. Let's celebrate the joy of coding for coding's sake!
1. JoachimS ◴[] No.41922577[source]
The weirdest, though personally very useful program I've written was the 'Renklämma reheater' program I wrote as a student. For those that don't know a Renklämma is basically a folded piece of soft flat bread with raindeer meat inside. (Ren is Swedish for raindeer, and 'klämma' is something folded over and squeezed together - very logical.) For an image on what a Renklämma looks like, see (and yes, the official name is not 'Renklämma', but everybody calls them that):

https://www.polarbrod.se/smorgasar/polarklamma-renkott/

Anyway, Renklämmas are sold frozen, and at the university could be bought cheaply from several student orgs trying to earn money for a final year trip. This made them perfect snacks for those late night programming sessions - completing assignment and other things a curious student with free access to the Internet may do. The problem is eating the Renklämma frozen. If only there was a way to reheat them? Luckily the school (Luleå University of Technology: https://www.ltu.se/en) had just invested in a lot of Sun SPARC ELCs:

These were great UNIX terminal++ machines. Importantly they had no fans, relying instead of passive cooling caused by heat rising from the bottom to the top of the enclosure over the main board mounted vertically on the backside of the screen:

http://john.ccac.rwth-aachen.de:8000/alf/sparc_elc/

Now, if the machine was made to work harder, more heat would be generated. Thus the 'Renklämma reheater' program was born. Basically it just forked more and more processes doing nothing but randomly writing and reading memory, and sending them between each other. Probably not the optimal solution, but reheated (defrosted) the Renklämma sufficiently to be enjoyed without getting brain freeze.

Just place the Renklämma on top of the upper ventilation gilles on the back side of the screen and run the program until the computer beeps. Preferably not on the machine you are working on, but the machine next to you, so YOU don't have to live with the increasing sluggishness. UNIX remote login ftw!

replies(2): >>41923414 #>>41923510 #
2. meowster ◴[] No.41923414[source]
That's horrifying, lol.

That reminds me of this:

https://xkcd.com/1172/

3. CRConrad ◴[] No.41923510[source]
Someone should probably insert the obligatory XKCD "Emacs keystroke as space-heater" link, but I'm too lazy to go look for it. [Edit: Oh look, someone did. Of course!]

(BTW, whaddayamean "the official name is not 'Renklämma'"? I never heard them called anything else. If the alternative is "Polarklämma", there's nothing "official" about that AFAICS; it's just one manufacturer's product name.)