Ruby blocks explained

My initial plan for this post was to write about the Ruby module Enumerable, but I realized that it would be a good idea to introduce blocks first. We’re going to need to have a good understanding of what blocks are before we talk about Enumerable.

• • •

Why You Should Use Referential Integrity in Your Web Application

When you build a database backed application it’s paramount that you keep your data in a sane state. The vast majority of the value our customers gain from our applications is in the data itself. Without it we’re left with a collection of nice, but empty pages. We need to be aware of this since it’s easy to create cracks in which errors slip through, leaving us with a mess of orphaned records and other messy data.

• • •

Sandi Metz’s Rules for How to Write Better Software

Sandi Metz is one of my many role models in software development. Her book “Practical Object-Oriented Design in Ruby” is a must read for any programmer who wants to write better object-oriented code. It’s short, clear and to the point and it made me even more enthusiastic about writing clean and eloquent code driven by empathy.

• • •

How to Simplify Configuration of Your Application with Environment Variables

We all want our applications to be simple to configure. One way to do that is to use environment variables and that is also the conventions defined in “The Twelve-Factor App“. If you are not familiar with the thinking behind “The Twelve-Factor App” it is all about making applications that are simple to deploy and scale, as well as minimizing the difference between the development and production environment. I warmly recommend that you take a closer look there after you finished reading this post.

• • •