How to think like a programmer??

I am still a beginner, I already know the basics but it's getting harder for me to step up.

For me it's getting easier day by day to read and understand someone else code, but then when I need to do my own starting from scratch it's a completely different story.A friend told me that before I think on any code language I should think what I want to accomplish, how and then starting writing the code... I usually go in the right direction but I'm not able to get there...

Post a Reply

Replies

I totally understand you my dear friend! A few years ago when I started getting in to programming I had a friend of mine who was an engineer. He never told me anything about syntax or what language is the best. He always said to me: you have to build a programmers brain. The problem is, there is no exact right way to build this. As you get older your brain is developing. Like for example abstract thinking (which is needed for programming) develops by most people when they are around 18. Some get it at a younger age, some never get it. So time is the key in my opinion. Of course you have to feed your brain. The core things are programming and maths, so you will have to train both skills very good. But don't be limited by that. Learn as much as you can to keep your brain 'oiled'. Get to know how programming works, get to know how computers work. But also try to learn things such as how the human body works, how physics work, how language works. The more you learn the more you know and the more diffirent spectrums and point of views your brain can acces. Again, time is the key so practise as much as you can. And whenever you're stuck on a program, just ask here at thenewboston

The best way is to just think about dividing your problems up and oslving them one at a time. I.e. Suppose you want make a cryptography algorithm. Then first you would need a way to receive the input. The next part would be the actual cryptography. THe last part would be outputting the changed text. So you would pick one of these goals and just keep breaking the goals into smaller subgoals until it is something you know how to do and accomplish those tasks. While doing this, you will also incrementally build up your code. Try to have every part of your code be organized and write what you are doing, use meaningful names for variables and functions. Focus on getting the job at hand done, then about how how to make it better.

if you ever get stuck on something, don't try force it out by continuing to slave over it for the next three hours. get up, take a walk, do something else, sleep over it, whatever. if you focus too hard on something, it will be harder to get it out. thinking about other things will help.

Here's what I personally do. I find unique pieces of software(unique by the looks, features, or even trust), and the figure out how I could make something similar to that, but even better. I also tend to think about our futuristic technology, which is my motivator. Anyway, just remember, whenever you're learning something, take it into consideration and importance. Your path will lead you to not just success, but understanding and creativity. Trust me, I've come a long way myself. Have a good day!

Learn your basic data structures (Array, List, Map, Set, Queue, Tree, Graph), the algorithms that operate on these, and to some degree know how to implement these. But first you need to learn the basics of a programming language.

Knowing algorithm and data structures bring your abilities as a programmer to the next level.