7 Steps to become a better programmer!

Four year and several interviews ago I had no clue how I will land into my first corporate job. And one of the biggest challenge was the coding round. Although I was comfortable in writing code for simple problems, but providing a solution within the given time frame was always challenging.

Welcome! I guess you are reading this post because of two reasons: First, you are a good programmer. Second, you want to improve further. In today’s world of technology, programmers are very well rewarded depending on their skills. Improving your coding skills might help you land a dream job.

Based on my experience as of now, I have listed below the SEVEN STEPS that have helped me to succeed in my career. I hope these steps will be helpful to you as well. Without further delay lets get started and take our first step to become a better programmer.

1) Practice data structures and algorithms

Technologies and Frameworks may come and go but, algorithms and data structures are here for a long run. They form an integral part of any programmer’s skill set. Mastering this you can take better advantage of what’s available.

Since DS & Algo are a key bit of any program, strong knowledge of these will aid in problem-solving.

The good thing about DS and Algo is that you can easily ace this over time and with consistent practice you can reach a stage where you start connecting new problems with the old ones you already solved.

Check out my list of essential algorithms and data structures over here. Don’t worry you are not supposed to know all these in one go. Start small, take one step at a time and eventually you will see the difference.

2) Read books to gain better insight

I have listed below four of my favorite books that I feel every programmer should go through over time. The best thing about the first two books is that they help you analyzing the given problem from different angles.

Note that the books are listed in order of difficulty in understanding, you can start small with the first two books, gain basic understanding of what algorithm and data structures are and how they fit into various technical problems. The third one helps you understanding how to structure your code when solving bigger problems. Finally the fourth one provides you a deep dive into algorithms.
  1. Data Structures and Algorithm Made Easy by Narasimha Karumanchi
  2. Cracking the Coding Interview by Gayle Laakmann McDowell
  3. Clean Code by Robert C. Martin
  4. Introduction to Algorithms by CLRS

3) Focus on design patterns and principles

This is something that we tend to ignore during the early stage of our career, but I bet you, knowing this will help you stand out from others. Design patterns and principles serve as the recipes to write better code.

S — Single Responsibility Principle

O — Open-Closed Principle

L — Liskov Substitution Principle

I — Interface Segregation Principle

D — Dependency Inversion Principle

Below is a must watch video by Robert C. Martin on how to write clean code and introduction to SOLID design principles.

4) Start reading code written by experts

Start reading code like you read an article or a blog. Check out the code of open source projects, fellow engineer’s code, code from Java SDK and try to see how it works, comprehend what is happening and why is it happening.

Discover patterns, build navigation skills, at first you might find it exhausting and difficult, however with time you will build up a decent code sense, which will alarm you when you do an error, help you to spot others slip-up and gaps. This Code sense is an important trait of a good programmer.

The ability to read code proficiently proves to be really helpful these days because, in today’s world of frameworks, a majority of our time is spent probing through files, finding the right areas of code and troubleshooting what the code is doing vs. what is expected to do.

5) Participate in code reviews

One of the best ways to improve your coding style is by taking code reviews seriously, look into the merge requests and comments provided to you and to others during the code review process. Try to understand what’s the thought process behind each comment, discuss with the reviewer and try to incorporate this into your coding style.

Always aim to get thoughtful feedback rather than for lowering the barrier to getting your code checked in. Try to get your code reviewed by different experts, this will expose you to a different school of thoughts.

https://www.linkedin.com/pulse/making-clean-code-smart-shailen-mistry

6) Discuss with people smarter than you

Don’t just sit and code, hang out with other programmers. Listen to what they have to say, regardless if they’re junior, intermediate, senior or guru. Exchange views on the current problem or bug that you are working on, check for other possible solutions.

7) Participate in online forums

In order to quickly fix the problem every time, we tend to build this habit of ignoring the discussion around it. Skipping the debate on how other forum members figured out this fix edges us from understanding the whole picture and limits our view on the problem.

Missing out on the bigger picture might need re-work later resulting in wastage of time. Hence it’s better to go through the discussion in the first go itself. Consider writing down your leanings back on the same thread. This will be helpful in two ways: first, it will provide you better understanding by organizing your thoughts and second, it might help someone in future facing the same issue.

Note: You might be able to survive without following the above suggestions and may not see any catch in short term, but following these will definitely bring in a big difference over time.

Success is the sum of small efforts, repeated day in and day out.

— by Robert J.Collier