In many positions, you are faced with the pile of code known as the legacy project. It is difficult to stage, understand and add additional functionality. It tempts you to transform it into the gleaming success story you want, and you believe the customer and your boss want.
However, there are a number of reasons that this project has deteriorated. In many cases there may not be the financial or political will to invest in a rewrite (even if it seems necessary). Bugs and deadlines take precedence over writing better code (as they should). Should you just throw your hands up and find a different job/project? No.
You can’t fix the code base completely, but whatever you touch should be better than when you found it. I call this the Campsite Rule. Rewriting a program from scratch inspires dreams among programmers, but doesn’t always work in practice. Maintaining software while actively making it more stable and supportable demonstrates craftsmanship.