DEV Community

How To Review Code You Don't Understand

Raquel on June 20, 2018

I recently read an article by Max Bittker called “How to Review Code You Don’t Understand”, and it got me to thinking about times when I’ve been ...
Collapse
 
phlash profile image
Phil Ashby

Good advice Raquel, thanks!

VSTS also does the staged comments thing, and I too end up nuking half of mine as I find the answers further down the page or my understanding improves :)

I also find it useful to leave open questions in the remaining comments, typically asking to have decisions explained because I don't 'get it' yet. Finally I check my comments for assumptions of understanding ('surely the input has...') or jumping to my own solution ideas ('why not like this?'), both these help with questions being less dominant, or challenging, which can improve the reviwee's confidence.

Collapse
 
straleb profile image
Strahinja Babić

I remember when I started to learn JavaScript and was looking for some exercises on freeCodeCamp.
My friend told me "you will stutter, you will meet examples where it is really hard, but if you are over the basics, check if there is a solution, try to explain yourself the code, follow from the beginning till the end and you will get it.
Funny thing is, I did understand.

Collapse
 
mnayeem profile image
Nayeem Rahman

Nice article! By the way there is an error in your personal bio thingy, 'I'm' should be 'I'.