News for hackers. Stuff that matters.
Re:Ask HN: I just want to have fun programming again by eddieroger on Wednesday February 08, 2023 @09:02AM (#34708114)
This thread has a lot of language suggestions, but I think you need a fun problem to solve. Pick a toy app and work on it. Learn embedded programming with an Arduino. Write an iPhone app to track when you feed the dog. Make a karaoke app for Android. If you pick a project you'll enjoy, the language won't matter. Use whatever is best for the platform. The fun doesn't come with the language, it comes with seeing your project come to life, or others' reaction to the cool thing you made. Every language sucks and every language is the best depending on who you ask. Don't focus so deeply on that part. Solve cool and fun problems.

I've had a long time dream of getting a broken jukebox and gutting it for a Raspberry Pi, but keeping the external interface in tact. I know next to nothing about hardware engineering, and can't write more than ten lines of Python without needing to Google something, but I finally got a broken juke in need of fixing, a multimeter, and a hard drive full of music ready to go. The fun isn't the Python or learning GPIO, it's that eventually I will have a cool retro jukebox with hardware and software I wrote in my basement.

Re:Ask HN: I just want to have fun programming again by codazoda on Wednesday February 08, 2023 @10:01AM (#34708920)
I did a similar fun project. I created my own slot machine. I made a small shelf like cabinet out of wood, set a TV on it in portrait mode leaning against the wall, added a few lighted push buttons, and dropped a Raspberry Pi inside. I never finished the software side, but I was pretty proud of the looks of the machine.
Re:Ask HN: I just want to have fun programming again by bbarn on Wednesday February 08, 2023 @10:09AM (#34709056)
Sounds like a super fun project. Did you find one with the moving pages for album pictures or with the pink yellow and blue "ticket" like song listings, or? Those are so awesome, I can think of all kinds of fun ideas to retro-mod either.
Re:Ask HN: I just want to have fun programming again by eddieroger on Wednesday February 08, 2023 @10:30AM (#34709391)
Thanks! It is ticket listing kind. It's closed so you can't see the record mech, which is what I wanted, and I will replace song cards with ones I add to the Pi. Then I will add all kinds of hidden ones for giggles because it would be a waste to only play 200 songs. I got particularly lucky in that it came with the field repair guide, which has a solid wiring diagram and sequence that I can more or less recreate in code. My goal is to do the least amount of destruction to it that I can so I could some day replace the broken parts (ironically, the central computer) and have it restored. It being "Computer Controlled" was one of the most appealing aspects to me - there's a light up panel that reads that on the outside.

It's an AMI Rowe R-88 if you'd like to see it.

Re:Ask HN: I just want to have fun programming again by scubbo on Wednesday February 08, 2023 @11:51AM (#34710807)
Big +1 on this. If you're OK with a broader definition of "programming" and have a bit of money to throw around, I've found tinkering with https://www.home-assistant.io/ to be very satisfying. I got more sense of accomplishment from scripting "text me when I leave the house if I forgot to set the alarm, and turn on the front porch lights when I arrive back if it's after sunset" than I did from months of corporate work, even though the actual _difficulty_ was much lower. I can _see_ the results of my work, and benefit from them most days!
Re:Ask HN: I just want to have fun programming again by giobox on Wednesday February 08, 2023 @12:29PM (#34711483)
Deploying Home Assistant is largely how I taught myself Docker, Kubernetes etc. Its much easier to learn solving a "real" example.

You can learn a ton just trying to do a production grade home assistant deployment - move on to SSL termination at the load balancer with letsencrypt, try different deployment strategies for upgrading the server with zero down time, write custom extensions... etc etc.

I've now got a small Pi cluster running k8s to deliver a bunch of services at home, and its all really easy to maintain. I've absolutely used the skills and knowledge gained in my day job too, which is nice. Home Assistant is great to learn a lot of production web app stuff, all you need to get started is as little as the PC you already own, or something like a Pi to host it. As it can solve problems in your actual life, it's rewarding enough to be interesting I've found.

Re:Ask HN: I just want to have fun programming again by tmaly on Wednesday February 08, 2023 @12:32PM (#34711535)
I knew this guy that automated his home with Prolog. It was quite a cool project. I 100% agree with picking a project to learn.
Re:Ask HN: I just want to have fun programming again by p4l4g4 on Wednesday February 08, 2023 @04:23PM (#34715399)
How i love these quirky side project! Do you have a link to a repo? Would like to see his setup!
Re:Ask HN: I just want to have fun programming again by tmaly on Wednesday February 08, 2023 @05:30PM (#34716439)
I do not think he publishes it. But I would not be surprised if he sees this comment on HN.
Re:Ask HN: I just want to have fun programming again by mirchiseth on Wednesday February 08, 2023 @01:52PM (#34712840)
Homeassistant is such a useful project. I use it for self hosting bitwarden, ubiquiti addon and bunch of smart home devices. For SSL I have been using local root authority but is a pain to maintain. I am able to access HA client from browser and Android phones but iPhones don't want to play. How did you do LetsEncrypt with HA?
Re:Ask HN: I just want to have fun programming again by giobox on Wednesday February 08, 2023 @01:59PM (#34712961)
I just did Caddy container as reverse proxy for my HA server - Caddy has support for Letsencrypt built in. Needs very little configuration. This approach lets you put SSL on any webservice you are running, the configuration is not specific to HA at all.

https://caddyserver.com/

https://en.wikipedia.org/wiki/Reverse_proxy

If you use LetsEncrypt's DNS-01 challenge to setup the SSL automatically, you can even deploy valid working SSL for IPs in the private range (192.168.x.x, 10.x.x.x etc etc), allowing auto-deployment of SSL for private services on your LAN, not just publicly accessible/exposed IPs. You can get around port forwarding during initial letsencrypt setup with this too, as all happens via DNS providers public APIs.

> https://letsencrypt.org/docs/challenge-types/#dns-01-challen...

Caddy is really easy to deploy as a Docker instance as well. There are many, many ways to accomplish LetsEncyrypt with HA though! It's really just an example of a common generic reverse proxy problem - searching for "reverse proxy letsencrypt" will show you many other ways to do it too. If you are using Docker to host your services at small scale, there are some really clever options now that auto-configure Caddy and SSL via letsencrypt all just using docker compose:

https://github.com/lucaslorentz/caddy-docker-proxy

Re:Ask HN: I just want to have fun programming again by grep_name on Wednesday February 08, 2023 @05:42PM (#34716618)
Ha, I also got most of my initial experience the same way :) I use k8s at work now, am somewhat frustrated with it and would like to run a k8s cluster at home, but I have a hard time justifying it. I'm not sure if a pi k8s cluster would make sense for me either, although I do have enough pis laying around for a small-ish one. I've considered ordering a couple (more) r210 ii's and making a cluster, but don't know what the stack would be exactly.The beefiest machine in my home currently is an unraid server, and I run a small number of services in a docker-compose stack on a vps.

Do you find that there are functions that are unique to k8s for a selfhoster that demand a system with that kind of overhead?

Re:Ask HN: I just want to have fun programming again by tharkun__ on Wednesday February 08, 2023 @07:46PM (#34718098)
Setting stuff up in order to have fun with it and learn is always worth it. It's "always" worth it to use overkill on a personal project.

Of course you don't need that k8s cluster and of course you shouldn't really use pis. But it'll be fun. You could also just use 10 vms running on your computer and each vm is one node in the k8s cluster if you don't want to buy hardware. Then you see what happens when "hardware failure" occurs. I.e. you kill a vm without shutting it down properly. Or yank the power on one of the pis.

The point is, once you need it for a real project now you know how it works and when to actually use it and when not to. Heck all the stuff I set up on my single old 200MHz system, no vms nothing taught me basically everything I needed to become an actual sys/network admin later.

Re:Ask HN: I just want to have fun programming again by scubbo on Thursday February 09, 2023 @11:14AM (#34726217)
> I've now got a small Pi cluster running k8s to deliver a bunch of services at home, and its all really easy to maintain. I've absolutely used the skills and knowledge gained in my day job too, which is nice.

I'm reasonably sure that being able to talk about my home k3s-on-pi's cluster was a positive factor in getting my latest job :)

Re:Ask HN: I just want to have fun programming again by beamgirl on Wednesday February 08, 2023 @11:59AM (#34710947)
I've found that sometimes the hardest issue is getting mentally unblocked enough to find a problem that seems approachable. One of the best ways I've found to prompt you is to start browsing libraries till you find some that imply a goal you might enjoy. My last fun personal project was making a command line AppleTV remote with a lib for doing such. I'd been so burnt out till I saw a random link to the lib, and it just sucked me in.
Re:Ask HN: I just want to have fun programming again by jasode on Wednesday February 08, 2023 @12:11PM (#34711161)
>, but I think you need a fun problem to solve. Pick a toy app and work on it.

I think you've read the op's question too fast and not fully empathized with his situation. He already found a problem when he wrote, "I have a clear idea in mind with some code already in C++ to proof-of-concept it for myself,

The bulk of op's words surrounding that goal is asking about the process of coding being fun. But then we get several (well-meaning) advice to just focus on the end goal being fun rather than the coding process being fun. Yes, that's a valid perspective -- but a lot of people also require the process itself to be fun too.

E.g. Let's say a programmer wants to code a custom music library manager:

- John wants to use Lisp because having a REPL for quick iteration and feedback loop is "more fun".

- Jane would rather use Python because having a bunch of 3rd-party libraries for lots of tasks is "more fun" than coding a lot of boring low-level tasks from scratch.

Advising people to have a sort of zen enlightenment of only caring about the final product and being totally detached from the process is unrealistic for many programmers. It's a perspective that may work for you but for many others, the particular tools do matter in terms of joy.

In the op's case, he wished that there was a tool that was cross-platform, with easy multi-threading, no incidental complexity, etc. (To answer op's question, there isn't such a tool that meets all requirements.)

We often see a variation of the lament: "I wish programmers would quit focusing on particular programming languages. They're all Turing Complete. Just pick one and get on with it."

That's true if the product is corporate project. In that case, the employee needs to suck it up and just use whatever (not-so-fun) programming tool to get the job done. But personal projects like the op's question can try to look for alternative coding environments that are more fun to use.

An analogy in woodworking was illustrated by 2 different shows on PBS:

- Norm Abrams (The New Yankee Workshop) used power tools to build his projects.

- Roy Underhill (The Woodwright's Shop) used hand tools to build his projects.

Roy Underhill likes hand tools because power tools are noisy. On the other hand, Norm Abrams uses power tools as it's fast. Neither are wrong. Both can craft a chair but the tools still matter.

A lot of woodworkers can't just detach themselves from the usage of tools and only focus on the final product. The choice and use of particular tools is a core part of the joy.