DEV Community

Cover image for Think With A Programmer's Brain
bob.ts
bob.ts

Posted on • Updated on

Think With A Programmer's Brain

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.

Can I Answer This Question

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 than self-taught programmers who do not learn Algorithm, Data Structure, Compiler Theory, OS Theory.

Communication

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.

THE ORIGINAL QUESTION

So, the original question is simply: "How can someone learn to think like a programmer?"

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.
  5. GO BACK TO STEP 1.

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:

  1. Working with "customers" to determine their needs.
  2. Working with designers and developers (on the team, or otherwise) to refine needs and plan the development process.
  3. Working with Quality Assurance to assist them in testing the application.
  4. Presenting work in meetings (Review or Knowledge Transfers).
  5. Working with Senior or Junior Developers.
  6. Participating in Code Reviews and Pull Requests.
  7. Reaching out to teammates when stuck on an issue.

Communication can also include things like ...

  1. Being able to build a good resume (it helps if this matches the LinkedIn information).
  2. Possibly writing articles to show your professional side.
  3. Speaking (at meetups or conferences).
  4. 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 ...

  1. How to correctly search on Google (or other search sites ... I use Google)
  2. Find relevant information from reliable sites (w3Schools used to actually contain a lot of incorrect information)
  3. 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.

Summary

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.

Discussion (20)

Collapse
kunalkeshan profile image
Kunal Keshan

Great article, I'm right now pursuing Electronics in college, and so yea, my interest shifted towards computer science a while back and I've been facinated ever since!

I'll start foucsing on CS Theory. Thanks!

Collapse
dev_allahnana profile image
Usman Abdulhadi Allahnana

Thank you so much for this great article. I enjoyed it.

Collapse
naka_dashi profile image
Naka Dashi

I think this is generally well-put, with a couple of exceptions:
"Understand that more math is needed than just High School level."

If one is developing business applications, this is not true. I have seen very highly-paid technical leads who can barely solve two linear simultaneous equations, which is around 6th grade math in a lot of countries.

"On teams today, forty to sixty percent of my day is in meetings:"
This sounds very excessive. If more than 20% of a programmer's time is spent in meetings, your department needs training on how to conduct more efficient meetings. The majority of meetings drag on for far longer than they need to.

Collapse
rfornal profile image
bob.ts Author

Nobody is static on a job for 40-years any more, so assuming the math isn’t needed would be a disservice to someone that might need it on the next job.

I should say on the meetings that I included pairing sessions.

I’d love to say you’re right about the meetings, but having worked with several enterprise-level organizations, this is the way things are. Very focused on process … often overriding common sense. But those base premise behind mentioning the meetings, that developers need to communicate stands.

Collapse
naka_dashi profile image
Naka Dashi • Edited on

It sounds like you do a different kind of programming than I do. I normally work with business applications on desktop and web, and I haven't had a need for anything beyond simple arithmetic. I did work at an engineering firm once, and most of the math was already done by the scientists and engineers; we just had to program it in. With the exception of specific fields that demand the math, a fresh graduate is more likely to be hired for their programming skills than their math skills, so I would encourage them to focus on that.

Regarding meetings, there might be a cultural difference between non-technical departments and developer teams that often needs to be addressed. The two communicate differently. I think there are firms that specifically provide training to increase the efficiency of meetings, so the meeting science is there. Just that not many companies are using it.

Collapse
olancheros profile image
Oscar Lancheros

This is an interesting article and I agree with you, CS theory it's pretty important when you write code. I've studied physics and I worked in geophysics for many years and a few years ago I had to write a bunch of Perl programs in order to automatize some tasks that helped me out to deliver on time a project. Since this year I started to study programming and a couple of months back I did realize that those Perl' scripts could be more efficient and have less code if I had implemented a couple functions.

Thanks!

Collapse
rfornal profile image
bob.ts Author

That’s great information. I remember working with the Engineers while in college using Fortran.

Collapse
raddevus profile image
raddevus

Those are all great points and this was a great article.

A lot of very good guidance for any developer.

thanks for sharing.

Collapse
neuron123 profile image
Neuron123

Great article, thanks for writing

Collapse
arcahyadi profile image
arcahyadi

Thanks, great article
These few days i lost my intention for programming
Because stress for my final project

This article wake up my spirit again

Collapse
rfornal profile image
bob.ts Author

Awesome. I’m glad I can help.

Collapse
ismailidrisabd4 profile image
Ismail Idris Abdullahi

Great article, i don't know how to program but reading your article is like giving me an assignment to go an learn how to do programming

Collapse
blackinitial profile image
Black Initial

greet article, thanks to sharing

Collapse
toour profile image
Turan Kılıç

Great article, thank you !!

Collapse
stanley_broo_69ad01f7d5a6 profile image
Stanley Broo • Edited on

Great article

Knowing when to take breaks have saved me hours of work over the years.
..Go for a swim :-) ..and a much better solution will present it self after the ”break”.

Collapse
ajahbenjamin8 profile image
AJ_Benjamin

Thanks for sharing Bob

Collapse
pini851 profile image
pini85 • Edited on

Could you send a link of one incorrect subject on w3 schools, if there are any left?

Collapse
rfornal profile image
bob.ts Author

I'd be happy to ...

There's plenty of research showing they had this problem in the past. In fact, I stated in the article, "(w3Schools used to actually contain a lot of incorrect information)" ... past tense. I've seen incorrect information over the years and have learned to "shy away from them."

I spent some time researching this subject. Looking into the information they currently present I found the documented issues in the past are fixed. I will honestly say that they have information that is reliable, though I have no interest in using their information.

Collapse
pini851 profile image
pini85 • Edited on

Yeah. I'm a bootcamp teacher and I usually recommend w3 schools only for html/css

Collapse
naka_dashi profile image
Naka Dashi

Sounds like an entire article could be written on dealing with incorrect information on the web when starting out as a developer!