Skip to content

Instantly share code, notes, and snippets.

@caioertai
Last active November 4, 2021 17:42
Show Gist options
  • Save caioertai/38b09a9ffaaf34256f01cd0bd792cc33 to your computer and use it in GitHub Desktop.
Save caioertai/38b09a9ffaaf34256f01cd0bd792cc33 to your computer and use it in GitHub Desktop.

Going deeper into Ruby and Rails in the post-Wagon blues

by Caio Andrade Le Wagon Teacher and Klatchian Coffee Guzzler

About this list

This list is ultimately a reflection of my own experiences growing as a developer. It’s more suitable if your career goal is to be a Ruby developer with a heavy focus on Software Engineering and the Rails stack. It deepens what you're familiar with after finishing Le Wagon.

The golden advice

Build things. If you're practicing by yourself, find a problem you want to solve. Be it a page component you're interested in (a navbar that hides on a threshold) or an entire, but simple, app (a downscaled Evernote clone), it's important to have clear goals and to be able to see the results of your work.

Courses

You folks probably heard me talk about thoughtbot enough already, but, geez! Their UPCASE platform is not suggested enough! It's the platform they use for training their teams internally. And they release most (if not all) of its content for FREE. I'm still going through their courses myself and I fully recommend you folks check it out.

If you're interested in learning TDD, check their testing section for 3 entire courses on the subject and many The Weekly Iteration episodes (a weekly program of them) on it .

Books

Yeah yeah... you can read articles and tutorials. But nothing beats an actual book.

Starting out

I used to suggest Sandi Metz's POODR as the first read after Wagon. But 99 Bottles (which she wrote with Katrina Owen) beats it now by a mile as an introductory material to OOP (object oriented programming), being a lot more practical and easy to follow for a beginner in both Ruby and OOP.

A bit of a recipe book release for free by the thoughtbot team. Read the summary and intros and maybe glance at it from cover to cover. But the important thing is to keep it nearby. Wondering how to cleanup your controller or all those messy validations on your model? How to validate a form object? You'll find here some of the best ways to leverage the power of Ruby and Rails to your advantage.

It's a thorough guide on JS. You can start by reading the first 10 chapters, which will give you the brunt and basics of the language. Chapter 11 can be a rough introduction to asynchronous programming, but it's needed if you want to build advanced front end interfaces (a basic level is enough for most projects). In any case, read this if you're interested in leveraging the best JS to offer and upscale your front end code.

Mid level

Another entry from Sandi Metz. The one book that every new Ruby developer should read. It's packed full of content worth years of experience for the road ahead of you. It's likely you won't be able to apply most of it on your first projects, or worse, it's likely that your first tries to follow into Metz's steps are going to lead you to code that was better off before your refactoring attempts. But... DO READ IT. And DO MAKE A MESS of your code. The lessons you learn here are going to follow you for your whole career and they will eventually fall into place, giving you a much clearer perspective on how to approach complex problems.

Advanced

Another recipe book. THE recipe book when it comes to design patterns. Written by the Gang of Four. Its examples are for JAVA and SmallTalk, but the structure of the patterns is agnostic and can be applied in any language. I often find myself searching through it and reviewing the implementation of my classes, trying to identify the best to solve the specific pain I have.

Getting dangerous

Wanna learn some spells? Here's your book. Metaprogramming is one of the most controversial subjects you can find, and it's arguably one the strongest super-powers of Ruby. But, as they say, those come with great responsibilities. You'll either find yourself writing amazing code with it, or the kind of arcane scribblings for which your coworkers will hate you. It's a great read since, despite the advanced and confusing subject, Perrotta managed to write the book as, believe it or not, an engaging story about your day job.

This book is also suggested as study material by Ruby Association is you ever want to study to get yourself a Gold Certification.

So... classes are actually instances of... themselves(?), and an instance doesn't inherit directly from its class? And classes are not actually classes? Yeah. Most of what you hear as you're starting with Ruby is an elaborate lie to simplify things. They're abstractly true, and help you think and talk about code seamlessly, but, under a microscope, things are a lot more complicated. Interesting read that will help you solve the pesky problems you hope you'll never have.

Talks and Conferences

The power of Object Oriented Programming lies in familiarity. The classes we deal with are sometimes incredibly abstract and difficult to grasp, and bad code is often a result of the failure to correctly comprehend what we are actually dealing with. In this talk Sandi Metz takes a very messy code example and slowly refactors it until it feels like what it should have been all along. The process by which she does it is an amazing example of how to go about refactoring code that you don’t even understand to begin with.

This is one of the most eye oppening talks I've ever seen about Rails. It gives you a deeper understanding of the RESTFUL pattern which will open your eyes for a much better pattern by which to organize your routes and actions. This is one of the most sorely missed skills I find even in senior developers and it's not a huge technical leap to have this understanding. I suggest you watch it sooner rather than later and your apps will be enormously better for it.

Other Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment