Skip to content

kaspth/riffing-on-rails

Repository files navigation

Riffing on Rails

When you're working on a new feature, it can be tough to break through how to actually build it. A common is to start somewhere, run some Rails scaffolds and migrate the database. Then a week later when you finally grok the problem, you're too far in — inertia takes a hold and sunk cost soon follows, "eh, I don't want to rip all that out now".

Wouldn't it be great if there was a different way?

Riffing: An alternative you've never seen before

Riffing is an altogether different approach to software design that has more in common with art or creative acts. We're trying to engage our brain in a different way to come up with the names and structure we didn't know we needed.

It's done in a blank file where you keep adding, removing or refining a sketch of Ruby code to prove out your design.

This combines a focus on top-down design with listening to what the budding implementation is telling you — and if the implementation reveals an issue with your design, you now know you need to change your design early.

Tip

If you've heard of fat-marker sketches for UI design (so people don't get too bogged down in the implementation details), this is the code equivalent.

So we're looking to get as much code design feedback as quickly as we can and being able to riff allows you to:

  • Move implementation insights you'd have towards the tail end of a project all the way upfront
  • By listening to the code, you can surfuce known unknowns and unknowns unknowns — and raise them with stakeholders on day one of a project
  • Unlock naming and code structure that you wouldn't have gotten from just wearing your "engineering" hat

It's best done in a session that lasts 30-60 min either alone or with partners. After a session, take a break and come back to it or sleep on it. If you're hitting diminishing returns that's also a sign to stop.

See it in action

@jeremysmithco and @kaspth have done a few sessions to demonstrate this technique.

Here's the session where dispatcher.rb came about. With special guest, @tcannonfodder!

Here's the session where friend.rb and rss.rb came about. We're also showing how to make scratch.rb runnable so you can test out your interfaces in a console.

Here's the session where mix.rb came about

We didn't record when we did scratch.rb but it happened pretty much the same way.

About

A more artful way to Domain Model your Rails apps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages