7 Essential Steps to Learn How to Program

The question I get asked the most (after “How do I build an app?”) is “How do I learn to code?” — So let me take a few minutes to tell you what worked for me.

Quick background: I’m a self-taught coder. I had dabbled with C++ a bit as a kid (12-13) but I didn’t get serious until I was getting my masters at Stanford (a great place to learn iOS a few years ago before certain things became more widespread). I’ve started two mobile app companies, built dozens of apps, and now help entrepreneurs to design, architect, build, and deploy their apps into the marketplace.

So here’s my advice (in no particular order):

1) In-Person Support. It helps a lot to have someone else to code/learn with, to ask questions of, to bounce ideas off of, and to celebrate your small victories with! I learned to code with the co-founder of my first company. We got dozens of job offers after we published our first set of apps which felt really great and helped us push through the difficult parts of the learning curve.

2) Find a Technical Advisor. You will inevitably run into situations where you don’t have a clue what you’re doing and don’t even know how to ask the question. Having a single person who you can pick up the phone and talk to is absolutely essential. My mentor created the shotgun apps for iOS and made some nice money in the process! Now he and I work together at my iOS Dev Shop.

Don’t know where to find a mentor? Try going to a Start-up Weekend or iOS Meetup in your area.

3) Digital Support. You know how you type “wiki” with your google searches when you want to go to the right Wikipedia page? http://stackoverflow.com(“stack”) will become your new best friend. There are a few others out there, but it’s by far the best. Make an account and start asking questions. There’s some etiquette on stack though. Vote up answers that helped you. Be respectful – there’s a human being on the other side of the screen who’s trying to help you solve your problem…for free (versus someone charging you $300/hr for lessons). Edit questions that are unclear. Give back. Always search before you ask a question.

4) Buy a Book. I’m not a huge fan of most coding book, but having an encyclopedic guide is really helpful when you’re just starting. They have great examples and sample projects. They’re also really helpful when you don’t know how to do something the “right” (or at least better) way. Yes 100% of the content can be found online for free, but you’ll spend a lot of time searching for answers that have already been solved well. Pro Tip: If you’re not willing to invest $40 in a book because of the money, then you’re not really serious about learning to code or starting a company.

5) Work really hard. Focus and bust ass on learning one thing at a time. But you’ll likely have to make some sacrifices.

6) Learn when to ask for help. I got arrogant a few months in and stopped asking for help. As a result I wasted a bunch of time, wrote crappy code, and learned to ask for help the hard way. One thing I do whenever I hit a nasty bug is to set a timer for 25 minutes (down from several hours when I first started). If I haven’t figured it out by then, then I move on or start seeking out help. Having the discipline to hit your head against the wall for hours is a great skill, but that discipline is made 3x stronger once you learn when to ask for help.

7) Be okay with your first idea not succeeding. If you want to be an entrepreneur, then you’ll have to learn 1) that failure is okay (not great, but okay) because you always have an opportunity to learn something when you fail and 2) that your early ideas suck compared to what you’ll come up with in a few months/years after pursuing your early ideas and making a lot of mistakes. Even brilliant artists start out crappy. You hone your skills by practicing relentlessly. So start to embrace that it might take you a few times before you build a multi-million dollar company, but always fight and work like this is the big one.

I was 22-23 when I got serious.. and by serious I mean 10-14 hours a day, 6-7 days/week, for 6 months. That’s what it took for me to feel comfortable with Objective-C. I didn’t know everything (still don’t), but I was no longer afraid of a new challenge. During the process, I was forced to learn PHP (server-side scripting language) and mySQL (database) and simpler things like XML, JSON, git, and other tools you’ll inevitably need.

Here’s the good news: Once you learn 2-3 languages, the rest only take a few days to get pretty good at. The syntax and vocabulary are all different, but there are only 3-4 paradigms worth learning.

In terms of specific resources. If you want to learn iOS, then you need to learn Objective-C, not Javascript, HTML, C#, and Lua – none of which are essential to launching a iOS app. Start by watching the iOS course on iTunes: iPad and iPhone Application Development (HD). It’s about 20 hours, but a great way to get started. (The great) Paul Hegarty teaches this class and he he knows his shit since he was with Steve Jobs at NeXT ages ago.

One final piece of advice: iOS has started to peak. It was a great language to learn a few years ago because only a few tens of thousands of people knew Objective-C (Mac OX developers). Now, there are over a million apps in the app store and things are crowded and getting worse. Consider learning languages that are going to blow up in 12-18 months. I don’t have any speculations about what’s next, but it’s something to consider, and I welcome comments on this.

The learning curve for coding is exponential so things will be slow at first but then rapidly accelerate as you have a basis upon which to build. Stick with it and it will pay off – it certainly did for me.

Best of luck!

Comments:
1) How did you learn to code?
2) Do you have speculations about the next great language to learn?
Tell me in the comments.