Pair Program More
This is not a Go-specific tip and applies to any programming language. In this blog, I will make a case for why you should pair program more.
Pair Programming is one of the best ways to grow as a Go engineer, especially if you are fortunate enough to pair with someone with more experience than yourself. When I used to work 100% in the office, we used to pair often, and I credit it with much of my technical growth. I found moving to remote working much harder, but I found a few ways to make it work (although I think the experience is still inferior).
What is Pair Programming?
Pair programming is a collaborative means of creating software. It means you work with one or more of your colleagues to complete a task such as adding a new feature or debugging. It seems counter-intuitive, but pair programming can often lead to faster outcomes than working alone, especially when paired with trunk-based development. I talk about pair programming in more detail in my debugging course as it is an amazing way to work through issues.
The way I like to do pair programming is the driver-navigator model. It is really simple. One person is in charge of writing code. This is the ONLY person who is allowed to touch the keyboard actually producing code. The navigator is responsible for helping guide the creation of software. They will do this by sharing knowledge they have about the codebase, asking good questions to challenge the driver, and perhaps researching on their own machine any sticking points. After 20-30 minutes, these two roles should switch, and the navigator now becomes the driver. If possible, you should block 2 hours out to do this so each of you gets a couple of opportunities to do each role. I recommend using a Pomodoro timer for measuring.
What are the Benefits of Pair Programming?
As well as benefits such as high-quality code and a faster feedback loop, you’ll also learn other skills that are critical to being a good software engineer that are often overlooked. You’ll have to learn to explain yourself clearly, and at some point, you’ll have differing points of view that you’ll have to resolve amicably.
If at all possible, try and pair program in person. If you are part of a remote team like me, then you can pair on Zoom or Google Hangouts by sharing your screen, which works mostly okay. Some IDEs now allow for pairing remotely, and you can even code at the same time (even though I discourage this). I have had particular success with JetBrains Code With Me.
Why is it so important to do it in person?
If remote is your only option, it’s totally fine. The reason I encourage in-person is that I find that bouncing ideas off of each other is much simpler. It also means you do not experience issues with internet connectivity, etc., which I find are real drains of productivity. Hopefully, being in person will also encourage you to grab lunch with your colleague and get to know them on a more personal level too.
Happy Pairing!