8 tips for effectively learning to code

I’m a big fan of the phrase “delta v,” borrowed from orbital mechanics,  which for the purposes of this blog, is essentially the concept of “trajectory”. I use it when talking about the small decisions you make today to set you on the right course toward where you want to go.  When you’re self-taught the lack of guidance and structure can cause you to waste a lot of time focusing on the wrong things or learn things in inefficient ways. Last week I began learning Scala, which is my second language, and I’ve been doing a lot of reflecting on what I’m doing differently this time around, what I wish I’d been doing all along and what I wish I’d known a year ago. Thus, here are my favorite tips on learning to program.

1. If you’re stuck on where to begin, start with google and be able to answer 2 questions:

What is your actual goal?

Learning to program is most likely not your actual goal, it’s a means to your goal. Giving this some real thought can get you past the biggest time suck, not starting.  For me, I wanted to work for my company and I knew what their stack was, so I at least knew what language to start with and generally what kinds of things I’d need to know.  Is your goal to get a job as a programmer or to build an app in your spare time?  If it’s to get a job, what kind of company do you want to work for? If it’s a side project, what do you want to be able to do? Figure this out first and then do the research on what to do to get there.

What’s your time commitment like?

Be realistic about what you’re trying to achieve and the time you’re able to dedicate. I have a friend who’s goal was to become an engineer at his dream company in the bay area. To do that, he quit his job, studied for months full time, finished a bootcamp, worked at a startup, hired a tutor and THEN went through the interview process before getting his offer. This is a lofty goal and required a lot of time and effort. Another friend of mine, just wanted to build an iphone app, so he read a book on iOS and played around in his spare time. Be honest with how much time you’re willing to commit and evaluate if they match up with your goals.

2. Get coding fast

Once you’re ready to start. just. start. anywhere really but the best approach is the one that will get you doing stuff. fast. Interactive online tutorials like codecademy.com are great for this. One of the hardest parts of programming is getting set up to program. If you work for a tech company, you’ll probably spend your first week just setting up your computer and installing all the software you need. Interactive tutorials won’t teach you everything you need  to run off and start developing web apps, but it will take care of the messy front-end setup and let you start writing functions and seeing results within minutes. As a beginner, the sooner you get out of the abstract and into the practical, the better.

3. Get comfy with the high level

Someone once told me “the key to being a good developer is to be able to find your answer as quickly as possible without learning anything else.” 

As a beginner, I found this is next to impossible. The trouble is you don’t know how to gauge when you’ve learned enough. Experienced programmers have a handle on where they are in the spectrum of knowledge and can gauge what concepts are specialized edge cases. Beginners don’t know what to ignore and what to dig into. My advice here is to start paying attention to 2 things: your network and repeated information. What I mean is to give weight to things that your mentors or friends tell you to spend time on. That may seem obvious but your natural tendency will be to focus on the stuff you don’t understand instead of the stuff you sort of understand, and it ends up being extremely important to nail down core concepts. Same with repeated information. Let a couple of unknowns stay in your peripheral until you start seeing the same thing pop up over and over. You’ll have more context when you dig in, which will save you time. And if it really bothers you to gloss over topics, like it did me, keep a list of things to research when you’ve got some time to spare. Which brings me to…

4. Be methodical about how you learn

This is one of the critical delta-v factors. A VAST amount of information is flying at you from all over the place. And it can be difficult to see how it all fits together . Also unless you’re extremely silo’ed you’re going to be switching contexts frequently enough that you end up having to relearn something because you haven’t seen it in a while. For example, when I was just starting, I was merging code maybe once every 2 weeks. Because I wasn’t getting regular practice, I had to relearn all about rebasing every time it happened. It never stuck. My life saver has been a mind-mapping tool called X-mind and I really wish I’d been using this since the beginning. It’s where I keep everything I’ve learned in some semblance of a framework. I have a friend who swears by flashcards. Another has elaborate google docs. Whatever works for your learning style, write down what you learn and refer back to it.
Screen Shot 2015-10-01 at 2.50.37 PM
Screen Shot 2015-10-01 at 2.51.44 PM

For more on why this is crucial I could not more recommend the Janki Method more highly.

5. Work on something fun

I use the word “fun” somewhat liberally here,  but the key here is to find something that excites you. If you don’t do this, you will burn out much faster.  This is probably the biggest strength I had learning this in 12 months with a full time job. Granted, I was working on finance infrastructure, which is why I say “fun” in quotes, but I’m a nerd and I was consistently excited to hack at it late into the night. On the flip side, now that I’m full time, I’ve noticed I learn much slower the less excited I am about the work project. So to keep ramping up, I’ve started building little side projects for fun. This stuff is hard and frustrating and it’s important to keep learning, so the more fun you can introduce to it, the better off you’ll be.

6. Invest in your environment

Speaking of fun, spending time on the fringe elements of coding can be well worth your time. Take the time to set yourself up now, to save you time on tedium in the future. Enjoy this part, it’s where you join the ranks of opinionated tech elitists. Spend the time getting intimately acquainted with your text editor. Hell, if you want insta cred, start on vim and never look back. Get even more cozy with the command line. Pimp your bash profile with all the git shortcuts and ssh commands and compile code that’s wasted keystrokes and space in your brain.  Google things like “most useful linux tricks.” Ask your friends/coworkers for their config cheats. Learn the keyboard shortcuts. Set up a coding playlist, or steal mine.

7.  Learn how to debug

If you’re going to succeed as a programmer, you’re going to develop this skill because engineering at it’s core is just problem solving. So the earlier you start practicing, the better your delta-v. I got an awkward start to this and it took someone showing me a couple specific practices I could use. I was of the “try anything and see if it works” camp. Very simple concepts like, adding print functions to your code to see your output as it runs. Or more robust actual debuggers like pry that let you step through your code, making calls along the way. Practice this early, even in your simplest chapter one functions and you’ll develop a system that will carry you through even more complicated problems later.

8. Get a tutor

This is my “throw money at the problem” solution that while surprisingly simple, I never actually thought to do until a friend recommended it to me. Your first instinct will likely be to bug your friends and coworkers. But you’ll need more help than you’re probably comfortable asking for and it will slow you down. As great as books and online tutorials are, if you want to ramp up quickly, there’s just no substitute for a real conversation. I was extremely lucky in that one of my closest friends, who was extremely supportive and had a generous amount of free time, writes books on coding interviews (Thanks Gayle!). She and I worked through many, many algorithms using Hackerrank’s pair coding tool. But chances are, you’re not in the position for endless free mentorship, so my advice is, just pay for it. If you really want to give yourself the best chance why not give yourself every advantage? After a friend gave me this advice, I started seeing a mentor twice a week. It’s great for that list of “shit to figure out later” topics.

So these are just the things that worked really well for me and you are likely in a whole different camp. But what I do think is a somewhat universal piece of advice is to give this journey the same level of respect that you gave your education the first time around. Enjoy the journey, pay attention to your mind, and don’t deny yourself any advantage that can help you get to where you want to go.

Happy hacking!

Kartarr

Advertisements