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/
Ask HN: What's the most creative 'useless' program you've ever written?
91–100 of 422 posts
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#92Ended up writing it up:
https://productgardener.substack.com/p/monte-carlo-methods-m...
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#93https://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.
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#94Earlier quoted context omitted.
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.
I’m hear about that country at work often, mostly people traveling back talking about all the crazy expensive cars they saw.
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!
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#95Re: Ask HN: What's the most creative 'useless' program you've ever written?
#96Years 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.
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#97Earlier quoted context omitted.
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 l…
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#98https://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/
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#99/i kid ;)
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#100JS 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/