Shawn Anderson

Testing Data Migrations in Rails


~2 years ago by Shawn Anderson on Atomic Spin.
When working on a Rails project, you will inevitably need to move data around in your database. Some join table value will need to be moved into its own...

Ember.js Components with DOM Dependencies


almost 2 years ago by Shawn Anderson on Atomic Spin.
Ember.js is a great framework for building single-page applications. Its mantra of “data down, actions up” sets a clear guideline on how to...

Building Better Board Games with Clojure and Gorilla REPL


almost 2 years ago by Shawn Anderson on Atomic Spin.
A while back, my six-year-old daughter and I were on one of our regular daddy-daughter date nights when we decided to create a board game. We sat at a restaurant...

Active Record Aggregate Fields via Sub-Selecting Scopes


over 1 year ago by Shawn Anderson on Atomic Spin.
I was recently working on a piece of code from a legacy Rails application. An unusually large number of queries being run on a particular page let me know...

From Ruby to Crystal: A Quick Look


over 1 year ago by Shawn Anderson on Atomic Spin.
In my dabbles into game development, I’ve loved the expressiveness of Ruby, but longed for the performance of a compiled language. (Anyone else in...

Pure Computed Properties in Ember


over 1 year ago by Shawn Anderson on Atomic Spin.
Ember.js has a great way of managing state on objects: computed properties. A computed property is basically a cached function call. If Ember idioms are...

Custom Rspec Matcher for N+1 Queries in Rails


~1 year ago by Shawn Anderson on Atomic Spin.
Rails and Active Record make many things easy: connecting to the database, building complex queries based on your object model, and easily migrating your...

Making Unexpected Friends at Work by Prepping for External Events


~1 year ago by Shawn Anderson on Atomic Spin.
When I joined Atomic many years ago, it was a small group of tight-knit developers. With fewer than 10 developers working in an open office environment...

When & How to Solve Problems with Genetic Algorithms


12 months ago by Shawn Anderson on Atomic Spin.
Genetic algorithms are a class of algorithms designed to explore a large search space and find optimal solutions by mimicking evolution and natural selection...

Building Concurrent Primatives in Ruby without a Queue


10 months ago by Shawn Anderson on Atomic Spin.
The number-one, easiest way to make Ruby threads communicate and synchronize is to use the built-in Queue class. You can even see this in the Ruby docs...