in reply to OT: Job Advice

two words: write tests.

keep a copy of all this work. then...

show the team the old code, the tests, and the refactored code. presumably, the tests will show things that shouldn't be. then show them the new tests, and the new code that passes all tests.

buy a copy of The Pragmatic Programmer for the office, and encourage teammates to read it.

this is precisely what i've done at my current job, except i'm doing it in ksh. i wrote a test library, and have written test cases (in my spare time) for 1100 lines of ksh. i've successfully refactored the code and passed a full suite of regression tests. i've modified the tests to match expected functionality, and am in the process of modifying the code to pass all tests... all the while making the code more reliable and reusable. and i'm training the team on performing tests and using my test library, so when i leave, they'll continue what i've started.

if all that doesn't work... i'm out of suggestions.

~Particle *accelerates*