HubSpot Engineering

Latest posts

Writing lately

Working on the Same Code Is Like Having Roommates

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.

Newsletter

For Agents

View Markdown

Share

More posts

HubSpot’s Engineering Values

As teams grow, knowledge stops spreading on its own. Chief Architect Whitney Sorenson shares HubSpot’s Engineering Values, why they matter, and why we share them publicly and often.

How Do Engineering Leaders Onboard at HubSpot?

HubSpot has a unique onboarding program for engineering leaders that consists of a few months of embedding as an IC in a few engineering teams.

HubSpot Engineering's Quarterly Development Cycle: How & Why

Discover why our team uses a quarterly development cycle, and learn how this approach boosts productivity, reduces stress, and enhances flexibility.