How to Think like A Programmer?by@bob.js
284 reads

How to Think like A Programmer?

by Bob FornalDecember 23rd, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

What do you think can help me think like a programmer? Here are the core areas that are important to get that "programmer brain."
featured image - How to Think like A Programmer?
Bob Fornal HackerNoon profile picture

So, I recently got a question from an individual participating in #100daysofcode on Twitter. I follow this hashtag to cheer on newer developers and support their efforts.

The question went like this ...

(What) do you think can help me think like a programmer apart from (working on various examples over time)?

I had to take some time and gather my thoughts. This isn't an easy question.

My Background

First, I started as a programmer when I was 10-years-old; no college education at that time. I did get a Bachelor of Science, Computer Science (CS) later in life. The Internet didn't exist when I graduated so I guess I am a self-taught frontend developer.

I have worked on small and large teams, developing internal one-off applications and enterprise-level customer-facing applications.

I have used Waterfall, Kanban, Scrum and Agile. Some of these teams had loose requirements, others had to go strictly by the books.

Benefits of College Education

Let me start by saying that self-taught programmers can learn these things. There are excellent books, college courses online, and other online resources and communities to learn from.

However, they do not have the benefit of being as structured, or in many cases as in-depth as actually going to college for a CS degree so there is much more self-directed learning that need to occur.

Computer Science

  • College students in CS are trained heavily in algorithms and data structures. They generally have better and more efficient solutions.
  • They are trained in compiler theory and most of them know how to implement a compiler or an interpreter.
  • They are trained in higher mathematics (Calculus, Linear Algebra, Statistic).
  • Their problem-solving skills are generally better if self-taught programmers who do not learn Algorithm, Data Structure, Compiler Theory, OS Theory.


A large part of what I got out of college was communication. I still remember learning about the various techniques that teams would use and these skills have been invaluable over the years.

On teams today, forty to sixty percent of my day is in meetings:

  • Planning at a cross-team level.
  • Planning at the team level.
  • Writing and managing card for upcoming work (discussing these with various members of the team).
  • Participating in, or presenting in Knowledge-Transfer sessions.
  • Documenting processes.

The job is almost half communication.

How can someone learn to think like a programmer?

Let’s address the original question!

1. Programmers need to program.

They need to ...

  1. Write code.
  2. Watch the code fail.
  3. Learn to debug the failed code.
  4. Fix the broken code.

Part of this process includes Refactoring.

  • There are formal times when refactoring is required to convert "working code" to better code that is faster and more useable over time.
  • There are informal times when refactoring is simply seeing and implementing a small improvement in code. This is generally a learning tool (if-branches, converted to switch-statements, converted to an object-reference tool). Essentially, learning when to use all the various parts of the language appropriately.

2. Programmers need to be familiar with CS Theory

  1. Problem-Solving Skills (yes, there are many good courses on problem-solving and critical thinking).
  2. Algorithms and Data Structures.
  3. Understand that more math is needed than just High School level.

3. Communication

Communication is also a learned skill. This is not simply being open and able to carry a conversation. This communication includes:

  • Working with "customers" to determine their needs.

  • Working with designers and developers (on the team, or otherwise) to refine needs and plan the development process.

  • Working with Quality Assurance to assist them in testing the application.

  • Presenting work in meetings (Review or Knowledge Transfers).

  • Working with Senior or Junior Developers.

  • Participating in Code Reviews and Pull Requests.

  • Reaching out to teammates when stuck on an issue.

Communication can also include things like ...

  • Being able to build a good resume (it helps if this matches the LinkedIn information).
  • Possibly writing articles to show your professional side.
  • Speaking (at meetups or conferences).
  • Marketing yourself (social media).

4. Knowing How to Research

Most developers know that StackOverflow can be a great resource when you are stuck on an issue.

This comes down to ...

  • How to correctly search on Google (or other search sites ... I use Google)
  • Find relevant information from reliable sites (w3Schools used to actually contain a lot of incorrect information)
  • How to determine if the located information actually applies to what you are trying to do.

5. Knowing When to Take Breaks

Taking breaks in this sense is not just about getting lunch or a 15-minute break every hour. What I am talking about here is knowing when you are so deep into a problem that you can't see your way out. A break is often needed to get away from the code ... to let your subconscious work on the issue.


The original question was ...

(What) do you think can help me think like a programmer apart from (working on various examples over time)?

Here are the core areas I feel are important to get that "programmer brain."

  1. Programmers need to program (there needs to be a lot of time writing code).
  2. Programmers need to be familiar with CS Theory (understanding these theories improves ability to write and diagnose good code).
  3. Programmers need communication skills.
  4. Knowing how to research.
  5. Knowing when to take breaks.