Bob Nadler, Jr. Bob Nadler, Jr.

Don't miss a post! Subscribe to my mailing list.

No spam, ever. Unsubscribe at any time.

Rails 3 Generators: Lookup Paths

Published about 12 years ago less than 1 min read

Apparently the new Rails 3 generators do not support looking up custom generators in ~/.rails/generators anymore. Here is a bash function that copies a generator from ~/.rails/generators/GENERATOR into your rails app so that it can be used without...

Read more →

JavaScript Patterns: Module

Published about 12 years ago less than 1 min read

When I started getting more into JavaScript I was looking for the best ways to organize my code. One of the most popular is to use the Module Pattern. This pattern provides structure and helps you to write self-contained decoupled pieces of code. Here...

Read more →

Ideas for Splitting Large User Stories

Published over 12 years ago less than 1 min read

During iteration planning, sometimes user stories need to be split so that they can be better handled. Here are a few ideas for doing just that.

Split according to data boundaries:
Try splitting based on the data needed to support the story, like...
Read more →

JavaScript Patterns: Callback

Published over 12 years ago 1 min read

In JavaScript, functions are objects that can be passed as arguments to other functions. A useful pattern that lets you take advantage of this is the Callback Pattern.

For example, let's say you were implementing a graphing library that would allow...

Read more →

Ruby's Matrix

Published over 12 years ago 1 min read

The Game of Life

I attended a Code Retreat a few weeks ago where the exercise was to implement Conway's Game of Life. The Code Retreat was awesome and I definitely recommend you check one out. I wasn't familiar with the Game of Life before attending...

Read more →

Faking Data with Ranges in Ruby

Published over 12 years ago less than 1 min read

On a recent project I needed to create some fake data for some reporting screens. I was using StaticMatic to generate a mockup site and decided to try out the Faker gem for creating the data. Faker worked out well, but it doesn't have any support for...

Read more →

Refactoring Case Statements in Ruby

Published over 12 years ago 1 min read

case (or switch) statements in your code have a tendency to grow over time. After awhile they can become unmanageable and hard to read. As a general rule of thumb I try to refactor case statements if they are more than one screen long. But how can...

Read more →

Rails Domain Generation with SQL Editor

Published over 12 years ago 2 min read

Update: I have a new Rails 3 compatible version called model_maker available on GitHub.

A Problem

I'm a visual person by nature, so when I start a new project I like to spend some time drawing out screens and domain models. From these I then write...

Read more →

Rails Lookup Tables with active_hash

Published over 12 years ago less than 1 min read

Just found active_hash which looks like it could be useful for implementing lookup tables in Rails apps.

Read more →