11

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.

  1. What triggered the code changes? A bug report from QA (the feature has yet to reach production)
  2. 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.
Andy Hunt
  • 263
  • 2
  • 9
  • 3
  • What incident was it that triggered your review of the code? For example, something broke down and in the process of investigating why, you checked the code and you collected a whole sackful of worms. 2. From your narrative, it looks like your team leader's coding was slapdash affair. Has anybody besides the two of you reviewed his code? The more senior people you have by your side, the less likely he'll make a fight out of it.
  • – Vietnhi Phuvan Jul 07 '14 at 17:20
  • I've added answers to the comments in the question – Andy Hunt Jul 07 '14 at 20:26
  • Tests can be written. The important thing here is that the architecture chosen was not good enough. This should have been caught before any code was written. – Thorbjørn Ravn Andersen Jul 29 '23 at 15:08