top of page

How to think like a programmer?



Introduction

When I started programming, I had no real-life experience, no one to teach me.

I never got a degree in computer science.

Initially, I wanted to learn how to code because I had to create a website for my grandfather.

I tried to figure out how to build this on my own, and that’s how I entered the technology world full of new areas to explore.

Having the ultimate power to create something astonished me.

Tech has changed my life, improved my communication skills, and made me better at what I do.

I took this from a blog article and have made tweaks to it at the right places to make it a bit informal and explain the key concepts from my perspective. I hope this helps you in your thought process.

People have a common misconception that programmers know everything. In reality, they have a unique approach to solving problems. Let’s explore the programmer mentality in this blog.


 

I’ll make sure to share tips that will help you get there too!


What exactly is the programming mentality and thought process?

Before we get there, let’s think about programming as a language that could be spoken. When you speak, you communicate effectively with the people around you.

When you code, you communicate with a machine.

In both cases, you don’t need to know every word of the language; you need to know enough to convey your ideas.

When you code to solve a problem, it’s more about knowing the fundamentals and applying them. You don't need to memorize everything when you understand how to break a problem down into smaller pieces and apply programming principles. You learn how to challenge a

problem, which is a skill you use every time you code

Breaking things down into building blocks

So, how do you break a problem down into its building blocks, like a programmer approaches a problem? Let’s have a look at the following example:

Let’s say we have to describe to a machine (or a person who is new to a task) how to open a bottle of wine. We could not just say, “Open the wine. “ We might offer the following instructions:

1. Pick up the wine bottle from the wine cellar.

2. Hold the bottle in your right hand.

3. Hold the corkscrew in your left hand.

4. Use the corkscrew and screw it into the cork.

5. Gently pull the cork out of the wine bottle.

6. Pour out the wine bottle in a glass.

Simple tips to get you thinking like a programmer


Each programmer thinks differently and learns how to approach and break problems uniquely. You’ll develop your programming perspective through practice, and it becomes easy to communicate with other programmers or machines to solve complex problems.


As you develop your perspective, here are a few tips and tricks that you can use to think like a programmer and develop this mentality.


1. Talk through the problem aloud!

First, you can talk through the problem by calling up a friend or family member and explaining to them what you’re trying to tackle.

By having a conversation with someone, you’ll determine how to communicate with them to explain the problem and your solution clearly. Don’t have anyone to talk to right now? No problem! Just try speaking through the problem out loud. Explain your approach and understanding to your pets or even a stuffed animal. It’s speaking aloud that is the key.


2. Collaborate!

Programmers don’t always work by themselves on their computers.

They like to learn from each other.

When the problem is complex, working with other programmers helps bring together the best ideas from many people, making it easier to develop innovative solutions.


3. Take it one step at a time

Starting on any big project, significant problems can seem scary at first, and it’s easy to get overwhelmed.

The best way to combat this feeling is to look at the problem from a high level and then break it down into smaller chunks.

You can then apply the fundamentals of programming to solve each piece.

Approach each chunk of work separately so that the task is manageable, and you can start to make some real progress, one step at a time.


4. Start: how would you solve a similar, more straightforward problem?

You can also consider how you might solve a problem similar to what you’re attempting to solve, but much more straightforward. Then write the code to solve that minor problem.

Slowly but surely, introduce complexity to solve the more significant problem you were presented with at the beginning.


5. Practice, don’t memorize.

Memorizing is tough, and you don’t need to go down that road to think like a programmer. Instead, focus on the fundamentals. Learn the principles and ideas behind problem-solving, and you’ll get much further than trying to remember everything.

Every time you solve a simple problem, you’ll develop your fundamentals even further, making it more accessible as you progress. Practice is key to your programming perspective becoming second nature.


6. Shortcuts can be dangerous

Taking shortcuts while you’re learning to solve a problem can be more hurtful than helpful.

Try to think of the learning process like running tennis drills. You could take steroids to get stronger and become a better player, but that’s likely to hurt you in the long run.

Try to solve it yourself first rather than searching for an answer right away when encountering a problem. When you rely on other people's solutions, you don’t get to develop that muscle yourself.

Focus on the basics, put in the practice, and run your drills.

The tried and true training methods are there for a reason; they work!

We know that it can be frustrating when it takes time to learn to program, but that’s all part of the process of forming your programming perspective.

It can be easy to blame the machine every time something goes wrong.

But if you take a moment and analyze how you’re approaching the problem, you can see where you might have gone wrong. Understanding this will help you to identify issues in the future quicker, and you’ll naturally get better by avoiding these issues in the long run.


7. Get help after you’ve exhausted other options

If you’ve really tried your most complex and approached the problem from many different perspectives, but you’re still struggling, now’s the time to ask for help.

Reach out to a colleague or teacher or post on a forum to get some guidance.

It’s more likely you won’t be robbed of a learning opportunity when you wait to ask for help until you need it.


8. Get familiar with reading documentation

Documentation is just like a recipe for cooking.

It lays out how the code is intended to work and is an excellent resource to help you understand better.

Learning to read documentation will also steer you away from looking for a shortcut or an easy solution to your problems or bugs.


Remember to focus on how to solve a problem and to learn as you go. Don’t get hung up on needing to do things “right” or to be “perfect.” There are many ways to solve a problem, and, with practice, you'll build your unique programming perspective!


Hoping these insights help you be a better person at what you do! Cheers to the next!


Shivam

1 view0 comments

Recent Posts

See All

Comments


bottom of page