DEV Community

Discussion on: What Makes an Effective Code Walk Through?

Collapse
 
simonhaisz profile image
simonhaisz

@tayloredwards ^ this.
The problem isn't that you've gone through bad code-walkthrough, so the best question isn't "how do you do good code-walkthroughs?". The reality is that code-walkthroughs are bad way to onboard someone to a new codebase, for all of the reasons that the other responders pointed out.

So the better question is "what are good ways to onboard someone to a new codebase?".

I won't reiterate the answers that the others provided, which are all good. Instead I want to go on a bit of a tangent about asking the wrong question and how you can learn from this to ask better questions for similar problems you will encounter in your career.

You encountered a bad solution to a problem and you knew it was bad. You wanted to improve it. That's great! This issue is, and we've all been there, you assumed the fundamental approach to the problem was sound and it just needed some changes.

Do you know what interaction that is similar that you will encounter throughout your career? When PM gives you "requirements". It is very common for developers to receive requirements in the form of a solution to a problem rather than the problem itself. Often the solution is the obvious, valid one for the problem However, it can be very difficult to separate those from the cases where they aren't when all you are dealing with are solutions so I think it's always worth the time to drill back to the actual problem.

Drilling back to the root problem a solution is trying to solve is an important skill you will continue to use throughout your career that doesn't just apply to validating requirements. Anytime your encounter an issue where something doesn't seem to work right, before you go and try to fix it you should figure out the problem it was trying to solve in the first place. I wish I had learned this lesson when I was at your stage of my career.