recap.capeco.de

recap.capeco.de

We had a lot of fun last week on the Cape. Here’s a small recap of the mini-projects, open source work, and more that we managed to get done between hot tubbing, s'mores on the beach, and some Rock Band.

Code Katas

Dan Croak and Brian Mulligan sparred with Uncle Bob’s Bowling Game Kata as a TDD exercise. The fruits of their labor are on github. In related news, our pals at EdgeCase started Ruby Koans, a great site to be enlightened about Ruby.

Node.js Websocket Mice Explosion

I wanted to learn more about Node.js, and this blog post was a great inspiration. I ended up getting the small example from the Jeff’s blog working and showed it off during our lightning talks.

Who

Mike Burns took a look at how we write controller actions and how conditionals are handled in languages like Smalltalk or the Either type in Haskell. He thinks we can do better in Rails. A little taste:

class UsersController < ApplicationController
  def create
    User.create_from(params[:user]) do |result|
      result.success(redirect_to_object_with("User created!"))
      result.failure do |user|
        flash[:error] = "You fail."
        redirect_to root_url
      end
    end
  end
end

This is still incubating but hopefully we’ll see it soon!

CSS3 Ralph

Our newest designer Phil LaPier whipped up an all CSS version of Thoughtbot’s mascot, Ralph. Feast your eyes upon its magnificence here. Make sure to bump the font size, too!

Loxosceles

Josh Clayton started learning C during the trip and got his toes wet by starting a graph database called Loxosceles. Also of interest: NoSQL Summer Boston is discussing graph transversals tonight, if you’re up for a swim.

Layer Tennis match

Inspired by the pros, Kevin and Phil decided to have their own match. Check out the results here.

I hope this will be a more regular event for our designers, how about you?

Paperclip storage refactoring

Jon Yurek has a lot of requests for other storage engines with Paperclip, other than the filesystem and using S3. A new gem isn’t released yet, but the necessary refactoring was done to allow this to happen. Review the patch here!

GIT INCEPTION

I tossed together a little talk about some underused git tricks. My favorite from this set: git notes, which is now supported by GitHub too. Plant some ideas in your mind.

Gemcutter Hacking

Matt Mongeau and I worked on pushing out some changes on Gemcutter/RubyGems.org. We finally got around to deploying changes to move over to the fantastic Fog library for talking to S3, and also a new endpoint to hopefully speed Bundler up with some Redis magic. A small sample of what we whipped up is here.

PORM

Mike Burns and Harold Giménez took a crack at a Ruby ORM for PostgreSQL that fully embraces PostgreSQL’s features making it Postgres-specific. They spent a few hours working on the DDL, INSERT, and SELECT aspects (which later influenced Who, mentioned above) before working on the Postgres fun: check constraints for validation, not null, unique, and foreign key constraints. They spent some time adding support for most postgres data types, and took a crack at supporting table inheritance.

The following is working code, which creates a users table and an admins table which inherits from users. No more STI.

class User
  include Porm::Table

  attributes do |t|
    t.string    :login, :null  => false
    t.integer   :age,   :check => '(age >= 18)'
    t.ip        :last_ip_address
  end
end

class Admin < User
  attributes do |t|
    t.boolean :super_user
  end
end

Effigy on Rails 3

Joe Ferris worked on Rails 3 integration for Effigy, his chaos-free view engine. Check out the README for more info on using it and integrating it with your app.

Awesome StyleSheets

Tristan Dunn cooked up a new alternative to CSS to ease the pain. Here’s some of the syntax his parser supports:

:button {
  font-size: 36px;
}

:button < div h1 {
  font-size: 72px;
}

div {
  background: #4C4;
  padding: 16px;
}
div h1 {
  color: complementary;
}

Nothing’s released here yet, but if you’re interested let us know!

See you next time!

We’d love to see you at the next capeco.de, so make sure to stay posted by following us here. We had a lot of fun last week and we hope you’ll be along for the next one.

Nick Quaranto Developer