2025-05-17
Reinvent the wheel
Detailed photo with flash from my dad’s mountainbike tire.
Write more “useless” software1
was the claim that inspired me to think about clones and yet-anothers2.
Reinventing the wheel is often said to be a waste of knowledge and time. If someone solved the problem before, why do it yourself? It’s easier to use dependencies especially when they receive periodic contributions.
Well, this is true… until it’s not.
Contents
Why?
Learning
Ever wondered how a json parser, regex, openssl, a webserver and whatsoever worked? Implement it and learn its functionality as you go.
Try out new concepts
Saw this new concept on hacker news or your new favorite O’Reilly book and want to test it? Well, then use what’s already there and reimplement it with the new concept. Both solutions can then be compared with each other. If they fulfill the same specification, the tests might even be usable for benchmarking.
Diversity
Although the specification among several projects is equal and they can be used as drop-ins, their implementation differences can be worth weighting the pros and cons over another. Different languages, paradigms (OOP, functional, logical) or optimizations (SIMD, OpenCL/Cuda, …) can lead to significant performance differences.
Redundancy
Even if it’s the same as some other software, redundancy can become very handy when the community behind one project breaks apart, licenses change or it just gets abandoned3.
Reduced lack of motivation
Working on a problem that has already been solved makes it easier to shift the focus away from what-to-implement to how-to-implement. It’s not “Do I do the right thing?” but “Do I do the thing right?”. The difference may seem subtle, but at least for me, having a known-to-work specification helps me focus on progressing.
Why not
Of course there are also some arguments against it.
Maintenance
While it’s educational and fun to create something new, once it’s used in production by yourself or others, maintenance should be considered every now and then, which can get time consuming.
Hacking over reinventing
Building something from scratch often comes with a bunch of surrounding code that needs to be implemented before coming to the relevant core.
Another approach could be to use something existing and hack it instead. For example fork the go-yaml repo and change or add some parser rules like merging a yaml anchor from another file.
My reinvented wheels
blogctl
Blogctl is the static-site generator for $this blog. There are tons of such blog generators out there, like Hugo or Jekyll.
I wanted to have a project that progresses along with me having my tempo. In the beginning there was just text. Then I’ve added an RSS feed, images, navigation and syntax highlighting. Not only is blogctl my shot on a static site generator, it’s an essential part of the blog and its aesthetic.
L-Systems
L-Systems is an implementation of the formal L-System hosted at lsystem.raphaelpour.de. It was originally invented by A. Lindenmayer for modelling plants, but it’s so versatile that it also can create pretty fractals. It’s featured along with other modeling techniques within the book The algorithmic beauty of plants.
femto
Femto is my shot on Antirez’s command line editor kilo.
md2
In my cs studies, I reimplemented MD2 in C. Although it already was deprecated/broken back then, it gave a simple insight into the mechanics of a hashing algorithm.
osrelease
Osrelease is my go library to access the current OS release with a comparable type.
Game of life
Life is an implementation of Conway’s game of life hosted at life.raphaelpour.de.
KVM Hypervisor
Booting a very trivial bootloader within a virtual machine is surprisingly approachable using KVM, as described in my corresponding blog post.
Vision
There are a few projects I want to do sometime in the future:
- regex parser
- BNF parser
- list interpreter (like Build your own lisp)
- graphic engine with shader (like OpenGL with GLSL)
- config format (ZML is my current favorite name)
- implement an RFC
- essential network stack
- VST/AudioUnit
+rv=ai
- RocketLang - Mein eigener kleiner BER from Chemnitzer Linux-Tage 2024. Shout out to Flipez!
- Yet-Another-Markup-Language, Yet-Another-Compiler-Compiler
- I’m looking at your Opensearch (fork of Elasticsearch) and Valkey (fork of redis). Both forks were made due to a license change from an open source to a closed source one.