| Mozart doesn’t feel right. The code isn’t beautiful and elegant. It’s not built to last (at least for ffmpeg) or be some kind of masterpiece. He writes code to get a job done or tickle some intellectual curiosity. It’s not beautiful but that’s OK. I think Unicorn illustrates one of the issues with his style. It wouldn’t have needed to exist of the QEMU code was architected into neat components. But then writing spaghetti code that gets the job done is why he’s so fast and effective. It’s a trade off https://www.unicorn-engine.org/docs/beyond_qemu.html I think there’s actually a sharp contrast with John Carmack here. Fabrice might be smarter and faster but Carmack is perhaps a better software engineer. You can really see the development of his style from Doom and Quake source code, where Quake 3 source is like a beautiful gem of a code base. |
Then you have the other end of the spectrum where people are too focused on hacking stuff together that the end result is unmaintainable.
The reality is there needs to be a bit of both to be a good developer.
For example, if you’re building a proof of concept (POC), then it’s more important to prove the idea than it is to define the architecture. And the reason for that is because you don’t always understand how the final product (whether it’s commercial software or a FOSS library) is best architected until you’ve gone through a few drafts of the idea. So spaghetti code isn’t necessarily a bad thing.
But then when you know your idea works and you need to flesh it out into something more durable, you start to refactor the spaghetti into something more maintainable.
Fabrice mainly releases POCs while Carmack mainly releases finished products. So it’s unsurprising you’ll see a difference in the style of architecting in their code.
I used to be someone who focused on beautiful code for my POCs too. And used to fail to release any personal projects. Then one day I learned to embrace the chaos of POCs and realised that you can getting something built and tarting it up afterwards was better than failing to build anything at all.