Blog - HubSpot Product Team

Working on the same code is like having roommates

Written by Chris Keller | Aug 6, 2010

One of the perks in Engineering at HubSpot is that you get to work in small teams.  Most developers like this for a variety of reasons, but for many, that would include "There's not too many people touching the same base of code". 

With that said, I ran into some funny examples the other day where the analogy "Working on the same code is like having roommates" and inspired this post.

Obviously any good engineering team has some coding conventions, but it's always funny to see people's preferences come out nonetheless in their own code.  One of these is the curly brace for function definitions, do you put it on the same line, or the next line? 

One of my colleagues is notorious for moving my curly braces to the next line even when it doesn't matter.  It's a style preference and he exhibits it, but then I thought, this is similar to when someone feels like the TV remote should be on the TV stand and not on the couch (where it probably always falls into the cushions). 

I then noticed a change in my code where a predefined function was substituted for some custom code I needed in that exact instance and here I thought, I forgot to leave a note on the fridge explaining not to touch that line of code. 

You can see how these examples could continue, but the point is that whenever you're managing a code base with other people, you have to remember that people's habits and preferences will always be displayed, and to not get too frustrated by those things.  Establish as many coding rules up front as you can that don't take a year to learn. 

Have any funny examples like this yourself?  Keep up the clean coding.