Live data from Hacker News

Writing toy software is a joy

blog.jsbarretto.com

31–40 of 318 posts

Re: Writing toy software is a joy

#31
I've abandoned tons of toy code but I have 1 thing I wrote in a weekend for myself that I've been mostly blindly using ever since. I just realized while typing this that it's been 8 years. It's a Firefox add-on that I only published to the "store" because running a local-only add-on is a PITA.

It takes regex(s), searches attribute values and/or inner text, and applies a given CSS rule to elements that match. The UI is awful (regex escaped to be inside a json string escaped to be inside a textarea all parsed by javascript) but I know how to use it.

It can probably be used for many things, but I just use it to set visibility: none on elements that link to sites I don't ever want to see (facebook, twitter, linkedin, popular pay/register-walled sites, etc). For example, my HN and reddit views just have blank lines where links any of those sites would normally be. For the most part, I add a site once, and forget they ever existed (except when their CEOs do awful things).

Re: Writing toy software is a joy

#32

GameBoy Advance game (difficulty = 3/10, time = 2 weeks) Wow! Physics engine (difficulty = 5/10, time = 1 week) What?? Threaded Virtual Machine (difficulty = 6/10, time = 1 week) I— POSIX shell (difficulty = 4/10, time = 3-5 days) Ok... I can't believe this person :D But regardless of the time estimates, I appreciate the idea!

I have to assume the author listed these times based on how long it would take for someone to follow along with the blogs that they linked to, which demonstrate stripped down simple versions of these things. Like the POSIX shell example just implements a few basic things, but leaves out a lot (and says so).

Re: Writing toy software is a joy

#33

GameBoy Advance game (difficulty = 3/10, time = 2 weeks) Wow! Physics engine (difficulty = 5/10, time = 1 week) What?? Threaded Virtual Machine (difficulty = 6/10, time = 1 week) I— POSIX shell (difficulty = 4/10, time = 3-5 days) Ok... I can't believe this person :D But regardless of the time estimates, I appreciate the idea!

This person is a game developer who works on an open source voxel RPG https://github.com/veloren/veloren - take their estimates with that in mind!

Re: Writing toy software is a joy

#34

I have a couple of projects like this and I'm not sure if they'll ever see the light of day. I enjoy writing code, simple as that. Only a small part of my day job is coding, but honestly, it's more like a hobby than anything. The whole thing with getting people to like your work, using it for clout or padding your resume has an appeal to it that I won't dismiss, but all that takes the fun out of it. I just don't have…

I love this take, and I’m reminded of the important idea that while we all are encouraged to be productive, our own joy is also an important thing for us to produce.

Re: Writing toy software is a joy

#36
post #3

Toy Software is a lot like working on your bike/car/boat/whatever. Working on your bike is fun. Working on the bike you need to ride to work tomorrow is stressful. I miss writing toy software. It’s fun. But inevitably I want to use said software and that’s where the trouble starts. You find all the bugs and none of the time to fix them.

I dunno. Working on a bike you want to use to ride to work could be stressful if it is your only bike, you need it to get to work, and your manager will be really mad if you don’t show up to work one day. If there was any slip available it wouldn’t be so bad.

Actually, I really like this analogy because

1) We can’t really work on non-trivial fixes for our cars because they are too complex

2) We’ve totally structured our living situations around these over-complex beasts

3) Sometimes they do just break down at random, and it becomes a mini-crisis for everyone involved, which can’t really be resolved without missing a day of work to go to a professional

4) The bike is in exactly the same situation, except you can actually fix most bike problems yourself with a little kit

And yet, it is seen as a serious adult thing to have a car, instead of a bicycle.

Some thoughts:

Outside of, like, customer service, most places are throughput-oriented and it doesn’t even really matter all that much if somebody misses a day.

If we really cared about “uptime” of employees, we’d all be living in bicycle range of our jobs, and able to fix our bikes. Maybe there’d be a bus route as well.

Re: Writing toy software is a joy

#37
post #3

Toy Software is a lot like working on your bike/car/boat/whatever. Working on your bike is fun. Working on the bike you need to ride to work tomorrow is stressful. I miss writing toy software. It’s fun. But inevitably I want to use said software and that’s where the trouble starts. You find all the bugs and none of the time to fix them.

>Working on the bike you need to ride to work tomorrow is stressful.

How about working on your bike that other people also work on daily? That's work.

Re: Writing toy software is a joy

#38
What's sad is how difficult it is to write software today. In the old days your dad could buy a C64 and cobble together an application. It should be vastly easier to do the same kind of thing with vastly better building blocks today. Why can't some Grandma drag and drop some widgets and have a recipe manager with sharing features amongst her friends and family?

Re: Writing toy software is a joy

#39
> Perhaps you’re a user of LLMs. I get it, they’re neat tools. They’re useful for certain kinds of learning. But I might suggest resisting the temptation to use them for projects like this. Knowledge is not supposed to be fed to you on a plate

Am I the only one using LLMs as if they were a search engine? So before LLMs I was searching on Google things like "pros cons mysql mongodb". I would read the official documentation of each db, forums, blog posts, stackoverflow entries, etc. It was time consuming on the searching side. The time it took to read all the sources was fine for me (it's learning time, so that's always welcomed). Now with LLMs, I simply prompt the same with a little bit more of context "pros and cons of using mysql vs mongodb when storing photos. Link references". So, I get a quick overview of what to keep an eye on, and the references are there to avoid relying on hallucination.

It's true that sometimes I go ahead and say "give me a data schema for storing photos metadata in postgres. I wanna keep X in a different table, though" (or something like that). But I do that because I know very well what the output should look like (I just don't wanna spend time typing it, and sometimes I forget the actual type that I should use (int vs integer?)).

Re: Writing toy software is a joy

#40
post #11

One of the best things that I’ve done for myself, career-wise, came during a 6-month sabbatical between jobs. I had a bunch of projects that I wanted to do, but I kept finding myself stymied by scope creep - when you don’t have any constraints, it’s hard to decide how big a project should be, and the projects would grow to these massive unfinishable beasts. I decided to constrain myself to one week per project - what…

I would just add that gen AI can actually be a fantastic aid when you're building some toy projects just for yourself. I am primarily a backend engineer, though I am capable on the front end, just not particularly fast. I am especially slow at the voodoo that is CSS. In the past, I would have been turned off from doing some end-to-end personal projects because I know I would have been bogged down just battling CSS fo…

It's a balance I find.

On the one hand, the machines can spin up these bridges over unfamiliar code chasms.

But on the other hand, you (at least I) have no investment in the code. No familiarity with it. No "skin in the game" when I can tell the AI to just redo it.

One way around that is by using the "Chat bots as search engine", and then, rather than cut and pasting stuff into your project, type it in by hand. Even if you're just straight up copying it, by typing it in you have a bit more connection to it. When I do that I can better see the unfamiliar patterns rise out of the code. It's much better for me than just reading it.

Also gives me opportunity to tweak it as I like, which can break things, which can teach me things.

Mind, I've been advocating this "type it, don't paste it" philosophy for years and years, for any code snippet found in a book or tutorial or wherever. It's just now with the bots, the code is more tuned to our exact use case, and the incentive for moving it over is less.

But I find grabbing a blob of code, pasting it into my project, and getting errors so that I can tell the bot whats wrong is not particularly satisfying.

Watching Claude figure out its own errors even less so. (It's very cool to watch, just not very joyful to me outside of "wow, that's cool".)

On the other hand, I have no problem pasting a snippet back with a "what exactly is this doing here" to get better explanations of what I'm seeing.

Post reply on HN