code

It has been two whole weeks since I’ve written any production code and I knew, going into work today that it could potentially be a blocker for me to get into the groove and have a productive day.

So how did I overcome this potential blocker?

I approached the code base as if I was brand new and to be honest a lot of it was new to me. There had been changes made whilst I was gone that completely reformatted the structure of the project, which made it difficult to navigate.

My first stop was to read the README file. What can I say, but just read the README. It’s written in all caps for a reason. A good README contains all the information to help get you kick started. It quickly reminded me how to get the project working locally on my machine and how to get the tests working (more on that later). It’s a such a quick win and I will always recommend documenting as much as you can in your README.

My second stop on this journey of familiarising myself was to read the tests. Tests are incredible bits of code and have this secondary attribute of acting like documentation. Not sure how a function fits within the puzzle of the project? A well written test with good test coverage will help you identify the purpose of the function and show you how the function behaves against various scenarios. I recommend breaking a few tests (within a safe environment that’s far away from your production branch ;) ) to help drive that understanding home.

Lastly, If possible Pair. Pair programming is one of the best bits of coding for me. It takes off the pressure of having to solve all the big problems on your own (Although those moments will come) and it gives a person to bounce thoughts off. Luckily I paired with someone familiar with all the changes that were made (As they were the ones who made them) and they were able to guide me through the code and all it’s changes.

There are plenty of other ways and tools you could you use to navigate a new code base or an old code base you need to familiarise yourself with, but what I’ve listed above are the ones that helped me out immedietaly and enabled me to be as productive as could be.

Blessings.

Derek