| this was me a few years ago, here's some stuff I learned about diving in to a codebase like this: - don't be rude but make it clear you think the code is messy and you can clean it up. Explain it to non-programmers in terms of time needed to add new features and the much greater chance of bugs and side effects - get a few style rules going (do A and not B, group regions/routes/modules -- with only comments at first, if needed) to apply ONLY to new code going in. - every time you have to touch old code, bring it up to style, even if your changes don't directly address spaghettiness - slowly (and more confidently now that you're more familiar with the code) refactor parts of the code - get at least some sort of test structure in there It'll take a long time but it'll mostly work and you'll probably find it very satisfying. I know I do. Be polite but firm. Believe me that everyone knows the code is a mess and if someone is willing to put in the legwork, every developer worth their salt will respect you for it. You'll have the authority you need to enforce your stylistic choices and the future structure of the code. Remember above all else, though, that your job is to write working code, not pretty code that developers like. Your goal should be to infect it with order, not tear it out and rebuild it. |