Zain Shah

How I Learned to Code

17 September 2013

I’ve been getting this question a lot recently, in various forms: how’d you learn to code? how should I learn to code? any good programming books you suggest? It’s hard for me to answer these questions because I learned in a rather non-traditional way. I can’t guarantee to any of these eagerly aspiring programmers that my way is the best way to learn, but I do know it worked out very well thus far for me, so I can only hope that by publishing it it will help others.

First off, I’m a 19 year old sophomore neuroscience student. (notably not CS, etc.) 12 months ago, my experience with programming was limited to a CS course in high school. By 1 month ago I had joined a renowned computational neuroscience lab, had my side projects featured in TechCrunch, received a full time engineering job offer from Amazon, internship offers from Google, Apple, eBay, Yahoo, etc. in addition to a handful of startups, and had been invited and flown out to hackathons and tech events across the country. Now I’m founding my own tech startup. This is how it happened:

Method: This you should be able to glean from reading the story, but here’s the distilled method. I learned by doing small project after project that I was very passionate about slightly outside of my skill-set; with each iteration I grew slightly more knowledgeable in the domain, but also had enough prior information to proceed without giving up, knowing I was close enough to succeed if only I learned a little on my own.

It’s a little hard to choose projects that fit this exact description, but you have to select projects at a certain point along the continuum. You’ll know when you’ve found a project that fits this description. You’ll be so excited you begin work immediately. Working on it right away means that you know enough to get started, great.

My immediate advice if you’d like to learn to code is to come up with what you want to build. You’re not learning the science of computation; if you are I urge you to pursue that interest academically. You’re here to learn how to build software, so I urge you to learn by doing just that, building software.

Again, this needs to adhere to all the rules I specified above, so first you should lay out what your skills and interests are. Then compile a list of ideas and their requisite skills. (you’ll even learn a bit just looking up what you’ll need to know to build these ideas; if you need help feel free to email me) Your candidate first projects are the intersection of the skills you have and what you want to build.

I realize I asked you to lay out your skills, and you may be here because you don’t have any technical skills yet. If that’s your case, you’re fine and this will still work for you; the building blocks here are very simple, and the whole method is very self directed. If you have absolutely no technical background initially, and have no particular direction you’d like to go (i.e. mobile vs web vs desktop, etc.) I recommend you start with building your own personal webpage in HTML; everyone is passionate about themselves. I won’t link you directly to a tutorial, but use the search engine of your choice to explore the internet’s vast learning resources on any particular topic. (like this). I highly recommend tutorials you’ve found on your own, because it constitutes learning how to learn.

With sufficient motivation, I believe you can build anything (what I love most about programming), but pick something small, something you know everything or almost everything to complete first. In the interest of continued learning, I’d much rather you finish building something small and useless than give up building something big for your first project. Once that is done, and you’ve established a comfort zone, learn how to step out of it and come up with more ambitious projects than your first. Don’t stick with the list you came up with first. Constantly re-evaluate your current skill-set and watch as your candidate ideas become more significant and ambitious.

With the finalized list of candidate ideas, rank them by how interesting they are to you, and simply choose the one that’s most interesting, that you’d like to see finished most. All of these should be (with some variance) accomplishable with your current skills, so don’t worry about small variations and instead go with what you’re most interested in. In my experience the limiting factor to success (of a simple project or life in general) is not difficulty but passion.

Once you have your idea, take that initial research on what skills you’ll need to build it and do the research again, more thoroughly this time. Modularize your project, break it down into discrete steps and necessary skills. Use queries like “how to make x” and look up every word you don’t know in the results, then do the same for those results. Find components of your project that could be independent from the main project, and figure out how to build those or see if someone else already has (it’s likely someone has, and it’s open source). Don’t be afraid to build on the work of others; Sir Isaac Newton famously noted “If I have seen further it is by standing on the shoulders of giants.”

If it’s hard for you to determine how exactly to build your project from simply searching the internet, consult the most technical person you know. Asking what you need to know to build something is actually a pretty easy question to ask of someone with such knowledge, as opposed to asking them to help you build it or build it themselves. If they don’t oblige or you don’t know anyone technical, I will. Get in touch with me and I’ll be glad to get you going.

Clearly, this approach requires some self-motivation, but it takes advantage of your existing passions, so it shouldn’t be too difficult. You need to be able to excite yourself over an idea; fortunately I’ve never met anyone without such a capacity. Also, I don’t think this method applies exclusively to coding, but I have no evidence to that end so… y.m.m.v.

Further, and I make this an aside to the main method because it isn’t integral to simply learning to code but it is necessary for doing well on all those interviews you’ll get and developing quality engineering skills, grab a copy of “Cracking the Coding Interview” (not affiliated with me at all) and look up everything you don’t know how to solve. Don’t stop at figuring out the solution to the problems; read around the locality of information available (consult the oracle) and you’ll be able to ace any technical interview, and in general approach problems you encounter that have already been solved with existing highly optimized solutions instead of reinventing the wheel.

Here’s my story (not all of it, just how I learned to program):

I’ll start with an event in the summer after sophomore year in high school because it clearly demonstrates the method I outlined above. I’d just finished an introductory (very introductory) computer science elective course in which we developed some simple terminal applications and learned the basics of the programming language, Java. I was helping my brother prepare for a spelling bee by reciting words from a list and asking him to spell them, verifying their correctness afterwards. This was one of the most frustratingly tedious things I’d ever done. At one point I broke down and exclaimed how tedious it was and that I felt like a machine, in fact I know a machine could do this just as well. I told my brother how a simple speech synthesis engine could read out the words and string comparison could easily verify the accuracy of his spelling. He asked why I didn’t make something that did that then? To which I responded that I don’t know how and he remarked that I never actually build anything I have ideas for. This upset me very much, and although it was 6 in the evening I left him mid-study-session to lock myself in my room and figure out how to build what I’d described. I knew Java, so at first I looked into TextToSpeech synthesis engines in Java, but most had complicated implementations and were of very poor quality, until I came across the idea to build an Android app. I learned that Android apps were developed in Java (I knew Java!) and that the Android SDK included a very simple API for TTS. 15 hours later, sleepless, I’d learned Android development and built SpellCoach for my brother to study for his spelling bee. My mother suggested I put it on the Android Market to save someone else the same suffering which motivated me to build it; and although I haven’t touched it since it was an incredible learning experience and exemplifies the accelerative powers of the method I distilled above.

Fast forward several years, in April 2012 I applied to a competitive medical neuroscience research fellowship that I’d been almost guaranteed admission to, but at the last minute they decided not to accept me because they realized I was a freshman and they wanted only upperclassmen. This was in late April, so I freaked out a bit. I didn’t want to waste my summer, so I scoured the web for every summer program, research fellowship, etc. available, but to no avail. My mom suggested I convince my uncle to hire me for his pharma-tech company in Philly. It was by far the best thing on my plate, so I spent the first half of my summer there. I began knowing introductory Java, I finished two months later knowing C#, the Sharepoint SDK, .NET, ASP .NET, AJAX, and Javascript. I’d call that a productive 2 months.

The next few months I devoted to working at an early stage recruiting startup. In developing the web app I learned Ruby on Rails, Twitter Bootstrap, and even some design skills. It really taught me the value of deftness and versatility. I realized how introspective startups need to be, but this is getting away from the point of learning to program.

I got back to school, ready to stop programming and return to my scholarly grind, but that’s not what happened. I couldn’t stop programming; I spent all my free time doing it. Some may wonder how I found the time with schoolwork; I was taking a full coarse load, doing research and working for a startup in Pittsburgh, but when you love something enough, you make time. First month back to school I went to a hackathon, PennApps Fall 2012, with a good friend from high school. That was the seed to my addiction.

At that hackathon my friend and I along with a newfound acquaintance built an intelligent collaborative note taking web application called Notable. I wasn’t very competent at the time; I basically just worked on twilio integration and some small things here and there, but even in that I learned a ton. I loved the idea enough to dedicate 48 hours straight to learning whatever I needed to build it. We loved the project, but we definitely didn’t expect to win anything with it; much to our surprise, we did and all received job offers from a huge e-commerce startup on the spot as well. 10Gen gave us “Best Hack for Students” and I had all the validation my now seeded addiction needed to grow.

About 2 weeks later, my friend suggested we go to HackNY. I loved the last one; it was honestly the most fun weekend of my life to that date, so I was gung ho about going to another. We got there excited to build something, anything, but we had absolutely no idea what in particular we were going to build. We wandered around, a kid from Michigan we met in the elevator suggested just mashing APIs together, but that didn’t excite me. Then we met some kids with a very ambitious idea; a popular Firefox extension, Tilt, enabled developers to view webpages in 3d. They wanted to emulate that technology in some sort of game. I immediately thought it was far too ambitious, dismissed it as impossible, wished them good luck, and walked away. 10 minutes later, an implementation had passively fermented in the back of my mind. We returned to the ambitious kids and told them we’d like to help them give it a shot; 24 hours later, DOM claimed 1st place.

After this my friend from high school mentioned his plans to pursue a tech internship for the summer, and I suddenly realized that I might be able to do the same if I tried hard enough. I immediately applied online to every tech company I could think of, expecting that with volume I may be able to increase my chances of getting a single tech internship.

One month later I went to a tech career fair in NYC. I marched in confidently, and handed my resume to a recruiter at the first company I saw, Spotify. He had read only 1 line of the resume when he put it away saying “Oh, you’re a sophomore? I’m sorry but we’re only looking for upperclassmen and graduates. Please come back next year!”. I marched right back out of the career fair, down the street to the nearest Kinko’s and edited the year off my resume. I wanted at least the slightest chance to impress them before my age came across. Upon returning to the fair I had great conversations for several minutes with each of the recruiters before they had even bothered to ask about what year I was in school. “by the way? what year are you or have you graduated yet?” “I’m actually a sophomore” “oh, no matter, you seem plenty qualified” was generally what transpired for the remainder of the night.

I went to a few more hackathons, won a few more prizes, building things like Deja Vu, a Facebook app that builds a 3d panorama with a time slider from a Facebook event’s photos to virtually recreate the event, and Bestaurant, an intelligent restaurant recommendation iOS app. As you can see I did not let my skills stagnate; I continued to think of ambitious app ideas and step out of my comfort zone to acquire new skills.

Meanwhile I’d received one interview in December for an engineering internship at a startup in NYC. I immediately consulted the internet to help me prepare for a technical interview. I read/memorized TopCoder’s Algorithm Tutorials page, more blog posts than I can count, and “Cracking the Coding Interview”. Immediately prior I was a nervous wreck, contemplating forgoing the interview for fear of failing alone. It was my first phone interview and I certainly didn’t expect to do well. 40 minutes later I’d completed the interview and complained to my roommates about how I forgot to use a hashmap until reminded and should have drank water before the interview because my voice was coarse and possibly incomprehensible. I was very pessimistic. A week later I had another interview and then got an internship offer. I was ecstatic. I thought it was the best I had and didn’t expect any more interviews, but waited to sign the offer just in case.

In January, much to my surprise I had several more phone interviews for both small startups and large tech companies like Amazon.I completely engrossed myself in hackathons, went to 5 hackathons in 5 consecutive weekends. Went to the Foursquare hackathon in NYC where we won with a realtime interactive check-in jukebox called Jamsesh, went to the University Hacker Olympics in SF where we built the self explanatory iOS and Android app called SnapRoulette, went to PennApps Spring 2013 where we won several prizes for our multi-device screen stitching app called Mosaic, went to TartanHacks where we built a webcam techno piano using computer vision called Frequency, and went to MHacks where we built a 3d interface for controlling a computer using stereopsis between mobile devices called Wand. I was knee deep, sinking further and further into a newfound love for programming, and I loved every moment.

By February I’d done more technical interviews in 2 weeks than any sane person could, mostly because I’d sent out a deluge of applications months prior expecting very little response. All of my interviews had been going well, I’d received several offers and soon companies like Google, Amazon and Yahoo were flying me out for interviews. Amazon flying me out had been particularly fishy, because after consulting friends who had interned there I’d found that none of them had onsite interviews and were instead offered internships with just phone interviews. Regardless I flew out to Seattle and took the day long interview, surprised by the difficulty of some of the questions relative to other internship interviews including Google but still treating it like every interview I had until then. A few days later I received a call congratulating me on my full time job offer from Amazon. I immediately realized what had happened and explained to the HR manager that despite telling them my student status they must have mistook my resume’s omitted graduation year for having already graduated, but she was excited rather than upset by this. She congratulated me on doing so well on a full time technical interview despite my inexperience and offered me both a full time job and internship.

I continued to travel, attending SXSW Interactive as a member of InteractATX, flying out to the west coast occasionally for interviews and going to hackathons. My friend and I won HackPSU with Hologram, an iOS app that takes 3d photos by analyzing photos taken under different lighting conditions with the phone’s camera.

Time seemed to fly and before I knew it I’d received almost 2 dozen internship offers from large tech companies and startups, a full time job offer from Amazon, and coverage in TechCrunch for Hologram and Mosaic. Now I’m forgoing all of the internship and job opportunities I’d been pursuing to build something of my own through co-founding a tech startup. It will be incredibly difficult, but my experiences so far make me think nothing is impossible.


It’s been 3 months since I wrote this. I was afraid to post it publicly then and still am, but I’ve been sending it privately to everyone who asks “I want to learn how to code. How did you learn so quickly?” Since I initially wrote this I turned 20, Mosaic won an Apple Design Award at WWDC alongside Letterpress, Evernote, Yahoo! Weather, etc. and was subsequently featured on the App Store.

I also joined the startup accelerator Y Combinator with my aforementioned startup (Watchsend),and just finished. We’re almost done raising our seed round of angel funding and I’m very excited for what’s to come.

I’ll never forget how critical hackathons were for my development. I have a special sore spot in my heart for them, and despite working full time on Watchsend, I take the time to go to, and now help organize, college hackathons like PennApps, MHacks, and HackMIT to give more students the opportunities that changed my life.