logoalt Hacker News

Writing toy software is a joy

655 pointsby bundieyesterday at 3:09 PM259 commentsview on HN

Comments

dakiolyesterday at 4:29 PM

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

show 35 replies
roughlyyesterday at 3:52 PM

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 - whatever I could get done in a week was what I’d do for this project. The experience of going from zero to something useable in either a new language or a new framework or a new field in a week was enormously confidence-building - learning that I was actually pretty good at this whole programming thing and breaking through a bunch of walls I’d run into previously in my professional career gave me an incredible amount of trust in myself to be able to take on new challenges that really helped me when I was looking for a new job. At the same time, it reminded me what I loved about programming - in a week, I was able to build something that solved a problem I had or that someone I knew had, and I got to do so in a creative and intellectually challenging fashion.

If ever you find yourself in a position to take a couple months off between jobs, skip the leetcoding or whatever else and just build some toy projects - you’ll be amazed how much you already know.

show 6 replies
diegomacarioyesterday at 7:39 PM

I did this for years to learn computer graphics. I spent so many weekends and evenings building weird things that never made me a single dollar, but all the knowledge I gained eventually led to the job of my dreams. Here are some of the weird things I built:

- Tiny ray-tracer: https://github.com/diegomacario/Super-Sunshine - 2D rigid-body simulator: https://github.com/diegomacario/Dyna-Kinematics - Character animation system: https://diegomacario.github.io/Animation-Experiments/public/... - Animation curve visualizer: https://diegomacario.github.io/Animation-Magic/public/index.... - Motion capture playback in the web: https://diegomacario.github.io/Hands-In-The-Web/public/index...

That's a mountain of code that served one purpose: to gain knowledge.

Swizecyesterday at 3:32 PM

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.

show 10 replies
eliasdornelesyesterday at 6:00 PM

I quite enjoy the spirit of the article, and I believe joy in programming has become even more important in the AI agent coding age we're leaving.

However, am I the only one finding those time estimates way too short?

I'm not the fastest programmer on Earth, but I'm not the slowest either, and I think most of those projects would take me a lot more time than those estimates, specially if I'd be working only 2-3 hours per day.

I feel most of those projects would take significant time researching and learning about the subjects, before even starting to code.

Example: recently I replaced my Pelican blog by my own hacky static site generator written in Odin, working 2-3h per day, it took me 2 weeks -- and this is a simpler project than many on that list.

show 5 replies
purplesyringayesterday at 6:15 PM

I'm surprised by the number of bad takes on LLMs in this thread.

LLMs spoon-feed you with information about how things are implemented. You are not supposed to know how everything works when you start these projects. You're supposed to try your best, inevitably fail, then research the topic and understand where you went wrong, then adjust your approach. If you know how everything works and just follow the tutorial, you won't know what makes other methods fail, and by proxy what makes the one you chose work.

Write a language parser with a regex. Find out that it can't parse recursive statements. You've now learnt that regex can only parse a specific subset of syntaxes. Try to workaround this by pattern-matching the most nested statement first. Find out that it blows up performance. You now know more about time complexity and know what to watch out for when you write a real parser.

Write a non-optimizing compiler from scratch. Find out that you can't make do with unsound optimizations because you can't keep track of what optimizations are applied where. Find out that implementing sound optimizations is hard because you need to track use-def chains. Then you'll understand why SSA is used. Find out that code motion is a mess. Learn about sea of nodes. Merge every optimization pass into one because you're unable to order passes right. Learn how e-graphs solve this.

Write a layout engine. Get stuck on being unable to define what a "width" is. Workaround this with min/max/natural widths, introduce binary search, etc. Learn how this stuff works in practice (this is something I haven't personally done yet).

They say we learn from mistakes. Please don't let the smart (or "smart", depending on how you look at it) machine stop you from making them. It's not a teacher and it doesn't know how to educate.

show 2 replies
ravenstineyesterday at 3:58 PM

One thing I've learned about building toy software projects or even just small personal software (stuff that's actually useful) is to avoid implementing flexible configuration engines. I used to fall into this trap where I thought I should make my software to be configuration-centric so that it would be usable for others in case I decided to make my code FOSS. The problem with that is making a configuration engine is a lot less efficient than just writing the code to do the damn thing. I've almost never shared any code outside of small libraries that were very low in complexity, and I wasted a lot of time writing code for other hypothetical people when I should have just been writing it for myself.

show 3 replies
oconnor663yesterday at 4:17 PM

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

I get where this is coming from, and I even agree with it today, but I also want to tag it as "don't cache this opinion too hard". It's interesting to notice when and how our advice for getting help from AI is different from our advice for getting help from other humans. It would be kind of odd, wouldn't it, to put a paragraph at the bottom of a blog post that said "by the way if you have friends who are expert programmers, I don't recommend asking them for help." I think there are two clear reasons that feels odd: 1) expert friends can actually answer your questions and get you personally unstuck, which is huge, and 2) expert friends usually understand why you're doing what you're doing and that they're supposed to help do it yourself instead of just doing it for you.

One thing I bet few people have tried (because I haven't tried it myself) is actually asking an LLM to guide you like an expert friend would, instead of just spitting out code to solve your problem. Maybe they're bad at that, I wouldn't be surprised. But if so, I bet in a year or two they'll be amazing at it. It might be good to build the habit of clarifying what sort of help you need, instead of assuming an LLM will give you the wrong kind of help?

show 4 replies
notepad0x90yesterday at 4:22 PM

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 much else I actually enjoy in life, so ruining it with peer-pressure, chasing clout, impressing people, worrying about career prospects is a buzz-kill. I used to think that if I am passionate about something like this and I get really good at it, maybe it will help my career and prospects but the real world doesn't work that way. it sucks the joy, fun and passion out of you if you let it.

All that to say it is perfectly fine to like coding for the sake of enjoying it and nothing more. Others play a sport (or watch it), work on arts & crafts, or raise chickens or whatever, I code. I am not particularly skilled or great at coding either, I just enjoy it, and that's it.

If you have fun coding, be protective of your joy! even if you don't take it to the extreme like I do. that's my only point.

show 1 reply
hu3yesterday at 4:19 PM

I've written a ton of throwaway toy applications for personal use.

The tip I can share is: publish them on GitHub.

You'll find out some of them are useful to a lot of people.

I have multiple toy repos with 20+ stars and one with 200+ stars.

Just put one screenshot and simple instructions to run on README.md, no need to write a manual.

As simple as `npm install && npm run start` is enough instruction for most.

The screenshot is important tho.

show 3 replies
josefrescoyesterday at 5:44 PM

Vibe coding via Claude has re-ignited my passion for fun, side programming projects. After a few false starts, I figured out the tooling, processes and in just a few weeks I've built several apps and I'm having new ideas consistently:

-Family calendar/weather dashboard

-Bluesky reader that allows you to hide posts you've "seen"

-Work PM dashboard to make time tracking more gamified and dare I say... fun?

-Chrome Reddit extension that hides posts after viewing for X seconds

-A WordPress plugin to replace a plugin no longer maintained

What I love and had to get used to was looking/using these apps and being happy with them being only 90%. Initially I had Claude make many UI enhancements but I learned to just let most stuff go and focus on the function and building new stuff, not refinement.

show 1 reply
rybosomeyesterday at 3:50 PM

This is quite an impressive list, and many of the things ranking low in difficulty for the author would have been quite high for me. It's definitely inspiring, makes me want to dust off a toy of my own.

That said, I feel the conclusion on learning with LLMs deserves some more nuance. It really depends on how you use them.

This is a terrible prompt for learning:

> Implement this solution for me

This is an AMAZING prompt for learning:

> Please give me an overview of ELF. Focus on the highest level abstractions, more of the 'why' than the 'how'

Certainly one can argue that it takes something away, in that you did not have to conduct the research yourself whenever a question occurred. However, if you are engaging in honest intellectual work (i.e. really thinking), then having a Socratic teacher always ready to discuss your questions is a profound accelerant to the learning process.

show 1 reply
_bentonyesterday at 5:23 PM

Possibly tangential, but I've really been enjoying writing software with very minimal tech stacks with no dependencies (or very few). Go works well for this, but really any language that lets you create a file and just start writing straightforward code is sufficient. As soon as I need to use some CLI to scaffold out a project with tens or hundreds of files, or pull in a ton of dependencies, I kind of check out. It's fine when you have a team and a big serious project, but in my free time I really just enjoy having a couple files of straightforward code and that's it.

didipyesterday at 4:14 PM

Big time! Almost all of my interesting knowledge came from toy projects I made to solve my own problems (or zero problem solved but it was fun so I did it anyway).

For example, I wanted to know if I can make 1 Kubernetes cluster span multi region, multi cloud. So I slapped TailScale for networking, replaced etcd with multi-region PostgreSQL Aurora, and span the Kubelets between my Raspberry Pi, Digital Ocean VMs, and AWS EC2. And then as the "customer app", I run CockroachDB, rqlite, and tiDB on it (one at a time, I don't want to burn money for this).

It was janky, zero SLA, I likely mis-tuned all the databases, and cost a bit of money :(. But it totally worked, all the db nodes can discover each other. I was satisfied and that's enough.

Another example would be writing my own Raft-backed database, similar to the ToyDB Rust project posted here. Is the DB useful? No. But it is so much fun and I learned a lot.

My AWS S3 bucket and private Git repo are a graveyard full of toy projects. My own Dropbox clone, Pinterest clone, Delicious clone, subset of Google Maps clone, etc. etc. are all RIP in there.

show 2 replies
heikkilevantoyesterday at 8:28 PM

The first example in the article, a regex engine, clicked for me. I had read the book on beautiful code #, and the first short story was about a regex thing by none other than Dennis Ritchie. As Fate would have it, my job required me to make a tool for web scraping. Inspired by that book I created a pattern matching language for dom trees. And a click and point tool to create those patterns. At the best time or company had a full time person maintaining maybe 10k patterns to scrape days from library catalogs... It was not a toy project, but it did feel like, even if I got paid to do it.

# Andy Oran, Greg Wilson: "Beautiful code"

rubicon33yesterday at 3:35 PM

> In 2025, the beauty and craft of writing software is being eroded. AI is threatening to replace us (or, at least, the most joyful aspects of our craft) and software development is being increasingly commodified, measured, packaged, and industrialised. Software development needs more simple joy, and I’ve found that creating toy programs is a great way to remember why I started working with computers again.

Sad but true. I especially feel that comment about losing the most “joyful” part.

show 2 replies
admiralrohantoday at 7:58 AM

Good list of projects. I have to disagree on the point on usage of LLMs.

These projects are going to be sideprojects and with busy schedule it might get tough to find motivation. Using LLMs for some of the parts can give the momentum required to continue.

We can also learn from studying the output generated by LLMs.

declan_robertsyesterday at 4:01 PM

This is one thing I don't get about the LLM people. For most of us who are professionals, writing software is not very hard, and it is in fact fun!

I don't need to let a computer write my software. I already know how, and I enjoy it. I need the computer to do the hard part (gathering requirements, speaking with stakeholders, etc).

Software is a joy.

show 1 reply
akkartikyesterday at 3:30 PM

Ha, these "toys" are quite ambitious. Here are my joyful toys: https://akkartik.itch.io/carousel/devlog

ericydtoday at 12:00 AM

I really like the idea purposed here but none of these projects are even remotely interesting to me. It's moments like this when I start to question whether or not I'm losing my love of programming.

show 1 reply
aldousd666yesterday at 5:10 PM

I've done a lot of these kinds of projects. I got really sucked into a rabbit hole with the parser/interpreter/compiler that I was stuck (happily) in "I need to understand this so I will build one" mode. I eventually built a database server and query language for it. (for a business) This was in 2009, but I highly identify with his method of learning by doing for fun!

mathewshentoday at 7:32 AM

Agree and that's why I create https://github.com/ai-glimpse

Lercyesterday at 9:49 PM

I added up a score for myself from that list giving me one point for something that more-or-less matches an item from this list and a half point for something vaguely similar. I got 15.5

The compiler, chess engine, and text-editor have been targets for years but I haven't quite gotten around to doing them.

I like the idea of the bitwise challenge.

I had been thinking that another challenge that I'd like to see (and have a go at) might be a plotPixel Challenge.

Make a game that does all rendering with

    PlotPixel(x : int, y : int, color:??? )
    NextFrame(offScreen:boolean = true, clearNow:boolean =true, clearColor:??? =0)
Unsure on byte for 256 indexed color or 32 bit for setting 24 bit color from ARGB as r= rA+R, g=gA+G, b=b*A+B.

It would be easy enough to test if a game obeyed the rules because a full video capture of the game should be possible by intercepting just those functions.

Perhaps a (generous) source code size constraint to stop people going too crazy. (maybe 64/128/256k source-code, zipped). Not for code golfing as much as to avoid people trying to squeeze Crysis though a straw.

thomascountzyesterday at 3:38 PM

  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!

show 3 replies
vinceguidryyesterday at 4:18 PM

I'm writing a shell right now in ruby after seeing a few other folks doing so and looking at the current state of shell development and not finding anything I really liked. It is indeed, a lot of fun. Using Vidar's really quite nice text editor to do so is equally pleasurable.

https://github.com/vidarh/re

Got a few PRs for you when you get to this, friend.

dwh452yesterday at 4:28 PM

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?

show 5 replies
andreygrehovtoday at 2:07 AM

My kids (7-10yo) are currently learning programming. I’m debating if I should show them the LLM. Leaning towards no :)

jekwoooooeyesterday at 5:11 PM

I agree. It’s fun to just write code to solve problems or even for fun. I love go (it’s the best all around language and it’s not even close) so for fun I wrote a game engine and a small game that I might try to turn into an actual game. It’s good to keep fresh. I’ve also tried to do llm free days

alanbernsteinyesterday at 6:03 PM

I agree with the sentiment in theory, but the time pressures of adult life make this difficult.

> What I cannot create, I do not understand

I suspect Mr Feynman would have phrased this a bit differently if he had first-hand experience with the modern front-end technology treadmill.

AutistiCoderyesterday at 5:51 PM

I know writing "toy" software has exposed me to new tools I might not have otherwise even known about.

I can't afford much n the way of software, so I've been trying to learn to make do with FOSS.

ppqqrryesterday at 5:17 PM

Problem/Truth is that writing toy software is not profitable - that's not to say one must always work on profitable things; what i mean is that it's being kept unprofitable, because in a hyper-saturated monopolized attention economy, every piece of "toy" software that isn't a video game or a plugin to some proprietary app ecosystem is essentially an act of subversion, an attempted "theft" or piracy of what the Company considers its rightful property: the sum of all disposable human attention.

show 1 reply
falcor84yesterday at 4:17 PM

I love that attitude! This is essentially my preferred answer to "what would people do in a post-AGI world when they don't need to work any more".

hiAndrewQuinnyesterday at 7:42 PM

I don't really get a lot of joy out of building copies of things other people have done better than me before. Almost by definition, no list of cool toy projects is going to appeal to me for that reason. I might like the techniques or algorithms employed within them, but frankly if I'm after that kind of knowledge I just find Leetcode and traditional studying to be both higher value and more fun.

But I do like writing programs in some strange new, non-CS domain where very little software to address my very particular needs already exists. Most of the software I've written in the last few years has been of this kind, for the purposes of learning Finnish. It is amazing what a few shell scripts, fzf wrappers, and well-timed calls to an LLM can do for accelerating one's own learning process.

zazazxtoday at 1:29 AM

Software is like baseball. Never stop practicing.

munificentyesterday at 5:09 PM

An anecdote about how a toy project _really_ helped me out:

I work on Dart professionally. I've also been tinkering on a toy programming language that may never see the light of day. My toy language has gone through several incarnations but a while back I was working on adding algebraic datatypes, pattern matching, and exhaustiveness checking to it.

The canonical algorithm for exhaustiveness checking is this paper by Luc Maranget: http://moscova.inria.fr/~maranget/papers/warn/warn.pdf

When I first started dabbling in programming languages over a decade ago, I tried to understand that paper for weeks and just could not wrap my head around it. I don't have much of a formal CS background and that paper was impenetrable to me.

So here I am tinkering on my toy programming language and I run into again. I give it another try and laboriously implement it in my interpreter, basically doing a straight translation. I don't understand the code, but it seems to sort of work. So then I start refactoring it a tiny bit at a time into a style that fits the way I think about code. Eventually the algorithm sort of folds into itself and before I know it, I finally understand how it works. The end result was only a page or so of code, but my toy language had real exhaustiveness checking work.

Meanwhile, at work, I am working on adding pattern matching and exhaustiveness checking to Dart [1]. Exhaustiveness checking here is a much harder proposition because Dart has subtyping, unlike my toy language and the ML languages that Maranget's paper works on.

I'd been hacking away at an exhaustiveness algorithm for Dart based on a couple of papers about Scala's approach but they were sort of approximative and inelegant (in my opinion, maybe they are a great fit for Scala).

But once I understood Maranget's algorithm from implementing it in my toy project, it finally clicked for me how it could be adapted to work with subtyping in a sound, coherent way. I wrote it up as quickly as I could and (with a lot of additional help from a teammate to handle generics), that became the algorithm we shipped:

https://github.com/dart-lang/language/blob/main/accepted/3.0...

It wouldn't have happened if I hadn't coincidentally been working on a toy pattern matching implementation at home.

[1]: https://dart.dev/language/patterns

show 1 reply
djmipsyesterday at 11:27 PM

Consider it like exercise. Pro atheletes train and exercise. Pro software developers should train and exercise their craft.

asicspyesterday at 3:34 PM

Dupe: https://news.ycombinator.com/item?id=44284291 (117 points | 8 days ago | 28 comments)

Seems like the link changed, and thus not caught by the dupe detector.

show 1 reply
kgwxdyesterday at 4:23 PM

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

linsomniacyesterday at 5:21 PM

>Perhaps you’re a user of LLMs. [...] But I might suggest resisting the temptation to use them for projects like this.

I agree. However: Your best bet is likely to build it by hand and then see if you can get an LLM to build it.

It is looking like we are living in a world where an important tool to have in your toolbox is going to be the skills and experience of working with the LLM/AI tooling. There are skills, knowledge, tools, tips and techniques that you need to develop to effectively use these tools, just like the honing you get from writing the code.

Over just the last half hour I did a brain dump of "hot tips" to a friend of mine who is just starting to use Claude Code to kick-start him.

The LLMs are REALLY good at writing small toy programs, and at the end of the day it's great to have little tools that you'll use every day.

nektroyesterday at 10:12 PM

love the spirit of the article, the time frames listed are quite unrealistic however

show 1 reply
b0a04glyesterday at 6:37 PM

it's more of compression. fastest way to get 10 yrs of backend sense in like 3 weekends is build fake OS scheduler or just kv store with fs persistence. and the shortcuts your brain takes after that, scary fast. you just start seeing stuff everywhere. like oh this LRU cache is just dumb DLL with hashmap. or this parser is just recursive descent with some peek-ahead logic stapled on. and then you can't unsee it. you start breaking down every abstraction you touch. even prod libs look like toys.

also lol toy projects expose your defaults hard. how you name vars when there's no PR. how you layout dirs when no one's looking. do you even test stuff or just printf until it works. do you log or do you trace or just guess.

cdelsolaryesterday at 4:34 PM

I love the article but disagree with the final point. It wasn't until LLMs came out that my toy projects have all been greatly upgraded with features and functionality. I simply didn't have time to do so before.

show 1 reply
bowsamicyesterday at 6:14 PM

If you're allowed! Apple says no

bitwizeyesterday at 5:58 PM

Ever since Nintendo let the mask slip and got up to their old evil bullshit with the Switch 2 launch, I decided to dust off the solution my teenage self came up with: I'll just play the video games I write. Even if they're small and amateurish, they're worlds and experiences crafted personally for me. And I don't have to pay a cent for them, let alone put up with "key carts", DRM bullshit, or we-can-remotely-brick-your-console bullshit.

I'm sure I'll keep buying commercial games from companies with reasonable terms (GOG, maybe?). But writing my own is great fun. It'd be nice if someone else enjoys them, but they're mainly for my own enjoyment.

Oh, and I "vibe code" the old fashioned way: with a REPL and some chill tunes.

show 1 reply
scarface_74today at 1:59 AM

It seems to be an unpopular opinion here. But the last thing I want to do when I get off of work is touch a computer. I haven’t desired to be a hobbyist developer nor have I written a single line of code that I haven’t gotten paid for since the day I walked across the stage with my CS degree in 1996. I was hobbyist for 10 years before then.

Life is too short to spend in front of computer.

Writing software funds my joy.

tayo42yesterday at 7:19 PM

I'm always mixed on this. In the moment it can be fun. In the end when it inevitably feels useless, idk it feels bad. Like I spent a ton of time on something and get some knowledge out of it. It doesn't make my job better and I guess doesn't improve my situation much. My rust sub-directory feels like a digital closet of rpis collecting dust.

The things I find fun writing and learning about and the tools I use to do it are so disconnected from anything i do professionally.

coolThingsFirstyesterday at 4:56 PM

Waste of time, you wont impress anyone because there are no more software jobs left.

Go to gym.

show 1 reply
xixixaoyesterday at 7:55 PM

Overengineering is a joy. Using LLMs is a joy. Building something novel, bespoke, something you wouldn’t do when ruthlessly prioritizing for profit.

herokuyesterday at 4:08 PM

Reinventing existing software has 0 merit. If you cannot be creative enough to invent new things, you shouldn't bother working.

show 4 replies