3 ms·
Beautifully crafted production code exists but the necessary conditions are almost never consistently available -- it requires a lot of time and energy to fight
by jandrewrogers 5y ago
Beautifully crafted production code exists but the necessary conditions are almost never consistently available -- it requires a lot of time and energy to fight code entropy. Even most people that write software don't care that much; like the business, anything that meets the acceptance criteria is usually considered "good enough". And most professional, production code is the accumulated cruft of that reality.
In the rare cases where you do see elegant, clean, high-quality production code, it is usually because 1) only a very small number of people are writing that code, 2) there is a strong cultural norm of rigorous code hygiene among those people, 3) they do not have prohibitive time pressure to ship, and 4) the requirement to maintain backward compatibility across versions of the code is weak. In practice, these conditions are very rare. I've mostly seen it in what is essentially hobby code, where the craft was a large part of the objective (and hobby code that becomes production code tends to quickly take on the characteristics of other production code).
There simply aren't enough people that care about code quality for its own sake, and the economics of maintaining very high-quality code rarely makes sense in practice.