Hacker News new | ask | show | jobs
by grigjd3 2847 days ago
After a while, I can guess where bad code comes from. Code that is hastily written by someone experienced is very different than code assembled by the inexperienced and without good guidance. Feature creep also has an obvious quality. Trying to turn these things into simple metrics is very much a mistake.
3 comments

Absolutely. The best maintenance I do isn't renaming a bunch of properties, or putting in better exception handling. It's deciding that entire features or the basic approach to a problem is fundamentally flawed and needs to be scrapped.

You do this work long enough, and you can usually tell in under a minute if you're dealing with code that takes shortcuts, or a big pile of copypasta from SO.

Yeah but there’s money to be had from people who will buy into that idea. People don’t like complex answers.
I worked for three years at a company that prided itself on being “entrepreneurial”. In practice this meant that management could add/subtract features at will and even launch new products. There was always time pressure due to a strong annual cycle in the core business. The code was atrocious - largely because maintenance couldn’t be done properly. We never had time to refactor/re-write. When we spoke to them about technical debt and the need to address it or our productivity would approach zero as we dealt with unmaintable code and crazy bugs. Their answer? Let’s offshore maintenance. I left after that.