4 ms·
I rewrote a mission critical application. The original app was something else. One function had 1500+ lines of code. It was the ugliest thing I have seen in my
by avgDev 3y ago
I rewrote a mission critical application. The original app was something else. One function had 1500+ lines of code. It was the ugliest thing I have seen in my life. We wrote cleaner code in early college years. However, that code ran the business for 12 years with almost 0 modifications. People created work around for some stuff. Error handling was poor. But the goal was achieved and business continued to grow.
I think devs in general sweat too much about code quality.
- refactor_master 3y ago> However, that code ran the business for 12 years with almost 0 modifications We have code like that, and it requires everything around it to twist and contort to comply with the beast of unmaintainable at the center of it all, simply because at this point it has so poor test coverage and is so incredibly mission critical now.
- avgDev 3y agoTest coverage!? I don't think that word was in the vocabulary of the dev who wrote it :).
- wizofaus 3y ago> I think devs in general sweat too much about code quality I think if they sweated a little more then poor quality code wouldn't find itself into the codebase.
- mplewis 3y agoBad code doesn't usually come from lack of effort. It usually comes from business requirements that grow over time with deadlines attached.
- wizofaus 3y agoIt can still be a lack of effort put in trying to convince product managers etc that more time is needed! But almost all PRs I review have something in them that suggests the developer not putting as much thought/care into what they were doing as I'd like to see (and I'm just as capable of doing the same).
- vsareto 3y agoSome disputes about quality are simply differences of opinion or style. There's not really a book or standard on opinionated code quality that satisfies a majority of the people in the field. There's way too many ways to build things for that to exist. This leaves it up to individual teams to approach a shared consensus (with some wiggle room) within their domain and tool set. One thing that is universal is how strict the enforcement of a team's quality standards. So as a developer, you have to decide whether you like strict or lax enforcement of quality standards. Everyone can decide that but I think most don't.
- patrulek 3y agoCode quality isnt that important if you check this code "once a year" and dont have time pressure to change somewhere in there. Or if you are seeing this code daily and know all the quirks.