Habits That Programmers Should Adopt

We are human and that means we have habits. Some smoke, some write spaghetti code and others drink green tea instead of soda pop. Sometimes the best way to break ourselves of a habit is first to understand that we have one and then finding some advice on new habits that we could adopt to take their place. Over the last 15 years I have had a lot of habits which I had to break. While I have broken many, you will always have more… half of which could probably be improved. So I thought I would share a couple of habits that I find great when it comes to being a programmer and perhaps you will adopt a few yourself.

Ten Habits Programmers Should Adopt

Never, EVER, stop learning! I know a lot of programmers who learn a little and then sit back on their skill set, not really trying to advance further by learning something new. I know it can be very tiring to constantly keep up on the latest trends and find out that half of them will never come to full fruition. Just realize that even though some of that material you ready never came to be, you can still learn from it and grow.

Get into the habit of reading. This means a lot of source code and a lot of articles. Related to the habit above, you have to start liking to read and doing it often. I myself have a book everywhere I go and read while on the bus, while I am at the dinner table or even reading an article on my phone while I have down time etc. And when I say reading I am not talking about simple Twitter posts or Facebook updates. I am talking about books, blogs, peer reviewed articles or discussion boards etc. I always hear those new to programming ask “I read book ABC, now what?” and I always reply “Read book DEF, then GHI all the way to XYZ”. You never learn it all in just one book.

Start practicing being humble and get into thinking that you won’t know everything. As a follow up to the previous habit, get out of the habit of thinking you know it all. You can sink a decade into a language and still not know everything. It is OK to say you don’t know and it helps to get into the habit of being humble and understanding that you don’t know everything.

Sleep and eat well, and do it while taking a break. I have said it many times in the past, the best way to think about code is with a clear mind and a healthy body. That is when good ideas come to you. So don’t forget about life when you are coding. Your health does matter and taking care of your mind is like taking care of the future code you are going to right. Besides, how are you going to write the next blockbuster app when you are… dead?

Thinking outside the box however impossible or improbable you think it might be. Always step out of the box and think about the problem from a different angle. If someone is debating you on the merits of an approach, seriously take a step back and look at it their way. If they have a better idea, eh so be it. No loss no foul. The next problem you might have a better approach. In the end it doesn’t really matter as long as the product is the best it can be.

Practice simplistic thinking. Get into the habit of thinking simple. This doesn’t mean you can not have complex thoughts, just think about the simplest and most straight forward way first and then build up. You encounter big complex problems all the time. Break them down into ridiculously simple ideas. I, as well as others, have gone down some terribly complex roads only to figure out the next day that the obvious was staring us in the face the entire time… and it was so simple. Cue the infamous facepalm!

Asking questions. Programmers learn and sometimes they have to learn fast. One of the best ways to learn is ask questions and a lot of them. The more questions you can ask and get answers to, the more the problem seems to be simplified. Talk out the answers to the questions you get and ask follow up questions. I know many of us are not very social but this isn’t being social, this is problem exploring!

Draw out complex ideas. If we can’t figure out the solution in our head, get in the habit of drawing it out! Just because we are programmers doesn’t mean we can’t have any paper or writing utensils at our desks. Want to be fancy, get a white board with great smelling markers. Anything that can help you draw pictures of abstract ideas and talk while you draw. Oh and no one really cares how good of a drawer you are if you talk. If you draw a stick figure and say that it is the “user” everyone will know what you mean.

Get into the habit of asking for help. We all need help from time to time. If all problems could be solved by just one person then we would be solving a bajillion problems a day and times that by 7+ billion people and we would solve the meaning of life. Sometimes problems are just too big for one mind and we need to form a Justice League of programmers from time to time.

Revisit your code regularly to see if you still understand it. Ever take out some old code you wrote 4 or 5 years ago and go through it again? Probably not recently. You might say we are too busy looking to the future, not the past! But sometimes our past code can remind us of what we use to do, tactics that we may have forgotten and can also give us a better idea how well we are doing with documentation and communicating intent through code. If we can’t understand what we did back then, how is anyone else going to understand it?

I hope you find these 10 habits of use to you and that you remember to adopt a few of them if you haven’t already. I am still working on a few myself like the sleeping and eating well part. But hey, at least I have learned to cut out caffeine, white bread, pop and drink more water. It has certainly helped me write better and think better.

About The Author

Martyr2 is the founder of the Coders Lexicon and author of the new ebooks "The Programmers Idea Book" and "Diagnosing the Problem" . He has been a programmer for over 18 years. He works for a hot application development company in Vancouver Canada which service some of the biggest telecoms in the world. He has won numerous awards for his mentoring in software development and contributes regularly to several communities around the web. He is an expert in numerous languages including .NET, PHP, C/C++, Java and more.

Related Posts

That’s a good list, and well written. I would add pragmatism and laziness, but I think they’re already represented. Asking questions is a really critical one you nailed that rarely gets mentioned. A few others as well. Very good list, consider it shared.

Lots of people don’t get the humble, or don’t take it far enough, sadly. I gave a talk a while ago on YAGNI http://www.youtube.com/watch?v=OsHGQbqkLjQ and one of the things you’ll find buried in there is the idea of “stupid users” – it’s we who are stupid because we didn’t anticipate their needs.

It’s a hard lesson to learn, I think. But ultimately who pays for your work?

Great post.

moses

that’s cool article.I just landed on this site while looking for a solution with my code.am new to web programming I hope to grow humble and with these supper 10 habits

About the Lexicon

The brain child of Martyr2, Dream.In.Code Mentor and veteran programmer, the Coders Lexicon is a website dedicated to the advancement of computer programming and technology. It offers advice, coding resources and references to cover web and desktop development.