I have worked with great software developers for years together now. One thing I always found challenging was to bring college graduates up to speed about what it means to be a great software developer, how to go about thinking and working like one. Probably many graduates might also face this problem have asked themselves the same question. This is my attempt to put at explaining how great Software Developers work and think.
Write Readable Code
Many times, written code will remain in use for a couple of decades or even further. During the lifetime of the code, many software developers maintain and enhance the code. The best developers keep this fact very close to them. They always try to write code that can be easily readable by others working on it.
One of the primary goals of this is to minimize the bugs. Readable code is easy to understand, relatively easy to test, and easy to review.
The secondary goal is to make it easy for other software developers to maintain and enhance the code over time.
Thoroughly Test One’s Code
There are many who can do a great job at writing readable code. But not everyone spends the same effort to write thorough unit tests.
Why give so much importance to unit tests?
Great developers tend to refactor(change code without altering the functionality) their own code several times before they are fully done. In order to make this refactoring process easy they always write unit tests.
They know that unit tests play an important role in keeping the code healthy in long run. They help in enhancing the code or refactoring the code at a later point in time. Unit tests act as a safety net.
In general, writing unit tests for readable code is easier compare to complex code. If they feel that writing unit tests is becoming harder, they immediately go back to the code and refactor it to improve the code readability.
Writing unit tests help in many ways. That’s why great developers give high importance to writing unit tests.
Apply Best Practices in the Context
Great developers religiously try to apply the best practices in almost all the things that they do. Best practices are contextual. In order to write the best code, there are many practices that come into play like general code best practices, language best practices, design best practices, object-oriented best practices, functional best practices, unit tests best practices, DB best practices, …. etc.
Whatever they generally do they try to follow the best practices which apply in that context. But need not necessarily they are master of all those best practices.
Focus More on Error Scenarios
Great developers focus more on which scenarios break their code rather than which scenarios work. They give enough thought to identifying the error scenarios, handling those error scenarios, and writing tests for those error scenarios. When focus shifts to “what can go wrong” there will be fewer surprises in production.
Feels Like Something Missed Out When They See Their Code Next Time
The best code, readable code, … etc do not have the end. How best someone writes it, still there will be scope for improvement. Great developers tend to improve the code as much as possible and they leave at someplace but not ideal place due to various reasons and constraints.
Even if they feel it is the best state to leave the code in, when they see their code after a few days, they will find something is missing and find places to improve in the previous version of their code.
The main objective involved here is continuous improvement.
Takes Up Challenges for the Betterment of Code
Especially while working on existing or legacy code, the time taken to write the best code does not happen in the first phase. Assuming, if there are no unit tests in the existing code and the code looks bad, then enhancing that part of the code is not a trivial task. They have to first write automated tests (may or may not be unit tests) for the existing code. Then they refactor the existing code and finally add the code they need to develop along with the unit tests. After that, they will make sure that the tests written before refactoring are working as expected to make sure no breaks in existing functionality.
By seeing it, you know that it’s a complicated process. The best developers always take up these challenges for the betterment of code in the future.
Skill Improvement is a Continuous Process
When you try to become the best, you will always find something to improve upon. They never feel like enough. As I have mentioned earlier, writing the best code involves many factors like general coding standards, language standards, Object-Oriented standards, functional standards, secure programming standards, … etc. They never stop, they keep exploring and learning things that are related to their horizon. In that learning process, they always try to do their best in that context.
This thrives to become best, motivates them to explore, learn from others continuously.
Takes the Peer Review and Feedback on Code
How best they write the code, they are aware that they can make mistakes. They always check with their peers and take proper reviews to eliminate the bugs or identifying the bugs early in the process. They don’t attach themselves so much to their code. And they openly think about the feedback and accommodate the feedback.
Do Not Take Any Action Those Impact the Project
Sometimes in the code, someone says this design pattern is un-necessarily applied in this context. Or This technology should not have been used here. In most cases, people try to apply them forcibly for the sake of learning or they will choose the technology in order to learn it. One way people feel happy with that decision but another way the code or project suffers in long run.
Best developers generally keep away from this sort of behavior. They know the importance of code and projects. They don’t take any action knowingly those impacts the project in long term.
Writing the readable or enhanceable code has a direct relation to a proper understanding of the domain and project. Even the developer has all the techniques to become the best developer, without a proper understanding of the domain it’s highly impossible to write the best code. That’s why the best developers give equal importance to the learning domain.
Do Not Get Influenced by External Forces
Religiously following the best practices comes with many challenges. Not everyone understands the importance of writing the best code. They feel like development time takes longer or fear of modifying the existing code, … etc at that moment. They force the developer to finish quickly or not allow to do the refactoring.
Best developers do not get influenced by all these external factors and they do not compromise on quality. They do aware of when to refactor and when not to refactor. They try to convince and educate the people about the importance of producing enhanceable code. This is particularly not an easy task though.
Learn From the Mistakes
How perfect the developer is, it’s quite common that at some point in time the mistakes can happen. Either they do that mistake or someone else makes that mistake. They accept their mistakes and learn from those mistakes and try to avoid repeating those mistakes.
They Are Faster
Let’s try to understand what makes someone slow. Lack of coding skills, improper coding, improper code design, lack of unit tests, lack of domain understanding, lack of requirement clarity, lack of proper coding environment, defects, …. etc all can affect the speed of coding.
Great developers always try to follow best practices, they are good at fundamentals and they strict with principles. They are mostly ready with all the tools required to avoid running into the problems mentioned above. This makes them a lot faster.
They also take advantage of tools around them to make themselves faster. Like leveraging shortcut keys in IDE to speed up the work.
They do not rely on manual processes. They always try to automate everything if they have performed the same task manually a few times.
When I started writing this blog, I kept recalling the behaviors of great developers. It’s not easy or practical for one individual to have all of these attributes and qualities. But best software developers do have most of these behaviors but not all of them. In some areas, individuals can do really poorly. But the majority of it if the individual has these behaviors I consider the person as the best software developer.
The meaning of best developer itself is really perception. But I tried my best to put the things related to the best developer.
Thanks for reading my article. Please do comment and share your feedback.
I will write another blog on how to become the best developer ….