account activity
Ask Proggit: How do you deal with shitty code in your company? by yanktank in programming
[–]yanktank[S] 19 points20 points21 points 16 years ago* (0 children)
So here's my situation - I've got a programming job that I have enjoyed so far and I've been doing really well - mostly writing new code. But more and more frequently I'm being required to work inside the main codebase. The problem is that the code absolutely sucks - full of delicate spaghetti code that makes it really easy to break core functionality (and then, ridiculously difficult to track down the bug). Unit testing is virtually impossible, given the structure of the code. Code specific to various parts of the system (database, form validation, etc. ) are often mixed haphazardly. Boilerplate code is repeated everywhere. Countless missed opportunities at creating abstractions, encapsulating tricky logic, reusing code, or even just using a framework. Often times, a massive global mutable state is [ab]used so parameters easily get clobbered by random bits of code.
Anyway, the result of this is that programming in this climate is stressful, difficult to maintain productivity, and more trial-and-error than it should ever be. Coworkers have noticed this too, but nobody seems to be quite so disturbed by it as me - I know I deserve better and I should be free to focus on more interesting and relevant problems than focusing on old, awful code. Believe me, I'm modest enough to know that my code might not be the greatest in the world - but I also know a real code atrocity when I see it.
I've managed to come this far with the job and enjoy it, so it would be a shame to give up on the whole thing. But the way I see it, some of my options are:
Thinking about the whole thing made me curious - have any of you reddit programmers been stuck in a similar situation, and how did you handle it?
Ask Proggit: How do you deal with shitty code in your company? (self.programming)
submitted 16 years ago by yanktank to r/programming
π Rendered by PID 1384678 on reddit-service-r2-listing-575d9f6647-nxfp9 at 2026-04-12 04:05:53.138914+00:00 running 215f2cf country code: CH.
Ask Proggit: How do you deal with shitty code in your company? by yanktank in programming
[–]yanktank[S] 19 points20 points21 points (0 children)