Most active commenters
  • Netcob(3)

←back to thread

296 points reverseCh | 14 comments | | HN request time: 0.985s | source | bottom

I recently came across the concept of "useless" programs - pieces of code that serve no practical purpose but are fun, creative, or challenging to write. These could be anything from elaborate ASCII art generators to programs that solve imaginary problems. I'm curious to hear about the most interesting or creative "useless" programs the HN community has written. What was your motivation? What unexpected challenges did you face? Did you learn anything valuable from the experience? Some examples to get the ball rolling: 1. A program that prints the lyrics of "99 Bottles of Beer" in binary. A text-based game where you play as a semicolon trying to find its way to the end of a line of code. A script that translates English text into Shakespearean insults. Share your creations, no matter how quirky or impractical. Let's celebrate the joy of coding for coding's sake!
1. Netcob ◴[] No.41923280[source]
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.

replies(3): >>41923438 #>>41923444 #>>41928689 #
2. yurishimo ◴[] No.41923438[source]
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.

replies(4): >>41923495 #>>41923522 #>>41924183 #>>41945501 #
3. tetris11 ◴[] No.41923444[source]
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.
replies(1): >>41929158 #
4. wmanley ◴[] No.41923495[source]
Maybe just stop shitting on the carpet.
replies(2): >>41926107 #>>41992203 #
5. hi_hi ◴[] No.41923522[source]
Put a diaper on it!
replies(1): >>41924232 #
6. Netcob ◴[] No.41924183[source]
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.

7. Netcob ◴[] No.41924232{3}[source]
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.
8. wsintra2022 ◴[] No.41926107{3}[source]
Spat my tea out on that comment!
9. hypfer ◴[] No.41928689[source]
I love everything about this. This is art
10. eszed ◴[] No.41929158[source]
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.
replies(1): >>41937247 #
11. tetris11 ◴[] No.41937247{3}[source]
I can't without doxxing myself sadly. I really should make a public HN account
replies(1): >>41940817 #
12. eszed ◴[] No.41940817{4}[source]
Please do!
13. pj1115 ◴[] No.41945501[source]
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

14. ornornor ◴[] No.41992203{3}[source]
Old habits die hard