How to Think Like a Programmer

How to Think Like a Programmer

Author: Helen Rebane

01 July, 2021

Share via

No matter if you want to become a programmer or not, learning to think like a programmer is a skill that will help you throughout your life. It teaches you the art of problem-solving and makes you a better thinker. So let's jump straight to the main question: 

 

How to Think Like a Programmer

 

There is no single answer to the question of how to think like a programmer. But there is a core mentality that all the programmers have: to break the problem down. It will be our starting point in the process of learning to think like a programmer. 

 

What does it mean to break the problem down? It means to divide the problem into smaller, actionable sections. Think about it this way. Although many people think that computers are smart, the truth is there are unbelievably dumb, and you should explain them every single step. Let's take an example. 

 

For instance, you want to tell the computer to open the door. If you write "open the door," it will not understand anything and will not know where to start. Instead, you should explain the problem step by step, approximately like this: 

 

  1. Approach the door
  2. Take the handle with the left hand
  3. Pull it down
  4. Push the door away

 

So if you want to think like a programmer and solve problems better, you need to start to break them down into smaller pieces. But how do you solve them? 

 

 Programmer Mentality: How to Solve Problems

 

As we said, breaking down the big problem into smaller chunks is your starting point. Next, what you should do is to look at that problem from different angles. Having one interpretation is not enough: come up with a couple of ones. If you need to read the problem multiple times, do so until you feel comfortable with it. 

 

As you get to the actual code writing, write a pseudo code first. Remember, programming is not only about learning the syntax of the language. It is about knowing how to solve a problem most shortly and efficiently. If you are not coding but still want to learn to think like a programmer, here are some great tips: 

Some Tips to Help you Start Thinking Like a Programmer

 

1) Start simple 

 

If the problem you are dealing with is too complicated, try to solve a similar problem that is more simple. You might think it is a waste of time, but in fact, it helps you to remember all the steps you might need to solve the current problem. 

 

Sometimes when the dilemma has too many riddles, we don't even know where to start. So try to simplify it to the maximum to find a problem that you can solve and then slowly go back to the previous one. 



 

2) Read it out loud

You should understand the problem thoroughly before you start solving it. Remember we told you to read it a couple of times? Well, another helpful tip could be to read it out loud. You can also try to explain it to one of your friends. It will help you to understand which parts of it are still unclear to you. 

 

It leads us to the next point: 

 

3) Collaborate 

 

Yes, it is fun to find the solution on your own and brag to everyone about how genius you are. But in any good work, collaboration is the key. If you want to grow and learn from others, you need to start working with a team. So, next time if you get stuck on an intricate problem, try to ask for help from your friends. They might introduce you to a new perspective you haven't thought about before. 

 

It's another thing to talk about problem-solving and different to practice it. To not overload you with purely theoretical information, here are some great websites where you can get your hands on programming problems and have fun at the same time. 

 

10 Free Coding Challenge Websites



 

TopCoder 

TopCoder is one of the top platforms for finding programming challenges. There are also some competitions from time to time where you can compete with fellow programmers on who finishes the project fastest and in a most efficient way. 

 

Project Euler

Project Euler has many computer science and mathematics challenges. Most of them demand writing along with a small code to solve the famous mathematical equations. 

 

CodeChef 

This is another platform where you can find various interesting coding challenges and participate in competitions with other coders. The platform is Indian-based. 

 

Codewars

No, there are no wars here. You just write code on their online editor trying to solve one of their problems. You can also participate in the discussions for that same problem to understand it better. 

 

Exercism 

Exercism comes with more than 3000 challenges in 52 different programming languages. The best part here is that you get to have a mentor who reviews your work in the end and gives feedback. 

 

HackerRank

Another great platform to find some fun challenges. Again, you'll have access to the community of other coders and can ask them questions when required. 

 

CodinGame 

 

If you are more into gaming, then you will love this option. Here you can not only write codes but actually play the same code while you are writing it. In other words, you create a code for a game and test it out at the same time. 

 

LeetCode 

LeetCode is for those who are preparing for a technical interview. It gives you a set of the popular tasks that they might give you on the interview, which you complete online. They even have a Mock Interview section to help you out further for the big event. 

 

Coderbyte

With more than 800.000 developers on this platform, Coderbyte is one of the best places to find programming problems and solve them. 

 

SPOJ

Last but not least, you can also check out Sphere Online Judge (SPOJ) with more than 20.000 coding challenges at your proposal. 

 

These were the websites with the best coding challenges online. But what if you don't know how to code? Don't worry! We got you covered here too! Here is the list of the ten best websites to learn programming from scratch.

 

10 Free Websites to Learn Coding

Here is the complete list of websites for beginner coders that you might need in 2021: 

 

  1. Coursera - here you can find a list of easy courses to start with
  2. freeCodeCamp - here you can find a lot an interactive approach to teaching code
  3. Codeacademy - almost 45 million learners have developed their coding skills here
  4. edX - here you can find some great courses offered by prestigious universities
  5. Udemy- Udemy is one of the most popular online learning platforms, so no need to comment here
  6. Udacity - here you can find both free and paid courses
  7. W3Schools - this one is one of the oldest and the biggest online schools
  8. Microsoft Learn - well, you know Microsoft, so no comment here either
  9. SoloLearn- a great place to start for the complete beginners
  10. Hackr.io- a great place to find all types of courses

 

Sum Up 

 

Learning to think as a programmer is one of the key skills you'll need throughout your life. You can start practicing it via online problem-solving platforms by following some simple tips. 

 

And if you start feeling that programming is getting interesting for you, you can learn it with the abundance of online schools out there. 

 

So all we can say now is good luck!

 

Share via

Comments

To leave a comment or to reply you need to login.

Be the first to comment


You May Also Be Interested In

All Articles