DEV Community

Roman Mikhailov
Roman Mikhailov

Posted on

Learning to think like a programmer.

I’m looking for a book (video, blog, or online course) for Somebody who just learned their first language. They know the “words”, but what will help them to write “poetry” - solve problems using computer programming? Ideally, this book will teach them the art of thinking like a programmer. It will teach them techniques to approach a problem, analyze it, come up with a solution, validate and troubleshoot it. Think whiteboard sessions at an interview.

I’m not looking for a book that concentrates on teaching a specific language like python or c++. Preferably such book assumes minimum computer science knowledge and should heavily use pseudo code, flow charts, diagrams or other ways to generalize concepts, but if it chooses a language to show implementation, that’s OK too. As long as the language is not the main topic.

What was your favorite book, video or lesson to learn thinking in code?

Top comments (33)

Collapse
 
vithabada profile image
Vít Habada

Stop looking for a book. Best advice, I think, is to just write code. It will, eventually, turn into programming.

Learning to think like a programmer on some basic, novice, level is very much like learning a language. And one learns a language by memorizing a bunch of stuff and then speaking.

Once bigger challenges arise, one has to study. And one is able to study, only if they speak the language.

Collapse
 
jacoby profile image
Dave Jacoby

The pitfall of just write code, of course, is that the conventions and protocols and styles you're "of course" about (because you learned it all yourself) are things that may drive others batty. Like my preferred indenting scheme.

So, additionally, reading code and asking questions to other programmers should be part of the process as well.

Collapse
 
vithabada profile image
Vít Habada • Edited

I really don't think that a novice, that is just learning to think algorithmically should focus or be able to focus on following some conventions. As you say, one can 'learn that for himself'.

First thing to master is putting a thought into code. Conventions and best practices just add a layer of overhead on top of that.

So, additionally, reading code and asking questions to other programmers should be part of the process as well.

Definitely.

Collapse
 
itscoderslife profile image
Coder

Try "The Pragmatic Programmer" book - amazon.com/exec/obidos/ASIN/020161...

And here is the recommended list by CodingHorror.com site:
blog.codinghorror.com/a-pragmatic-...

Collapse
 
rommik profile image
Roman Mikhailov

Thanks for the suggestion. It is a good book, but unfortunately not for this case. It is too broad. I'm interested in just how to teach to learning to solve problems and think in "code".

Collapse
 
regul4rj0hn profile image
Mauro Lavigna

Was going to recommend this one as well, but I looked in the comments first cause I'd be amazed if I was the first one to do so.

Collapse
 
websvc profile image
WEBsvc

In my opinion, well....
A book might teach a lot of stuff but...
It might also teach how to cover a load of concepts, but the essential for me is, not even if a developer has much knowledge, to be thistthy for knowledge, to be curious, to have logical thinking, to be smart enough to see a problem for various points of view
A developer in my opinion must be able to do that in a natural way
I work on a daily basis with dozens of developers and it is desolating to see people that make basis mistakes just because they don't stop for 2 seconds and think!
A developer, more than "shith" code must be able to think, and then put into code

When a developer does code without thinking, shit happens, and I see that too many times!
A developer will not do it the correct way at the first time. It will learn with mistakes,and comparing results. For that he must be able to think!

I'm a developer for 15 years plus, and I manage a couple teams at the moment.
I did not learn from a book or school! My studies area is electronics, which I think it is really a good entrance point to development because of of the necessity of logic thinking and understanding.
I had fresh computer science engineers working for me that could not even understand how a print or echo works... Hence they are ingineers . Yes!

Learn, test, give yourself to the "cause", make mistakes. Can you understand your mistakes? No? Try again then!

But this is only my opinion and experience.
Have a good one. And put your best into it.
Namastê

Collapse
 
pedro2555 profile image
Pedro Rodrigues • Edited

I would suggests intro to computer science MIT opencourseware lectures on youtube

Not a book, I know, but they give exactly what your looking for. Plus they use python

Collapse
 
wavell profile image
wwatson

Well it's kind of a book. Sicp (structured interpretation of computer programming), and I'd recommend that as the best programming book ever written. But my personal favorite is the little schemer. Teaches you how to think for sure

Collapse
 
courier10pt profile image
Bob van Hoove • Edited

You can check out SICP for free. Nice to see it being mentioned.

It might be too much in depth depending on the audience :)

Collapse
 
dpashutskii profile image
Dmitrii Pashutskii

This! SICP indeed is the best programming book ever written. This book literally changes your perspective.

Collapse
 
codingarchitect profile image
Sendhil Kumar R

If you are short on time, this is a second best after SICP. Good Suggestion again.

Collapse
 
codingarchitect profile image
Sendhil Kumar R

I highly second this. Good Suggestion

Collapse
 
vingam profile image
Vincent

I used to ask myself this same question once, "how can I think like a programmer?" I actually didn't find any useful books or courses on this, just a couple of articles that hepled me a bit, I started from them, then on my own.

If you're interested:

Hope you find them at least a bit useful.

Collapse
 
humzakhan profile image
Humza K.

I was in the exact same position when I was learning to program, and I was glad someone game be a wonderful piece of advice. The only way you can force yourself to think programmatically is actually by writing code. Pick a project, and start working on it. Then look into ways you can improve your overall architecture of the application, get feedback, make it public. Fix the vulnerabilities and flaws.

You can always pick a random book and start learning, but our brains aren't designed to retain theoretical information just by reading it. We LEARN BY EXPERIENCE. Until or unless you experience it firsthand, you will never retain that piece of information in your mind. I went through countless videos, books, articles and so on, but I only remember the things I learned AND applied.

You first few projects will suck for sure, but as you proceed, you will see for yourself that you are getting better day by day, all by the power of trial and error. Take this approach and you will good about it later on. I know this because I do.

Collapse
 
odonacer profile image
Roman Bardachev • Edited

You can try to google for articles like “don’t learn how to code, learn how to think”, there I think you would find answers. Also, take a look at edx’s CS50 courses - they have courses for Webdev and mobile dev. There’s good explanations how things are built, so understanding how to develop and think like a dev should be obtained after watching those courses.

Collapse
 
mazyvan profile image
Iván Sánchez

One of my favorites by far is Clean Code by Robert C. Martin. It's not about data structures or algorithms but definitely is about writing poetry. It theach you how to write beautiful code that it's not only readable but also scalable.
His author is one of the impulsors of agile. He and personalities like Martin Fowler, Kent Beck, Michael Feathers or Dave Thomas are the heroes that made and/or populated the software development process and practices that lets the industry moves fast but with confidence.
At the end of the day there's one editorial that you really need to know. It's name Addison-wesley. Ones of the best books in the field are written under that publisher

Collapse
 
buinauskas profile image
Evaldas Buinauskas

I recently read The Art of Unit Testing. Really useful and helps to understand importance of automated testing and some design principles.

Collapse
 
nathanbq profile image
Jonathan Bohorquez

Hey there Roman, I think that what you're looking for is that scenario where you as a software engineer or developer feel comfortable in the way you approach to problems, That scenario is full of many variables and those variables are different according to the people who is seeing the problem, but sometimes there are some basic useful advises:

1) Understand or domain the basic of what your doing (programming, solving a problems, developing an Algorithm etc)
2) Read and isolate those errors that might be causing you troubles in your labor in order to fix them.
3) Know when to stand up and give yourself a time for breath and relax.

pd: this is not a book, or youtube video or tutorial, but I hope it might be useful to you. Cheers and keep coding, that is what make us develop that "Thinking like an engineer or programmer".