How I Started to Code
I get this question a lot: how did you learn to code? People seem perplexed that I can make software without a background in computer science. I’ve never taken some 12 week intensive course with a five figures price tag. I did not major or minor in computer science.
How did I learn to code?
Goalkeeper by Juan Pablo Bravo from The Noun Project
During college, my friends and I would sometimes gather to play Bang!, the spaghetti western card game. We would shout in imitation Italian and laugh at each other tripping over rules.
After college, everybody went their separate ways. I had some free time before my job started, so I decided to make an online version of this card game, so we can all gather around our computers and play — just like the good ol’ times.
That was my goal. And it was specific, a true north. It’s easier to get somewhere when you know where you wanted to go.
Oftentimes in class, I do problem sets with the titillating goal of doing problem sets. Don’t get me wrong — these exercises are helpful, but I find it much more helpful when I have a goal that I personally care about driving my education.
I’m not saying if you don’t have a specific goal, you should stop going to class. Learning something is far better than learning nothing. But having a goal you care about and learning as a means to an end is the best of all.
2. Break it down
Shark by Okan Benn, and Fish by Dan Hetteix from The Noun Project
Initially, I wanted to keep things simple. The card game, Bang!, had a lot of rules. Different cards gave players different powers, and certain cards can’t be played more than once, and certain card override other cards, and so on. Well screw that, I thought. I just wanted to make something where I can I can upload card images and manually figure out which card is in my hand, on the table, etc.
I did that, but my job hasn’t started. So I moved onto coding the rules of the most common card. I did that, and my job still hasn’t started. So I moved onto coding the rules of another card. And another after that.
I tackled the game bit by bit. The whole game was complex and confusing, but each bit was manageable. If I thought about tackling the entire game as a whole, I would have turned my computer off on Day 1. But it wasn’t until I was 90% there, that I considered finishing the game. By then, the game didn’t seem all that impossible.
By tackling one bite-sized piece at a time, I also felt more accomplished along the way. It’s the same reason video games have so many levels. Each tiny triumph give you more fuel to tackle the next puzzle. Gargantuan problems, on the other hand, are scary and discouraging. But you know what? A gargantuan problem is just a school of sardine-sized problems huddling together to frighten you, their predator. And sardines aren’t scary.
3. Let me Google that for you…
Search Engine by Wilson Joseph from The Noun Project
And so how did I translate each bite-sized problem into code? I Googled it. I Googled how to set up a database, how to retrieve of data from the database, how to modify that data, how to keep a counter for score keeping.
At this point, I usually get one of two reactions. Reaction One is the “surprised” face — mouths open and eyebrows raise. This face usually belongs to non-technical people. Reaction Two is the “yup me too” face — eyes close and heads nod. This face usually belongs to technical people.
I first realized the power of Google when I was in college. My computer kept freezing, so I waited for hours to see the computing assistant. Then I watched while the CA fixed my computer. He opened up Google. Typed in the problem. Scrolled down the page. Clicked a link. Found the fix. I was irked. I couldn’t believe I just waisted hours of my precious time waiting in line for the CA. When college-me realized she just lost hours of Facebook time I mean paper-writing time, she pays attention.
After that, I learned how to code!
Haha, just kidding. The game was buggy. Random cards mysterious show up on the table. The code is horrendous. I actually used the names of tables as a way to store data. I did not learn how to code.
I learned how to approach making a complex website. I gained confidence in tackling the unknown. I did not learn how to code, but I started to code.
My advice for people who want to start learning code is simple:
- Find a goal you care about
- Break down your idea into bite sized pieces