From a Lorry Driver to Ruby on Rails Developer at 38 I recently had the pleasure to interview Pedro David Garcia Lopez, a Ruby and Rails developer based in UK, who used to be a Lorry driver. What's interesting is that he decided to become a developer at the age of 38. This post shares his story and I hope you find it as inspiring as I did!
How I Read Rails Source Code Here're two techniques I've found really helpful for reading the Rails codebase, without getting overwhelmed. If you want to dive into the Rails source code for a deeper understanding, but feel intimidated by the sheer size of the codebase and don't know where to begin, this post is for you.
Build Your Own Router in Ruby Have you always wondered what a Router is and how it works? I know I have. In this second bonus post in my Rails Companion course, we'll build our own router in Ruby to get a deeper understanding of the Rails Router. We'll also use some meta-programming to make it look just like the Rails router. This article is for Members only
Growing Object-Oriented Software, Guided by Tests Testing software is good. Period. This book gives a practical approach to building software combining the principles of object-oriented programming with test-driven development. All the buzzwords might trigger your inner sceptic, but this book is really, really good. Highly recommended.
Understanding Ruby's defined? Keyword Ruby's defined? keyword is an elegant way to check if a variable is defined or not and also to cache expensive operations. However, it's confusing, and a few gotchas await the new Rubyist. Now that I've had a few opportunities to play with it, here’s my shot at sparing you some of the confusion.
Honeybadger Now Supports Logging and Event Monitoring Honeybadger recently added support for logging and event monitoring. It's one feature that I've been waiting for a while now, and I recently stumbled upon it randomly yesterday. This post shows how you can log events from your Rails apps to Honeybadger.
Rails Companion - Build a Web Application in Ruby, without Rails In this course, we'll build a web application in Ruby from scratch, without using Rails, to understand how web applications work and the core ideas behind Rails. In each lesson, we will build a specific feature from scratch using Ruby and understand the corresponding Rails concept in-depth.
Let's Build a Web Application in Ruby without Rails Rails is great for building web apps. But it can be quite overwhelming if you don't know how web applications work. In this series of articles, we'll build a simple but complete app in plain Ruby without Rails, to get a deeper understanding and appreciation of everything Rails does for us.
What Does the Frozen String Literal Comment Do in Ruby? Frozen strings not only prevent unintended modifications, but also reduce the overhead of the garbage collector by eliminating unnecessary memory allocations, thus improving application performance. This post explains the concept of freezing along with the magic comment frozen_string_literal.
Speed Up Your Tests Using VCR Gem in Ruby HTTP API requests can be slow. They're especially slow if you have to make them repeatedly in your tests. The VCR gem in Ruby speeds up your tests by recording the response the first time and replaying the same response for future runs. Let's understand how it works and how to use it.
Playing Sounds in Rails with the Audio API In this post, we'll learn how Campfire allows users to play various funny sounds by typing `/play` followed by the name of the sound. I found the entire flow pretty interesting, involving various aspects of Rails and Hotwire. Let's see how it's done.
How to Generate Random Numbers in Ruby This post covers the basics of random number generation in Ruby. As with everything in Ruby, there're multiple ways you could do it, with some approaches better than the other. We'll also explore generating random numbers in various formats as well as generating secure random numbers.