So you want to learn how to code?
My first experience coding was right-clicking in a browser, hitting inspect element
and then changing some of the text of the website I was on (go ahead, try it). It made me realize that all the web pages I use on the internet aren’t magically generated - they’re built by ever-precarious and configurable building blocks of code.
I mention this because my main philosophy when it comes to learning how to code is that there isn’t any particular “right” way or things you “must” learn. For me, discovering that I could build something that I use every day was the impetus for my curiosity and self-education.
Try to build something that you care about
Learning to code doesn’t require supernatural intelligence, but mostly motivation and grit. Is it a website for your art? A web scraper for all of your favorite show venues? A twitter bot? If you have an idea for something that will improve your life, make your work more interesting/productive, or just generally bring you joy, you’re going to be more motivated to actually follow through with it.
If you need inspiration, here’s a thread of project ideas. The Recurse Center also has a great blog called the Joy of Computing that showcases a lot of cool, interesting, and quirky projects - when I was there I worked on a train time visualization and (still am working on) an activist project called signalboost.
If you’re at a loss for what to start with, build a website or check out the resources at the end of this post.
Get set up
Something that is often left unsaid for beginners is where to actually write the code and where it gets run. Here are a few options:
Run code in your browser
Using any of these tools requires 0 setup besides having a browser and internet connection.
Use a text editor
In order to run your code from the text editor, google “how to run Python code in Visual Studio” substituting your language and editor of choice.
Get comfortable googling stuff
Most software developers (myself included) will tell you that a huge part of the job is getting good at googling (or duck-duck-go-ing) stuff. If you hit a wall with your setup, or find yourself with errors that prevent your code from running, try verbalizing what you’re confused about to the search engine.
Here are some examples of things I’ve searched in the past:
"For loop in Java"
"TypeError: 'dict_values' object does not support indexing"
"Mac how to change color of command prompt"
Remember, the search engine isn’t judging you! And 99% of the time, someone has already asked that question on the internet.
Build a website
There are a lot of fancy ways to build a website these days, but basic HTML and CSS are really all you need. My first exposure to HTML and CSS was customizing my Myspace layout. And honestly, it’s not that different than today.
If you learn by building things from the ground up and understanding the building blocks, try this tutorial from Mozilla. In general, the Mozilla Developer Network (MDN) docs are a high quality and reputable resource.
If you like abstraction and want to learn the trendy new thing that may be attractive to potential employers, check out the beginner tutorial from React.
If you’re not super interested in design and want some professional-looking elements (buttons, fonts, colors) out of the box, try adding Bootstrap to your site.
Computer science vs. web development vs. programming
I think a lot of people get hung up on the idea that they have to take a computer science class in order to learn how to code. This is completely false! Computer science has to do with the theory of how computer programs work underneath the surface and the design of algorithms and computational systems. Coding is an important part of that, but by no means is learning the theory necessary to learn how to code. I personally found that pedagogical structure of my college computer science classes (lectures, standardized projects & exams) particularly boring and oppressive. It was only after having built some things on the web that I found computer science interesting and useful.
Web development is probably the most common and accessible type of coding that exists nowadays. It involves building out the logic, systems, and appearance of websites. Most of the time it involves some sort of combination of HTML, CSS, and Javascript. You may have heard a distinction in web development between front-end and back-end: front-end is more concerned with the appearance and structure of elements on the page, whereas back-end is concerned with the logic, databases, and management of content that is then fed to the front-end.
Then there are other types of programming - scientific programming and data analysis, MIDI programming for making music, machine learning programming, hardware/microcontroller programming with things like Arduino and Raspberry Pi’s - just to name a few.
I bring up these distinctions because most courses, whether they be online or at a university, teach coding abstracted from its applications in the real world. But that’s no fun! It’s very helpful for learning the basics, like conditional logic (if-this-then-do-that) and data structures, but you don’t need to study that much in order to start applying it to an interesting project.
Is x bootcamp/course right for you?
A lot of my journey in the world of technology has been shaped by learning (often the hard way) that I learn best by playing with code and learning from examples rather than taking a course start to finish. I also really enjoy talking through problems and working on projects with others.
The idea of thinking about how you think is called metacognition, and I’ve heard of metacognition as it applies to learning being called “metacognitive learning skills.” I think taking a moment to reflect on what kinds of systems/structures/situations have been most conducive to your learning is extremely valuable!
College courses in computer science are great if you want structure, have money to pay for them, and want to learn the deep foundations of the field. Online courses from Edx and Coursera have the same (and sometimes better) quality lecture-based content, but lack the positive reinforcement and accountability of in-person lectures and classmates.
Bootcamps excel where college courses struggle: in teaching hands-on, modern web development skills in a short period of time. I think some of them are great educational value for the cost, especially when compared to a university degree. But be wary of claims that you can find a job right after graduating; it can be a struggle.
If you’re a complete beginner, don’t pay for anything. Take advantage of the plethora of free resources on the internet and linked below.
Technology is confusing; failure is normal
Have you ever had your hard drive crash? Tried and failed to set up a printer? At this point I’m sure everyone reading this post has had an extraordinarily frustrating experience with computers. Coding is no different, and I just want to end with a little encouragement for those getting started. This technology stuff is really confusing and it’s honestly a miracle any of it ever works!
I almost never get something to work on the first try. So when things aren’t working, don’t internalize that failure. Do ask good questions to your search engine, coworkers, and friends, and keep trying! I promise it’s worth it.
Resources
Beginner programming tutorials
Computer science
Web development
Other cool stuff
- Julia Evans’ programming zines
- Recurse Center