Archive for June, 2010

Compleat Rubyist – Day 1

June 19th, 2010 by Brian | No Comments | Filed in work

Day 1 of 2 of my notes for the Compleat Rubyist training course

Ruby Versions and Implementations  – David

http://ruby-versions.net/ – David’s home for ruby versions & implementations for learning & historical reference

Ruby version manager – http://rvm.beginrescueend.com – lets you install several ruby versions/implementations and easily switch between (including your own custom compiled version). Suggestion – don’t install as root, even though it is allowed.

Notes on a few of the existing options:

  • MacRuby – interacts with Cocoa
  • Rubinius – Ruby in Ruby
  • JRuby – Ruby on JVM
  • REE – optimized – created by Phusion Passenger team
  • MagLev – built in object persistence, repository instead of files, smalltalk-ish
  • IronRuby – Ruby on .NET
  • URABE – ?

rvm allows you to compare performance between versions/implementation:

rvm ruby-1.8.6,ruby1.9.2 benchmark filename.rb

Why does everyone use 1.8 instead of 1.9?

  • Same amount of people are using it as last year (like almost no one)
  • Rails considerations
  • 1.9 is not 100% backwards compatible
  • 1.8.7 backported many of the features of 1.9, so people feel safer

Ruby Enterprise Edition has major memory and speed improvements

Highlights of changes between 1.8 & 1.9

  • Enumerators
  • Method parameters
  • Block variable binding & scope
  • Syntax changes

(more…)

Tags: , ,

RailsConf – Day 3 – Lightning talks

June 9th, 2010 by Brian | No Comments | Filed in work

Brian C – DNC

http://github/dnclabs

- client_side_validations – gem that does client side validation for rails
- takes AR validations – serves them via json – used by jquery.validate

how to kill rails
github.com/michel
bad practices by a few rails developers
Don’t reduce yourself to $20/hr, stick to your price, delivery quality
Communication is important!

Democracy.com
Raimond Garcia
Revolutionize Democracy
Parsed Congress web page – created a prototype on heroku in 48 hours
legal palitical party in spain – “partido de internet”

What’s new in RSpec-2
David Chelimsky
in beta right now
Old rspec won’t work with Rails 3
doesn’t work with rails < 3 (yet)

http://github.com/rspec

$rspec spec
modularized, rspec-core is built on micronaut

(more…)

Tags: ,

RailsConf – Day 3 – Persistence Smoothie

June 9th, 2010 by Brian | No Comments | Filed in work

Persistence Smoothie – Blending SQL & NoSQLFlip Sasser (Intridea, Inc.)
@flipsasser

http://github.com/flipsasser/Persistence-Smoothie

NoSQL means no ACID
Keep what you know – don’t throw out your MySQL

DataMapper is the swiss army knife of ORM
- can point different models to different datastores
- Have a lot of refactoring to do

Sample Store App
- Authentication – keep in Reational DB
- Products – store metadata
- Purchases – keep it in RDB
- Activity Stream – denormalize with key/value store

mongofy – gem for moving data from mysql to mongo

Drawbacks
- DataPortability is lowered
- Lot more moving parts
- Say goodbye to all your fun AR mixins

Tags: , , ,

RailsConf – Day 3 – Introduction to Cassandra and CassandraObject

June 9th, 2010 by Brian | No Comments | Filed in work

Introduction to Cassandra and CassandraObjectMichael Koziarski (Koziarski Software Limited)

Scales linearly – increases not only read access, but also write access

A ColumnFamily per query

CassandraObject
- Mostly AR compatible
- In flux
- taking patches

Tags: , ,

RailsConf – Day 3 – Redis, Rails and Resque

June 9th, 2010 by Brian | No Comments | Filed in work

Redis, Rails, and Resque – Background Job BlissChris Wanstrath (GitHub)
redis is a key value store for data structures

redis is not use for everything because entire dataset used to have to fit into RAM – would have to shard across machines

github – uses redis for routing, can add, remove.modify routes quickly & easily – can determine what server to put new users on, etc

Old – HAProxy sending to mongrels
New – Unicorn – instead of receiving requests, it asks for one using ‘select’, pooled, forks similar to passenger

Used 6 or 7 different bg – SQS, DelayedJob
Used Delayed job for 2 years

resque is built on redis, jobs are serialized to json and workers can be in any language http://github.com/defunkt/resque

resque has a plugin API – 15 or so plugins already exist – http://wiki.github.com/defunkt/resque/plugins

has admin interface

github has 35 types of background jobs

Notes: lightning fast talker! Lots of good information though. I’d have a beer with this guy!

Tags: , ,