Category Archives: Howto

My Screencasting Process

A bunch of people have asked about my screencasting process for RubyTapas. My process is a work in progress that I frequently iterate on, so this is really just a snapshot of my process as of January 2013. I don’t … Continue reading

Posted in Howto | Tagged , , , , , | Leave a comment

Fancy GitHub Authentication with Omniauth

Configuring Omniauth for GitHub authentication is easy enough. But I needed to optionally add extra permissions to the authentication token. I eventually figured it out, but since I had to piece the steps together from various sources, I thought I’d … Continue reading

Posted in Howto | Tagged , , , , , | 2 Comments

Letter to a Young Developer

I’ve been getting some emails from young developers wanting to “level up” as programmers. I’m definitely not the first to write about this topic, so I’m not sure how much I have to add. Still, for what it’s worth here … Continue reading

Posted in Howto | Tagged , | 18 Comments

View Sandboxes for Rails

Designing HTML views is an iterative, interactive process by nature. And anything that slows down the iterations, slows down development. I was working on a form recently where the steps to show it went something like this: Go to the … Continue reading

Posted in Howto, Rails | Tagged , | 14 Comments

Make Emacs-Server Write a PID File

Oddly, emacs-server doesn’t seem to have an option to write a PID file when it starts up. Here’s some ELisp you can drop into your init file to make it happen:

Posted in Howto | Tagged , , | 2 Comments

A Guardfile for Redis

I ran into a project that required a running Redis server for the tests and development environment to work. Here’s what I threw into the Guardfile to make sure a Redis server was running during development. It starts a new … Continue reading

Posted in Howto, Ruby | Tagged , | 5 Comments

Keep local modifications in Git-tracked files

I often find that I want to make local changes in configuration files that have been checked-in to Git. For instance, I find that the database.yml has been checked in to a Rails project, and I need to override the … Continue reading

Posted in Howto | Tagged , , | 9 Comments

RubyMine, Spork, RSpec, Cucumber

I can’t take credit for this one; that goes to Ben Lindsey. But since the answer I needed was buried in a comment, I thought I’d give it a little more googleability. RubyMine needs to load special test formatters for … Continue reading

Posted in Howto | 4 Comments

Checking the existence of a super method in Ruby

Ruby gives methods the ability to call up to the superclass definition of themselves. Or it may not be a parent class definition; it might call up to a definition in a module included further up the ancestor chain. Either … Continue reading

Posted in Howto, Ruby | Tagged , , | Leave a comment

Determining Singleton Class Status in Ruby

Q: How do you tell if a given class is an ordinary class or a singleton class? A: Test whether the class is the first element in its own ancestor list. class NotASingleton self == ancestors.first # => true end … Continue reading

Posted in Howto, Ruby | Tagged , , , | 2 Comments