Table of Contents
- Learn and master the fundamentals of programming
- Read, and watch, voraciously
- Read other people’s code
- Try pair programming
- Epilogue: How to Become a Better Programmer
How can one become a better programmer? This is a question many programmers and developers often ask. There is no universal answer, but there are some good tips you can follow. In this article, you will learn the first four. Use these tips to improve your skills and become a better programmer.
16 Tips to Become a Better Programmer Part 2.
16 Tips to Become a Better Programmer Part 3.
16 Tips to Become a Better Programmer Part 4.
Learn and master the fundamentals of programming
Every mastery starts with the fundamentals. Or, as the saying goes: “Every master was once a beginner.” Well, programming is no different. In a fact, fundamentals are especially important if one wants to become a better programmer. It is also one easy way to distinguish between beginner and senior programmer.
It is usually true that the more one knows the fundamentals the better programmer he or she usually is. What are these fundamentals, in the terms of programming? You know, all that “simple” stuff like heap, stack, pointers, addresses, shallow and deep copies, memory allocation, garbage collection and so on.
Don’t rely on online courses and bootcamps
Never heard about these concepts? You are not alone. It is safe to say that the majority of web developers and also many self-taught programmers never heard about them as well. These concepts, no matter how fundamental and important they are, are usually completely ignored when you learn web development.
This is also one problem with online coding and programming academies, courses and bootcamps. Imagine learning basic math operations without actually learning what are numbers and how they work. Sounds silly, or even stupid? Well, this is how many online academies, courses and bootcamps approach teaching programming skills.
They do a very good job teaching you the language, whatever programming language it is. They will teach you the syntax and semantics and how to use that programming language. They may throw in some algorithms and more advanced stuff, but that’s about it. They will never go deeper, to the low-level programming or even the machine code.
What about the path of a self-taught programmer? Well, that is mostly the same. Self-taught programmers usually pick curriculum published by some bootcamp or follow roadmap created for special course. This than gives them either similar or the same result. The lesson? Don’t rely on courses and bootcamps.
Learn computer science
So, if online courses and bootcamps will not cut it, what will? What other source can help you become a better programmer? The answer is Computer Science. Sounds too hard? This is probably why only so few self-taught programmers and developers learn Computer Science. And, it is also why it will be such an advantage if you learn it as well.
This is interesting. On one hand, the vast majority of Universities teach programming only as a part of Computer Science curriculum. Never as a separate degree. On the other hand, the vast majority of online courses and bootcamps teach programming as a separate “degree”, never as a part of Computer Science curriculum.
Try to compare the probability of getting a better job, building a business, or just becoming a better programmer, for these two cases. Who will you pick as your favorite, someone with degree in Computer Science or someone with diploma from online course or bootcamp?
My choice would be someone with degree in Computer Science. The majority of employers would make the same choice. Do you want to become a better programmer because you want to write better programs? Do you want to become a better programmer because you actually want to find new and better job? Regardless of the answer, learn computer science.
The question is, where to start? Since the majority of online courses usually focus on teaching specific programming language they are not a solution. Bootcamps are basically the same. What’s worse, both are paid and, since we talk about Computer science curriculum, the price can be very high. University is also probably not an option. So?
Where to learn Computer science, for free
Fortunately, we live in a world where information exist in many forms, and with many price tags. What is expensive on one place can be cheap, or even for free, elsewhere. Computer Science is no different. Here is where you can start. First, there is a GitHub repo made by Open Source Society university that provides free curriculum for Computer Science.
Another option is Youtube. There are many playlists teaching Computer Science. Some of these lists are created by well-known and respected Universities. For example, there is one playlist, or course, created by MIT and another one by Harvard. Search and see what you can find. Who said you have to spend a small fortune to attend university courses?
Lastly, you can find Computer Science curriculums published by respected Universities. Look at what subjects and topics they focus on. Then, follow it on your own, gathering learning resources on the internet, in books, etc. Remember, you don’t have to attend any university in order to follow courses.
What you can do is to learn everything on your own. All you need is a roadmap, and discipline. Then, you can find the rest on the internet, often for free. So, no excuses. Pick a curriculum and start learning.
Read, and watch, voraciously
There is a lot you can learn in college or university that will help you became a better programmer. However, there are things, more practice-oriented things you will usually learn on the job, these places will not teach you. Fortunately, you don’t have to wait for a job in order to learn these things.
What you can do instead is to read books written by senior developers, programmers and other experts on the topic. These books can give you a lot of practical information that would otherwise require years of hands-on experience. Thanks to those books, you can get all those years of experience in the matter of weeks or months.
Some very good books on programming are Code Complete by Steve McConnell, Clean Code and Clean Architecture both by Robert Cecil Martin, The Pragmatic Programmer by Andrew Hunt. I would also recommend [Code] by Charles Petzold that will give you a great overview of how programming languages work, from the lowest level.
Read to learn to think like a programmer, not just to learn a programming
When it comes to the books I mentioned, and other similar titles, remember one thing. You are not reading the book in order to learn specific language, or framework. You are reading the book because you want to learn how to think better. This is what distinguishes beginner from senior programmer. Not a skill, but the quality of thinking.
When you take beginner and senior programmer and give both the same problem to solve what do you think will happen? Beginner will probably start to write some code and see if it works. If not, he will try something else. Then again. The senior will not. Instead, he will take the time to think about the problem, thoroughly.
The senior programmer will consider all sides of the problem, potential solutions and their implications. Only then he will start writing the code. This is the main difference Only when the senior programmer. It is like the difference between a newbie with a machine gun and a sharpshooter.
Newbie will take the machine gun, maybe aim, and start shooting, hoping at least one bullet will hit the target. Sharpshooter will take it slowly. He will analyze the target, weather conditions, probabilities, outcomes. Next, he will take the time to aim the target. Then, he will take the shot. Only one. Problem solved.
It may look like the senior programmer is slower and less efficient. The opposite is true. The beginner might be faster in the beginning by getting to code right away. However, he will need more time to find the solution with his trial and error approach. And, he will also need time to clean the code when he is done because it will probably be a mess.
The senior programmer, on the other hand, will need fewer trials before he finds the solution. He will also need much less time to tidy up his code because he will approach the task in more organized manner. As a result, his code will be probably much cleaner from the start.
So, stop reading books for the sake of learning a programming language. Instead, read books to learn how to think like programmer. This will help you much more to become a better programmer than a pile of books on any specific programming language.
Read for self-improvement
Aside to learning to think like a programmer use books also for self-improvement, and improvement of your trade. Programming skills are only one part of what makes great programmers. Another part are soft skills, such as time management, self management, learning to learn, emotional intelligence, teamwork, patience, etc.
If you want to become a better programmer, set aside some time to also improve yourself in these areas. Programmer or not, you will still have to deal with people from time to time. The better you are at it the easier it will be and the more time you will have for what you like, writing code.
Read other people’s code
Learning from books about how to think like a programmer is one way to become a better programmer. Another one, sometimes even better is reading other people’s code and trying to understand it, without any help. And, a big plus point is if you can also write documentation for that code. If you can document it you probably really understand it.
What’s the point of reading some else’s code? Writing code is easy. Literally anyone can do it. Sure, there will be big differences in results, but still, anyone can do it. What’s more difficult is reading someone else’s code, and then figuring out what it does. This is another quality that distinguishes beginner from senior programmers.
When you show a piece of code to a senior programmer he is very likely to do few things. First, figure out what it does. Second, understand how it works. Third, guess the problem the code solves. Fourth, maybe find ways to make the code better, cleaner or faster, or all of that. Try to show the same piece of code to a beginner and watch what happens.
Reading other people’s code is good for just testing how good you are in reading code. It is also very good way to improve your programming skills and polish your style. Both will help you become a better programmer. When you read other people’s code you can see how they work think, approach problems and how they solve them.
This can help you find other, maybe better, ways to write code and also to think. And, sometimes, reading other people’s code can also be one of the best ways to learn how not to do something, either by finding some very bad examples or some very good. I recommend finding the good ones. The question is, what is the best place to start?
Choose some of well-known and respected programmers and developers. This could be programmers in general, or in a specific domain, or working with or on a specific language or framework. If you have a more experienced colleague, that might be also a good option. Whoever you choose just make sure he or she is at a senior level.
Try pair programming
I think that pair programming is one of the best ways to become a better programmer. It is also a great way to learn programming in general. Why? It helps you see things in action. When you read books and articles, you don’t see how the code works and how each statement influences the program.
This is not such an issue if you watch video tutorials. However, even video tutorials are inferior to pair programming. Why? When you don’t understand something, while you watch a tutorial, you can’t ask for explanation. You may message the author, but it may take some time before you get an answer, if you get any at all.
This is not a problem in the case of pair programming. When you don’t understand something, you can ask your colleague, friend or whoever the person next to you is. If you still don’t understand it, after you get an answer, you can ask again and again and again. You can ask as long as you understand everything, or until that person loses her patience.
This is what makes pair programming a very good tool for beginners, or junior programmers, to learn. When you have junior and a senior developer sitting side-by-side junior can learn much faster. He can ask questions about specific topics. This will help the senior programmer avoid wasting time by talking about what the junior already knows.
Aside to this, pair programming is also better than tutorials because it offers hands-on experience. In the end, this is what pair programming is about. Both, the senior as well as the junior will get in front of the keyboard and write the code, not just the senior. This is still not the best.
The best thing is that pair programming is always win-win. One win is that the junior will learn a lot of stuff in much less time. The second win is that even the senior can benefit from it. Teaching can help the senior to sharpen his own skills, dust off what might almost forget, maybe find ways where he can improve as well.
Lastly, pair programming is also a good tool for team building and creating relationships. It is also more interesting and entertaining, especially for more introverted programmers. Sports, games and other activities might work well for some people. However, it may not work for others. For these people, pair programming might be the solution.
One thing to keep in mind if you want to try pair programming to become a better programmer. Make sure that every person involved gets in front of the keyboard, regularly. Remember, pair programming is not about “I talk, you listen”. It should be rather something like “I talk, you listen, anyone can ask and everyone writes some code”.
Epilogue: How to Become a Better Programmer
These were the first four tips that will help you become a better programmer. That was the easier part. Now, comes the harder, applying what you’ve learned. The things is, reading tips is not enough. You also have to apply it. So, choose which tip will you begin with. Then, start working on it. Only this will help you become a better programmer.
If you liked this article, please subscribe so you don't miss any future post.
If you'd like to support me and this blog, you can become a patron, or you can buy me a coffee 🙂