Programming can be a very stressful endeavor for beginners. Simple mistakes can be hard to track down and can cause the program to completely explode into a bajillion chunks. As a result, programming requires perseverance; there’s no way you can go into programming and expect things to be smooth! Without that perseverance, your job becomes a massive chore, and this is obviously just plain horrible (and sad). There are a few universal tricks that anyone can pick up to ease the burden of the rest of programming, however… which I’ll be covering below.
Firstly, never try to learn too many languages at once. Learning multiple things in parallel will rarely result in significant progress in any of the areas of interest. Obviously, everyone wants to learn immediately, but this is the worst way to go about it. You’ll easily lose the knowledge if you don’t practice until you’re at some base level of competency before moving onto the next. It can be hard to moderate this because everything is shiny and new, but it’s critical lest you lose everything you just put in the effort to learn. Stick with one language and go far with it — you’ll be much better off in the long run.
Don’t give yourself false estimates. Programming isn’t like an English paper; you can’t accurately guess how close to the finish line you are. With programming, unexpected outcomes are common, and code efficiency is important so polish is a consideration; when you think you’re 90% of the way done, you’d be lucky if you were actually 50% of the way done. These estimates can sap your motivation to work and may result in sloppy code that causes problems down the line. Remember to allocate enough time so that you don’t end up missing your self-imposed deadlines.
Use comments liberally when you’re starting out. Comments are extremely helpful for revising your code. If something feels wrong to you, it probably is in some way so you should comment on it for later if you can’t immediately see the problem. You should also add comments that describe the function of certain “clumps” of code as it makes finding a problem much easier with troubleshooting. Unfortunately, excess comments are worse than no comments at all. Make sure your coding is legible and the comments are actually helpful. You’ll thank yourself in the future.
Learn how to use Git, and never forget to backup your work. If Git’s too confusing for you… manually backup your source code. Even if there’s no risk of data loss, you might want to return to an earlier version to revert massive changes you’ve made or just reference some previous code example. If you’re not making backups at least have files with descriptive version information so that you can pick out exactly what you need from the bunch. Without them, you’ll have to unnecessarily rebuild the code that you could’ve otherwise gotten from an earlier version.
Finally, don’t arbitrarily limit yourself once you start developing skills. There is no ego in programming, or at least there shouldn’t be. Think about plumbers or carpenters: They don’t improvise on the job, they bring their toolbox full of almost anything that could be useful. There are no artificial limitations because “it’s cool.” They use the best tool for their job and sometimes that tool is terrifying and rarely effective anywhere else, but that’s still ok. Programmers, unfortunately, have failed to learn this lesson.
Oftentimes, intermediate programmers will have a specific programming language in their mind to use, and frankly, this can lead down the wrong path. You’re not cool because of your programming language, you’re cool because of the finished product. Use the right tool for the right job. This terminology is broad, as the “right” tool could prioritize performance, maintainability, speed, ease of use, or maybe it’s just what the rest of the team is using. The point here doesn’t change though: don’t limit yourself for the sake of limiting yourself. If you’re an experienced programmer and don’t have several languages in your arsenal you’re probably doing something wrong.
Important Takeaways: Programming is not an easy job, but correct code management makes it much easier. Don’t try to learn how to do multiple things at once as you’ll just confuse yourself with the code and you won’t actually learn anything. Don’t give yourself false estimates as the “final stretch” can sometimes induce a rush that results in sloppy work; always over-estimate to compensate for this. Don’t arbitrarily limit your toolbox, as some tools make the job way easier and limiting yourself benefits nobody. Always make accurate, useful comments.
Comment on functions of blocks of code and on anything that seems suspiciously wrong to you but is functional for the time being. These comments make finding problems much easier in the future. Lastly, backups and version control is essentially for future you. Even if you think that there is no chance that you’ll lose your data, nobody can tell when you’ll have to return to an earlier version to progress forward. Without those backups that task is impossible and you’ll have to rebuild code that would otherwise already be present and ready to go.