while (noSuccess) { tryAgain() if(Dead) break; }
Programming is a field where you are not paid to write code; you are paid to solve problems. Programming is a field where perfection comes with practice not just reading or watching a thousand lines of code. As a beginner, you may be disappointed when you see apps and codes that look pretty complicated. You don’t understand most of the code there and you have no idea where to start, you start thinking that coding is only for clever people but we want to tell you that every programmer goes through this phase and feel like the same. Those who made such apps like Instagram, WhatsApp or Facebook have practiced decade to make these apps.
Learning programming in the initial phase might be frustrating for you and you may become confused as well but sticking on it and following some general advice can help you a lot in this journey. We are going to discuss some tips that every developer should follow to become a good coder.
1. How to Remember Everything in Coding?
The most general and obvious question for beginners. You take the first step in programming, you see a lot of syntax of different programming languages, you see a thousand lines of code in a complicated project and face difficulty in understanding all the logic behind that. Now you start asking questions to yourself that how would I remember all those stuff? how would I remember all the syntax of programming languages or frameworks? there are so many things to remember in the project and that’s scary. The solution is…
- You don’t need to remember the characters you see on the screen. You need to understand and comprehend it. You need to check what’s happening in the code, how these characters and syntax are coming together, building the logics to fulfills a specific task. Divide the complete code in small chunks and then understand how logics are working in each part.
- All code is different from each other. Suppose you try to remember one function and later if you run some code with that function to solve a particular problem and if one little thing is changed from what you remember then you’re gonna stuck there because you simply remember the structure of the code so there is no benefit in memorizing the code.
- If you grasp the concept instead of remembering the code then you will able to adopt new changes and implement the things on your own. Remembering the characters, syntax or function is just like reading a book and memorizing the words but not really understanding the story behind it.
- Be an active learner, not a passive learner. A passive learner listens, take notes and retain everything for the next test but active learner creates the same situation and solves the problems. Active learning is much more like a dynamic way of learning that you should adopt in programming. Keep in mind The more you understand, the less you have to remember.
2. Take Action and Practice
Whatever you have learned as a programmer you also need to use that knowledge practically, something you will actually face in the real world. So once you have learned the stuff from tutorials or from any other resource take below actions…
- Firstly run the original code exactly as you have read it or saw it on the video or learned from any other resource.
- Understand the logic behind every single line and every single character. If you find any function or piece of code that you don’t understand what it does then google it. Google the expression, function, syntax or line and figure out what that line does and how it does. If you will ignore the line then you may face a situation in the future where that line or expression can break your code.
- Once you understand the code you have read and then run it, try to make small changes in it. Start small and start by adding some extra piece of functionality and check what it does now. You can also remove everything and put some similar code in a custom function and perform the same task.
- Once you are done with making some small changes then try and recreate something completely new using the same type of logic. This is what active learners do. If you will remember the things then you won’t be able to create new things and you will be repeating the same thing over and over.
- You will definitely make some mistakes when you will learn something. You will be getting some strange errors of different types which is actually a good thing because fixing those makes you a better programmer and it is a good way to learn to code. Google is the best friend here for programmers and chances are there that you get your solution on StackOverflow. You try a solution and if it doesn’t work you try another one and that’s how you dig yourself into coding and reach the root cause of the problem.
3. Use References
When you are working with more languages you need to check the correct syntax of a specific language. Accept that it’s normal to get confused between the syntax of multiple languages. Here you can use references to check the correct syntax or structure of the language and there are multiple ways to do this…
- Keep small text files with common snippets. You can keep that on your local machine or you can use a cloud service like dropbox. You can create a folder snippet, then you can create subfolders of multiple languages, then another level of the folder for certain frameworks for those languages.
- You can use some online snippets like Gistbox which is very popular and you just need Github account. Csnipp is another cool snippet manager, you can also sign up here using your Github account. Another one is SnippLeaf which you can use.
- Another good way is documentation of any language, specific framework or library. In the documentation, you will be able to find all the functions, class name and other things.
- You can also take the reference from Blog Post. Just bookmark some blog post or informational sites for references to check examples or to check a certain block of code.
4. Do Not Stop Coding
This is one of the most important pieces of advice for everyone. Write code every single day even if it’s just for 30 minutes. Writing code every day keeps the stuff fresh in your mind. If you will stop coding for two or three months, your mind will stop working in a particular way of problem-solving. You will face difficulty in using your logic while building a project or program. People forget the languages they don’t use for a long time, so practice it more often.
Try to learn something new every day. Watch a couple of tutorials or read some blog posts. Also, stay up to date with technology and trends, more specifically in programming. Every single day a new technology is introducing in the tech world so keep updated yourself with it and educate yourself as much as you can.
5. Common Principles
There are some common principles in computer programming that apply to a lot of different situations. These are KISS (Keep it simple stupid), DRY (Don’t repeat yourself), YAGNI (You aren’t gonna need it) and there are some others as well which makes you a better programmer. Check the link 7 Common Programming Principles to read about these principles.
In the end a short note for all those programmers who just get stuck in programming and start questioning their abilities, they think that they are not smart enough to code and sometimes they start losing confidence as well but remember that it’s important to do what you love so even if you get stuck somewhere in programming still you love it then stick with it. If you fall get back up with a fresh mind and try one more time.