On Code Reviews

Published on: 13 Nov 2013 by Anders Conbere

When I am in the position of reviewing another developers code I look for three things.

  1. Is code correct and free of obvious defects?
  2. Is the code verifiable, can we test it?
  3. Can I imagine the path from this design to my ideal?

The first two are an obvious part of most code reviews, the third might bear explanation.

When reviewing code it's easy to get caught in the trap of imparting your design sensibilities on that of the author. But design sensibilities are largely subjective and difficult to quantify, and falling into that trap can lead to long arguments with few positive outcomes. Focusing instead on whether the design accounts for the necessary modularity or flexibility to take it from it's current design to a new one, gives me the freedom to remove myself as gatekeeper and changes the tone of the conversation. Instead of critiquing design aspects, it becomes a discussion of external factors that might need to be considered, knowledge of other users of this code, or performance for example. If these factors have been thought about by the author I'm quick to mark it as good. If it turns out that the design had flaws, I've validated to myself that I believe the code could be rewritten to account for those flaws.

Lastly, this is a chance for me to be proven wrong. I am not perfect, I am often wrong. If all designs that exit review are molded in my image, what chance do I have to learn from my peers. Being proven wrong is an amazing opportunity to reevaluate your assumptions.

  1. On Code Reviews
  2. Monads - Tools for everyday programming
  3. The semigroup, or how a bunch of math snuck into my program
  4. The Problem Finding Talent
  5. Setup and Teardown Methods With Py.test
  6. Learning to Program is Easy
  7. Igor Design Part 2
  8. BOSH working with Ejabberd, Firefox and Strophe
  9. Concatinative Versus Object Oriented Design
  10. Atom feeds for igor... difficult
  11. Deploying wsgi applications behind Nginx
  12. Building Ejabberd Modules - Part 4 - XMPP Bots
  13. Building Ejabberd Modules - Part 3 - HTTP Modules
  14. Rabbiter - Open Federated Pubsub Server
  15. Building Ejabberd Modules - Part 2 - Generic Modules
  16. Building Ejabberd Modules - Part 1 - Compiling Erlang
  17. Distribution Erlang and XMPP
  18. Muesli - Breakfast Cereal Done Right
  19. Kite Building At Gasworks
  20. First Dates
  21. Meat Flappings - XMPP Summit 5
  22. Timelope - Share your browsing
  23. Scaling web applications
  24. Life Before Death
  25. XMPP Roster Item Labels
  26. Valuation of social networks
  27. Dataportability needs to bring something to the table
  28. Dynamic Foaf - Issues with XFN
  29. BlogTalk2008 / SNP WebCamp Conclussion
  30. Talk on XMPP at SNP WebCamp
  31. SNP WebCamp - Arrival in Cork
  32. Follow up on Xmpp and Android
  33. XMPP and google's android
  34. Python and social networks
  35. Python Microformats Parser Released
  36. Python Microformats Parser
  37. SixHourStartup needs a home
  38. GameWrangle - 6 hour startup
  39. Tagmindr - 6 hour code jam
  40. Xmpp-psn Client Available
  41. The First Road Block
  42. First Version of Xmpp-PSN available
  43. Soap for community events
  44. Moving from the web to physical
  45. Portable Social Networks (XMPP)
  46. Distributed Multi-User Chat
  47. Announcing Babik
  48. Discovery
  49. Ignite Seattle
  50. Problems With PHP
  51. Solutions for Trust and the Internet
  52. Code Microformat Proposal
  53. Trust and the Internet