Tips & resources for learning to code

Code Jul 23 2020

Over the past two years, I've learned the basics of Python and Javascript in order to develop web applications in my free time. I didn't have a background in technology before this, and it's been a time investment and an interesting challenge. There's plenty more I'd like to learn, but I'm happy with how far I've come and what I'm able to build today.

In this post, I'm going to share the resources and tips that worked for me while learning to code.

Process collage

My learning process, featuring The Bachelorette and rsyvarth.

Jump to:

Why learn to code

Most people start out learning to code with a goal in mind. They might have an idea for a website they want to build or be working towards a career change.

For me, I enjoy learning new things and getting hands on with new information. When I started my serverless business development role at AWS, I wanted to be able to really understand AWS services, and that meant building things myself. I could make simple static websites or provision EC2 instances without code, but I needed to learn to code if I wanted to go deeper, for example writing my own Lambda functions. With each new projects I've built, I've also built on my programming knowledge.

If you're looking to build personal projects, there's a chance you may be able to use no-code tools (👋 hello Amazon Honeycode). If a no-code tool works for you and saves you time, by all means use it.

If you do have the time, I've personally found learning to code worthwhile. First, there's endless opportunities of things you can build and problems you can tackle just knowing the basics of programming, which is incredibly empowering. Second, I appreciate learning more about the underlying technology and learning to think like a programmer, which opens up new ways of problem solving.

Which language to choose

Python has served me well as a first programming language and is often recommended as a good one to start with. It's an easy and intuitive language to learn and is a good foundation to learn other languages from. Even cooler, it's used in a variety of different fields. Python is great for everything from automating tasks on your computer and building website backends, to advanced work with AI/ML and IoT technologies.

After spending a few months learning and writing Python, I started in on JavaScript. Another popular language, JavaScript allows you to build dynamic web frontends (i.e., when someone clicks a button on your website, something happens on the backend). I confess, there's plenty of concepts in JavaScript I'm still working on grasping. I've found it trickier than Python, but very useful and an area I want to keep improving in.

If you want to compare more languages and when you might choose them, this infographic is fun.

Where to start

Now that you have a goal in mind and your first programming language picked out, it's time to get started. I enjoyed the free online courses from Codecademy for Python and JavaScript. These courses are hands on and interactive, which helped me get a foundational understanding of the syntax and components of the languages.

Note: Python 2 is an older version of Python than the current version (3). It looks like Codecademy's Python 2 course is free, while their Python 3 course is paid. Given that the differences between Python 2 and 3 are fairly minimal at the beginner level, you could still take the Python 2 course, learn a bit about the version differences (namely, print 'hello' vs. print('hello')), and start coding in Python 3 without issues.

To get more exposure to the language and get into more advanced topics, I read the O'Reilly books Introducing Python and Head First JavaScript Programming. The Python book was excellent. The JavaScript book was a little quirky, but got the job done.

Overall, I appreciated starting with interactive online courses to get a feel for how the language works, before moving on to books. Books are great for learning more details and getting deeper into the language.

General tips

In this section, I'll share some general tips that helped me stick with learning to code, work through difficult bugs, and reach the point I'm at today where I really enjoy coding.

1. Build while you learn

I've found that intermixing studying from an online course or book with working on your own projects is a great way to stay motivated and learn as you go.

I typically start with the first few chapters of a book or a course, then spend some time building a new project with what I've learned. When I feel like I've reached a point where I'm struggling, I'll go back to studying.

If you read another post of mine, Getting started with serverless on AWS, you can see how my learning path for serverless closely parallels mine for programming. For nearly every project, I needed to build a new programming skill. The first project is a no-code static website, the next two use beginning JavaScript and beginning Python, and the later projects are more complex and required significantly more code.

Working on real projects will help you stay motivated and learn by doing, while also building a strong foundation through courses and books.

2. Get good at asking questions

Learning to program is all about learning to problem solve. If you're brand new to it, you might be surprised to learn that Google is one of software developers' primary tools for working through coding problems. Googling your questions is powerful, but even more so when you can do it well.

The more you code, your searches will evolve from 'how do I put something in a list at a certain point in python', to the more precise 'how do I insert a string into an array at a specific index', getting you answers faster.

Sometimes you've exhausted all potential searches and still don't know what to do. Another problem solving approach that I like is rubber duck debugging. In this method, you explain to someone (a rubber duck, a friend, a pad of paper) what each line of your program is supposed to do. Plenty of bugs will suddenly appear obvious once you've taken a step back.

When you first start coding, and especially when you leave behind book problems and start building your own projects, it can feel like you're constantly running into things you don't understand and getting blocked. As you improve your ability to quickly debug issues, coding will become a lot more fun. Writing code will start to flow and you'll even see things work on the first try 😎.

3. Ask for help

Few things are more frustrating than running into a programming problem that you just can't figure out how to solve. This is when it's helpful to have back-up!

  • Friends. You might have friends that are learning to code or are already experienced programmers. People new to coding like yourself may be able to see things that you've missed, and software developers can show you how they would approach solving the problem.
  • Coding meetups. Pre-COVID 19, I attended Meetup events for developers, like Puget Sound Programming Python (PuPPy). Hopefully we'll get this back someday! I know many groups are still doing virtual events.
  • Online learning groups. There's lots of great groups learning together on Twitter, Slack, and community forums to be a part of. To name a few:


🌻

← Back Home