🕷 zenspider.com

by ryan davis



sitemap
Looking for the Ruby Quickref?

Code Ownership & Egoless Programming

Published 2012-05-30 @ 12:00

Tagged productivity

This is part of the One Pagers series.

2009-08-03

The Problem:

How do we improve our code over time?

The Solution:

Take responsibility for all the code and expect others to do the same to yours.

By working for the company, you should have implicit1 permission to modify anything for the better. Code ownership isnʼt about putting fences around your project. It is about taking responsibility not just for the code you write but for all code in the entire organization. The converse is true as well: everyone owns your code too.

If you see something that needs fixing, then fix it. It is best to rope in the person responsible for writing the original code, so they can stay on top of the changes and learn from their mistakes.

  • You own all code, whether you wrote it or not.
    • Think of it this way: All bugs are everyone’s bugs to those above us.
  • Everyone else owns your code.
  • If you see something that needs fixing, then fix it.
    • Use this as an opportunity to teach and learn from others.
  • Changes will be made to improve over time.

This does require a certain level of humility and maturity on both sides and can be hard to deal with at times.

  • We all write imperfect code. Get over yourself. You can always improve.
  • Critiques of your code are an opportunity to learn.
  • Donʼt be emotionally attached to or embarrassed by the code you write.
    • “This code is bad” does not mean “You are bad”.
    • You are not your code.
    • You can disagree, but donʼt be defensive. (aka think & act vs react)
  • It can be fun finding code to torment, but donʼt be a jackass about it.
    • If you donʼt have a solution/improvement in mind, STFU until you do.