I'm currently getting my footing now as a contractor. If this is actually something that most programmers don't like to do, is there an angle for me to pitch myself as "The guy who will clean up your code base"?
I'm currently getting my footing now as a contractor. If this is actually something that most programmers don't like to do, is there an angle for me to pitch myself as "The guy who will clean up your code base"?
Absolutely not. Do not go there. If you love the process of software engineering, the art of refactoring, building good abstractions, etc., then you need to have your own code; your own garden to tend. You cannot just parachute into an ailing codebase to "clean it up"; you need to build the mental theory behind it first, which means deeply understanding the problem being solved. If you are able to do this, you may make lots of changes which genuinely improve the code, and you will be hated for it. Because when you leave, nobody is going to understand why you made all those changes, and they're going to think you're some enterprisey architecture astronaut who just made everything more complicated, even if they're wrong. You've just disconnected their mental models from the codebase and then jumped ship, leaving them with something they can no longer maintain. Now instead of bad mental models matching bad code, then have bad mental models completely divorced of this new "good" code. They're worse off. You cannot just "clean up" a codebase -- keeping a clean codebase takes a long time, a lot of background knowledge, and a lot of care.
The best thing you could do would be to improve their own mental models, and guide them in improving their own codebases. But this is a completely different skillset, and I don't know how much money there is there. It requires them to accept your help, which is a big ask.
You could swoop in and "fix" some stuff and then leave the in-house team not understanding what you've done. That sounds profitable. You might even get called back to fix things a second time.
As with management consulting, I think it would at the system level tend to do more harm than good, even if you do good work and get paid well for it. I agree strongly with feoren that the code needs to reflect the in-house developers' mental models of the domain or everything will fall apart. If you fix things and then give them a bunch of processes and coding standards to follow, they will not do well and you will be thought of as some clueless architecture astronaut by them. But profitably.
Probably the closest things to that are test writer, technical documenter and build engineer.
This would likely not even be a software company as such.
You sort of answer your own question unfortunately.
> managers keep pushing us to limit our time and move on to things that are visible to customers.
So if a manager only values things visible to a customer, why would they hire an expensive consultant work on things that aren't valuable to them?