So the story up to now is that I was tasked with re-architecting a site at a client. Since it was the first time I have done this for such an important client I took my time and implemented something elegant, clean, unit tested and more importantly easy to follow and build on top. The lead architects looked upon my work and they were greatly pleased.
Cut to a few weeks later and another senior developer was asked to implement something new. After 2 weeks of "I'm almost finished" D-Day dawned and suddenly he mentioned he was in trouble and I needed to help him with some unit tests. Being the type of team player I am I quickly jumped in and...
My heart sank. Validation methods that were once generic and re-usable throughout the site now had values that were hard coded for his cases, his model was copy/pasted all over the place simply because of minor differences in the views and view logic has been dumped unceremoniously inside the models. The mess made it effectively impossible to write tests.
Unfortunately because the developer wasn't able to admit that he was in over his head we are behind schedule and it is too late to rewrite this code. We're shipping as soon as we can manhandle the mess into a functional state.
I'm gutted. I know I shouldn't be emotionally invested in my code but this was my firstborn baby. I shaped it and brought it into existence and now it is forever soiled.
So, to the experienced architects out there. How do you deal with this sort of thing?