Coding jargon, coding questions, code logic, problem-solving skills, logical thinking, creative skills, see things from different angles and thinking outside of the box come to mind. I want to improve and become the best programmer I can be, so I would like to know the best way to learn to think like a programmer.
What would you say is the best way to learn to think like a programmer?
Top comments (17)
Here is my list:
Really like this list! The only addition or comment is to not read best practices like they are law. There are times to use them, and times to avoid them. Learn where they make the most sense. This is why I tend to think of DRY instead as AHA, Avoid Hasty Abstractions.
Nice list!
This is extremely important for maintainable and enjoyable code, and also really difficult.
Remember that code is both language to communicate with computer and with other people (other developers, you in on year, testers, tired you, PMs possibly). The "people" part is often much more difficult.
Some ideas how to get better (in my opinion):
Couldn't agree more with the last point. 🤝
I love your list !
It is helpful.
Thank you
The best way to learn to think like a programmer is... to program! The more you code, the more you understand how it works.
Also, work with other developers. It is very easy to become infatuated with your own work: having partners in coding help you extend your horizons a lot!
Yup. That's the best way.
@zaparka has already given a great answer, I'll try from a different perspective.
For me, managing complexity is the biggest problem in coding. There are complex libraries to understand and our own code becomes complex or intricate.
The best practice, raw principle for me is to black box, to develop a skill for thinking in detail when constructing something and then retaining its 10,000 and 30,000ft views when working on something else. Our job is primarily to assemble parts to create a solution, we should develop an ability to assess parts and fit them into the solution we are working on, only building new code when one finds that no existing part fits.
My mantra is then: build what you MUST not what you CAN.
Design patterns and algorithms are just the parts or the tools we use to produce solutions, just like everything else. Understanding basic trade-offs (e.g. use more memory, but get higher performance) is often useful, but know that there are rarely right and wrong answers that can be read in a book or a blog post, right answers are heavily context specific!
For me;
This helped me with my first project at goleko, it hasn't done me wrong, I'm a convert haha :)
oh, yeah, and checklists :)
My way, (which I learnt from CS50) is to write the solution for a problem in Pseudo-code in ascending steps:
This is what I do. I guess this should cover logic, problem-solving , creativity and out-of-box thinking as well! 🖖
One thing you could try is programming from multiple different "perspectives". For instance, if you mainly work on the backend, try working on the frontend and think about how choices you made on the backend affect you as a frontend developer. All that being said, I'm still in a similar phase of learning to program as you, so my advice may not be as great as others.
Learning to problem solve in a larger scale is a huge contributor. You can adopt the same (or very similar) process to solve problems in other areas of life!
First, KISS (keep it simple, stupid)
Second, start thinking how you would explain what you are trying to do to a non-dev. No fancy words, no jargons, no complicated concepts, just the basics, which can be understood by anyone.
This is your basic code. If you can do it, you can do (almost) anything
Okay, so if you want to learn to think like a programmer, first thing you understand is the problem you are going to solve or the utility of your code, once you start getting it, you are half way there.
after that you should focus on visualize the procedure of your code that how you gonna build it, you can try flow charts and pseudo code for this, don't just mug up or copy paste the code, understanding the concept behind it, that's where the success of coder lies.
Hope it helps, all the best.
Interesting
Some comments may only be visible to logged-in visitors. Sign in to view all comments. Some comments have been hidden by the post's author - find out more