Jerome's Adventures in Software

JSONB + Rails to Store Glorified Strings in Your DB

| Comments

Everyone likes a good old quick and dirty hack every once in a while. For example, who hasn’t stored — or at least hasn’t been tempted by storing — a list of values as a simple string in the database?

Let’s see when this could be a good choice, and how to use Postgres JSONB to make our lazy decision nicer […]

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

EDIT: This article is outdated. I have moved away from Prezto and now use my own minimal ZSH settings.

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! […]