Rails, Angular, Postgres, Bootrap Second Edition in Beta!

October 19, 2016

The second edition of Rails, Angular, Postgres, Bootstrap is in beta.

There’s a lot of new content, mostly around Angular 2.

Of particular interest is that we aren’t using the Asset Pipeline, but are using Webpack. I tried hard to get Angular 2 working with Sprockets, but as Giles Bowkett points out in a recent post, Sprockets is not a modern tool for modern JavaScript.

The current beta is about 75% complete and includes:

  • Rails
    • End-to-end unit testing with PhantomJS
    • Making your end-to-end tests work with Webpack
  • Angular 2
    • Setting up Webpack to serve CSS and JS
    • Intro to Angular 2, including routing and unit testing.
  • Postgres
    • Using and testing Postgres check constraints
    • Content-specific indexed (e.g. index on a lower-cased version of a field)
    • Materialized Views
  • Bootstrap
    • Simple styling with Bootstrap
    • Grid-based design with Bootstrap

Angular 2’s setup was painful, but it’s a much nicer framework than Angular 1, and requires a lot less plumbing and decision-making than React (based on my limited experience with React).

The skills you learn in this book will let you solve a wide variety of problems quickly, cleanly, and efficiently, using modern and powerful tools.

Buy the beta now!

Note: if you bought the first edition, stay tuned—I’m not sure what accomodations will be made

My talk on scaling Rails from RailsConf 2016

May 31, 2016

I gave a talk at RailsConf ‘16 called “Can Time-Travel Keep You From Blowing Up the Enterprise”. The talk is really about scaling Rails on a growing team, and attempts to stop the discussion around “monolith vs microservices” by showing how a team can take hold of its destiny.

It’s also the exact way Stitch Fix engineering evolved, and while we have some large Rails apps, none are the monstrosities I’ve seen elsewhere.


Test Behavior, not Configuration

May 23, 2016

I’ve become re-acquainted with the pattern of testing ActiveRecord classes using stuff like expect(parent).to belong_to(:child) and I just don’t understand why anyone would ever write a test like that. It provides no value, and the implementation provided by shoulda isn’t actually testing the behavior. It’s testing configuration.

Announcing Rails 6: An Imagined Keynote

May 17, 2016

Just got back from RailsConf. It was a great Ruby & Rails conference, but I was struck by the dearth of talks about new features of Rails 5—because there just aren’t many. I thought back to what excited me about Rails in the first place—the baked-in conventions, convenience, encouragement of good practices.

Justin Searls gave a talk not about RSpec but about how Rails is losing mindshare, losing favor. Is Rails losing relevance? I hope not, but it’s easy to see how someone less emotionally invested than me might see it that way.

I’m trying to write about this without complaining. This is my fifth attempt. It’s hard not to just rant about Rails’ failings, so I’m going to try to be constructive by outline a fantasy roadmap for Rails 6.

I tried very much to think about this without going against the “Rails Doctrine”, and have written this as if it were an Apple-style keynote. The theme is Progress.