Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cultivating a Code Review Culture

Cultivating a Code Review Culture

Code reviews are not about catching bugs. Modern code reviews are about socialization, learning, and teaching.

How can you get the most out of a peer's code review and how can you review code without being seen as overly critical? Reviewing code and writing easily-reviewed features are skills that will make you a better developer and a better teammate.

You will leave this talk with the tools to implement a successful code-review culture. You'll learn how to get more from the reviews you're already getting and how to have more impact with the reviews you leave.

Derek Prior

April 22, 2015
Tweet

More Decks by Derek Prior

Other Decks in Technology

Transcript

  1. NO!

  2. Use type column first in multi-column indexes add_reference can very

    helpfully add a multi-column index when you use it to add a polymorphic reference. However, the first column in the index is the id column, which is less than ideal. ...
  3. Use type column first in multi-column indexes The PostgreSQL docs

    say: A multicolumn B-tree index can be used with query conditions that involve any subset of the index's columns, but the index is most efficient when there are constraints on the leading (leftmost) columns. ...
  4. Use type column first in multi-column indexes The MySQL docs

    say: MySQL can use multiple-column indexes for queries that test all the columns in the index, or queries that test just the first column, the first two columns, the first three columns, and so on. If you specify the columns in the right order in the index definition, a single composite index can speed up several kinds of queries on the same table. ...
  5. Use type column first in multi-column indexes In a polymorphic

    relationship, the type column is much more likely to be useful as the first column in an index than the id column. That is, I'm more likely to query on type without an id -- to find all records of a certain type -- than I am to query on id without a type.
  6. Ask, Don't Tell • What do you think about... ?

    • Did you consider... ? • Can you clarify... ?
  7. Rules of Engagement • As an author, provide context. •

    As a reviewer, ask questions rather than making demands.
  8. Rules of Engagement • As an author, provide context. •

    As a reviewer, ask questions rather than making demands. In Practice • How do we handle disagreements?
  9. Rules of Engagement • As an author, provide context. •

    As a reviewer, ask questions rather than making demands. In Practice • How do we handle disagreements? • What should I be reviewing?
  10. Rules of Engagement • As an author, provide context. •

    As a reviewer, ask questions rather than making demands. In Practice • Insist on high quality reviews, but agree to disagree. • Review what's important to you.
  11. Benefits of a Strong Code Review Culture • Better Code

    • Better Developers • Team Ownership
  12. Benefits of a Strong Code Review Culture • Better Code

    • Better Developers • Team Ownership • Healthy Debate
  13. Photo Credits • https://flickr.com/photos/evilpeacock/6365513881 • https://flickr.com/photos/urtica/15363980935 • https://flickr.com/photos/metamerist/36353575 • https://flickr.com/photos/omcoc/6751047205

    • https://flickr.com/photos/oberazzi/318947873 • https://flickr.com/photos/vyassaurabh411/7368419622 • https://flickr.com/photos/wallyg/1659490498