Learning to think like a programmer.

Roman Mikhailov on July 21, 2018

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 ... [Read Full]
markdown guide
 

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.

 

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.

 

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.

 
 

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".

 

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.

 

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ê

 

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

 

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

 

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

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

 

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

 

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

 
 
 

Of course it matches the name of my question, but can you elaborate why this book is the best answer?:)

 

Anton Spraul breaks down the ways that programmers solve problems (creative thinking and problem-solving) and teaches you what other introductory books often ignore: how to think like a programmer.

 

I wholeheartedly agree and recommend this book. Also check out V. Anton Spraul's YouTube channel. It has a dozen or so videos on the different problem-solving techniques covered in the book.

 

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.

 

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

 

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.

 

My suggestion is against the grain here, I can’t suggest one that lets you think in code—as I don’t know it exists—but if you can express the “problem” then often that can be solved with code. Think less about thinking in code and more about thinking in terms of the problem you are trying to solve. See “Are Your Lights On?” By Donald Gause; amazon.com/Are-Your-Lights-Figure-...

 

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

 

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".

 

Honestly you really can’t learn how to think in a specific way. You can defiantly learn from books on how to utilize and build things with a certain language. But in order to learn how to thin like a programmer you just need to build stuff. And evrey thing else will start falling into place. Because you will be able to start to learn how to break problems down and structure the program ect. So you might want to look at as what is it you want to program. And what language do you want to program in and then take it from there.

 
 

I agree with some of the things that have already been suggested such as code a lot and checking out other people's tutorials. In addition, I'd add learn to read documentation. A lot of times tutorials won't use best practices because they are still learning the subject too or they're looking for an easy way to set something up for the tutorial.

Learning how to read the official documentation for the language/framework/tool will go a long way to teach you how the tool should be used and what the best practices are when using it. It can also put you miles ahead in terms of how to do something with the tool than someone who has to sift through several mediocre tutorials.

 

The first part of my answer is why focus on "thinking like a programmer"? I think the reason why we all became programmers is because we love to build things and solve problems.

So if we look at it from that angle what will help us do this? The first key is understanding any computer language is really made up of only three things: sequence, selection, and iteration. Sequence is the idea that our code instructions execute in order they are written in code. Selection are the handy if statements we use everywhere. Iteration is loops. These are our building blocks.

Our tools to put it all together? One I love is TDD. I think this way of working helps you because you focus on little pieces at a time. One important lesson any dev needs to learn when starting out, don't over engineer things! Also the idea is we try to come up with the simplest way of solving the problem first then try to optimize when we see bottle necks. The other tools are learning design patterns enough to know to at least look at them when you see certain problems. Anther good idea is look at some of the classic computer science agolthrims. And also the books everyone is suggesting on writing code that is easy to understand and maintain over the long term.

 

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.

 

"Stop talking about how to be a good man and be one" - Marcus Aurelius.

This is getting a bit repetitive, but there is no way to short cut coding experience. First you need to learn the basic concepts until it becomes second nature. Once you have the foundations you can begin to exercise these skills in developing real systems.

Passive learning is not nearly as powerful as active learning where you experience feedback. The feedback process reinforces neurological pathways, which is the definition of learning.

This feels a little like the ten year old asking me what books to read to quickly become a black belt; first you learn the basics. Then you practice. Then you practice some more.

 

"Pragmatic Thinking and Learning (Pragmatic Programmers)" by Andy Hunt and xahlee's site at xahlee.info/ to get a glimpse of someone else's thinking pattern.

I remember reading "Organic Chemistry as 2nd Language" by David R. Klein which taught the "language" of organic chemistry whilst explaining it and then solving some problems at the end of each topic.

It's great because it teaches you the language of learning within the context of organic chemistry.

"Learning the language of learning how to code in any language" or "Coding as a 2nd language" - If someone writes any of the these please let me know :)

 

I would certainly advise "Practical Object-Oriented Design in Ruby" by Sandi Metz. I'm a beginner and it's really fleshed out a lot of programming concepts for me from a big-picture perspective. Its "Ruby" specific, but so much more than that.

Here is a link to the book's website:

poodr.com/

I also recommend "Cracking the Coding Interview" - lots of good things in here.

Here is the Amazon page for the book:

amazon.com/Cracking-Coding-Intervi...

 

Books are a great resource for exactly this! My recommendation is the book Thinking Like A Programmer - amazon.com/Think-Like-Programmer-I...

 
 

Ah yes i've been wanting something like this too i hope we get it.

 
 

The Art Or Computer Programming by Donald Knuth, Eloquent Javascript (cant remember author)these 2 books are actually enjoyable to read. . .even for non-coders.

code of conduct - report abuse