Jerome's Adventures in Software

How DHH Organizes His Rails Controllers

| Comments

EDIT: This article is also available in Japanese. すごい!

In a recent interview with Full Stack Radio our Lord and Savior DHH™ explains how he organizes Rails controllers in the latest version of Basecamp. Here is an enhanced transcript of his holy words:

What I’ve come to embrace is that being almost fundamentalistic about when I create a new controller to stay adherent to REST has served me better every single time.

Leveraging Rails’ Custom Configuration

| Comments

These days, I use environment variables for credentials and other sensitive data (secrets.yml could do the job but is too boilerplate-y for my taste). Dummy environment values are stored in my project dotenv file and production values are deployed to the PaaS server of my choice with a simple heroku config:set / eb setenv / etc.

But what about non-sensitive configuration values such as emails or your company address? […]

Migrate From Oh-my-zsh to Prezto

| Comments

Pipe the whole result to the "lolcat" Ruby gem for better effect.

Zsh is an amazing shell, and Oh-my-zsh is very good at showcasing its power without having to dive into too much configuration. I recommend it to Zsh first-timers: within minutes they can enjoy autocompletion on steroids, crazy prompt tweaking, git integration as well as many other plugins.

BUT. It’s God. Damn. Slow! […]

Dead Simple File Handling in Ruby

| Comments

Common scenario
You are writing a basic Ruby script that needs to read or write in some text files.
So you search “ruby write file” and “ruby read file” on Google.
You end up on the usual tutorials and Stack Overflow answers that tell you to open files with r or w mode, “1970 C style” […]