If you are anything like me, this is the time of year that you are working on putting your new years resolution into motion. My resolution this year involves zen habits. One of the reasons I chose this as a resolution is that I find myself in time crunches more more frequently. The older you get the harder it is to find time to do the things you enjoy doing in your free time. Whether it is work, being social, going to the gym regularly or learning something new it seems like the world is out to get you sometimes. A number of years back I set a new years resolution to get into the best shape of my life. I learned a lot in the process including the fact that a workout is actually more energizing than a double espresso after a long day at work. The reduction in my espresso budget was a good thing because the cost of my nutrition and fitness budget ramped up quickly. Ultimately, that resolution was very successful. Fast forward to today and I can’t to make it to the gym on a regular basis much less five days a week. I wish that I could blame it on motivation or the fact that I recently had a daughter, but it is a lot more than that. Some days it is a work related fire that must be put out. Other days it is a trip that does not make it easy to make it to the gym. Attending SXSWi last year is a great example of that – every spare minute was either spent in the car on the way to the event due to a late registration that I had no control over, evenings packed with events and networking, or social meals. Despite challenges like this I could go to the gym, it is just tough to make it consistently. All of this boils down to what feels like a time crunch, but that may not be the issue at all. Since this is about learning to code I will change gears and focus now. I believe what is really required to succeed at learning to code, even amidst a frenetic or challenging schedule, is your ability to form good habits while learning to code. Accomplish this and you will be able to break through the time crunch and chaos.
There are a few things that you can and should do before you get started. I remember that when I made my fitness related new years resolution that I bought a gym membership at a 24 hour gym and moved into an apartment complex with a small gym. Learning to code is no different. You should join a programmer user group or two that you can regularly attend and get the right hardware and software setup. You should also plan on making some friends who can provide mentoring. There are certainly paid programmer friend options, but if you are having to pay for each conversation you are building yourself a receive for failing unnecessarily fast.
Over the holiday break I read Jeremy Dean’s book ‘Making Habits, Breaking Habits’. Jeremy points out that we create associations between our environment and certain behaviors and that the coffee shop or place where we spend time learning to code and coding are a sort of Pavlov’s dog situation. He also points out that changing environments can make even the most ordinary things that we try to do harder. So pick a place that is comfortable, free of distractions and where you will have what you need. If you need a coffee shop atmosphere, but want to work from the library or home then invest in an easy to execute caffeination option. If you want the coffee house vibe, but can’t find the right coffee shop then download the Coffitivity app and get started wherever you want.
In re-training myself to be a coder after quite a long break where I was mostly an ops guy managing teams of product people including designers and developers, I started out creating cheat sheets for myself to learn to code. I created a cheat sheet for Linux and a cheat sheet for setting up my local development environment. You can click or mouseover the learn to code button at the top of this page or you can check out my learn to code Ruby on Rails page for a preview.
Creating a cheat sheet isn’t required, but it can help. Making friends who can help and going to a regular user group for programmers in the language you are trying to learn is even more important. You should learn how to code, not code by cheat sheet. The cheat sheet for me has turned into almost more of a bibliography of past and present resources. If you take advantage of mine I hope you will let me know what you think of it and make suggestions that will help improve it. Since I put it up I have had around 20,000 people check it out and some really helpful suggestions along the way. There are resources on the page that I have not checked out in a few cases. In one case there is a learn to code resource that someone suggested that requires that you use method that would be different from what you would do if you wrote code on your own laptop or desktop computer. I pointed this out on the page and I point this out here because this seems like the kind of environmental change-up that could make it harder to succeed along the way. There are other options out there like this and not all of them are bad. Just keep in mind that if you do all of your coding on a hosted environment where someone else has done most or all of the setup of the coding environment then you might find it hard to act out the good habits that you have formed while you are learning to code.
Knowing that being successful as a programmer requires constant learning and super human focus means changing your habits. You have to choose a few consistent places to learn, practice regularly, and consistently set aside time. Becoming a parent totally derailed my efforts in this regard during the first three months, but after that I managed to get the train back on the tracks and things evened out.
The habits that are important go beyond when and where. You must also commit to a routine that combines learning and practice. While working on my most recent startup I hired quite a few very intelligent and capable students to work with me and the team as junior coders. As I was starting them out I just had them jump in and learn on the fly. Part of this was due to our limited budget while an even bigger part of it was due to the assumption that as computer science majors at a top ranked computer science program they would be able to pick things up quickly. This was a mistaken assumption. We got code and results, but there are cars that drive too. Shortcuts were taken, coding horrors were committed, and the technical debt that now has to be paid back is much higher than it would have been had we simply started off by working with them to build a small app from scratch and reinforcing coding best practices along the way. In the long run we would have saved a lot more time than we saved back putting them to work in a learn on the job sort of way.
You can learn from this too. Rather than starting off trying to build your vision for the ultimate MVP or app or trying to jump into the works and add features to an existing app you should set your sites on small coding exercises and practice exercises that will make sure that you do things right before you try to do them on your clock or someone else’s. Code interviews that involve coding exercises are a great reminder of this for me. If you look at the non-whiteboard coding exercises that people ask people they are interviewing to perform it becomes clear that this effort will not just help you to master coding – it will help you if you ever want to get a job as a coder. My learn to code Ruby on Rails page and other learn to code pages include links to programming exercises and sites like Code Kata as well as suggestions for how to get started.
Just remember that forming good habits means that you should be setting yourself up for a regular and consistent effort. You will not be an expert right away, but in time you can become one.