This is a question regarding the software industry, but would apply equally to any industry in which teams contribute work to a final product.
How do I handle having to completely rework the work of my team leader?
Recently, I was undertaking some pair programming at work with a peer (actually my senior developer, but closer to a peer than a senior) in which we decided that the work done by our team leader in the previous weeks would need to be re-done. Briefly: there were absolutely no tests and the methodologies and the approach taken was not maintainable in the long run.
As it happens, he has been on holiday in this time; though I believe we'd have made the same decision were he in the office. How best can I\we handle telling him what we've done? I can defend the technical decisions we made, but I'm not confident that he'll accept the reasons for the genuine technical reasons they are (i.e. the actions taken were not intended as any kind of personal attack or reflection).
Update to answer questions in comments.
- What triggered the code changes? A bug report from QA (the feature has yet to reach production)
- Has anybody else has reviewed his code? No. There is a code review tool and process in place, but it's rarely used and followed.