Using checklists for code review
blog.rbcommons.com
Using checklists for code review
1–10 of 26 posts
Re: Using checklists for code review
#2Re: Using checklists for code review
#3http://www.projectcheck.org/checklists.html
including a "checklist for checklists" (!)
http://www.projectcheck.org/checklist-for-checklists.html
Great article on the use of checklists in hospitals, by Atul Gawande:
http://www.newyorker.com/reporting/2007/12/10/071210fa_fact_...
Re: Using checklists for code review
#4And so we'd get into a situation where we'd have to decide whether a particular item was even applicable or not, which somewhat defeats the point of checklists, since you're supposed to be able to decide immediately whether an item is satisfied or not.
Re: Using checklists for code review
#5Re: Using checklists for code review
#6I think checklist level thinking for code reviews is bad though. It ends up being a pretty soul destroying experience when someone tells you that you need to validate arguments to all methods as not null (for the 100 you wrote), or that you should take the data in your test cases and put it in a text file. Or that you've re-used the same string in several places and should make it constant. Robots can tell me that, and I can get their feedback while I'm developing or choose to ignore it. People are invaluable for helping you step back and see how to re-organize your code, introduce new abstractions, re-interpret requirements, and see actual bugs that no QA person or tool would ever discover (likely affecting some unlucky user who would hit an extremely rare bug that couldn't be reproduced easily). Those types of reviews are invaluable. Put down the checklist and automate it instead.
Re: Using checklists for code review
#7I just think its rather silly to do code reviews this way unless you're writing software to power a space shuttle (ie stuff that should never fail/break), It would simply take too long.
the overall appearance of the checklist does make it seem like it would be problematic, but i think the author makes a good point of showing that they act as a template for the reviewer rather than as strict set of guidelines.
in a situation where "we're all consenting adults here," having a set of things to evaluate features or code style makes it easy for anyone to know what to expect when checking in a change or when reviewing one for the first time. it may not work for you, but it certainly adds consistency when they're used non-dogmatically.
Re: Using checklists for code review
#8Re: Using checklists for code review
#9I just think its rather silly to do code reviews this way unless you're writing software to power a space shuttle (ie stuff that should never fail/break), It would simply take too long.
i disagree. fundamentally the point of these checklists is to standardize the sorts of things you evaluate during the code review. if feedback is inconsistent, you end up seeing different standards applied to several parts of the codebase which can (and does) manifest itself as an inconsistent product. the overall appearance of the checklist does make it seem like it would be problematic, but i think the author makes…
Forcing a checklist upon all reviewers isn't what the article is all about, but rather it's about one developer's way of organizing his own personal process for doing code review so he doesn't forget something.
If I have a huge change in front of me, and I know that I tend to look for certain things, I could certainly try to look for all those in one go. That's error-prone, though. Might forget something, or get bogged down in syntactical stuff and miss something important. However, with a little personal checklist in front of me, I can go "Okay, I'm done looking at syntax. Now let's make sure that there's no off-by-ones." Leads to better organization of thoughts.
Re: Using checklists for code review
#10Specifically, how do you check "Correctness of algorithms"? What is the criteria to pass that? "Well, I think it's right", of course you do, otherwise you wouldn't have committed it. Formal proof? Unit tests?
Items phrased like this are ripe to become a "looks fine, check" style process-theatre that doesn't actually add anything.
Credit where credit it due, "Are controls laid out in a way that makes sense given visual scan order?" is a bloody good one.
Checklists can be very helpful to make sure you remember to consider everything in the right order. I have a phone screen checklist that includes "introduce yourself" because sometimes I forget and that's embarrassing. At a previous job, we had a "stakeholders that might be affected" checklist used in feature planning (we had gotten into a bad habit of building features that affected the performance profile of the app, causing ops to get paged on the weekend because they hand't been told to expect different behavior, also: removing an arcane feature that we had wrongly assumes nobody used).
One thing to remember when comparing with flight or medical checklists: These people deal in repeating almost the same thing as consistently as possible. Software engineering is rarely like that.