Notes From A Year Learning Programming: Ruby, Elixir, and JavaScript

I spent the last year learning programming. I talked about the different languages I learned and projects I worked on in my last post. This post contains my notes looking back on the year and a list of my favorite resources. Enjoy!

My Notes

This is a collection of notes I put together as I reflected back on the year.

What language?

I didn’t realize it a year ago, but when you learn your first language, the language itself is the tip of the iceberg. I think it is helpful to find a language with tutorials and books to learn beginner and intermediate programming fundamentals using the language as examples.

I think Ruby is a good first language to learn because there are a ton of resources that will especially help you learn the non-language aspects of programming. For example, how the web works (Learn Rails Book One), testing/refactoring/programmer tools (Upcase) & design patterns (Practical Object Oriented Design in Ruby, i.e POODR), and development environment setup, Git & GitHub workflow, deployment, (Ruby on Rails Tutorial).

Ultimately, I wouldn’t worry a whole lot about picking a language. If you want to switch, learning a 2nd language is much easier because you won’t be learning the fundamentals of programming at the same time.

Language or framework first?

I started learning both and picked whatever I found most enjoyable on that day. I would bounce back and forth as sections got boring or if I felt like I was wading too far out in the framework “deep end” and didn’t understand what was going on. It probably depends on if you learn better from the bottom up (learning the concepts in depth bit by bit) or top down (learn overall how everything fits together and then going back to learn the details).

Type, Don’t Cut & Paste

It really helps me to type out the code rather than cut and pasting. Many people have said it, but it’s kind of like reading about skiing versus going to the mountain. You aren’t going to get it until you get out on the slopes. The same is true for actually typing code. Get your fingers and mind used to typing the syntax. However, sometimes I will just paste in the code if it's a topic I plan on coming back to. For example, I skipped over the CSS in Ruby on Rails Tutorial the first time and just pasted it in. I also skipped through JavaScript sections in Programming Phoenix my first time through. I still read through those sections, but I knew I wasn’t getting a great understanding and made a mental note to go back when I wanted to really learn those areas.

Errors, Bugs, and Typos

Typing out all of the code helped me learn the lesson that 95% of my errors or bugs are typos. On multiple occasions, when going through the Ruby on Rails Tutorial I had an error I couldn’t it figure out. When I searched StackOverflow, someone else had already posted the error...haha, we had the same typo. It’s one benefit of having a bunch of people learning programming with the same language.

Twice Through the Tutorial

The first time through a tutorial, I focus on understanding the big picture and often go through it twice. If I don’t get a concept, I just keep going and make a mental note to look for ways to better understand it during the rest of the book. When I go back through the tutorial, I understand how things fit together, so it is easier for me to understand the more challenging topics. On many occasions, the concept I struggled with on the first time around makes sense once I understand how everything fits together.

Find a Project

It was helpful for me to find a project once I finished a couple of tutorials (before I had a basic understanding, it was hard to know what was reasonable to build when starting out.) The main project I picked was building the fantasy sports app. As I mentioned above, I built it 3 times. Picking the next thing to learn was easier because it was based on the next feature I was trying to add to my app. Having a project also created the right amount of stress and urgency for me to break through barriers and not give up as I was learning.

Intermediate Learning Without Becoming Overwhelmed

There is a ton to learn and it can be overwhelming. Justin Weiss gives a lot of great advice about learning Rails as an intermediate, e.g. "With So Much Rails to Learn, Where Do You Start?". The most important thing I learned from him is the importance of your setting aside the things you plan to learn later. I always have a large list of things I am setting aside so I can focus on learning one or two things in depth.

Borrowing Code for Your Project

There were many opportunities to take pieces of tutorials and modify them to fit my project. One advantage of going through multiple tutorials is that I had a bunch of patterns and ideas for how to solve problems when you will run into them in your project. For example, I used the Wes Bos Learn Redux tutorial app Reduxtagram to model MetroApp. For one of my next features to add to MetroApp, I plan on using the implementation of the FilteredTodo from the Redux docs Todo List tutorial to add a filter by rail line color for the list of metro stations.

StackOverflow and Documentation

StackOverflow can help you find something when you don’t know what you are looking for. However, the more I’ve learned, the more useful the docs have become. Part of that may be because Elixir has great docs and there isn’t as much info on Stack Overflow. The Elixir Forum is a great resource if you run into problems with Elixir...pretty cool when the creator of the language answers your question himself.

Watch the Pros

One of my favorite part of screencasts was learning that even the pros make typos and other mistakes. They also have to reference the docs and look stuff up just like us regular folks.

Reading Open Source

I’ve tried to read more open source code, but I found that libraries were tough to understand at first. I joined Upcase which is a learning site from Thoughtbot and I think the best thing about it is access to the Upcase repository. The structure generally mirrored my app, so I could see how they solved problems similar to problems I faced. Now that I’m more experienced, I’ve found libraries useful for style and understanding how people organize classes/methods, and modules/functions. Reading more open source code is something I plan to work on in 2017.

Taking a Break

When I hit a roadblock and I start forcing a solution, I learned that it is best to step away from the problem. So many times I’ve struggled for an hour or two and then the next morning I see the problem in 5 or 10 minutes. This is a tough one because it feels like you’re right on the edge of figuring it out…if I just play around with it for a few more minutes! …nope, time to take a break.

Pairing and Finding a Mentor

Another one of my goals for 2017 is to look into remote pairing and maybe learn more “in person” from a more experienced programmer. I feel like many of the authors of the books I’ve used are my unofficial mentors, but seeing how experienced programmers work would probably help me learn more quickly.

List of My Favorite Resources

Many books and tutorials are available online for free, but if I find them useful, I buy a copy to support the author.

General

Ruby/Rails: Beginner

Ruby/Rails: Intermediate

  • Practicing Rails by Justin Weiss (@justinweiss): An excellent guide for learning intermediate concepts once you get the basics.
  • Upcase: An amazing resource for not just Rails, but all kinds of software development tools and best practices. Convinced me to learn VIM and now I’m hooked!
  • Thoughtbot Guides: A bunch of real world guides for software development. I use their Git Protocol guide every time I’m committing changes to my master branch (i.e. saving my changes).
  • Practical Object-Oriented Design in Ruby by Sandi Metz (@sandimetz): Once you have a basic understanding of the language and have some experience, this is a good book to introduce design patterns. Here is where learning Ruby is helpful. You can learn the design patterns in a language you understand.
  • Bike Shed with Sean Griffin (@sgrif) and Derek Prior (@derekprior): An excellent podcast to become familiar with programming terms and concepts. The episode You’re an Elixir Developer Now convinced me to learn Elixir and Phoenix and build my app a third time.
  • Giant Robots with Ben Orenstein (@r00k): A fun mix of business, self-development, and programming.

Elixir/Phoenix: Beginner/Intermediate

JavaScript/React/Redux: Beginner

  • A Smarter Way to Learn JavaScript: Make sure you actually do the exercises. I could tell I was getting it when I could go through the exercises without consciously thinking about them.

JavaScript/React/Redux: Intermediate

These are my favorites, but there are many other great resources I haven't listed here. Thanks for reading!