How software developers should approach & solve a coding problem

Bhushan Chordia
3 min readFeb 5, 2022
How software developers should approach & solve a coding problem

Every software developer and engineer must have solved a lot of coding problems and must be solving coding problems in a daily routine. The job of a software developer is to solve the real-time problem or real-time use case in understanding the problem and solving that into writing machine code that is understandable by machines.

Information Technology was/is/will evolve and programming languages keep upgrading to a newer version with minor changes to previous versions. Every tool in itself wants to update as per demands from businesses. Every framework wants to say that I am the BEST and that goes into the loop and software developers keep enhancing those tools, libraries, frameworks, programming languages.

There is a concept called open-source. You might be wondering why someone would create libraries, framework, or programming language and keep it open for everyone to use. The answer is every software engineer thinks in different ways and tries to solve the problem in a different way. So, every software engineer can contribute and make those libraries, frameworks, programming languages more beautiful with respect to support, features and so on.

Every business in the world is trying to solve some problem in some or another way and due to high demands from the business software engineer needs to fulfill those demands by providing simple, efficient, robust, maintainable, sustainable solutions. The world has changed a lot, yes a lot after Android OS launched.

I still remember my days when I used to wait in a queue for min 1 hour for the amount of credit/deposit in SBI Bank(especially SBI) and now, it's a matter of hardly 10 secs without even stepping out of your home. There is a lot more to talk about on this topic but let me cut it short and straighten come to the main topic.

How software developers should approach towards any coding problem

  • 1st thing 1st is to understand the problem carefully before jumping on towards writing the code. There is no hard stop towards timing, it’s not about the marathon race that you want to win. The objective is not to complete the problem in a particular time rather is how to solve the coding problem which is simple, efficient, robust & beautiful.

OK. You understood the problem statement, that's wonderful. Good Job!

THEN

  • Every software developer needs to think about how are we going to solve the coding problem. We should break down the coding problem into small pieces/chunks and then try to solve a small part of the problem independently.
  • Before you jump to solve the solutions, write Pseudocode for a smaller chunk of the coding problem. Once your idea has been implemented clearly via Pseudocode then it’s very easy to convert Pseudocode into actual syntactical code which runs on your machine.
  • Integrate all the smaller chunks of code which you have created in the earlier steps and do a thorough check with all the permutations and combinations of user inputs.
  • The last and very important step is to simplify & optimize your code and make it beautiful. I mean the code should look like a story in which you would fall in love to read.

Assumption few things about coding disciplines

  • Assuming that you would follow Software Design principles (SOLID, Design Pattern & Design Principle).
  • Assuming that you would follow clean code rules (General, Design, Function, Naming, Comments).
  • Assuming that you would write enough Unit test cases for your code.

Conclusion- The approach towards solving the coding problem should NEVER be about completion of the problem but it’s all about how you understand, break down the problem and write clean code following all the coding disciplines.

For more blogs,
Follow Bhushan Chordia, subscribe and stay tuned!

--

--

Bhushan Chordia

Talent Acquisition Specialist who loves to connect, engage & build a solid pipeline of Software Craftsman who believes in Software Craftsmanship.