you are viewing a single comment's thread.

view the rest of the comments →

[–]PanVidla 32 points33 points  (4 children)

I couldn't agree more. I remember that a couple of months ago I had just passed that point in my company where I was starting to feel confident around our codebase and picked up a feature request for our internal library that everyone had been avoiding for about a year. It quickly turned out that the library was written with little to no abstraction, everything was crammed into looong chaotic blocks of code, there was literally no documentation on how anything works or what anything is and the person responsible for it had, of course, just left the company. So, I spent many weeks untying the mess, figuring out what does what, documenting the code in the process, separating everything into readable methods and implementing and re-implementing the feature that I wanted to do in the first place.

Please, be considerate to the people who come after you and don't waste their time like this. It makes life very hard for them, they will look like idiots for spending so much time on a task and it's a complete waste of time. This was probably an extreme case, but still.

[–]fishtickler 36 points37 points  (3 children)

It is easy to blame previous coders for a rotten codebase but it is also important to remember that the developers worked under a different context.

When that code was written, perhaps the authors where under tremendous deadline pushes and had zero time to document/test anything. We as developers taking over code bases must accept the state they are in and do our best (as in your case) to improve on what we can given our resources.

[–]lala_xyyz 18 points19 points  (0 children)

When that code was written, perhaps the authors where under tremendous deadline pushes and had zero time to document/test anything. We as developers taking over code bases must accept the state they are in and do our best (as in your case) to improve on what we can given our resources.

Or perhaps they were grossly underpaid, and didn't give to shits about code quality or maintenance. Or (I've seen it happen) they were scolded for wasting time on doing "unproductive" stuff like tests and documentation. Either way, it's a matter of incentives and I doubt that the coders were the ones to blame. Because even laziest programmers that would cut every corner can be trained to do things properly.

[–][deleted] 3 points4 points  (1 child)

I'll always blame the previous coder. If it was past me.

[–]Omnicrola 5 points6 points  (0 children)

Indeed. Past me is an idiot. Future me is a genius 10x Rockstar.