Habits of a Good Programmer
Programming is a unique career and in order to be successful, you really need to work on creating and maintaining specific habits. Habits that you may not need to worry about in other careers. But like all careers, once you really nail these habits down you can really start to succeed and grow your career and portfolio of work. To help I wanted to share my own top 5 habits that I’ve worked on as a programmer and have really helped me succeed! Let’s get started.
1) Train your Body
Now I know what you are probably thinking. How can training your body be an important habit for someone who sits at a desk and stares at a computer screen for hours and hours? Well trust me this is one of the most important habits to form, and it’s why I’m starting off with it. Many might not think so, but programming is a physically demanding activity. If you were to just sit in your chair the whole time your body would start to really go downhill fast. Just like a lot of desk jobs you need to get up and move around and have the proper posture to keep your body in tip-top shape. You need to understand that exercise and good sleep are essential for any programmer and this is something that I make sure I give myself every day if I know I have a busy day of coding in front of me.
Good posture is also a huge huge thing to remember. When I’m sitting at my desk I sit with my back straight and in a comfortable chair (one specifically designed for programmers or computer heavy jobs).
Sometimes I add lumbar support for my lower back and I always give myself breaks to get up and stretch. Personally, I try to get up and walk around every 30 mins. Training your eyes is also a very important thing. Staring at a computer all day is not great for your eyes so I’m constantly taking breaks from the screen and looking out the window or really anything but the screen to give my eyes a break. Some people also love the blue light glasses which are said to help block out some of the damaging light that’s emitted from the screen (This is something that some doctors don’t believe, but hey if it works for you go for it). Drinking a lot of fluids can also help to keep your eyes from getting too dry and I think overall people just need to drink a lot of fluids in general.
2) Go Outside!
I can’t stress this one enough. Many programmers like their workstations dark, I’m one of them. However, if you spend too much time in the dark you’re probably going to start to feel a bit cranky or down. Sunlight and Vitamin D are extremely important when it comes to keeping your mood positive. A happy programmer is much more likely to complete work than a not-so-happy programmer, so get some sunshine on your skin. Take a walk every day or take your breaks on your patio or deck, or heck, just get some sun looking out the window if that’s your only option. The bottom line is that the sun is very very much your friend.
3) Consistency
Once you get into programming you’re going to find that there are a lot of ways to solve any one single problem. If you are all over the place with your code and solving each problem in a new and unique way then things will quickly become unmanageable. Also, you have to keep in mind that you won’t be the only person who is looking at your code. Keeping things consistent is key to making it easier for others to view and understand your code. When you or other people are doing things in a different way and then you’re trying to get that code to line up with each other it’s a lot easier when it’s consistent or follows the same syntax or same approaches to the solutions.
Programming can bring out the ego in a lot of people as well and that can create issues. Those types of people may try to write their code to show off how smart they are and how impressive their coding skills are. That’s all fun and great but it’s not practical. In the end, all they are doing is making things so complicated that nobody else can read the code except them. They might feel some type of pride and excitement from that but it’s really just hurting the build in the long run. As time goes on you and hopefully the ego-driven individuals begin to understand that all of that showboating is really just working against you.
So remember, you need to keep code as simple and consistent as possible to help avoid crashes and bugs, but most importantly to help you and everyone read and understand the code.
4) Continue to Learn
Programming is like every other type of profession, it doesn’t just end once you’ve learned it at the start. It’s a constant continuation of learning and evolving. This may force you to get out of your comfort zone. It’s very easy when you’re coding to get stuck in a certain routine where you’re just doing a certain small subset of tasks. You may end up doing that for months and over time you may find that you’re not really learning anything new. That’s when issues will start to arise because programming itself is evolving over time more than most industries. Every few months there are new libraries or frameworks or languages. For example, when ES6 came out it was a completely new ballgame for a lot of people. If you don’t keep up you will start to find that your code is becoming outdated.
One of the key skills of programming is the ability to debug and this has less to do with the experience you have and more with if you can learn an environment and understand how another program or system is put together. The only way to be able to debug at a high level is to learn all the environments and approaches there are to building programs. Again, this is something that can be hard for some people because it pushes them outside their comfort zone but debugging is a critical part of a programmer’s day-to-day life.
I like to spend at least 30mins to an hr learning new approaches, or new languages. I might pick up a book on a new framework and spend a week learning that. I might watch a Youtube tutorial on new approaches to algorithms, or different syntax approaches to problems. Whatever it is, it’s important to keep moving forward. If you don’t you will be left behind and the longer you stay behind the easier it is to start making mistakes or start taking too much time looking up new documentation instead of working on the project at hand.
5) Collaboration
When I began programming I did a lot of things on my own. I think most people do the same. For the most part, programming is very much a lonely job. For the most part, you are working alone, but collaboration is key. The sooner you realize it the quicker you will become a better programmer. All too often an engineer will go off on their own and then come back a day or two later and say they’ve been stuck on something for hours and hours. This is not helpful or smart programming, and it’s certainly a waste of time. It’s not your job to know everything. These types of programmers are not reaching out for help and it destroys their productivity. That’s why collaboration is so important.
It’s quite common that other programmers on the team may have some ideas that you haven’t thought of or some clues about what could be causing some bug. Programming may not seem like a group activity but overall it is very much a team sport. You’re often interacting with other people’s code if you’re working within the company environment. When your code needs to integrate with other people’s code it’s really important to work together. When you have a bunch of people working on their own and then you try and put all their work together, it’s likely the work won’t fit together very well. But if everyone is working together with the same ideas and approach, the work is much more likely to fit together nicely. This in turn limits the number of errors and bugs, and also makes it cleaner and more consistent across the board.
So there you have it! My own top 5 habits to focus on to become a successful and well-rounded programmer. These of course are only my top 5, there are many more that successful programmers share, but it’s where I would start if you are just getting started in the field. Happy Coding Everyone!