←back to thread

296 points reverseCh | 1 comments | | HN request time: 0.202s | 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. bigpeopleareold ◴[] No.41923528[source]
I haven't lately been writing 'useless' stuff, but have done some things a few months ago.

I never finished it, but this got me thinking again. I wanted to try PyGame, never doing any game programming before. However, I started on a lot of the logic around a game where a bunch of introverted employees in a company are forced to participate in some sport, specifically a football game, with robots 'encouraging' game play. The purpose is to stay far away from the ball while all other players chaotically run away from it too.

Last year, I spent an inordinate amount of time writing a Makefile and scripts to prevent re-runs when distributing files and configs to various VMs. I used it a little but there was a problem with it that I couldn't solve, so I gave up (and funny enough, I just wrote a tiny bash function to do all what I did before with that :D )

I wrote a tiny 'time-series' database in bash. It only supported two fields - probably something to fix. But, I wrote enough to query it and aggregate results into time ranges. I never used it for anything, but I was thinking of writing an nginx handler to call it to see page hits on my blog (the site generator which I also wrote myself, which is probably less useless, but not that useful with things like jekyll :)) I also wanted to play with C and what came out of it was something of a unit test tool that I based off of the Mac OS X version of assert() that prints out in a semi-TAP format. Useless because I don't usually write C code :D

I recently wrote a web scraper for a site with stuff I wanted to download and parse into some structure, but have no clue what to do with the data now that I have it :) So, it's in the status of useless at the moment.