Atomic Teach and Learn: Now at Hope College

In my early days at Atomic, before Teach and Learn became a Core Atomic Value, its practice was already in full swing. My first months were spent having vim commands barked at me from Dave Crosby while trying to figure out how to build good software. I was very much on the learning side of Teach and Learn.

Nowadays, more than a dozen years later, I’m tipping the scales in the other direction: I’ve started teaching this fall at Hope College.
Read more on Atomic Teach and Learn: Now at Hope College…

Spy on Your Garden with Garden KnowEms

After successfully automating the reporting and watering of my garden last summer via my GardenPi, I wanted to rev on the idea this summer. Since this is as much a learning project as it is an automation project, I decided to improve on both fronts. Introducing: Garden KnowEms™. Read more on Spy on Your Garden with Garden KnowEms…

Building an Infinite Procedurally-Generated World

I had a lot of fun writing my last blog post: All Work & No Play – Taking Time to Code for Fun. In it I talked about writing fun code that keeps you interested in programming and keeps you creative. I used the example of writing a 2D procedurally-generated, infinite world. In this post, I am going to explain details of how that example works.

Read more on Building an Infinite Procedurally-Generated World…

Ember-Style Computed Properties in Ruby Gamebox

I’ve been using Ember.js on a recent project because it has a ton features for building web-apps, like routing, event handling, and templated views that use built in data binding. Ember also does a great job of managing data on its objects via its computed properties.

I wanted computed properties in Gamebox, but no Ruby gem existed. So, after reading some Ember.js source, I wrote my own.
Read more on Ember-Style Computed Properties in Ruby Gamebox…

QuickCheck in Ruby

Scott recently posted about the theft property-based testing library in C. Theft is very similar to Haskell’s QuickCheck. Theft tends to have a little less magic than Quick Check for generating random input and for failure case reduction. Theft makes them more manual, but also gives you better control of how they work. The theft ruby gem is a direct port to allow the same kind of testing in Ruby. Let’s take a look at the value in property-based testing and walk through a contrived example in Ruby.

Testing complicated algorithms can be, well, complicated. Typically, a developer will try to reason about their code and come up with a representative set of test cases to exercise the normal flow of the algorithm as well as all of the edge cases. This approach can leave holes in test coverage and brittle tests to maintain. That leads us to property-based testing. Basically, generate valid, randomly generated input and validate that a particular property is true.

Scott’s post does a good job of showing a real world example on the heatshrink compression library. I’ll use a contrived example to show how the theft gem can be used in Ruby. Read more on QuickCheck in Ruby…

GardenPi: Sensing with the Pi

Phase one GardenPi has been running well for a while now (aside from some wifi connectivity issues). I can legitimately say that my garden waters itself everyday, unless the forecast calls for rain.

However, there are definitely improvements to be made. Let’s take a look at how to add analog sensor to the Raspberry Pi for soil moisture and light. Read more on GardenPi: Sensing with the Pi…