Lurker News
And what made it so good?

Was there someone enforcing good practices top down? Just being in a group of great engineers? Or something else?

Comments (454) 104 threads

Earlier comments
rthnbgrredf1 reply#
The best codebase is the one you fully understand. I prefer codebases that are small enough to understand within a week. This is why I like Microservices. Large codebases can be overwhelming and even senior developers working a decade in the company of might not fully understand them. Instead, I prefer maintaining a few Microservices that our team fully comprehends, where the entire codebase fits into a clear mental model. We then interact with other codebases, that have active mental models in other teams, via APIs.
01HNNWZ0MV43FF1 reply#
I'm skeptical of this because I think that a well-architected large codebase should be as good as multiple microservices stapled together at the seams. But then I don't do much web dev.
rthnbgrredf#
> I think that a well-architected large codebase

I agree with you, but the problem is that such codebases rarely exist in practice. This is partly due to laziness and time pressure. When high standards are not maintained or time becomes a constraint, developers start to make compromises in large codebases, such as placing or connecting functionality in inappropriate parts of the codebase. This is much harder to do when access is restricted by an API (contract) between teams, as it forces communication.
Additionally, if parts of the codebase are completely messed up, refactoring in large codebases can be extremely difficult due to complex interconnections with numerous other components. In contrast, with a microservices architecture, if you have 50 microservices and five are poorly designed, you can rewrite them from scratch while ensuring the new versions maintain the same API. This ensures that the other 45 services adhere to the API contract and cannot interfere in any other way.

ryukoposting1 reply#
This is going to sound insane, but I worked on a firmware codebase at an industrial automation company that was remarkable.

Everything was working against it. No RTOS. Subversion. GCC 5-point-something (I think?).
It was an incredible mass of preprocessor crimes. I'm talking about #including the same file 10 times and redefining some macros each time to make the file do something different.
It used a stackless coroutine library called Protothread, which itself is a preprocessor felony.
And yet? It was brilliant. Compilation was lightning quick. F5, lean back in your chair, and boom, you're running your code. I understand that this kind of thing is normal for web/backend/etc folks, but I yearn for the days of sub-15 second firmware compile times.
It was easy to flip a couple flags and compile it to a Win32-based simulator. Preprocessor felonies are felonies, but when you stick to a small handful of agreed-upon felonies, you can actually reap the benefits of some very sophisticated metaprogramming, while staying close enough to the hardware that it's easy to look at a datasheet and understand exactly what your code is doing.

jhayward#
> Preprocessor felonies are felonies, but when you stick to a small handful of agreed-upon felonies, you can actually reap the benefits

There's a saying, "Only commit one crime at a time". Knowing when to cheat is a fairly high-risk but pro move.

bitwize#
I haven't contributed to it yet, but one of my personal projects involves hacking NetBSD. Absolutely, legendarily good code base, so thoroughly documented you can actually begin kernel hacking just by reading the man pages. The code itself is really consistent and easy to read; it's pretty clear the NetBSD team enforces a consistent style as well as high standards for thorough documentation. NetBSD is how C code should be done.

The other code base I really liked was QRes, ITA Software's airline reservation system written in Common Lisp. I contracted at Google a few years ago doing maintenance on this code base before it was shuttered for good. Aside from being just high-quality Lisp code, it had its own testing language that allowed new tests to be written in just a few lines or so -- tests that sent XML queries with generated data to the running system and checked for specific results in specific XPath paths. Because the system was Lisp, implementing and extending this testing language was relatively easy. Using it even more so. Truly the only system I was happy to write tests for, rather than seeing it as a necessary chore.

jsrcout1 reply#
It's refreshing to read the replies here as I am currently working in the worst codebase I've ever seen in my life. It's just unimaginably bad.
mythrwy#
You must be the guy who replaced me at my last job.

Load more comments