DEV Community

Alfred A.
Alfred A.

Posted on

Thoughts from a Junior Developer on their first pair-programming session

In August of 2020, I joined the Centre of Computational Law (CCLaw) in SMU as an Assistant Research Engineer (essentially a junior developer). I've had the opportunity to pick up several skills in my time here thus far, and have also been exposed to several ways of working that are specific to devs, one of them being pair-programming.

Pair-programming as a method of work was very foreign to me. In my "coding life" thus far, I've always worked on problems alone. The only time another pair of eyes would see what I've written was when there was an error or problem I couldn't put my finger on. As such, Coding was a meditative exercise of sorts, where I would drown out everything from the world around me, and focus solely on the problem at hand. I believe some would call this the "flow state".

My first pair-programming session

For the session, I was paired up with my reporting officer, someone who has had decades of experience. The problem we were going to tackle was the Gilded Rose Kata. I've never done a kata before, and with two about-to-be-firsts, safe to say I went into the session feeling very unsure of what was going to happen. I was worried that I'd end up stumbling and tripping over my tongue, trying to express/describe my thought process to someone else.

How it went

The session was actually very enlightening for me. Even though I read up as much as I can about the Gilded Rose Kata, when it was time to actually start, I didn't know where to begin. Given a guiding nudge from my pair partner, we started listing all the various possible cases/categories that could take place. It was extremely helpful to have someone else think of edge-cases while I wrote down what the general cases could be. This accelerated the amount of time needed to get the maximal theoretical coverage, even before any proper code has been written.

When we started on writing the solution, we went with a driver-navigator approach, and I spent most of my time driving (i.e. writing the code) while my pair partner pointed out possible issues, caught my mistakes, and also suggested improvements.

After we had a simple working solution, we proceeded to look at solutions for the Gilded Rose written by others, and had a short discussion about how and what they were doing. It was a great opportunity to pick the brain of a senior dev, and I definitely walked away learning quite a bit.

Final Thoughts

While the idea of it was slightly distressing, I actually learnt a lot from the pair programming session. I would definitely recommend that people who are junior-devs like me, reach out to their senior colleagues and work on a Kata or two together!

Top comments (0)