Tuesday, August 15, 2017

10 tips to quickly become productive with new Project/Codebase

One of the main drawback of changing job or changing project it that you lost all subject matter expertise you have learned by working the last couple of years in that project or domain. It doesn't matter whether you are an expert in a programming language, once you change job, you lost your hard earned experience on projects or domain you are working on. When starting a new job or on to a new project you will rarely be working on a complete greenfield environment. Understanding and mastering an unfamiliar code is a difficult process and it can sometimes feel overwhelming due to the amount of new information you need to take on.

This can be even more difficult if you are joining on a project which uses completely new technology then you are used to e.g. node.js, angular or react, SQL Server, Java 8, Spring Boot etc and you are coming from a Core Java or Java EE project.

I had this experience when I started working on a project which uses a lot of Groovy code scripts, I was not only learning a new codebase but also learning Groovy at the same time. That was some difficult few months because you not only have to learn but also deliver and that too within tight deadlines.

So what can we do about it? how do you cope with such situations? Well, there is no alternative to hard work but you can follow some of my tried and tested tips to quickly become productive with a new project or codebase. These tips are based on common sense but you know what? many programmers don't follow these basic steps and take a long time to get familiar with the unfamiliar code.



10 Tips to become productive on new Project

Here are some of the useful strategies that I used to get productive as quickly as possible. Many of you might have familiar with them or follow them in your project. If you have something to add to this list, feel free to do so.


1) Talk to People
There is no better way than talking with people to learn about your new company, new project, new infrastructure, and new codebase. People are the biggest asset of any company and they  possess a wealth  of information about business and process where they work. When you join a new company, the first thing you should do is to talk with as many people as possible, make friends, build your network and in the process, you will learn about your new project and codebase. Your team members are best to start with, they know your project better than anyone else.


2)  Be Humble ( accept and move)
From my experience, the "be humble" strategy is by far the most important one. Many developers tend to dislike whatever piece of code that was not written by them before even looking into the actual code or they get discouraged because they have a hard time learning how it works. For whoever is in this situation, be humble... pretend your way of writing software is not the only way and see if you can learn something. You may get surprised.



3) Run Unit tests
If you are lucky enough to work with a project which has a good amount of code coverage i.e. unit tests then you should start running them. They will help you to familiar with essential classes, packages, and functionality of your new code. try to make some trivial changes and break the existing code and find them by running unit tests.

Though never check-in your code without running unit test and until all of them pass. In short, once you check out your code, the first thing you should do is to run unit tests. If you are someone, who is not very comfortable with unit testing, I strongly suggest you to first read Test Driven: TDD and Acceptance TDD guide for Java Developers, one of the best books to learn practical techniques of unit testing your code.

10 tips to quickly become productive with new Project/Codebase


4) Run the program
Try to run the program in your development environment in windows or on a Linux box and look at the stack traces and logs. Sometimes it's easier to analyze runtime and figure out what the program is doing than looking at the code. This will also help you to understand the flow of data in your application and what are the main/common patterns.


5) Read Logs
Yes, reading application logs can give you a lot of useful information about how your application work, what are dependencies, what is the flow. As a developer, you must get yourself familiar with your application log because that's the only tool you have to troubleshoot any production problem.


6) Setup application in your favorite IDE
This is again one of my favorite tasks and proven tip to get familiar with the new codebase. Until you setup a Java project in your favorite IDE e.g. Eclipse or Netbeans, you won't be able to easily navigate, run unit tests and read them. That's why this is one of the first tasks to complete once you get access to your codebase e.g. svn or git. you also learn about compile dependency of your project while setting up in your favorite IDE.


7) Focus on high level
Yes, look at the big picture. Try to find out what is the role of your application in your business area. who are your clients, what service your provide? what is upstream and downstream application i.e. what are systems from where you import data and what are systems to whom you distribute data? By focusing on a high level you can better co-relate what a piece of coding is doing.



8) Documentation. 
Start with documentation (I know developer hate documentation but in legacy and large project, this is the one thing which is often missing) Creating documentation, diagrams not only help your team members but also help you to learn project and its dependency, end point very quickly. Reading what other people have written in Confluence and JIRA can also be really helpful.


9)  Use static tools
You can also use some static tools to get call/caller graph to browse your application quickly. It allows you to jump between definitions and see what's used, what's not. e.g.  Java developer can use their favorite IDE like NetBeans, Eclipse, IntelliJ. while the C++ developer can use docgen or similar tool.

That's all about how to quickly become productive with the new code based. Doesn't matter whether you are a Java programmer or Python developer, these tips apply to everyone who codes and work on applications.

Further Reading
Clean Code
Working Effectively with Legacy Code
Refactoring, Improving design of existing code

Thanks for reading this article so far. If you like this article, then please share with your friends and colleagues. If you have any question or feedback then please drop a comment. 

No comments :

Post a Comment