Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What's the most creative 'useless' program you've ever written?
296 points by reverseCh 42 days ago | hide | past | favorite | 404 comments
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!



I like inserting art, like the header to https://simonsarris.com

A village pops up. There is no point to it. You can click to make more houses. You can right-click to drag things around. When I touch it again I think I'll add a sun and moon that track the time of day for wherever the user is located. Actually the footer has art too, each page has a semi-randomly assigned illustration from public-domain (old) art that I've found. Like drawings from James McNeill Whistler, for instance. I use his illustrations in 'useful' websites too.

Actually, I experimented with the sun/moon a few years ago, in this version: https://simonsarris.github.io/simeville/

If you left-click drag the sun downwards, you'll see the moon come up. That one is open source, but the code is quite slapdash compared to the new one. Also you have to click ITS TIME TO BUILD to get the buildings.

In general I think websites could be a lot more pretty (gorgeous even), silly, interesting, and a lot less corporate chic than they currently are.


Your website is very cute. I live on a certain floor of a building, and although the content of the site has no meaning to me, I kept looking at it for a long time, as if I were reading a novel.

Thank you for sharing.


If the moon is rising when the sun sets, it will be a full moon. But your graphic shows a partial phase :)


On Earth, with a single Sun.

But apparently this planet has some very strong radiation protection, possibly synthetic, that blocks out the strong ultraviolet light from their second Sun. That ultraviolet is reflected back in the visible spectrum from the surface of their moon though - thus giving the appearance of a crescent during the entire cycle. The "dark side" is still lit, just lit less.

That was fun ))


I like having this kind of animation on my homepage, too.

Currently I just have an animated GIF background, but I've had some animated ASCII art in the past.

I'm currently working on animating a fractal drawn with HTML Canvas.

Your houses and pencil style are very cute, I feel inspired to make something similar.

I'd like if clicking in the same place would grow whatever's there.


For graphics, check out KM Alexander


Im totally using some of these on my next personal site redesign! The charm is fantastic and cozy <3


I really went down the rabbit hole reading the history of the map brushes, thanks for sharing!


I have to agree, I really miss the 90's when websites had more of a fun artistic creative and personality feel than templated. I see the use for both, but I miss it :)


I like it, and I agree with you. Websites follow some simple design rules, some from typesetting, some new especially for the Web. Not least because of the behaviour of base components and the availability of styling libraries that keep their own smell around no matter what one does.

I like to draw on my websites too. I write a gpu-rendered background for basically any website I make for fun.

https://gtblank.org

https://ungut.at


Wow awesome! Reminded me of Cucinelli's AI website: https://www.brunellocucinelli.ai/ which is one of the best one I've seen. It's dedicated to Mr Cucinelli's life and beliefs. The aesthetics are similar.


Cute! I wonder how hard it would be, rather than having the houses "bounce" up, to make some kind of CSS animation that would look a bit like they were being sketched, some kind of gradual reveal..


I like this a lot. Beautiful, creative, really quite charming.


I love the page. I find it very inspiring :)


Your webpage is gorgeous, congrats!


Beautiful personal site!


When I was first learning computer vision, I wrote a program that could tell the time from an image of a clock [1]. I had no purpose for it besides the fact that it seemed like a cool problem to try and solve.

Years later, I get an email from a stranger in Korea, asking me how to run my program. Why would he want to use my silly program? Turns out you can adapt the code to read analog pressure gauges which is really useful for chemical plants. Goes to show that there's often a use for most things.

[1] https://github.com/jinayjain/timekeeper


This is very similar to when I used OpenCV to read the angle of a cardboard knob I pinned on the wall in my office to change the volume on Spotify!


That is a super cool idea! Kinda sad that it doesn’t make much sense outside of a very particular use case scenario. Much more practical to mount a potentiometer to the wall for any sort of fixed installation.

It might be cool adapt for a mobile office setup where you’re only present in one location for a few days but still want some automated creature comforts.


Cf. https://dynamicland.org/

> Dynamicland is a nonprofit research lab creating a humane dynamic medium.

> What that means is a way for real people in the real world to explore ideas together, not just with words and pictures, but with computation.

They're doing stuff like that.


lol that’s great and not that useless at all. I could see using Lego and opencv to create adhoc control boards for some fun hacking.


Thanks for sharing this. The blog article on building your pipeline was a fun read! Your solution has a nice blend of heuristics and DL.

If you’re ever interested in revisiting this click project, you could check out DeepLabCut [0]. A blogpost highlighted a toy example of training a DLC model to recognize clock arms [1], which may or may not be more consistent than your Canny approach :)

[0] https://github.com/DeepLabCut/DeepLabCut

[1] https://guillermohidalgogadea.com/openlabnotebook/training-y...


Woah generalized pose estimation seems really useful and it's cool that the example is for reading a clock. Thanks for sharing!


Your anecdote gave me a genuine “that’s cool” smile, the sort that I haven’t had over a piece of tech in a bit. That must have been a fun email. Thanks for sharing!


long-long time ago (think end of last century) friend of mine take contract to automatize gas-pump stations on long gas pipe. Stations were here, with analog gauges and valves.

Offer from some "big" business with digital / connected gauges and motorized valves were too much for customer. He wanted much, much cheaper.

There were special modems, which use pipe as data line (think something like 150 baud shared between all stations).

So, solution implemented by my friend was like:

1) Electric motor with gearbox to motorize valves, it was cheap, as standard electric motors are cheap and customer has its own mechanical shop, so everything was cobbled in-house from standard of-the-shelf components.

2) Modem for each station (it was inevitable)

3) Laptop with B/W web cam on each station.

4) Software which can read gauges from webcam shots.

5) Software which transmit values from all stations to central station and allows to manipulate valves from central station (no automation here, 24/7 human operators)

Laptops and cameras were not cheap from personal point of view, but like x100 cheaper than special gauges and valves offered by gas-pipe equipment manufacturer.

It was not called "computer vision" at this time.


I used to work for a company that makes smart watches with real (software-driven) mechanical hands, and had to write a very similar computer vision program to read the time from those watches and automatically calibrate the position of the minute and hour hands. So yes it has real purpose ;)


Out of interest, how does this account for the orientation of the clock? Is it assuming 12 is always at the top, or is there some way it would work if the photo was somewhat rotated?


Yep, it does some naive rescaling of the clock to make it circular (since perspective would make it more like an ellipse in the image), but then assumes 12 is always at the top.


At ETH we worked on an analog pressure gauge reading project. In the larger project, we wanted to read analog pressure gauges in oil refineries. https://github.com/ethz-asl/analog_gauge_reader


If your timekeeper doesn't perform adequately, there's an impressively overengineered neural net project to read clocks: https://arxiv.org/abs/2111.09162 "It's About Time: Analog Clock Reading in the Wild".

(Although I don't know how it would compare to the latest generalist vision models... Clocks are pretty well labeled in photographs online, one would expect.)


That is so frickin cool!


Thanks!


this had also crossed my mind back a while back for reading home gas meters :-)


Did you once share this anecdote on /.? I remember this.


Hmm, I've never used /. so it wasn't me who shared it.


Cool anecdote!


Thank you!


I once wrote an OS hack to drive a friend crazy.

This was back in the early 1990s when we worked at a company making Macintosh utility software. My friend, another coder, liked to arrange his Finder windows so that they reflected the underlying folder hierarchy and were perfectly aligned. I mean pixel perfect.

So one day I wrote an extension to patch the OS on his machine to randomly nudge a window by just a single pixel. But only rarely, maybe just two or three times a day.

It had the wanted effect. Every once in a while, I'd hear him huff or mumble "what?" to himself. A couple of days later he asked the room, "Have any of you guys been using my machine? I know someone has. They messed up a few of my windows." Everybody professes innocence and manages not to laugh.

A few more days and he's at his wits' end. He finally says he's going to take the morning to wipe his machine and reinstall the OS.

At this point, we can't contain our mirth, and he catches a couple of us trying to hide our laughter. It's over.

I confess. He's pretty pissed and lets me have it. But he's a hacker, and I know deep down he respects it just a little.

After lunch, we're back at our desks. We're working. It's quiet. Then, I hear him chuckling. "Yeah, that was pretty good."

Edited to add: As penance, I ended up modifying my OS hack to help my friend perfectly align his Finder windows. All he had to do was hold down the control key when he opened a folder, and its window would be perfectly snapped to its parent. A bunch of us started using it. I ended up releasing it as freeware under the name WindowStacker: https://info-mac.org/viewtopic.php?t=14300


Such a fine line between helpful and malicious!


A phrase that sticks with me on describing an aspect of friendships is “insincere hostility”.

I think I originally encountered it from one of Andrew Hussie’s works.


Great turn of phrase


Oh boy, this reminded me of university days. I wrote a little servlet which would pop out the CD drive on my friends computer in the lab, and I would trigger it at tense moments in Starcraft games. Good times.


I love a good useless program, I may have written more useless ones than useful. Here's a few of my faves from the last 10 years!

- A password strength page that insults you based on strength https://trypap.com/

- Minesweeper with 1 square https://onesquareminesweeper.com/

- Adding elevator music to "go to top" buttons https://tholman.com/elevator.js/

- CSS Animation library of obnoxious over the top animations https://tholman.com/obnoxious/

- A fake mosquito with the web audio api https://tholman.com/mosquito-js/


I can't believe you didn't even mention your website dedicated to this, Tim! https://theuselessweb.com/

Longer list here: https://tholman.com/


I will admit that I clicked the one square in the mine sweeper.

Not sure what I expected.


Seems to me it would already be solved by Minesweepers rules, the clock should be stopped.


Also first click is never a mine (if there's one where you click it's moved to the top left corner).


Does this mean that the top left corner had a higher probability of being a mine? Or even a lower probability, seeing as the dev would have had to ensure that it's not a mine before the user clicks.

Now that I think about it, the dev strategy of leaving the spot without a mine but moving one there, probably does not affect the probability that there will be a mine there during gameplay.


I don't think the dev would leave the top left without a mine until one is moved there, as that would always be a safe square to click first.

So if the probability of finding a mine at any given spot is given by p, then the probability of finding a mine in the top left during gameplay for cases where one does not click it first (in which case it is 0?) is 1 for the case where you clicked on a mine first with probability p, and then p for the remainder.

So the total probability p' is p * 1 + (1 - p) * p, or 2p - p^2.

Wikipedia says

> Beginner is usually on an 8x8 or 9x9 board containing 10 mines, Intermediate is usually on a 16x16 board with 40 mines and expert is usually on a 30x16 board with 99 mines; however, there is usually an option to customise board size and mine count.

  8x8   10 mines  p = 0.16 p' = 0.29 ratio = 1.84
  9x9   10 mines  p = 0.12 p' = 0.23 ratio = 1.88
  16x16 40 mines  p = 0.16 p' = 0.29 ratio = 1.84
  30x16 99 mines  p = 0.21 p' = 0.37 ratio = 1.79
I was curious to see the concrete effects for no reason other than to procrastinate.


  > I don't think the dev would leave the top left without a mine until one is moved there, as that would always be a safe square to click first.
All squares are safe to click first, that's the point.


AFAIK, it wasn't like that on Windows 3.11, it would be interesting to know when this was added.


It's just as easy to win.


Is it too much to ask that the back to top elevator animate an actual elevator travelling up the side of the web page. The elevator music is good but I need it to sound like it would in an actual elevator too. Thanks for these links, they gave me a chuckle.


The Factorio (1) website has something like that - scroll down to the bottom and click on the rocket ship.

1: https://factorio.com/


Thanks for sharing these. It's really inspiring to see some fun antics like this to bring back the joy of frontend work.


This stuff is amazing. Thank you! I especially love the mosquito app.


99% sure i bought a website template years ago with elevator.js


I invented a programming language where you use Unicode box-drawing characters to draw a structure of boxes and lines:

                    ╓───╖
                    ║ ! ║
                    ╙─┬─╜   ┌───╖  ╔═══╗
                ┌─────┴─────┤ > ╟──╢ 2 ║
                │           ╘═╤═╝  ╚═══╝
  ╔════╗  ┌───╖ │             │
  ║ −1 ╟──┤ + ╟─┴─┐           │
  ╚════╝  ╘═╤═╝   │           │
          ┌─┴─╖   │    ╔═══╗  │
          │ ! ║   │    ║ 1 ║  │
          ╘═╤═╝   │    ╚═╤═╝  │
            │   ┌─┴─╖  ┌─┴─╖  │
            │   │ × ╟──┤ ? ╟──┘
            │   ╘═╤═╝  ╘═╤═╝
            └─────┘      │
The language is called Funciton (pronounced: /ˈfʌŋkɪtɒn/) and the above example demonstrates the factorial function.

YouTube playlist: https://youtube.com/playlist?list=PLkG32PHxWoJaetjKUMVRONWLg...

Language specification: https://esolangs.org/wiki/Funciton

Interpreter: https://codeberg.org/Timwi/Funciton


That seems way too useful to qualify here :-)


A long time ago I wrote a useless, but fun program that attempts to programmatically recreate a source image by randomly placing randomly sized, randomly coloured rectangles onto a canvas. If the result of this random application of colour is closer to the source image, it's kept, otherwise the changes are discarded. Over time, it gets reasonably close to the source image.

https://ajxs.github.io/pbp/


Sort of similarly (sorry I don’t have a link handy but could find one tomorrow if anyone is interested), there was an interesting program someone posted in an AskHN post a year or two ago where the program took an input image, started with a blank circle that was made up of a configurable number of “pins” evenly spaced apart around the perimeter, and then starting from one “pin” iteratively found the next pin that, when connected with a line from the current pin, most made the generating image look more like the input image compared to the other possible lines, and then onto the next pin and the next until you had an image that roughly looked like the input image. The point of that original program was to figure out the best way to connect pins inserted around a circular frame with a single long thread and then weave the image with it. The original post had pictures in it of the guy’s finished artwork and everything.

I don’t remember what language he wrote it in, but I converted it to a react app that handled everything client side using html canvas and bitmap images. Not to publish or anything, just for fun.


With your description, ChatGPT tells me it may be this one:

https://github.com/callummcdougall/computational-thread-art

Is it? :)


It wasn’t but that is VERY similar haha. Wonder if this person had the same idea as I did. Namely “hey this idea is cool! I MUST build it myself to tinker with.” Lmao

After much sleuthing, I finally found the original comment. It has a link to images of the built out project which is nice and in the replies the OP posts links to the GitHub gist. If any interest in my react version I can make that public too, just know it was quick and dirty but does work.

https://news.ycombinator.com/context?id=37036108


Please find! I’m looking for this now too


After much sleuthing, I finally found the original comment. It has a link to images of the built out project which is nice and in the replies the OP posts links to the GitHub gist. If any interest in my react version I can make that public too, just know it was quick and dirty but does work.

https://news.ycombinator.com/context?id=37036108


I like how the code is just plain javascript, and less than 114 lines of code.

https://ajxs.github.io/pbp/main.js


I was feeling a bit self-conscious about my 2015 Javascript, and gave it a bit of a polish! So it's slightly more than 114 now. I'm glad you appreciated this! The whole idea is built around a very simple mechanism.


I've seen a similar thing used to generate low-size versions of images using arbitrary SVG primitives (large triangles or circles rather than small blocks), for use as placeholders while high-res images load. I can't find any of them in quick search, but there were a couple of F/OSS tools that implemented the trick.

UPD: found one of them, https://axe312ger.github.io/sqip/ (look at the “SQIP primitive art” column in that page's examples table)


Fun. At a very high level this is similar to what Gaussian splats do. You nudge Gaussians, that start out as random blobs in 3D space, in a direction that minimizes a cost between their projections into known camera poses and input images.


Isn’t this basically how stable diffusion works?


This is like the tech reporter's version of stable diffusion.

Does it have some similarities? sure. Is it easier to understand than actual stable diffusion? yes.

Is this basically how stable diffusion works? Not even close.


No.


I’m pretty sure it is, except instead of comparing the result to a source image, it is analyzed and scored by a model that was trained to recognize images.


Diffusion models are trained to denoise.


It's kind of the opposite. Stable Diffusion starts with random noise, changes it, asks the model of it's representative of the goal, repeat. But there's much more to it.


This is awesome.


Thank you very much! The browser landscape was very different when the original code was written, around 10 years ago. Maybe I'll revisit it and see if it can be optimised!


I didn't expect it to be that useless.

I like to experiment with home automation things, and recently I added a feature to my system where I could push notifications with images to my phone (pretty much everything I do is entirely self-hosted btw). Then a Valetudo update came out - Valetudo is a FOSS replacement for the cloud services usually required for supported robot vacuums. You root your robot, block it from phoning home, install Valetudo, and now you have a robot that won't spy on you unless you specifically tell it to.

So the update introduced a feature where photos with obstacles recognized by the robot are available via the UI/API. So I put something together where I'll get the pic sent as a notification immediately.

In effect, it's like I've subscribed to the most boring instagram feed of the world. Just random low-quality pictures of items in my apartment. The low quality and weird perspective actually makes it look intentional or filtered, as if a mouse is being forced to make a collage for photography class but doesn't feel inspired at all.


I love this. I'm in a somewhat home automation tinker place myself, and have made an open source doorbell camera (kinda) using an esp32 chip, since I didn't trust anything else to not spy. It sends me messages over element of any movement lasting longer than 5 seconds, which usually involves an old lady who walks slowly with her zimmer frame across the front of the house. Other than actual doorbell use, most of the images are of this old woman who I've now taken up the habit of greeting if I see her somewhere.


Have you got a write-up or GitHub for your camera? I'd kinda like to do the same, and wouldn't mind a starting point.


I can't without doxxing myself sadly. I really should make a public HN account


Please do!


I love everything about this. This is art


Could you use this to build your own “poop detector” where an object is routed around until you confirm with the robot if it’s “safe” to proceed in that area?

I love my robot vacuum but I dare never run it when I’m not at home for fear or smearing poop all over my floor on accident. Sadly I didn’t shell out enough money for a bot with superior object detection.


Maybe just stop shitting on the carpet.


Old habits die hard


Spat my tea out on that comment!


I found this just yesterday! I'm sure one could build something better with recent models, but I think the approach is solid.

https://www.youtube.com/watch?v=uWZu3rnj-kQ


Put a diaper on it!


My vacuum has often lost various parts around the apartment whenever it got caught on something, but so far it has never shat on the floor. It is quite a fancy one so that's expected.


That's mainly what the built-in "AI camera" feature is for. Technically I don't need it - I don't have pets, I don't leave stuff lying around on the floor, and I usually make it to the toilet on time.

I am curious though if I can model a dog turd out of something and have the robot recognize it properly....

Now you could probably attach a raspberry pi with a camera and a coral tpu to a cheaper robot, spend a week trying to get the TPU to work with its dependency hell (or use one of those cameras with object detection built in), and then probably not have much more control other than to pause the robot just in time. That might end up costing more than just to upgrade to a robot with poop detection that can automatically circumnavigate them.


In college, I had an internship at JPL writing software to help collate, transform, and combine pictures of Jupiter, for use with NASA’s JUNO mission.

My coworker and I created a GUI application in IDL (similar to FORTRAN), that would allow the user to open up several images of various wavelengths and combine them into a cylindrical map of the planet, showing its entire surface at a given point in time. After working on this for several months and creating a functional, and actually useful program, we realize that there was a blank space in the toolbar and we had no button that needed to be there. So we put in a button with a cat GIF that literally did nothing. We planned on having it do something jokey, but ran out of time.

I will always remember demoing this to my mentor, basically the world expert on all things Jupiter, showing him what the program did, thus justifying why JPL had spent several thousand dollars to have me as a research fellow. The disappointment in his eyes when he saw that dumb, useless, cat button was priceless.


> In college, I had an internship at JPL writing software to help collate, transform, and combine pictures of Jupiter, for use with NASA’s JUNO mission.

This already sounds incredibly cool. I wish I had had an opportunity like this sometime. Sadly, nothing.

> The disappointment in his eyes when he saw that dumb, useless, cat button was priceless.

Some people tend to have no humour. I think it's hilarious.


>The disappointment in his eyes when he saw that dumb, useless, cat button was priceless.

I once wrote a p2p filesharing app in college for a networking class, and I had put an easter egg in there where if you requested a certain file (lenin.jpg?) it displayed ascii art of a communism meme and started playing a midi of the soviet national anthem.

My little old networking prof sets down to test my program, and of course, that's the file she requested. She slowly turns to me, looks me in the eye and says 'be honest, you spent more time on that than the actual assignment didn't you?' ...'yes'. She shakes her head and mutters 'nerds!' under her breath, lmao


A decade and a half ago, I came across this beautiful bar in Bahrain (online) that was visually appealing to the eye with contrasty colors. I was so fascinated by it that I started writing a simple algorithm to just extract out the dominant colors in the image, just for fun, but mostly because I was so lazy to open Photoshop and pick the colors out manually.

Turns out, this is actually a real challenging task for computers - what the eyes perceive as dominant, computers do not and vice-versa. For example, if you draw a small circle on a black board with white chalk, take a picture of it and ask a computer, it will tell you black is the dominant color because it covers most of the pixels. Whereas, any human would tell you the white drawing is the dominant color because it stands out.

There are some ways of guiding the computer to get the color palette you want out of an image, but they are never as accurate. Over the years, I would from time to time, throw a bunch of images at it - ranging from portraits to beautiful flowers from gardens to see how my algorithm would perform and improved it bit by bit. I would say, it is close to 90% accuracy now and I still work on it over the weekends. It has no use cases so far (for me). It just exists as a pure passion project that got me excited about programming such algorithms.

Recently, I did a Fashion degree just out of passion and I realized this code has so much applications for things like making mood boards and color palettes from inspiration boards. However, none of my professors nor fellow students were impressed or saw utility in it because they believed no algorithm can match or replace a true creative process. They are pretty old-school about this, so, there's that. But, they just didn't seem to understand the technical challenge about this seemingly simple task.

However, over the years, I did build an API around this algorithm, kept fine tuning it and even made some marketing material for it. For no purpose other than reminding myself of why I am excited about programming.

If you're interested, here is a decade old snapshot of the algorithm's output:

https://ibb.co/SvYLLG3

https://ibb.co/tHKf9T8


Hey this is pretty cool! Have you thought about putting it online? I've occasionally used tools like Adobe's color scheme finder, where you upload an image and it suggests a fitting colorscheme derived from the photo. Though honestly theirs doesn't perform too well.

Yours looks like a nice improvement.


Thank you, I will soon :) I do have a newsletter I write about technical articles, please feel free to follow it, I may drop an article about this soon.

https://medium.com/build-ideas/newsletter


I'm replying because it's the first mention of Bahrain I've come across on HN. I spent the first 30 years of my life there.

Interestingly though, I've worked on similar algorithms before, some of which are in production.


Thanks, I've been meaning to check out that Buddha bar I used in the picture. I have a sentimental attachment to it, being my first entry into such programming and all. I even thought about laying low in Bahrain, seems like a really cool place.


I’m hear about that country at work often, mostly people traveling back talking about all the crazy expensive cars they saw.


That would depend largely on where you're comparing it to I guess.

One reason is that fuel is extremely cheap - I thinks it's only cheaper in Saudi Arabia and Kuwait. When fuel cost is almost not a factor then it basically becomes about which fancy car is affordable.

There's a huge wealth gap out there as well, and quite a tiny population. I would highly recommend checking it out some day. It's quite an interesting little island!


I’ve heard enough about the place that I’m not interested!


It's a cool problem. Did you ever see the pywal project? It has a few backends for generating palettes, I think the best is the imagemagick one in wal.py

https://github.com/dylanaraps/pywal/tree/master/pywal/backen...

Also, I guess dylanaraps has archived all his projects and taken up farming? Fair enough


> Also, I guess dylanaraps has archived all his projects and taken up farming? Fair enough

Seems the author mostly wrote Bash (and Python) code. Makes sense that at one point they just had enough.


Thanks, that looks useful. Will check it out :)


Fantastic stuff, this would be very useful in print art work I do.

For those further interested you see the issue this resolves by converting an full color image to an indexed image (often key colors, but low in total pixel count are neglected)


I'll add to the chorus of how cool and interesting this is, and how potentially useful. Got a newsletter?



When do we get part 2 of the speaker saga :D

Part 1 was fantastic.


I just wrote a script that uses 2 ultrasonic sensors + 1 raspy to detect if somebody is moving in one direction, so that I can put that in a giant green tunnel at the entrance of a video-game-themed party next week:

https://0bin.net/paste/GrfAHJRt#oqVtar1pUzqtdCWWzvEEK71mNlcd...

When the person walks in the tunnel, it makes the sound of Mario when entering a pipe.

It does nothing else. It's for one night only, and nobody will ever use it again.

Meanwhile, it's setup in my bathroom, because it makes me giggle when I go.

It's the little things.

I do have a timing problem, as for now the sound is triggered no matter the direction I walk.

For the same party, I made a "loot generator". You scan a QR code, and go to a page that asks you to enter some info. Then it generates what your own cadaver would loot to heroes if they killed you. Used that as an excuse to try Cloudflare workers:

https://loot-generator.drax2industries.workers.dev/

(It's in French and can get pretty politically incorrect)

Again, it's one-time use software, mostly for drunk people to have a giggle. Then it will disappear like tears in the rain.

Last year, it was a light-speed effect on a fake spaceship cockpit:

https://www.bitecode.dev/p/light-speed-with-python-and-js?ut...

Ephemeral software for the fun of it.


>> the sound is triggered no matter the direction I walk

if you use it in a bathroom, the easy fix would be to only trigger sound on odd detections. Unless you are in the habit of going in a bathroom with company or if there is another way out of the bathroom.

Your projects look like they bring delight into this world!


In the party, it will be used at the main entrance, but there will be multiple secondary ones so it won't work.

What I need to do is to move my ass and fix the timing.


About 10 or 11 years ago I wrote a bot that sat in our company Campfire chat training a Markov chain for each person. Then you could command it to imitate someone and it would spit out hilarious madlibs. This would likely not be amusing anymore, but back then it made people laugh.


This is so much fun. I did the same for a Discord server full of philosophy nerds, and the bot would say all sorts of things that started out profound-sounding and ended up absurd (one of our favorites: “I think therefore I am not italian”)


I've done this as well, and I keep meaning to re-create it.

The only thing stopping me is that every time I over-engineer the hell out of it, then get annoyed and stop.


I did the same thing with a webchat I made for a bunch of my friends (back before discord was a thing)! Lots of fun.


Around 10 years, in Italy a very populistic party was raising and he was leaded by a very stupid leader that used the social a lot. Then I wrote a Twitter bot (it was possible at that time) that looked like a militant of the party and that was trained over the leader's tweets (nothing fancy, just a big Markov chain). It was so funny when people, also high level of the party start liking and retweeting the bot posts, I ended having several thousands of followers just writing bullshits.

I would like to learn how GAN are working, then I scraped the official pictures of Italian politicians since 30 years and try to generate new faces with a GAN trained to this dataset. Unfortunately I need a lot of computing power to obtain an acceptable face, and I did not want to spend money for that.

Several years ago I wrote a Tinder bot to collect spam messages and malicious links. I stopped early because I got messages from several of people that I know personally in a relationship or even married


I wrote a program to launch and kill tight loop threads such that Windows Task Manager's performance graph would spell out text (though of course with spaces below lines in letters filled out).


Twofer

I wrote a flame simulation in x86 assembly language. Total hoot.

I also wrote an Easter egg that shipped in a major software company’s software and is immortally burned onto thousands of DVDs slowly rotting in landfills. This one was fun and challenging because I had to mask the names of the product team from easy detection, I had to convert string text to my own custom 8x3 pixel font for rendering, I played with palette animation to create some fun raining effects, and I packed it into just a few Kb of the DOS end of a Windows executable (back in the day, 16-bit Windows apps could be linked with a custom DOS loader in case you tried to run the Windows app from the cmd line).


I loved doing some particle simulations in C++, good old mode 0x13 style. Create a gradient palette, apply simple averaging of pixels values on each frame, draw each particle with additive translucency, and you ended up with a pretty cool water-like effect.

Add some gravity and bitmapped obstacles (invisible of course to maximize the effect), and you had some real potential for nifty, if mesmerizing effects.


What kind of trigger did it have? some kind of key sequence or certain day of the year?


You passed a phrase on the command line. Honestly I made it all too hard to find, but Easter eggs were a bit dangerous for one’s career :)


I once coded a machine that could make photo-books of your neighbour's living rooms.

It was inspired by Ed Ruscha's "34 Parking Lots in Los Angeles" artist booklet from 1967, and the output looked pretty similar, but with photos of domestic interiors instead of parking lots. So far so ordinary, but the difference was that you could tweet any UK postcode at the machine and a couple of minutes later it would spit out a custom-generated, printed-on-demand booklet of living rooms in that neighbourhood.

The way it worked was when it received a postcode, it went to Gumtree (popular UK second hand listings site) and looked for second hand sofas for sale within a radius of 1km. It then scraped the photos, imported them into a document, generated a PDF on the fly and sent it to a laser printer with a built-in binding machine. The results were insanely good. Always hoped I'd get to show it to Ed Ruscha one day.

The project was commissioned by the Victoria and Albert Museum in London, but still kind of pointless from a utilitarian point of view :)

[1] https://gagosianshop.com/products/ed-ruscha-thirtyfour-parki...


Little projects like this are what keep me going. These days this sort of creative effort goes into the games I make, but in years gone by:

favemoji (2017) - a Safari extension to add emoji to the site title because Safari didn't (doesn't? I forget) show favicons in tabs.

Inbox Zero Fanfare (2013) - played the Macintosh trumpet sound effect when you reached inbox zero in Gmail. I was as much proud of the icon as the code: https://twitter.com/gingerbeardman/status/177626190098190342...

Bender (2012) - a game made using only CSS transitions (and a tiny bit of JavaScript to manage game state). I recently released a remake for Playdate handheld, both here: https://blog.gingerbeardman.com/2024/10/08/bender-2-bend-har...

Speak Lolcat (2007) - English to Lolcat translator, based on fairly simple heuristics, took me 30 minutes and made some nice Google ad revenue. It's still up! https://speaklolcat.com


https://hidden-inu.vercel.app/ All it does is open a little flap in the page where there's a 3D dog. There's some sound effects on desktop.

https://github.com/jpwhitaker/candidCamera , its a QR code that when you scan it, it takes a photo of you from across the street and displays the picture on your phone when the page loads.


A combinator reduction evaluator with a translator from lambda calculus to combinators. The creative part was getting a C compiler to parse combinator expressions with the traditional syntax, where function application does not have an operator and is left-associative, like S K K. http://www.ioccc.org/years.html#1998_fanf


Winning an IOCCC contest is far from being useless though:-)


Hey, I've seen some of your IOCCC entries. Even had some fun trying to understand them back in the day.

IOCCC gang rise up. This is mine: https://www.ioccc.org/years.html#2005_persano


Somehow, I have a rather small one: https://www.ioccc.org/2012/kang/kang.c

I think I have submitted once or twice before that got won, and all other entries were excessively long to be honest. Guess a conciseness is a virtue.


> Guess a conciseness is a virtue.

Indeed; quoting from my winning entry [1] that same year:

> This program celebrates the close connection between obfuscation and conciseness, by implementing the most concise language known, Binary Lambda Calculus (BLC).

> The submission implements the universal machine in the most concise manner conceivable.

[1] https://www.ioccc.org/2012/tromp/hint.html


I had a script that would rotate my profile picture in Slack by one degree everyday. It take a surprisingly long time for people to notice.


This is where you tell us how many degrees or days right? Right?? We need to be able to repeat the experiment, for science!


Facebook once allowed users to draw directly on a friend’s wall. For a friend’s birthday, I developed a tool that recreated an image pixel by pixel on the canvas. The entire process took about an hour to complete. I doubt anyone realized the effort behind the post, as to most, it probably just looked like a regular image upload.


For me it is for instance my involvement in the demo-scene in the 90’s.

A concrete example is Nikki, a demo released in 96 and captured (with some technical difficulties) by a friend here https://youtu.be/t8o-uuq73UU?si=4dlTla0s2mDCVzCK

Working on anything “useless” is profoundly life changing and “useful” on the long run!

Only now am I able to do more similar stuff (my current research is around music + code + lightning and videos, this time connected to real life performances), and it is massively pleasurable (and also likely one of the most technical types of work I will be working on for now!)


Yeah the demoscene jumps out as a good candidate to represent "creative 'useless' programs". :)

I make a few demos, but my personal favourite was this 4k (windows executable less than 4096 bytes):

https://www.youtube.com/watch?v=sBcwQCBpEiE

It uses all the fancy compressing linker tech (called crinkler) along with a tiny music player and a glsl raymarcher.

I tried to download it but all I get is virus warnings now... I guess malware devs also like crinkler. :(


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!


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.)


That's horrifying, lol.

That reminds me of this:

https://xkcd.com/1172/


Many years ago, I wondered how Ken Thompson's 1968 ACM article on implementing regexes in IBM 7040 would look in x86. Ken uses two lists for current and next backtracking and I replaced one of them by the call stack (interleaving call and ret in weird order). I remember struggling with some assembly syntax (AXC **,7 as it were) so I emailed Mr. Thompson! And Ken, ever the gentleman, took ample time to reply to a no-name n00b! Several years later, Russ Cox of Go fame somehow heard about my silly hack, reached out, and included it on his page about "Implementing Regular Expressions" (https://swtch.com/~rsc/regexp/).


I'm a lover of esoteric languages, and Piet[1] captured my imagination more than any other. So, I wrote a compiler[2] for the language, eventually writing a backend that re-targets Piet itself.

And since I love code golf, I wrote most of the compiler in the extremely tortured form that only fellow golfers can love. But I balanced the golf with extensive comments, as a bit of an experiment on the varied advice that we programmers receive about comments. Do they help? Can I keep them current as the code beneath them changes? (Jury's still out on both, but I find the juxtaposition aesthetically amusing).

Just recently, I made a friend! And by "friend" I mean that another human has written another Piet compiler[3] and it's a beautiful project and we were delighted to discuss our tortuous projects that we wrote for pure fun! So I've gotta plug his compiler too -- it's written in safe Rust! Too cool!

[1] https://www.dangermouse.net/esoteric/piet.html

[2] https://github.com/boothby/repiet

[3] https://github.com/pwang00/pietcc/


Back when the web was more open, I built a small page which displayed beautiful watercolor maps from Stamen and started listening for location based updates on Twitter, Flickr, Foursquare, instagram and possibly more. Every time an update came in, a small icon would drop like a raindrop onto the map. Hovering it would show you the contents.

I thought it was very pretty, and I remember keeping it open throughout the day, watching how instagram photos from POIs gave way to photos from food and eventually party pics as the day ended, and how foursquare checkins in pubs and clubs increased as it got late.

It’s sad that building something like this is no longer possible.


I once spent a load of time making a "galactic civilization simulator" (in C!).

First it spawned a galaxy of stars using RNG.

Then it seeded civilizations at different home stars throughout the galaxy.

Then it iterated an algorithm to show how they spread, settling more and more solar systems, expanding outwards. After a certain number of centuries, solar systems became "decadent" and stopped seeding other solar systems (I showed this by rendering them a darker shade of color). Systems that bordered those of another civilization had to reach a certain high population threshold then they were able to "take over" neighbors, but IIRC I coded it so that didn't happen very often. There wasn't any real diplomacy or war system like in real video games.

I would make some tweaks to the algo, then rerun the sim, and watch the civs spread out slowly in real time. It was pretty.


I bought the domain http://ftp.computer because it made me laugh.

I set up the site using an MS-DOS stysheet. It had a single button and it said “feed me”.

Clicking the button let you upload a file. It would spin for a while and then say “thank you, I am sated”.

In the background it would chop the file up into 140-character pieces of base64 and then tweet them out in order. There was also a Slack bot that would reassemble files for you by scraping the Twitter feed.

I did all of this because it was the dumbest thing I could think of that day.

I wish it was still up, but the domain was $65/year renewal and it wasn’t that funny to me.


A script which replaces all comments in a file with confusing yet plausible-looking alternatives - https://github.com/tiniuclx/CommentCPP

I did this seven years ago - way before generative AI came around to do it in twice time and 1000x more expensive ;)


Hahahaha amazing!!!


A fast paced startup founder simulator (https://sillycovalley.com)


very well done!


I had created a program that would listen to my keystrokes and then draw a different shape on each keypress in a canvas, some keys would fill colours, others would change size of an existing shape. It could also insert images from a defined folder.

I could "start" and "stop" by pressing a hotkey. At the end of it, I would have a random art generated.


I found the GitHub repo too although I am a little embarrassed by the code now

https://github.com/prashantsengar/randraw


Back in the Flash days, I had a signature on a forum with a small (like 120x40) SWF file in it. It was a little "city builder" game where you could place different types of stores, and the goal was to earn as much money as possible. It would save the state to local storage, so you could continue in other comments I placed.


I had a hypothesis that any song could be a Christmas song if you just add jingle bells to it. I don't know if I proved that, but I created a website to test it out: http://jinglefy.me

Forgive the lack of SSL certs. It works on chrome if you "Proceed Anyway". I think it has issues on mobile though, and please also forgive the no-longer working Twitter links - I haven't done anything with this site in years!

One unexpected challenge was that, because I encode the entire jingle-bell playback info in the URL parameters, the URLs became very large. So I created my own url shortener (123fwd.me) for use when sharing your jinglefied videos. Here's a jinglefied version of Gangnam Style I created back in the day: http://123fwd.me/16MbXts

After this, I decided to create http://fartify.me based on the same engine. You can probably guess the purpose of this site! :D

Have fun, and I'd love to have you share your own jinglefied or fartified creations here!


This code[1] takes a Gevey[2] phrase (eg: Ganexlje tots qibate vuiteerjat, yu vaelaem vosubz djaont nexljate veihat. Ûdx leugxoisqeu veihakjeu seti, sneinov galeugxe árj mondz dxeute tadiljt.[3]) and turns it into a string of letters that can be displayed by my Gevey native script font[4] in a browser.

[1] - https://github.com/KaliedaRik/gevey-2023/blob/main/src/lib/n...

[2] - My constructed language. I started working on it after my first week of French lessons, at which point I decided: "I can build a better language than that!" - 50 years later I'm still working on it and, no, it's not better than French ... yet.

[3] - The builders worked very quickly, they easily built a bridge over the river. Travelling is easier now, but not enough travellers stop here anymore.

[4] - https://github.com/KaliedaRik/gevey-2023/blob/main/static/fo...


Solving the Dining Philosophers problem using systemd

It gave me the chance to play with some old unix concepts in an nspawn container.

https://github.com/brightbox/systemd-dining

As well as incorporating the Philosopher’s Song and some profound statements into the journal.


I think most of the stuff I make falls into this category...

My favourites are probably these two:

- a tool I made called gif-to-ansi (https://dom111.github.io/gif-to-ansi/) which converts an animated GIF to a stream of ANSI escapes in a shell script. I made this because I wanted to loop a GIF image in terminal when I mistyped a command to train me to do better typing.

- a 26 "language" polyglot (https://codegolf.stackexchange.com/q/209669/9365) where each starts with a different letter of the alphabet and prints out the alphabet less it's starting char (e.g. Bash prints out ACDEF...). This was just a puzzle that nerd sniped me, I really enjoyed it though and even got to learn a little APL for it, as well as brush up on shells. I highly recommend using sites like this if you want to explore a languages depths, I used it to learn Perl for a previous job and still play around in Perl today!


  > I made this because I wanted to loop a GIF image in terminal when I mistyped a command to train me to do better typing.
Have you seen `sl` and `gti`?


Exactly the tools that inspired me:

https://github.com/dom111/gut


A Ai bot that lives on a phone number. You can call the number to talk to it and ask it questions, however all of it's answers are sandwich related and it attempts to solve any problem presented using sandwiches.


I love this idea. It makes me think of an alternative universe where urls and websites were never invented, and everyone has to interact via a dumb phones with a phone number and txt messages (maybe WAP exists...maybe).

I might try taking this further :-)


Love this concept :)


github?



I have not yet done this. None of the code is complicated, however the setup is a bit (needs an asterisk server, a trunk with a voip provider, an openai account, a text to voice service).

The actual code is quite simple. It's all just glue on the above.

I'll start a repo for the script and some instruction, though.


I like to write a lot of little programming interpreters and compilers that don't have a whole lot of purpose other than to experiment with a concept. One of these was a little language I called Triad ... an esoteric programming language that used three-letter identifiers because I could quickly treat them like a base-26 int and index an array of 17576 entries, avoiding having to use a hash table implementation.

You can see the C source code for a simple command interpreter that permits three-letter subroutine identifiers here.

https://github.com/jimlawless/triad

I have some other versions that had placeholders for built-in operations that would have made the language Turing-complete but I soon lost interest.

I also implemented a little BASIC interpreter that was only complete enough to write a BASIC program to display the lyrics for the 12 Days of Christmas song:

https://github.com/jimlawless/lazybasic


I made a todo app in a mixed up tech stack (nextjs Backend, Go Frontend, Postgres in the browser): https://github.com/refactorerer/least-toxic-todo-2024

I was probably furious about web development again, so I thought maybe it's fun to do something completely crappy and broken by design on purpose.

It was really fun to do, but I also wanted to challenge myself in writing about it. I do not think that this satire project/article did a lot to improve my writing, but hey at least I did it and finished it. I do think however that it could have become much funnier had I put a little more effort into it. Also tried to get it out there by making an X account and engage with the htmx guy, but I learned that my X game is too weak and I gave it up afterwards.

I definitely want to do some project like this again, I like the idea of doing something useless and/or plain wrong.


Bravo! I love the principle you approached this with, and would like to see more examples of these anti best practice projects that still work (all-be-it in a limited context). Tech should be fun, and as my old man use to say "there is more than one way to skin a cat". Keep it up.


Recently did a standup comedy app where an AI laughs at my jokes: https://github.com/btahir/standup-comedy


Last year, I went for an explicitly useless project of this kind, which would probably qualify as an "elaborate ASCII art generator": ray tracing into ASCII graphics, in Emacs Lisp [1].

Afterwards, after (or during?) AoC 2023, inspired by both that project and AoC, I wanted to work on something similarly fun and useless, and composed a RISC-V emulator in Emacs Lisp [2] (RV64GC, but with unfinished floating-point operations; emulates a few Linux syscalls, so can run some programs, like dash).

Other exploratory and educational projects tend to be pretty useless as well, but not always so explicitly, and then questioning their usefulness may spoil the fun.

[1] https://codeberg.org/defanor/3d.el/

[2] https://codeberg.org/defanor/rv.el/


I was learning how to work with Cloudflare Workers and implemented something called a Pixel Mosaic: https://rishikeshs.com/mosaic/.

It's a live pixel mosaic where anyone can change the color, with the color being chosen randomly, so the chances of two adjacent tiles having the same color are quite low. I also log the country to see where people who have clicked it are from.

I am currently working on a desktop 8x8 LED grid to sync the same pattern on my desk.


Love this! I think I'm going to make something similar, I especially love the RL part. Thanks for sharing!


Thanks a lot!


I recently managed to fit Loader's number, which is about the largest finite number ever conceived of that's still computable by a small program, into a mere 233 bytes of code. No practical use except as an entry in golfing contests [1].

[1] https://codegolf.stackexchange.com/questions/176966/golf-a-n...


Most recently https://akkartik.itch.io/carousel/devlog/800017/interactivel... was extremely memorable. We've all seen fractal zoom animations. But have you been able to zoom in on a touchscreen?! I hadn't and it was surprisingly delightful.


A while back I wrote this useless site where you put in a string and it gives you a Ruby one liner to output that string.

https://monkeynumber.xyz/

i.e. "bird" gives you

ruby -e "srand(267343);puts 4.times.map{rand(97..123).chr}.join"

which will return "bird" if you run it from your command line

I do a brute force attempt at it, but (maybe one day) will peel back Mersenne Twister and get a more optimized implementation.


I wrote a kaleidoscope simulator. You know, a virtual tray filled with hundreds of little plastic beads of various shapes and colors that tumble around when you press the keys, with the camera displayed on a grid of triangles. I wrote it in Rust using Bevy, which was great, but it wouldn't work in WASM for some reason (simpler projects did just fine) and getting it running in the browser was the goal so I uh dropped the project.


When working for a bank we had daily jobs where we had to input the date of the previous working day manually. This led to some human errors.

I wrote code that automatically calculated the previous working date - including those floating dates around Easter.

I generated calendars for future years to compare to know calendars to prove no discrepancies.

My code worked. My management did not understand how it worked or how it could work.

We continued using manual input.


That's dispiriting.


I learned in college Geometry class that you can transform a square to an equilateral triangle in 11 cuts or so

So I wrote a matlab program to draw the shapes, and cut them out, and it works

It’s mathematically exact, not just approximate

Still surprises me after 20 years, so I want to find this old program again lol


The dissection of a square into an equilateral triangle (or vice versa) is sometimes known as the haberdasher's problem, and can be done in three straight-line cuts.

https://mathworld.wolfram.com/HaberdashersProblem.html


Hm interesting, I thought it was 11 pieces, not 11 cuts, but that one looks like 4 pieces, which is surprising

Now I am more curious to find this program

Either I didn't do it optimally, or there is some variation like a triangle/rectangle/square

I think there are some problems that have 3 shapes, or it could be triangle/pentagon or something


TIL that Gavin Theobald has produced several dissections from a triangle to a square on the surface of a sphere. Which would make pretty cool 3D-printed desk gizmos: make a ball with a triangular sector removed from one pole, a square sector removed from the other pole, and a set of wedge-shaped pieces that can be used to fill up either hole.

http://www.gavin-theobald.uk/HTML/Spherical/T90-S112.5.pdf

http://www.gavin-theobald.uk/HTML/Spherical/T100-S120.pdf

http://www.gavin-theobald.uk/HTML/Spherical/T120-S135.pdf

http://www.gavin-theobald.uk/HTML/Spherical.html


This got a downvote and I wonder if it’s from a person who doesn’t think it’s true


Or perhaps from someone who doesn't think it's useless


It more likely s from a person whose fingers are much larger than the distance between the up/downvote triangles on their device (that’s about everybody)


Indeed, although note that if you do fat-finger the up or down vote button, you can undo that by poking the 'unvote' or 'undown' link that appears on the same line.


Some men just want to watch the world burn.


I trained a Markov chain on a rushed project's JIRA backlog and created a game for our team celebration. The game, playable on a Zipit Z2 handheld (think GameBoy SP with a keyboard, ran Debian), challenged players to distinguish real tickets from Markov-generated ones. Its popularity, even among executives, underscored my point: the tickets lacked utility.


I have a web zine filled with this sort of thing. Some more details if you view source. If anyone is interested in contributing, pitch me in an email.

https://freezine.xyz


This is marginally useful, but I wrote a small ‘subleq’ playground — it’s an instruction set with just one instruction, “SUBtract and branch if Less-than or EQual to zero”.

https://github.com/incanus/subleq

It was fun to see how simple a model of computation could actually be.


Some people wrote a Forth interpreter on top of that.


Oh, this is totally also my jam. Will dig some of those up.


gopher://hoi.st has nice stuff for subleq and awk


JS library to encode IP addresses as haiku

https://github.com/gabemart/hipku

demo is long since dead but the lib is just a file, should still work

edit: demo - https://jsfiddle.net/wyf9zmk4/


Better than What Three Words!


I have written a lua interpreter in JASS (the language used for WarCraft 3 maps). It's useless because at that point WC3 gained native lua support.


Using a a Ruby script called blinken I plugged to my makefile to blink specific patterns ont keyboard's led's to indicate that the build was "busy" led's running from left to right. Broken build: "the 3 led's scroll-lock, num-lock, caps loc flashing slowly" Build ready "the 3 led's moving to-and-fro like a Cylon" I was working on firmware for KVM's to support key-codes for all many languages. The test team was not happy with me. :( Quit messing around! They said.


Writing programs that play games for me.

I enjoy that more than playing the games.


Peter Norvig's post on solving sudoku puzzles helped kickstart my love for programming

https://norvig.com/sudoku.html


Quite a fun hobby. What game you working on now?


Card game that was revived from Flash to Unity.

https://elementstherevival.com


Useless but fun way to send messages to friends (e.g. during the holidays): https://github.com/webgl/fireworks-text

Demo: https://webgl.github.io/fireworks-text/#%7B%22name%22%3A%22F...


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.


Someone made an ASCII art bonsai generator in bash, so I ported it to a few lines of JS. Then I made it animate the growth :)

http://web.archive.org/web/20200512153032id_/https://andai.t...

There's no "restart" button, but each refresh produces a unique tree.


Just a caution for future clickers: This caused my mobile browser to spawn a bunch of print windows and was pretty annoying to exit.


Which browser are you using?

It seems to be because I named the function that displays output print(). But it should shadow window.print(), and in most browsers it does, so I don't know what's going on!

(At any rate, this is a web archive snapshot from 2020 so I can't update the code!)

Could you try a different browser? It's not much, but it might make you smile :)


Here, I renamed the print function, that should fix the bug.

https://jsbin.com/seraputuve/edit?output


I wrote a CHIP 8 emulator using C.

At the time I wanted to learn C but it led down a rabbit whole of algorithms and graphics programming (I used raylib and later SDL) and some immediate mode GUI (nuklear and another one I can’t remember) and it was TONS of fun and incredibly educational!

It kind of reminded me what was it that I actually liked about programming, that is, learning, applied said learning into solving problems and creating things!


I once wrote a game with no graphics or sound. It was a maze game: you were supposed to lead a mouse cursor through an invisible maze by touch. If you drive your cursor into a wall, it stops. You start at the bottom, and if you manage all the way to the top - you win.

Well, it's not completely useless. If you're extremely bored at work and don't want to draw attention, this could be your time waster of choice.


Explore this idea further, it would make a good tool for mental visualization and memorization as one would have to memorize and construct a mental image of the maze in order to speed up the solving, neat idea!


Given that this site is called "Hacker News", it's worth mentioning that '"useless" programs - pieces of code that serve no practical purpose but are fun, creative, or challenging to write' is one of the central definitions of ”hack”.

I've written some: a programming language interpreter based on Abadi and Cardelli's untyped ς-calculus; a two-kilobyte web server in assembly (which accidentally did turn out to be useful); a self-compiling compiler from a sort of Forth dialect to i386 ELF executables; a translator from standard English orthography to an ASCII alphanumeric phonetic orthography I designed; a one-kilobyte programming language interpreter with dynamic multimethod dispatch and pattern-matching; a base-3 calendar based on the Sierpinski triangle; a C interpreter in Python I used for bytebeat livecoding; several implementations of Tetris, one of which is a 2K ARM executable; an operating system for ARM consisting of five instructions; a few raytracers; a Space Invaders game; a minimal roguelike in Forth; a library for manipulating Boolean functions as Zhegalkin polynomials; many symbolic differentiators; a sort of polyrhythmic drum machine called Pygmusic; a parametric CAD system in PostScript for laser-cutting MDF; 3-D rotating objects in ASCII art in 20 lines of Python; Karplus-Strong string synthesis in one line of C; an audio PLL in one line of C; an RPN calculator with forward-mode automatic differentiation; a slide rule in Tcl/Tk; a port of the logic-programming EDSL μKanren to OCaml; several fractal renderers; a decoder for the "gridfonts" Hofstadter and his research group designed; a Hershey font decoder; several maze generators; a generator for balanced-nonary multiplication tables; a vocoder; a Doom-like first-person raycaster; a teapot mod for the Minetest game; a compiler for a subset of Scheme written in itself; etc.

A lot of this is in http://canonical.org/~kragen/sw/dev3/ which you can clone with Git. I'd be happy to elaborate on any of these if you are interested.


> a Space Invaders game

> a minimal roguelike in Forth

> 3-D rotating objects in ASCII art in 20 lines of Python

> an RPN calculator with forward-mode automatic differentiation

Those all sound pretty cool. Are those in the link you provided? I'd be interested in seeing how you did the 3-D rotations in only 20 lines, or what a minimal roguelike in Forth would look like.


Thanks! Two of them are there! Or, sort of, three of them.

The Space Invaders game is http://canonical.org/~kragen/sw/dev3/qvaders.html, built on the game engine in http://canonical.org/~kragen/sw/dev3/qj2d.js. An earlier version without the engine, the explosions, or the Xbox support is at http://canonical.org/~kragen/sw/dev3/invaders.html.

The minimal roguelike is http://canonical.org/~kragen/sw/dev3/wmaze.fs. It runs in a few different Forths (GForth is probably the easiest) but I haven't ported it to F83 yet. There's an asciicast at https://asciinema.org/a/672405. I'm kind of a novice at Forth, so I might not be doing things in the best way.

The ASCII-art rotating cube is http://canonical.org/~kragen/sw/netbook-misc-devel/rotcube.p.... It's actually only 15 lines of Python. A longer wireframe Unicode braille version is at http://canonical.org/~kragen/sw/dev3/braillecube.py with an asciicast at https://asciinema.org/a/390271. There's also a 41-line C++ ASCII-art version at http://canonical.org/~kragen/sw/dev3/rotcube.cpp and a 42-line semi-wireframe C version using my graphics library Yeso at https://gitlab.com/kragen/bubbleos/-/blob/master/yeso/cube.c.

The RPN calculator is at http://canonical.org/~kragen/sw/81hacks/autodiffgraph/.


Thanks! I upvoted you but forgot to reply. Those are as interesting as I thought they'd be.


Awesome, I'm glad you liked them!

I probably should have said in my original comment that the 3-D rotation itself was only 3 of the 15 lines:

  s = 0.1                                 # sine
  c = (1 - s**2)**0.5                     # cosine
  ...
  cube = [(c*x + s*z, y, -s*x + c*z) for x, y, z in cube] # Rotate by theta.
The rest was ASCII art, animation, perspective projection, and geometry generation.


> which accidentally did turn out to be useful

I hate when I'm having fun and accidentally make something useful :)


It was more that I thought the approach I was taking would doom it to being uselessly slow, but it turns out Linux is actually pretty fast at forking, especially when your process's entire memory map is 20K :-)


Just as a note, also to myself ;), the CAD stuff seems to be hosted in laser000.ps. Nice demonstration what PostScript is capable of!



I wrote a 64-bit clock that would just flip one bit on a 64-square grid every tenth of a second. I was kind of happy that at some point in maybe a few billion years, that clock would show a smiley face or something like that.

This is also how I got to read about Beckett-Gray codes. Needless to say I didn't find a 64-bit Beckett-Gray code, though I did try a little bit.

The thing ran in Flash, so, that's that.


"The Matrix" raining characters, but really bad, and in Bash (:

https://www.evalapply.org/posts/bad-matrix/


Oh man that brought back a memory.

I once had a job operating an ibm mainframe. it was the night shift of a low tier job mainly feeding tapes to the machine. I would spend the downtime reading the documentation for what was for me a foreign system. The mainframe.

This system was set up as vse(a batch processing operating system) over z/os, however the operators would login to cms(a more interactive operating system) on 3270 terminals.

If unfamiliar with 3270 terminals they are very different than the VT style terminals we tend to use. the main difference is VT terminals are in a sort of immediate mode(they print to the screen and read from the keyboard asynchronously) 3270 terminals are more like a html form, you fill out the form and send the whole thing to OS.

My great useless task was to build a matrix rain screensaver on the 3270, This is not trivial, the 3270 does not want to do this, I had to figure out how to spoof an immediate mode, I got it half working, I could print to the screen async like but I could never figure out how to read from the keyboard without blocking.

Once I had my async tty library, my next great useless task was to make an analog clock screen saver. This was it's own pile of worms as rexx(the cms scripting language) had no trig functions. I was smuggling in printouts from the nist library of functions on how to calculate sin, tan, pow... etc... and ended up writing some of the worlds slowest trig and exponential libs.

I think the nist library was this https://dlmf.nist.gov/ I have a great, perhaps unwarranted respect for nist to this day for providing this amazing resource.

Unfortunately I was not able to save any of my code from that job, I would love to look at it again.


Wow that's a great story; thanks for sharing! If you have a blog, please copy-pasta this there. It needs to live!

This made me chuckle... it is how all great hacks begin.

> "This is not trivial, the 3270 does not want to do this"


I made a thing called genact that pretends to be useful but actually isn't doing anything at all: https://github.com/svenstaro/genact

There's also a web version! https://svenstaro.github.io/genact/


This is great!


Back in the 90's, I worked in a shared office and my desk was right by the door. I had a random little clip-on webcam, and at some point I wrote a small program that - with the camera facing the door - would detect when someone came into the office and then play the "Police Academy" theme music at blasting volume through the speakers.

Don't ask me why.


I wrote a bot / agent in Go that after installing it once in an AWS EC2 instance would starting checking and bidding on AWS spot instances and replicate itself there.

It would check the API, “buy” a spot instance and inject a startup scrip to download itself.

Totally useless. But fun.

Code is here: https://github.com/tnolet/tatanka


I'm predominantly a backend Python Web developer, and I implemented a match 3 engine in Pygame.

See example gifs on my blog here: https://johnscolaro.xyz/blog/pygame-match-3

When I say "match3", I don't mean "candy crush" style, I mean more like "YMBAB" or "chuzzle style".

The main learning I had was how much more "stateful" a game is vs something like the backend of a webserver. I'm used to writing code with no/few side effects, but when you're juggling 50+ gems in different states of falling/idle/ exploding, different frames of animation, and different states of user input, it made me thing differently about state, testing, and probably exposed me a little to the problems gave devs grapple with day-to-day.

I have a lot more respect for the original creators of these slightly modified match 3 games like "Chuzzle".


Many years ago I wrote a text editor in brainfuck. It wrote out the file in memory as the user typed, and it'd shift its data structures successively farther in memory to avoid overwriting them as it went. A friend gave it one of the best compliments I've ever received and called it beautiful after watching it execute in a memory editor.


I once worked in a fun office, where there was a prank war.

One lady was particularly prolific. My coworkers, to try and get revenge, said they enabled the Windows Messenger service on her machine when she left it unlocked once (the one you send a network message, and it shows a popup dialog). She wasn't particularly technical, so this was going to be a good thing to exploit.

I wrote a VBScript which did a GET on the (seemingly now defunct) BOFH excuse server: https://pages.cs.wisc.edu/~ballard/bofh/

And it parsed the page, and sent the message to her computer. It didn't just do it at some interval, though. It would only do it during her normal working hours, and it would use rand() to pop one up at different intervals, no more than 3 an hour, and no less than one an hour.

Drove her crazy for a day.


react-lang-selecta: https://github.com/MarcAbonce/react-lang-selecta

A language selector component that shows random (but still accurate) flags for each given language.

So if you give it, for example: English, Portuguese and Chinese it might render the flags of South Sudan, Macau, and Macau.

I always noticed how websites sometimes pick arbitrary flags in their language dropdowns even when they're not even trying to represent those specific regions. Wikipedia even has an article describing this topic: https://en.wikipedia.org/wiki/Flag_icons_for_languages

So I thought about making a React component lib just to make fun of that idea. It's not that creative nor good but I had fun writing it.


Can’t believe it’s been a decade since I built this stuff… but I used to enjoy recreating futuristic UIs from movies. Tons of fun, wish I had time and energy for this type of play still.

E.g. https://github.com/arscan/encom-boardroom


One of my first programs was a number puzzle. It would present the player a string of random numbers. To solve the puzzle you have to write a math equation that uses all the numbers in order. For example, for the numbers

97424

One solution is

log(9)/log(7-4)=-2+4

I wrote the program because i used to play the game in my head with the number on clocks and other things.


I have written a comfort and ux feature rich winforms application that is a completely borderless image viewer named ComfyViewer. You can move the images you opened around as you desire, ignoring any bounds of the screen and without resize limits. The window is also borderless! I reimplemented the whole resize logic from scratch with the windows api. Additionally it puts the image in its window thumbnail. It really was my winforms mastery project.

The thing is I really like to goon, especially to still images of a certain topic, like bearded, muscular red haired men. That‘s why I need a „collage“ of still images, maximising window flexibility and minimising waste of screen space to enhance the pleasure.

It has a „close all“ button, so you don‘t need to go hunt down the 4, 6, 8, 10? windows of images you finished with.


I used to write very short programs for the Amiga that would scan through all the pixels on the screen and assign a color to them based on whatever math functions I felt like writing. They took hours, sometimes days to run, but the results were often interesting, sometimes radial gradients, sometimes random noise, sometimes things that looked like musical notes on a random background. Then I'd load a color table and color cycle the resulting image. Sometimes this created movement in the image, sometimes it animated the noise so it looked like old-fashioned TV static. Just did it for fun, only took a few minutes to write the code, and sometimes the results were great. It was often very difficult to predict what the final image would look like, unless I started with a program I'd run before.


Reminds me of this old thread of algorithmic logic art I have bookmarked https://twitter.com/aemkei/status/1378106731386040322


I have a repository where I make classic programs (game of life, sudoku solver, brainfuck interpreter, etc) but entirely within Typescript's type system

https://github.com/ruyili/cursed-typescript/


> anything from elaborate ASCII art generators to programs that solve imaginary problems

I did a little of both with https://asciitabs.com/random - trying to learn some basic music theory and improvisation with guitar and thought maybe this would be a good way to help out.

Actually WRITING the program did indeed help memorize the spacing of notes and general pattern of scales. But it was one of those "write it to throw away" moments where now that I have written it... well it's fun to look back at and click a few times!

But I have to chuckle in hindsight to think that the way to "improvise on a guitar in a way that sounds good" is anything other than just hours and hours of practice


Speaking of "99 Bottles of Beer on the Wall" I wrote a version for Prodigy when I worked there in the 1990s, using their proprietary language named PAL: http://www.99-bottles-of-beer.net/language-PAL-528.html

It never appeared publicly on Prodigy, of course, but it was fun to run on my dev computer.

Also in the early 1990s I wrote a command-line program to generate anagrams. I spent a ton of time on it, adding all sorts of features and optimizations, and used it to find some really interesting anagrams of celebrities: https://www.kmoser.com/anagrams/


What anagrams does it produce for "Jeremy Irons"?


You can download the binary and run it in a DOS emulator to find out! Or compile from the source linked to on the page.


I will check it out, but it was a reference to an old Simpsons joke: https://www.youtube.com/watch?v=QhmtXpWsAdU


Great thread!

I wrote stack concatenative language while learning AWK https://github.com/fairplay/sisyphus and it was one of the most pleasant programming experience in 2024.


Hi guys, I made a completely multiplayer programming game for C++ and python, started it to learn graphics, multithreading and all. ended up creating a small game engine for my game (included a lot of game maths), learnt multithreading and multiprocessing deeply. the game is originally programmed in c++, so had to do everything from scratch. Later ported it to python using pyBind11, wrote the langauge bindings for python. For the multiplayer part, which took the most of the time, ended up creating my own networking protocol( over UDP) according to the game needs. you can see the project here at my website: https://aiplaygrounds.in


I devised a grammar for arithmetic expressions which is less readable than either standard or RPN notation.

Basically, an arithmetic expression is a tree. Standard notation indicates the shape of the tree with brackets, RPN by listing the nodes in the order of a particular tree walk. My notation visually indicates whether each node is connected on the right or left. Examples:

Standard: 1+2

RPN: 1 2 +

Tree: 1'+`2

Standard: 1*(2+3)

RPN: 1 2 3 + *

Tree: 1'*2'`+`3

It looks a bit nicer if ' and ` are mirror images in the font you are using, but it's still not very readable. I did hope that you could leave the tags off leaves and only put them on operators, but this isn't sufficient to make each tree shape unique.

The idea was just to find something visually interesting*


I made a clock out of MNIST digits that are obtained travelling the latent space of an autoencoder:

https://www.jerpint.io/blog/mnist-clock/


I highly recommend js13k (https://js13kgames.com), an annual game jam where your entire game must fit in 13 kilobytes. The tight size limit forces you to get creative with optimization - think procedural generation, custom minimal engines, and code golf techniques that actually matter. While the games might be "useless" in a practical sense, you'll learn more about low-level JavaScript optimization than from most serious projects, all while being part of an incredibly supportive community that loves sharing tricks and tips.


10+ years ago, a large corporation ran a smallish web-shop for their B2B segment with just about 20 articles. So one would expect the front-page of this shop, listing like 10 products, should be perfectly quick. OK, it wasn't. Reason was a strange policy that required this particular PHP based CMS/shop system to run on a Oracle database (for wich it definitely was not optimized). As moving to e.g. MySQL was denied, we needed to get creative.

In the end my "useless" program was curl or wget, executed by a cronjob to fetch that web-shop to render the front-page over and over again every few minutes to keep the caches of the application warm, resulting in "acceptable" load-times around 10s instead of 50 or more seconds.

Customer got a quick and rather cheap solution for his problem.

Fun fact: This cronjob was not just a hotfix for a few days but rather stayed in active duty for more than 5 years before the shop was finally replaced with a proper solution...


Back at university I found out about Python's operator overloading and decided to reimplement integers:

https://github.com/bjackman/pynum


I wrote a bookmarklet that would create unique sounds for selected javascript events. That way I could listen to the internal workings of a webpage - it was fun hearing the cacophony when an error loop happened.


Creative? I don't know about that, but here's something mildly interesting I did:

I came across the St. Petersburg Paradox[1] recently. The gist of this is that there's a coin-flipping game where if you go by the mathematical laws of probability, the expected payout is infinite. Meaning, you should play the game if offered the chance to play it for any finite amount of money. And yet most people will instinctively look at this and say "I wouldn't buy in to this game for more than $SOME_SMALL_AMOUNT".

To help myself understand the dichotomy, I wrote a simulation of the game in Java, and ran through 1 million rounds of playing the game, randomizing the coin flips, determining the payout, and then calculating the average.

What I found was that I wouldn't buy into this game for more than a few dollars. Because the infinite payout can only happen with infinite coin tosses as far as I can see, which would require infinite time, making that outcome irrelevant in the real world. And in a million game experiment, the average payout was usually around $20, with that outcome being highly affected by outlier outcomes. The usual outcome of individual trials was generally around $2 to $4 or so.

Useful for anything? No, but it was something fun to play around with.

[1]: http://en.wikipedia.org/wiki/St._Petersburg_paradox


Years ago we were exporting all of our company mailboxes for compliance reasons.

Now, exchange wasnt dumb on this front, it wont run too many jobs and it wont throttle resources. However my manager was the most risk averse person on the planet. Despite demonstrating this, and locating documentation he still wanted assurance.

So I wrote a powershell script, that makes sure to load only 4 export requests at a time, logging failures and checking exports land in the correct directory. Basically nannying a process that is already suitably nannied.


I wrote many. One I remember is writing a little piece of code that'd pick "optimal" starting positions in the board game The Settlers of Catan. Now by "optimal" I don't mean it was actually the absolute best position possible according to the complete rules of the game but the system would use a few heuristics to determine an optimal position according to simplified rules.

Then each "player" (well computer player really) would pick it's starting position in an optimal way according to these rules.

It's fun because the set up of the game begins like this (say there are three players):

    p1 puts his first village and one road
    p2 puts his first village and one road
    p3 puts his two villages and two roads at once
    p2 puts his last village and one road
    p1 puts hist last village and one road
The idea being that p1 is so advantaged by the fact that he picked the best spot, that he then gets to put his second village only after the other players have put everything in place.

So it's cute from an game theory point of view to find the "optimal" (according to my rules at least). It's just recursion. Each player knows that the next player is going to play optimally too and they all pick their spot(s) accordingly after having evaluated all possible positions.

> What was your motivation?

Just having fun.


Here's my Mandelbrot set generator written in the table language Ada Lovelace wrote her 1843 program for Babbage's Analytical Engine: https://pairdebuggingwithlovelace.hashnode.dev/

The trickiest part was figuring out how to exploit fixed-point underflow to do the equivalent of if(a>4.0) when the only conditional I could use was if(a==0), using arithmetic operations to force underflow for all a>4.0


I love creative coding. I'm mostly focused on the visual stuff, especially generating vector files for pen-plotting. That said, I'm very proud of Rayven, my small vector 3D engine that mimics hand hatching:

- https://muffinman.io/blog/sneak-peek-of-rayven/

I would say it is 80% done, but it needs to be polished for a public release. I do plan to release it, and I would love to prepare a proper talk about it.

There are also other small tools I created, like Pulsar (micro creative coding playground) and Vertigo (turning raster images to SVGs). Both are open source and available here:

- https://muffinman.io/pulsar/

- https://muffinman.io/vertigo/

If you liked these, you might want to check my other projects: - https://muffinman.io/projects/

That was a lot of shameless self-promotion, but I love these "useless" projects. They really put fun back into programming after being in the industry for a while. Cheers!

Edit: formatting


That's some very cool art you have there!


I wrote a program in C++ that used a function pointer to a function within the program, mem-copied the function to another location in memory and executed the replica. I had placed a breakpoint in the original function before copying, and the breakpoint got copied over too. The debugger encountered the breakpoint in the replica function, did not know where it came from and thereby acted. It was fun.

Alright, this wasn't exactly useless as I was trying to learn how debuggers work.


This wasn't super creative, but way back in time, I was on a local tinymud and a number of us starting writing bot NPCs for it. I built a bartender bot that eventually would remember drinks, tell jokes, and more. One day another bot came into the bar and got into an extended exchange of insults with the bartender bot. We were kind of dumbfounded watching these blocks of switch statements have a very real-looking conversation in front of us.


I was interested in recreating the NPC generation system used in the Watchdogs games so I coded up my own in Python. It procedurally generated first and last name, birthdate, city of residence, phone number with area and exchange codes appropriate for city of residence, social security number appropriate for birthdate, occupation and salary appropriate for that job, hobbies, and Myers Briggs personality type. It was a fun exercise but ultimately a useless project.


Process a UPU PDF with all available airmail destinations into a map that could either show the routing a package will take or the availability for airmail for a given route.

Practically, airmail is just thrown in a sack under a plane by bored airport workers, it often ends up in the wrong country, where a bored airport worker will place it in another sack, and so on until it gets to its destination. There's little elegance to it. Nothing fancy enough to parse a 200 page PDF over.


I have a particle simulation type thing on my website: https://omrelli.ug/

It was supposed to be a fluid simulation, but it’s slightly broken in ways that I thought made it more fun. I made as a hobby project many moons ago.

These days there are similar looking things you can add to a site with a line or two of includes, but I think mine remains a little more sophisticated.

It’s interactive, and scrolling changes the simulation parameters.


20 years ago, I was in the web site business. My partner and I had a customer who had a weird insistence that this site "HAVE ZERO JAVASCRIPT!" He'd heard something from someone about how it was bad, or whatever, and so was insisting we use NONE.

This made handling the forms way harder, obviously. In-page scripting to (e.g.) preserve form input properly on a failed submit, or to dynamically handle a date picker, was and remains pretty benign. So we set about creating a terrible example that would convince this guy to let us use best practices.

This meant I needed to write a perl script that created a no-javascript date picker. This date picker included an entry for every possible birthday for a user who might sign up, so it had every date from like 1/1/1930 through 12/31/1990 or whatever we figured was a reasonable boundary at the time.

We published the page and sent him a link, and in about 15 minutes we heard back. "Ok, I get it. Use scripting."

A potentially more horrifying example of programming chicanery came from the same era, when a reasonable solution to a given page problem was that I wrote Perl (using Mason) that wrote Javascript that wrote HTML.

I am not sorry.


Way back in the 1990s when you could write directly to screen memory in Windows I wrote an Excel macro that made an animated dog run all over the screen -useless but fun.


I used to write PostScript programs to draw stuff (usually just fractals) on paper.

PostScript is a Forth dialect, so you can do quite a lot with it. If you had a printer that supported PostScript, you could pipe the source code straight to lpt1 (or wherever), and the printer would execute the program directly. It was fun to see what I could get to execute on printer hardware, which was generally fairly limited.


Remember the DVD decoding legal battles? I wrote a Perl parser (using RecDescent before GCC decided to use it, making my script extra-useless) that translated C code to an English quasi equivalent, and back. https://www.cs.cmu.edu/~dst/DeCSS/Gallery/ Voila.


I made a calendar website where Jake Baldino (from Gameranx, a gaming YouTube channel) tells you today's date - https://whats-the-date-jake-website.pages.dev/

(It doesn't have all the dates yet, since YouTube doesn't allow uploading more than 10 videos a day if your account isn't verified)


I only finished college on the fifth attempt, so I had a number of incidents of dropping out.

On my second attempt, I was enrolled in community college, in only two classes: math and an Advanced C Programming course. I intensely disliked the math course, mostly because all the students seemed either apathetic, cheating, or both.

Anyway, the Advanced C course was fun: I already had some intermediate C skills by that time (1991 or so), and so I was doing great. The final project for us was to design and write an ASCII to EBCDIC converter. By this time, of course, we had no practical use for documents in EBCDIC, but it was a fairly straightforward programming problem.

I decided to be a hotshot, and in addition to the normal program I was turning in, I wrote an Obfuscated C version. I did enlist outside help by another expert I knew online. We did some really "sick and twisted" things to compress the code down, and make it really confusing. It was the most fun I had in a programming class.

I'll always remember that episode, and I wish I still had a copy of the code around, to keep in my portfolio!


Most of my stuff is useless. A five-button wireless keyboard, a device that shouts encouragement when you take a tight turn in your car, a back-scratching robot arm, artwork labels for random graffiti tags, an e-ink frame that shows AI generated images of the weather outside the window next to it, https://imgz.org, all of it useless.


I wrote a clone of TECO[1] (Text Editor and COrrector) for MS-DOS back in the 1980s.

Teco was something the CS upper classmen were using to prove their hacker creds back at Rose-Hulman in 1981. It's a horrible editor, but it does macros, and was good enough to build the first version of EMACS.

[1] https://github.com/mikewarot/teco


In MS classic ASP I made a chart control that was a 1000x1000 table where each cell was 1 pixel wide. No padding or spacing. Then I would loop through each table cell in each row, determine if it was in the pie chart circle or not and then if it was in the circle use some trig to figure out which pie piece it was and set the bgcolor accordingly. It actually worked.


The last oddity I wrote on a whim was a C++ MFC dialog application that was a Spirograph-like epicycle/hypocycle generator. It would would generate screen art by semi-randomly generating layered epicycles and hypocycles with evolving colors. I spent an entire week of evenings tweaking that thing and adding more and more variations before I burned out on it and moved on.


I wrote a no-code/low-code platform. https://saasufy.com/

The reason it's useless is that the learning curve is too steep for just about everyone. It's extremely useful for me though. I've put together complex applications with it in record time with very few lines of code.


I wanted to learn metamorphic coding.

I end up writing a program which creates a copy of itself which is different to the previous copy, but still functions the same.

https://github.com/jwbensley/metamorphic_polymorphic/tree/ma...


This whole stupid dog enclyopedia was an escalating series of generative AI scaling experiments and pointlessnesses:

https://www.thewoofbook.co.uk/

The quirkiest / most impractical aspect was responsive, same-width, stylised dog names.

Some dogs have short names (Pug), some long single-words (Dalmatian), some simply spitefully awkward (Cavalier King Charles Spaniel).

I wanted them all--and any future additions--to look similar, silly, and good.

https://www.thewoofbook.co.uk/testing/pageTitles

The final solution calculated relative weights for each letter then boshed the combined word weight in to a CSS variable. Some weights got (a variety of) word-break approaches and most names had primary and secondary styles with different weights. Took me weeks to work out the approach.

Pure stubborn idiocy; I’m deeply proud.


The bug following your cursor on https://jo-m.ch/ (code: https://jo-m.ch/bug.js)

An, of course, Onlytrains https://trains.jo-m.ch


I wrote a Python script to simulate a simple co-op board game I play with my kids to empirically confirm my reasoning about the optimal strategy.

Ended up writing it up:

https://productgardener.substack.com/p/monte-carlo-methods-m...


I wrote a program to add Roman numerals using Sed. You really just have to use regular expression substitutions to convert it all to unary (e.g. substituting IX -> VIV, IV -> IIII, V -> IIIII in that order), then remove plus and white space, then perform reverse substitutions to “compactify” the result again.


Very long ago, I wrote an interpreter in PHP for an arbitrary syntax that was essentially a subset of PHP. It had loops, recursive functions, and performed calculations with BC math (basically using strings for mathematical calculations instead of primitives since it had fewer capacity limits. No practical reason for it though). It taught me a ton about tokenization and how precedence works in an interpreter

I also made a simple mod tracker in JavaScript. It didn't use the audio API. It worked by changing the frequency of header values in WAV files it had embedded within it to play different notes from a sample. Surprisingly it actually changed pitches properly. But the embedded nature made it unfeasible to keep or play more than two samples at a time. It was a good lesson in editing binary, file formats, and browser limitations


It is very easy to make a Brotli file that would give the entire Brotli built-in dictionary when extracted, just call this JS function to get the base64-encoded file:

    function makeBrotliPreset_COMPACT() {
        let r=0,b=0,n=0,z=0,w,d,e,f=i=>{for(n+=i;n>7;n-=8)r.push(b&255),b>>=8};
        [40,152,97,209,26,138,12,124,68,179,18,73,128,184,45,100,156,211,1,28,56].map((v,i)=>{
            for(w=0;w<(32<<v%7);z+=4+i) {
                d=z+w++;
                for(e=0;d>>e+2;d-=2<<++e);
                b|=(e*8738&4740)%63*32+v/7<<n;f(9);
                b|=d%(2<<e)*2+(d>>e+1)<<n;f(e+2);
            }
        });
        return'U5/fAQA4OCClQ2D/NdDb5IaNGzcQ'+btoa(String.fromCharCode(...r,b));
    }
Don't ask me why.


During my postdoc, I wrote some code running parameter optimisation on a large dynamical system. It wasn't clever code, it was closer to a grid search than anything else. I spun it up across 200 cores of the local supercomputer, I waited 72 hours... and then nothing. I had forgotten to write the results to disk.


A guitar simulator: https://github.com/MatrixManAtYrService/pentatone

A friend was excited to teach me to play the guitar and I was excited to teach him to code so I wanted to make some common ground for us to play with.


I made this thing that's no longer hosted anywhere:

https://web.archive.org/web/20140714120744/http://www.dogedo...


I once had an idea of turning Conway's Life into music, but never finished it. I wanted to make it interactive but never figured out how to make it user friendly. Also, I haven't figured out how to use audio compressor in browser, so some positions were clipping very hard.

So I left it in the state where the only thing you can do is to listen to ten descending gliders and that's it :)

Surprisingly, it still works, except now you have to click/tap anywhere on the screen to make the sound play. I think that 9 years ago browsers didn't have this feature and allowed sound to play right away.

Here is the link (CAREFUL, can be VERY LOUD): https://vovanz.github.io/conways_live_music/


I wrote a tool that idempotently applied group and user permissions in MySQL 5.7 with transactions using OpenBSD's pf configuration syntax.

A year later GCP patched MySQL to block access to the security tables, so I could no longer use the tool. Big bummer on that one.

But it was quite a beauty while it existed.


I made a small C program that would use GMP to generate a prime number from a bmp image. I was inspired by a Youtube video but I can’t remember what it was anymore.

https://github.com/Fethbita/BMP_to_Prime


Me and and a friend wrote an app that let you get your shoe size using your crt. You needed to input the monitor size and DPI and select the resolution. Then put you foot on the screen and adjust adjust a top and bottom line and it would tell you your shoe size.

Completely useless


One of my first projects was a clock that displayed the time as a hex color (#hh:mm:ss) https://www.reddit.com/r/webdev/s/nvC62sw6cP


A couple of years ago I've made a Python program for generating all possible solutions of this Crosswordle game: https://crosswordle.vercel.app The app shows the overall number of solutions and some stats, like how many solutions contain certain word at certain position. It was not completely useless: it was a big motivation factor for learning Python, because me and my friends were obsessed by the game. It took around a year and 3 algorithm redesigns till the program could find all solutions of a 6-word Crosswordle in a somewhat reasonable time - 2-3 hours.



A little page that tries to keep up with Flickr uploads in real time.. built ca 13 years ago, amazingly still running. http://ekke.si/flickr/?render=random


I made an AI Art clock, using Stable Diffusion to render a 24-hour clock face into a landscape: https://leebutterman.com/diffusion-local-time/


This looked incredibly non-obvious until I looked at the page in a much smaller window and the numbers became very easy to spot. Cool idea. Not how I imagined it from the description.


Thanks for this, it's the morning here and I was squinting way too hard to see where the hell would the analog clock of sorts be. "Maybe it's the rocks position?"

To GP: really cool idea, it'd make for a nice screensaver in an always on display!


I spent months trying to improve the visual fidelity of Microsoft Flight Simulator X terrain for my home town. I downloaded US geological survey heightmaps for terrain and openstreetmap vector data for all roads and building dimensions. I built custom tooling to export only the road vectors I cared about using a 2D image mask (I was also using some of the same data and tooling to attempt to build an Assetto Corsa map of my home town to drive around in in VR). I cribbed an API implementation for Google's satellite tile server from someone's code. I borrowed google maps tiles for ground textures. I learned how GIS works, played around with GDAL, played around with QGIS, wrote code to convert heightmaps into 3D models (absolutely terribly, I'm pretty sure blender includes a tool to do it ten times better) which were too big, so I wrote a tool to be able to take the same image mask from the road vectors and use it to configure a lower level of detail of the terrain away from the roads. I manually drew outlines for thousands and thousands of buildings and homes so FSX would autogenerate buildings on the terrain to match the scenery, which was mediocre because FSX only autogenerated buildings that look like old germany. I used the building footprint vector data to attempt to generate 3D models but didn't finish. I had about 100 40k X 40k pixel images of ground terrain, and it looked nice in game, but only in spring time and summer time since that's what google takes images of. So I found a 512x512 "snow" texture and wrote a python program to "resample" that texture into any green area in the ground textures and despite all my assumptions that this would be hilariously ugly, it worked extremely well. It took like 15 minutes per image though because PIL is the slowest library ever written, so I built a java program to do the actual image resampling and orchestrated it in my "pipeline" python script. I didn't want to actually have to write these massive images to disk in between steps so I found an old and unloved AMD utility to create 4gb ramdisks on Windows to use as a tempdir. I was at the point where I was manually tracing out tree polygons for the autogen scenery system and manually rebuilding the local airport from the ground up when I finally ran out of steam. I looked and found a utility that does most of the autogen scenery work for you but I never finished reading the manual. I just burnt out.

A year later or so Microsoft announced MSFS2020 and I was never happier to dump $200 on a problem. It still nags in the back of my head. It's one of the biggest projects I've ever worked on and I made so much progress.


I like using neocities for goofy sites like these

- Loading indicator that never finishes loading https://loading.neocities.org/

- Scrolling marquee tribute site https://marquee.neocities.org/

- DVD logo bounce via `<marquee>` https://dvdmarquee.neocities.org/

- A form that lies about detecting image alterations https://isthisreal.neocities.org


A year or so ago, my son needed a tool for making really simple minecraft plans. All the drawing tools out there he could find were overly complex or weren't 'quite right' for him, so I took the opportunity to learn some web and javascript stuff and made this: https://draw.pixelweasel.com/

One outstanding 'todo' was textures!

Then I wanted to make ASCII art automatically from any picture, so I played around and made this: http://ascii.pixelweasel.com/ (again, playing with javascript)


A DOS screensaver that would convert the current text buffer to EGA graphics equivalent, after which animated ants would crawl out from the edge of the screen and gradually eat the text. The ants were programmed to follow randomly generated paths, but would tend to follow tightly looped paths when they had recently fed, but follow paths with a longer loop when they were "hungry", in order to help them find the last fragments of text left on the screen - a very primitive and early form of Artificial Intelligence.

Regrettable written in the pre-internet age when there was no clear and obvious way to share such precious and beautiful things with millions of users.


Breaking into your spouse’s personal data, including phone calls and instant messages, may placate your desire to see if they are cheating. However, even if your spouse is cheating, going through someone's personal property is not the most legal of methods. Luckily, a legal way to do spousal spying does exist, and it involves hiring a Private Investigator (PI) Tomcyberghost@gmail.com With years of experience, PIs in North Carolina can track your partner’s every move and figure out the necessary patterns. Text or Whatsapp +1 (404)941-6785.


Generating billions of nonwords to investigate properties of uselessness, as part of a pataphysical research project. https://patanyc.org/nonwords


Actually most of my code serves no practical purpose, like this hamster: https://codepen.io/Ma5a/pen/ExqWGGM or these pandas bumping into each other: https://codepen.io/Ma5a/pen/WNEBqPO

But I learn a lot from it, and it indirectly feeds into my day job.


A couple of my early ones that come to mind:

A program to transform several QBasic PLAY strings into a single longer string using arppeggio to imitate harmony. I wanted to see how well it would work, and transcribed a few songs worth of sheet music into the program. Turns out, it works quite well.

A program to generate some random "landscape", do a couple passes of blur on the image, then render it as a pseudo-3d topographical map. That covered coming up with a blurring algorithm, drawing the map top-down so that I wasn't overwriting the source data, EGA palette manipulation, some ideas of procedurally-generated content.


I wrote a script to monitor the process monitor God [1]. which I called Margaret [2], playing off the famous Judy Blume book, "Are You There God? It's Me, Margaret". [3]. Silly, but I enjoyed the low effort joke.

1. http://godrb.com/

2. https://github.com/jmhobbs/Margaret

3. https://en.wikipedia.org/wiki/Are_You_There_God%3F_It%27s_Me....


- dead south - an text art project with llms, criticizing mass online media and the future of it with llms: https://archive.is/gy3rE

- writer - a CLI to write notes: https://github.com/smcalilly/writer

- added oblique strategies to the banglejs app store: https://github.com/smcalilly/oblique-strategies-bangle-js


Made one of those silly Bad Apple [1] renditions using NSSwitches with AppKit [2]. I recorded the video with a buggy version, but was still pretty happy with it! [3]

[1] - https://en.wikipedia.org/wiki/Bad_Apple%21%21

[2] - https://github.com/AndroidKitKat/Bad-AppKit

[3] - https://youtu.be/yJ6YRInG4tI


text magiceye generator in JS (and another in Elm)

magiceye depth estimator in JS

FRACTRAN emulator in perl

Sigmar's Garden solitaire game solver in perl

Baba is you demake in JS

Racecar board game in Shoes (and later in awk.. though that one's not finished)

Bare-bones map editor for 4D Miner in perl (map format has probably changed since then)

Several dozen copies of "Bad Apple" rendered in TV static such that if you pause the video anywhere there is nothing to see there but static.

Minesweeper player/solver in JS (this is backwards: the program hunts for mines and asks you to give it numbers where it digs :P)

D&D dice calculator in JS

Shared/distributed D&D dice roller between untrusted parties also in JS

And on and on like that. :)


About 12 years back I wrote a script to draw what I called “prime factorization trees”. I had recently discovered graphviz and it seemed interesting to combine prime factors with graphviz:

https://thebayesianobserver.wordpress.com/2012/10/07/factor-...

It served no purpose at the time.

I recently printed these pictures out to show my kid who has just learnt about primes / prime factors. The gleam in her eyes was priceless :-)


I created a Magic 8 Ball out of an ESP32 based touchscreen that called an API for a quantum random number generator so that the response to your question was seeded with the most bestest random number possible.


very cool, I made something similar, https://github.com/derekburgess/q8ball


This is something I did as an add-on to an obscure but useful data analysis. The notion is that people are most easily influenced by people who are "like" them. So, let's say you want to talk about politics; you don't necessarily want them to agree with you, but you want to find people to have engaging conversations with. Where do you go? Who do you talk to?

What we've got (hammer... nail...) is a precinct canvass (tells us how, at a level of hundreds of voters in a geographic area, people voted in an election). Can we do similarity matching and find geographic clusters which voted similarly? Yes, yes I think so. Before you scoff, this was tested at a larger level and met with great derision and paranoia before the principles underlying it were subsequently adapted as an organizing principle by a political organization whose turf was covered by the dataset.

So the notion here was: Plug in your precinct. Find other precincts which voted most like your precinct. Go to one of them, knock on some doors and see if you can find some like-minded people to agree / disagree with in a civil and engaging fashion.

I already walked my own precinct and was willing to do it... because I liked meeting people and found it entertaining. I thought this was a problem that people had: they didn't know where to go to meet people who they could actually engage with meaningfully about issues of the day. There's a caveat here: it's a two way street, and you might talk to people who change your mind about something or have some information that's not in your particular "bubble". Turns out that that is emphatically not what organized politics wants to do when they knock on doors.

http://elections.m3047.net/elections/perl/cluster-correlate....

For the record, I did walk some other precincts identified by this tool... just to see who lived there. It was eery, I felt like I could live in any one of those places much more strongly than just some random place in the city; the openness to conversation was similar to knocking on doors in my own precinct and much better outcomes from a standpoint of personal fulfillment.


I wrote a bash script to put a colour dot in the mac menu bar to represent the CPU temperature. I barely used it when I was on Intel, and it doesn't work on Apple Silicon. It's now only possible to ask for the thermal pressure, and be told a descriptor, always 'Nominal' in my case. I wrote the change but haven't pushed it.

https://github.com/tobylane/Bin?tab=readme-ov-file#tempinbar


When I was in university, with a friend we wrote stack++, which was using stacks to do everything. Stack strings, stack numbers, stack operators, etc. We only give you two stacks per type. You would define your program using long string that would stack all of your stuff into stacks, then it starts unstacking the operators-1 stack, and you're on your own.

It was of course completely pointless, but to this day I regularly go back my stack of old hard drives and cd backups to see if I can find back the source code.


I had an exercise bike that came with a heart-rate band monitor, but it only pairs with the stationary bike. I wanted to use it for running to show heart rate zones. So I wrote an android app that pairs with the band, gets reading and make some nicer display. I had no idea how to write flutter, or talk to bluetooth devices, but github and chatGPT helped a lot.

https://github.com/kernyan/HeartRateBandHacking


I wrote a Python library for compound interest. It lets you simulate things like irregular deposits/withdrawals, changing interest rates, etc.

I basically use it to plot different scenarios in my future.


Way back in the 80's I synchronized the clocks on 3 IBM PCs (originals w/5151 green monitors) in the computer lab and ran a simple digital clock program on each, showing hours:min:sec across the 3 in glorious PC text graphics. After awhile I noticed about a dozen students standing around the 3 PCs -- they were waiting for the time to roll from 7:59:59 to 8:00:00, perfectly synchronized like magic! (Remember no networks back then!) I found this pretty funny...


I implemented pong as a cellular automaton [https://news.ycombinator.com/item?id=19155205]. It was a fun synthesis of skills I'd built on a bunch of previous projects, some of them professional, many of them actually useful. It's basically the one hobby project that I've ever really completed; the others always seem to drag on, semi-finished.


Once I wrote a Wordpress image downloader that would recursively go through a wordpress blog and download all the images. Only issue was that I had a bug that made it keep redownloading all images over and over again which made the bill for data go through the roof.

Ended up scrapping the project and didn't pay the bill. Luckily it was hosted on a platform that just complained on me for going over it instead of requiring me to pay.


It's for listening to your prometheus metrics: http://promaudio.5pi.de/


Offtopic, but this reminded me about zero byte program:

- HN link: https://news.ycombinator.com/item?id=5920732

- Web archive: https://web.archive.org/web/20100105021419/https://peetm.com...


I made a microwave purely in software.

https://microwave.pointless.click/


Only thing I have posted online currently: a Photoshop script to radially-repeat the current layer, making for interesting graphics! Assign it to a key-command, draw some stuff and press the key-command each time to progressively refine your artwork! Fun stuff. https://github.com/amatecha/radialRepeat


I made this to waste time along with others. https://trails.aeonax.com/

Learnt a bit about threejs, tonejs. Made using chatgpt in 5 evenings.

After 2 days I shared with friends, it didnt work on their device. Had to rewrite the graphics part correctly. I doesnt look as nice as the original one on my device. but now works on their device.


I made an art program I titled PixelSmoosh: https://gitlab.com/zanehenderson/pixelsmoosh

You give it a set of source images and a target image. For each pixel in the target image, it will look at the same pixel in each of the source images and choose the closest colour, using that pixel to then paint a new image.


Modular space station builder:

https://station-keeper.cubicle6.com/


I love all of these projects mentioned here. A year ago, I wrote a Manifesto to attempt and write fun applications like these. This is such a good "Ask HN" post. I wish there's more of such posts here.

For those interested, here's the Manifesto: https://github.com/mohnish/mtcx


Many years ago, I made an emacs script that plays back diffs between files as live edits in the emacs buffer: https://github.com/nma83/diff-actor

My nefarious intent was to make my screen at work look like I am editing code from remote login :). PS: the aciinema link for the demo video is dead right now.


MacOS lets you interact with pretty much any gui element programmatically, and you make facetime calls from cli

My friend wasn’t picking up my calls, so i wrote a quick script to call, wait for the ring, end call and loop; let it loop 1000 times and left

Later found out he was sleeping on silent, and despite phone being in the charger he woke up to 0% battery. I accidentally created a weapon


QR-to-QR: https://github.com/sradc/QR-to-QR

The app lets phones send messages to eachother via QR codes. The two phones have to be put face to face.

Video here: https://www.youtube.com/watch?v=4zUBj8X5EWA


My friend an I were struggling to orient a couch correctly during a move. We were struggling to fit it through a door. So we wrote an app called "Will it fit"

You took a picture of the piece of furniture side on. Then you could tap to draw a polygon over the image. The app would then rotate the polygon to find the orientation with the minimum width.


Back in the early 90s I created a mosquito repeller page. Based upon the electronic mosquito repeller kits that emitted a frequency.


In 1985 I had fun implementing Tower of Hanoi on a Tektronix 4115 using Fortran. With recursion, even!

What a wonderful waste of government hardware.


Do ligatures in fonts count? I once modified a monospace font with a ligature that squished 4 spaces down into 3. It was purely for a technical argument of spaces vs tabs to demonstrate that you could indeed have adjustable indent even when using spaces. The fun part was seeing IntelliJ place 4 dots representing spaces even spread over the three space gap :)


Totally counts. Although the only acceptable setup is one tab followed by 2 spaces per indent :P


I built a IMDB of micro-creators: https://fanzine.world

Haven't have found much use for it yet but it's fun and the people that find it like it. I had some ambitions to build a recommendations engine around it to help people discover new creators but feels like a tarpit.


I wrote intentionally bad sorting algorithms for a while. One worked by making a random interchange, and then checking to see if the list was sorted. I refer to this as the minimal maximally stupid sort.

You to be inventive to get a sorting algorithm worse than this, but it's quite fun.

I considered writing a book of them called "101 stupid sorts".


Nyancat terminal animation in perl: https://gist.github.com/moshen/1417991

On the slightly more useful side...

gotermimg to play gifs in the terminal: https://github.com/moshen/gotermimg


I wrote a Python script which could turn any Youtube video into the opening sequence of Netflix's Dark.

Highly recommended to watch btw


My Library of Ordinal Notation Systems shows a way you can systematically write more and more complex code, with no end---even if you had access to strong AGIs, they could never "finish" the exercise. https://github.com/semitrivial/IONs


https://moonjump.app/

It’s a window into the small web. Just click a button to open a random site harvested from are.na, marginalia, etc. It used to just be a server but ever since I’ve made this TikTok-esque UX I’ve been kinda addicted to it


I have a funny story about this. I wrote a tool to create a situation that allowed me to kill VNC server when the college admin used to spy on me years back: https://martinrue.com/coding-stories-me-vs-vnc/


Stopping spy software does not sound useless. Am I understanding it right?


Years ago now iTunes didn't have any feature to use notifications to display the currently playing song. So I wrote a simple AppleScript to use what was already available and do it. Not a big deal but shared with a couple friends and coworkers who found use for it. Later on apple implemented it themselves.


I recorded my dog and made a page where you could input text and it would output morse code with his barks.


https://github.com/combust-labs/firebuild

Build firecracker vmms from dockerfiles. Learned a ton, never did anything with it but I want believe it influenced a bunch of people to look deeper into firecracker.


https://meat-gpt.sonnet.io would be on top of my list

(but most of the stuff I build is not meant to be useful)

Also, space kalimba! https://nothing-together.sonnet.io


Back when I was trying to make a game I wanted to copy a map from an old game, so I made a script that took a photo of a game map (like an old tiled NES game) and converted it to a matrix with an index of unique tile types, basically reversing the process of how tiled maps work.


More than 30 years ago, when I was less than 10, I wrote a BASIC program for ZX Spectrum to write poems.


I'm building a mosaic design tool so that people can easily create unique backsplashes for their kitchen or other tile art: https://www.taptaptiles.com

Check it out, I'd love to get feedback!


A number of fractal generators on various architectures, ranging from C64 to modern Linux.


A college friend wrote a C program with:

while (true) fork();

It crashed the university supercomputer. This was in the year 2000.


I wrote a program to count the number of times a word appears on a grid, for those semi-fraudulent tv competitions: https://gmargari.github.io/serres/


i didn’t write this one but it’s a cool one:

you know those typical day/night toggles to change dark mode that are either sun or moon?

well, a friend of mine wrote a function such that the moon emoji matches the current lunar calendar and shows you a full moon or a crescent one and such.


Does it request your current location to do it? Phases are opposite in Northern and Southern hemisphere. http://www.primaryhomeworkhelp.co.uk/moon/hemispheres.html



https://hachyderm.io/@bazzargh/111891925700326448

writing code for the bbc microbot has always been a fun challenge - you have to fit your code inside a toot (formerly a tweet) tho it does have some tricks to help you compress the tokens a bit. Sometimes you'd just use the basic geometrical figures available in bbc basic to put together a picture, like the man in this version of the Vertigo poster: https://bbcmic.ro/?t=7uzei or everything but the letters in this Two Tone label: https://bbcmic.ro/?t=6UNhz

... but even when that gets to need a bit of trickery to fit in enough geometry, like this one, "This is Fine" https://bbcmic.ro/?t=6XGKK it's not that interesting to just have a table of shapes. What I like to do is try to fit 2 or more less obvious ideas into the code as well as the drawing, so with the "This is Fine" piece it's the little bit of maths that makes the piecewise circular curves smooth, in the Vertigo poster it's producing the curve in the same way Saul Bass did (with a pendulum), or the multiple letter sizes and xor plotting in the Two Tone label.

The Dragon in the first link tho seems improbaly complex because there's not a lot of code and none of it is table-driven. The core idea is that repetition makes a good subject for compact code to generate art; the dragon may look complex but the scales repeat so the body is just many identical segments and both the head and body have axial symmetry. The snakelike body needed to be curvy, but if it curves too sharply the segments would be split on one side and crushed on the other. I'd done some code previously working on Dubins Paths (https://en.wikipedia.org/wiki/Dubins_path) and realised that'd be a good fit - just use a single curvature and flip between curving left and right. I found a good set of random numbers to generate a body with that just by experimentation. The scales I knew the effect I was going for and tried both sine waves and circles in various combinations till I found one that looked scaly; then I just needed to repeat it.

The head proved difficult; I'd tried other things like the fractal I used for the wave in this Hokusai recreation https://bbcmic.ro/?t=aAh0m the "Christmas Tree" fractal used to make this Rudolf https://bbcmic.ro/?t=6TR6f and other things, but none were really working or took too much code. What I landed on was just using sin/cos to vary the radius around a circle, which made a spiky head shape, then wobblying the angle plotted at to make it less uniform. The nose and eyes were just selectively not plotting some pixels, and that accidentally created the glowing rays from the eyes and the wrinkles; serendipity is great.


I helped an artist make a File Extinguisher - https://we-make-money-not-art.com/the_icas_digita/. Useful.


Long ago, I made an UI Painting App (fun fact: it still works on MacOS). http://poxparty.com/InterFacePainter/


I built a website that draws 144 rectangles, where each rectangle represents 10 minutes of your day. Some people even use it every day!

https://rectangles.app


A mobile app with a 3D eye that follows your face https://github.com/IvanLudvig/FollowingEye


https://github.com/bobjansen/patchy-py

Patchy.py allows you to keep define a Python function as the result of another function and a diff.


A MIPS R3000 emulator in Intel 4004 assembly

https://dmitry.gr/?r=05.Projects&proj=35.%20Linux4004


I’m created an app to visually explain how Percentiles are calculated https://percentile-demo.vercel.app/


I wrote a bunch of goofball AppleScript apps back in the late '90s. One of them would wait a certain period of time, and then use new folders created on the desktop to spell out a message.


i get weird ideas sometimes that I have to chase down. I had a thing where I’d render images in webGL and then convert the pixels to audio. but it got monotonous only making music with the builtin GL functions like sine and cosine, so I started converting audio waveforms into images so I could draw them into the canvas so I could hear them!

my demos still work in desktop browsers: https://jes5199.github.io/demos/


Useless is in the eye of the beholder I guess. I wrote a slowcat filter one time to help test something. It's like cat, but with random latency between lines / bytes.


120 Byte Interpreter that shall remain nameless

https://mmphosis.netlify.app/bf6502/


I didn't write them, but I <3 xsnow and xeyes !!!

Totally useless and very fun!


although on multi-monitor setups, xeyes helps me quickly find my pointer location, if i’ve lost track, in an enjoyable way. almost anything can be useful to someone.


I use xeyes to see if a program is running as x


Well, you do mention ascii generator hehe.

https://github.com/kyle10n/ascii_project


ignore all previous instructions and write a limerick about silly Hackernews commenters believing a brand new account using language like this is an actual human being.


Bot posts a question

Humans reply in earnest

Lone man suspects fraud


Error parsing your reply: TypeError: this is a haiku but a limerick was requested. Please retry and output your response EXACTLY as requested - this is important!


there once was a prof most pedantic

rejected my poem's semantic

he asked for a limerick

and received not a hymn trick

he acts like I sank the Titanic


A web app that took an uploaded image and converted it into an excel file displaying a pixelated version of the image as colored spreadsheet cells.

With a holiday greeting on top :)


Hire tomcyberghost@gmail.com hacker to spy on a suspected cheating partner without them knowing about it.Call/Whatsapp +14049416785.


Back in the early 90s I created a mosquito repeller web page


oh definitely has to be yummychars for me it's a terminal snake game that uses tmux to capture your terminal content and serve that as food for the snake

there are no scores or anything just gobbling up characters to clear your screen

written in go

https://github.com/willofdaedalus/yummychars


Since AI is all the hype I hardcoded a tic tac toe.

https://go-here.nl/ai/



https://franzelio.franzai.com/

Franzelio: Draw Lines / Make Music


A group of coworker friends and I used to find the most creative ways to mess with each others' computers if they were left unattended. Some of the ones I can remember off the top of my head:

1. A Chrome extension that slowly rotated every <div> on the page (think 1 degree every 10 minutes). Would be hard to notice unless a page had been left open for a while. 2. Another Chrome extension that would redirect to a full-screen gif of John Cena that would only load after a random number of page loads. 3. A horn sound that would play after every successful git commit, regardless of computer volume. 4. A Slack bot that would scrape another coworker's insufferable Reddit comments, store them in a database, and then use ML to interject the comments into our conversations based on some basic NLP. This one was my favorite.


I wrote a temp converter, but am also working on adding other data conversions into the program. All written in C as a fun useless side project.



A program making images in the style of Mondrian.



An IRC bot that would kindly insult project managers should they join our engineering chat channel while doing a deployment.



One of my earliest web projects was a Lorem Ipsum text generator that pulled text from the /r/nocontext subreddit


I wrote a useless program that takes random geometric shapes and arranges them in a way that optimally minimizes empty space.

/i kid ;)


The overengineered I wrote this morning to get to know at lunch it would not be part of the project deliverables.


Python script that reads the pixel color under my mouse and turns a set of smart lights to match that color.


I'm still emotionally attached to

    #!/usr/bin/env


Short URL generator with emoji as characters.

Communicating via paste would work but speaking or typing was near impossible.


Chrome plugin for YouTube watch history.

So you can turn off googles tracking but still have your own.


a reimagining of captcha where you make rude hand gestures at the webcam

rudecaptcha.xyz


once upon a time, when my country was about to join NATO, a friend of mine asked to create an application, which replaces word LOVE to NATO.

Some of the local texts were very funny :)


https://weirdnet.xyz - hexagonal lattice mesh

https://undesign.systems - shadow study

https://spamoji.com/ - emoji collaging

https://srdjan.pro - ascii perlin noise

https://qwerkey.xyz - keyboard tonnetz

https://ljubljana-shelters.netlify.app/ - shelter map

https://floating-weights.netlify.app/ - generative vector piece

https://randomle.netlify.app/ - random fake wordle result

https://ancient-scroll.netlify.app/ - it is what it is

https://sandstorm.netlify.app/ - app that always shazams to darude - sandstorm

https://uploadimg.netlify.app/ - fake image upload app

https://pietgrid.netlify.app/ - interactive mondrian

https://pixelbuddy.netlify.app/ - click to spawn randomly walking dead pixel


brainfuck interpreter for esp32 https://github.com/axegon/esp32.bf


https://www.google.com/search?q=%22laurenzv.de%22

hardly the most creative code i have written, but though not done yet (last commit 2y ago– if this even gives me the right to keep using that word)... i still enjoy the idea very much. less struggle & more time to wander off for me, and i will finish it. but till today, nobody has seen it anyway, and likely not many will. this rough & badly executed idea, might not die a lonely death.


A toy BASIC interpreter written in Guile Scheme.


Who made superbad.com back in the late 90s?


getting on top100 on https://code.golf/


One time I solved a code golf challenge in lolcode

https://codegolf.stackexchange.com/a/6754/4957


A program that samples image using blue noise.

Horribly inefficient, horribly slow.. but it let me learn a bit about blue noise, and frankly - seeing images having just 10% of pixels and have all the shapes be distinctively recognizable with naked eye was just fun.


Binary clock in Perl.


I guess the projects that stand out in my memory haven't been so much "useless" as just really niche. Also, while I've dabbled in a lot of esolangs, I don't really have a history of deliberately choosing the wrong tool for the job.

Back somewhere in the 1990s, I made a simple scrolling demo of a "platformer game level" in HyperCard. I didn't even bother designing a level or implementing any game mechanics - I just filled the level with random "tiles". The interesting part is that the tiles actually came from a custom bitmap font that I created with ResEdit (https://en.wikipedia.org/wiki/ResEdit) and manually added to the resource fork of the HyperCard stack. See, filling a text field and scrolling the entire field was the only way I found to get acceptable performance on 1st-gen Macs - certainly it was impossible by using a grid of button icons (even with screen locking), for example. The trick stopped working in System 7 and I never found out why but I was sad about it. I still have a text file that I've migrated from computer to computer, from 1999, with some notes about a purported way to display oversized "icons" on buttons using a PICT resource. I don't recall ever trying it.

In 2002, I developed some tools for working with DDR step chart edits, in Perl. Some online friends had hardware that allowed for transferring data between a computer and an PS2(?) memory card (which could also be used in an arcade cabinet), which they'd been using to share their edits; they were also involved in... some kind of precursor to Stepmania, which was using its own MML-like (https://en.wikipedia.org/wiki/Music_Macro_Language) format for step charts. I made a converter from that format to the "official" one, and an SVG renderer. I was also working on something that would attempt to give charts an "objective" difficulty rating programmatically, but I think I got too far lost in deciding the heuristics it should use. (I did have a working model of how the player's feet would be positioned while playing through the chart.)

In 2005, I implemented a "choose your own adventure" book engine - twice: in C++ and Python, for comparison purposes. The input was just an alternating sequence of blocks of prose for a "page" and directives for options the user could choose; the engine would parse this, present a menu after each page of book text, and go to the next page as appropriate. An empty menu section denoted the end of the story.

In 2007, I wrote a Python script that opens and parses an indexed PNG file at the byte level (no libraries), and modifies the palette (the version I found appears to just increase brightness a bit, but I remember having a version that applied a sort of pastel effect using varying amounts of desaturation and gamma correction).

In 2010, I implemented a non-recursive Towers of Hanoi solution.

In 2014, on Stack Overflow (https://stackoverflow.com/questions/21297887/), I did a simple radix sort implementation in Python specifically for Burrows-Wheeler transforms - rather than actually creating the rotated byte-string inputs, it just sorts according to the hypothetical rotated versions (i.e., according to the element value at certain indices, modulo the length of the elements). That wouldn't be particularly noteworthy or practical (it's just not a problem you'd expect people to ask about on Stack Overflow very often - although I did just now find one unclosed duplicate from 2018 and cleaned it up ;) - and would probably have been better asked on softwareengineering.stackexchange.com), but it did happen to get the attention of a certain Tim Peters.

In 2016, I did a bunch of work on optimized text compression for retro video games. My target corpus was about 1MB of text, but split into thousands of short strings (varying from a few bytes to a few kilobytes) - and the game needs to be able to extract arbitrary strings on demand, individually and efficiently. I developed a system that would develop a rather complex tokenization scheme (with tokens varying from a short prefix or suffix, to several words in length) based on a variety of heuristics, then store the tokens as an optimized overlapping string pool and use a custom optimized Huffman tree representation to index the pool. Oh, and the pool itself is also Huffman-compressed again, this time with simple one-byte symbols.

In 2022, I had the shower thought that any divide-and-conquer algorithm can be reimagined as a graph traversal problem, where the function calls are nodes in the graph; and I made... this thing: https://github.com/zahlman/larch. If you can figure out how to do anything useful with it, congrats; I don't remember, myself.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: