How do Programmers Think? Inside a Developer’s Mindset

Thinking about becoming a programmer can be a challenging idea in itself. Many people think you have to be smart to become a programmer. Others see programming as a hard profession. Just like many other things in life when starting out, learning how to program is hard. I know because I was there when starting out. In fact, if you ask any programmer about how hard it was when they started, they will probably say that it was hard.

However, it is not correct to say programming is hard. Unless there are special circumstances, most of us don’t come to this earth knowing how to program using JavaScript, TypeScript, C#, Python, or Java. Just like a soccer player, a programmer needs to practice. The more you practice, the better you will be at whatever you want to be, and programming is not the exception.

Practice in itself might not be the only part you might want to know. Thinking plays an important role in the world of a programmer without realizing how important during the process of becoming one. Programmers constantly have to solve problems, and finding a solution requires a special way of thinking as there is more that goes beyond when you “think”.

Steve Jobs famous quote

Steve Jobs was one of the most brilliant minds in the world of technology. He and Wozniak co-founded Apple, one of the most important technology companies that have ever existed. He was considered a genius, and his thoughts impacted and will keep impacting for multiple generations.

There are several quotes he left before he passed away from pancreatic cancer, which can be found in Steve Jobs’s biography. However, some of his most famous quotes were:

  • “Sometimes life is going to hit you in the head with a brick. Don’t lose faith.”
  • “The people who are crazy enough to think they can change the world are the ones who do.”
  • “For the past 33 years, I have looked in the mirror every morning and asked myself: ‘If today were the last day of my life, would I want to do what I am about to do today?’ And whenever the answer has been ‘No’ for too many days in a row, I know I need to change something.”
  • “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”

However, there is one quote that resonates with all programmers and probably you have heard of as well:

“Everyone in this country should learn how to program because it teaches you how to think”

Steve Jobs

Let’s stop for a second and analyze what he meant by this. Many people get confused with the final goal he was trying to convey.

After all, What did he mean with that quote?

People will think the goal is to learn how to use a programming language because the act of coding is what makes you think. This might be a good guess. However, this is far from what he really meant. Unless you are a programmer, you won’t see the real value Steve Jobs intended to say. I certainly would have had a different point of view if I had never learned how to program.

What is the job of a software engineer, software developer, or programmer? Despite writing and testing code that allows computer applications and software programs to function properly, the primary goal of a programmer is to solve problems. Interestingly enough, it takes months and even years for new programmers to understand what their profession is all about.

Why should everyone learn to code?

Despite the concern of becoming a person sitting for hours staring at the computer and talking in computer languages, rather than plain English, there are surprising benefits people get from learning how to program in a similar way when kids play with Lego games.

Programming is a fun activity regardless of the preconceptions a person could have. Certainly enough, Steve Jobs didn’t want everyone to learn how to program for the sake of encouraging everyone to have fun. The factor of fun happens when programmers are able to make something work the way they wanted it to work. This stimulates creativity as it allows the mind to explore new things they can accomplish with the help of a computer

The activity of giving instructions to a computer to accomplish a final goal involves several skills used in life whether it is working your day-to-day job or playing games with your friends. It involves critical thinking, problem analysis, problem-solving, planning, and awareness of all the possible outcomes a solution can have. This leads to constantly making decisions at the moment of deciding to use one logic over another, or one solution over the other.

Coding is an exercise that “mirrors your thought process”. In other words, you are putting in words, or in code, every single thought process you have to achieve a final goal.

As I previously mentioned, the job of a programmer is to solve problems. Now, don’t expect a programmer to solve your financial problems or your life.

If you think about it: everyone in this world has problems. Whether you are rich or poor, healthy or sick, living with your family or living alone, renting or paying for a house, etc. In fact, we constantly encounter problems. If you fix a problem, you come across with another.

The important part is not the problem in itself but how you think and act towards finding a solution to your problems. In a similar way, programmers care about finding the solutions to the endless set of problems or bugs they come across when developing an application.

Can you see why Steve Jobs was encouraging everyone to learn how to code now?

Did Steve Jobs learn to code?

Steve Jobs was an excellent visionary and orchestrator. He was always striving and demanding excellent work from all Apple’s employees while being a manipulative executive and hated by those who surrounded him. Anyone might think the idea of perfectionism Steve Jobs constantly demanded could have come from developing applications.

However, according to Apple’s co-founder, Steve Wozniak, he said Steve Jobs “didn’t ever code“. He wasn’t an engineer and he didn’t do any original design, but he was technical enough to alter and change and add to other designs.” Funny enough, Wozniak was the geek wizard, while Jobs was the marketing person.

Crazy to think he encouraged everyone to learn how to program when he wasn’t a programmer himself.

How to think like a programmer?

Now that you know a little Steve Jobs and the famous quote he left us, you want to know how to think like a programmer. What better way to see how programmers think than by understanding their action plan process to tackle problems?

Understanding a Programmer’s Action Plan

These are the steps most programmers follow to make something work:

Define what is the problem

Everythings starts by understanding what problem a programmer wants to solve. This sounds like an obvious step. However, failure to do so can lead to wasting time and not finding the solution to a problem. Why? because that means we are looking for a solution for something that doesn’t exist if there is not a problem defined.

Knowing what the problem is, allows the programmers’ brain to shift his/her attention to thinking on anything related to that problem, such as, What causes the problem? What topics are related to the problem? Why do we care about finding a solution to this problem? Is this problem a priority? These and much more questions can come up in the brain of a programmer.

Coming up with questions is what allows programmers to think of the different scenarios they need to cover, it allows them to architecture a solution that fits the problem, it allows them to do research in front of the many unknowns they have about the problem.

Reduce the scope of the problem

After defining what the problem is, programmers wonder how big the problem is. The problem might involve different smaller problems that need to be tackled to get to the solution of the big problem. When that is the case, programmers focus on one smaller problem at a time without forgetting about the main problem.

Aren’t programmers supposed to fix big problems?

Programmers like to think of incremental changes. Smaller problems are obstacles in the way of solving the main problem, which is the main objective, serving as a guide to not lose track of what needs to be fixed at the end of the day. Hence, solving little problems, one by one, is the key to accomplish the big goal.

Analyze first, then code

Once programmers know exactly what they are going to solve, thinking about the first thing they will do is to run to the computer and start coding the solution that is not correct.

Let’s pause for a second and think about this scenario. How can you work on the solution if you don’t know what the solution is? Once again, there needs to be a level of certainty. Just as defining the problem, programmers strive to have a clear understanding of the solution. It is possible to ideate solutions rather than implementing a solution. This leads to being efficient at doing the “hard work” which is to put in code the programmer’s solution thoughts.

There will be scenarios where the problem is simple or common enough that programmers already know what solution to implement. However, failing to stop for a second and analyze leads to missing to solve key pieces of the problem that aren’t obvious first.

If you notice, programmers’ job is not just about code. It has taken three steps before the programmer has started coding the solution. Yes, at this point programmers finally put to work for their hands and smash the computer’s keyboard, which is the implementation face.

All the heavy work is happening in the brain. That’s why programmers have a preference to work in isolated spaces as it allows breathing room for their brains to focus on what matters for them as well as avoiding distractions that couldn’t prevent them from ideating the best possible solution.

Make it Work: Find the solution to a small problem

After having gone through the analysis phases, programmers have already ideas in their brains. It is a matter of putting those ideas in different ways to come up with a solution. Oftentimes, there could be different solutions and it is up to the programmer to choose the best solution.

Multiple factors can influence the decision of choosing a solution. Programmers think about questions such as How long will it take to implement the solution? Have I solved this problem before? How scalable is the solution? Will the solution in code interact with multiple features in an application? , etc. in aims to choosing a solution that makes sense.

There is not always one perfect solution for one problem. The problem can have a different context and failing to understand whether the solution is ideal within a specific context can lead to not choosing the best solution.

Split work in smaller chunks

At this point, programmers know what the main problem is, the smaller problems as well as the solution. Doesn’t it mean they already split in small chunks?

Not necessarily. It is correct to say programmers will start picking on the smaller problems and focusing on one single problem at a time. We are talking about the questioning in itself as well as what to solve. However, only programmers know how often they end up splitting their work into smaller chunks even after having clarity of the solution. Let’s understand what is meant here with an example.

There is a problem everyone faces at any point of the day: Hunger. There could be a couple of solutions to this problem. A person could cook, or go to a restaurant, or if they don’t have the money nor know how to cook, they could ask their parents or friends to give them food, right?

The solution we are going to pick is to cook. Perfect, we now have a solution. However, there are little steps that need to happen to implement the solution:

  • Get the recipes of whatever you want to cook
  • Buy the ingredients
  • Turning the oven at an X temperature
  • Mix ingredients and put the mix in a container
  • Wait X amount of time for it too cook
  • Wait X amount of time for the food to cool down
  • Serve the food
  • Eat the food

As you read this, it might sound programmatic or structured the things that need to happen so we can eat some food. Maybe you do it without realizing it, but there are steps that need to happen before you can go to the next step. The same way, programmers do when working on the solution. Little implementations allow them to quickly test and ensure the computer does what they are commanded to do.

Programmers are constantly abstracting or simplify a complicated idea, which could be a complicated problem as well as a complicated solution. They are looking to make things simple as possible. They are looking to make their work easy, even though their work can be rather complicated at times.

Go from crappy code to clean code

This is the stage in which programmers have already implemented and tested the solution. They have confirmed the solution is working. However, the code written for that solution might not follow best code practices or it is hard to read. That’s what is called a crappy solution.

The main goal was to fix a problem no matter how ugly the code can be. Now that the problem is fixed, it is time to clean the code and make it easy for programmers to go through the code base and understand what someone else intended to accomplish when writing a piece of code.

Optimize the solution

In the programming world, it always seems there is a better solution for an existing code. Depending on how performant and/or scalable is the solution, a programmer might need to go back and look for ways to make the code more efficient and run faster.

Have you ever opened a website and noticed it takes more than x amount of seconds to load, testing your patience up to the point it is wasting your time and decide to navigate to another website in hopes to load much faster to find similar information? That means a programmer forgot about the optimization phase or didn’t care to bother about optimizing the website.

Now that you see the steps programmers follow to fix problems we can talk about how to think like a programmer.

Set Goals

From the beginning, programmers look to know what their final goal is. It allows them to keep themselves focused on one objective and only move on to another goal once they accomplish one.

Look for Clarity

If you notice, programmers want to know exactly what the problem is, they want to know what the solution is before coding, and even at the stage of converting crappy code to clean code, they look to make the code more readable not just for other programmers, but for themselves.

Constantly improving

It is common for programmers to write a piece of code and after a few months later wondering about why they wrote that piece of code in the first place. It is ok if things are not perfect at first. This allows room for improvement and explores new ways to accomplish the same goal with more effective and efficient solutions.

Being Ok with the unknowns

Programmers know they don’t have the answers to all the solutions. There are plenty of unknowns in this life and being comfortable at not knowing absolutely everything is what allows the brain to explore and learn about those unknowns, eventually turning into things people know.

Build systems or habits

It seems programmers have a common pattern to tackle a problem. This can change from person to person, but there is a process in place to follow. Building good habits creates discipline without knowing people are disciplined. It is like a kid who trains basketball because he wants to become a professional basketball player. Therefore, every day before or after school he trains basketball for x amount of time with his teammates. Without knowing, the kid builds a routine that he follows in hopes to make it one day to professionalism.

Persevere

Programmers constantly face obstacles. It is up to them to overcome those obstacles no matter how challenging they are. Sometimes it takes a lot of time to come up with a solution in the first place. The desire to accomplish and make something meaningful is often the driving factor for programmers to keep working to solve problems.

Problem-Solver Mindset

At this point, you know programmers’ main job is about solving problems, right? As previously mentioned, people will always have problems. It is up to them to think about solutions. Seeing solutions rather than problems, or challenges rather than obstacles sets up a programmer with the right mindset.