Ask HN: What is the best code base you ever worked on?
561 pointsAnd what made it so good?
Was there someone enforcing good practices top down? Just being in a group of great engineers? Or something else?
Was there someone enforcing good practices top down? Just being in a group of great engineers? Or something else?
Comments (454) 104 threads
Show all comments
Showing thread 4 of 104
This was ~10y ago, so my memory might not serve me well. A bit of context:
- proprietary service, written in Python, maaany KLOC,
- hundreds of engineers worked on it,
- before this framework, writing the integration tests was difficult -- you had a base framework, but the tests had no structure, everyone rolled out their own complicated way of wiring things -- very convoluted and flaky.
The new integration tests framework was build by a recently joined senior engineer. TBF, it's wrong to say that it's was a framework, if you think in the xUnit sense. This guy built a set of business components that you could connect & combine in a sound way to build your integration test. Doesn't sound like much, but it significantly simplified writing integration tests (it still had rough edges, but it was 10x improvement). It's rare to see the chaos being tamed in such elegant way.
What this guy did:
- built on top of the existing integration tests framework (didn't rollout something from zero),
- defined a clear semantic for the test components,
- built the initial set of the test components,
- held a strong ownership over the code -- through the code review he ensured that the new components follow semantics, and that each test component is covered by its own test (yep, tests for the test doubles, you don't see that very often).
Did it work well longterm? Unfortunately, no. He stayed relatively short (<2y). His framework deteriorated under the new ownership.
Travis, if you are reading this and you recognized yourself, thank you for your work!
Maybe the issue is that it easily comes apart without a dedicated censor, so to speak, and nobody wanted to have that role.
Continue this thread — 4 replies
I think the issue is that integ tests are not really a place that sees "development". You write the integ tests, and move on, you are not actively introducing more integ tests.
I think that's a shame that this is the common view of the people that need to fund this. Bad integ tests mean bad dev exp, which then results in increased attrition and dissatisfaction.