Hacker News new | ask | show | jobs
by khedoros1 3172 days ago
You've said shitty and complex code...how about voluminous code, or old code? The main product that I work on has about 2 million lines of C, C++, and Java code in the core of the system, then about 20 plugins ranging in size from a few thousand lines to a few hundred thousand lines.

We basically hire for sections of the codebase. It's pretty common for developers to discover the existence of an area of code that they haven't had to touch before and were unaware of the existence of even years after starting to work here.

2 comments

2 Million! Wow! Now that is a LOT of code. I can't imagine anyone being able to master all of that and then keep up with the changes. That would take a decade at least!

For reference, the Bible has ~30k verses in it. A verse isn't a line of code, but I'd say mastering the Bible is a good benchmark for equivalent complexity to coding. If anything the Bible is more straightforward than a 2 million line code base.

> 2 Million! Wow! Now that is a LOT of code. I can't imagine anyone being able to master all of that and then keep up with the changes. That would take a decade at least!

The people who'd I'd say mastered the core codebase were the people that wrote it. Over the last couple years, they've been laid off one by one, but most of them have been around for 15-18 years already (the prototypes were built around 1998, and I think that the current code descends from stuff written in 1999). I've been around it for about 8 years now, in total. I wrote most of the current build system, a lot of the packaging code, the initial version of two or three of the plugins, and individual features in a few of the others.

The Bible has a distinctly different kind of complexity, though. Social complexity, rather than technical. A line of code has an unambiguous meaning, with other lines of code, the OS, and the underlying hardware providing an unambiguous context. A verse of scripture can have multiple simultaneous meanings, and the context is provided both by surrounding text and by the millennia-old cultures that the verses were written in. I'm not sure how I'd make the comparison.

Why have everyone know all of 2M lines of code? Programming is about abstraction, knowing what a subsystem does, what it's responsible for should be adequate most of the time until you need to fix something inside it.

We aren't doctors, we just need the skills to figure things out and fix them quickly.

The system's more broad than deep, mostly. Lots of functionality covered, but for the most part, the abstractions aren't super-deep.

My point was that someone can ramp up quickly on a portion of the system and have a vague idea of other parts of it, but "mastering" it covers too much code to do it in a reasonable time. Each plugin introduces special cases for the data flow, and the plumbing for that ends up running through the whole system.