My RailsConf 2008 picks

Posted by Colin A. Bartlett Thu, 29 May 2008 01:16:00 GMT

Here are my tentative selections for RailsConf 2008. Looking forward to everything!

Thursday:
  • Refactoring Your Rails Application
  • Developer Testing Tricks
Friday:
  • Entrepreneurs On Rails
  • Hosting and the Woes
  • Faster, Better, ORM with DataMapper
  • “Design Patterns” in Ruby
  • UI Design on Rails
Saturday:
  • Optimizing Rails
  • Asynchronous Processing with Ruby on Rails
  • Fast, Sexy, and Svelte: Our Kind of Rails Testing
  • Integration Testing with RSpec’s Story Runner
  • Metaprogramming and Ruby Internals for Rails Programmers
Sunday:
  • De-Railing: Smashing the Rails Stack
  • Oh the Fail I’ve Known
  • Building an app in 48 hours – A Rails Rumble Case Study

RailsConf 2008 - Justin's Schedule

Posted by Justin Reagor Thu, 29 May 2008 00:52:00 GMT

Below is the schedule I came up with when going over the sessions available this year at RailsConf… Going to try to make these, if not switch with Colin so we cover the conference well… very glad to see some advanced classes! Would have loved a REAL advanced Rspec session though.

8:30am Thursday, 05/29/2008
Meta-programming Ruby for Fun & Profit Portland Ballroom 252
Neal Ford (ThoughtWorks), Patrick Farley (ThoughtWorks) Ruby is the revenge of the Smalltalkers. Not since Smalltalk has a language had such powerful meta-programming facilities. While this may seem like a minor feature, it turns out that surgical meta-programming allows solutions to problems that are clearer, more concise, more maintainable, and take orders of magnitudes fewer lines of code. Read more.

1:30pm Thursday, 05/29/2008
Powering AIR Applications with Rails Portland Ballroom 252 Tony Hillerson (EffectiveUI), Daniel Wanja (Nouvelles Solutions, Inc.) Adobe’s AIR platform offers developers familiar with web technology the tools to create desktop applications. Come and learn how to drive an HTML and a Flex AIR application with Rails using RubyAMF. Read more.

10:45am Friday, 05/30/2008
Entrepreneurs On Rails Portland Ballroom 251
Dan Benjamin (Rails Machine) Many of the people working with Rails are independent developers, doing freelance work or running small development shops. This makes sense – Rails provides a great framework for an indy developer, making it easy to work with with designers and other developers. Read more.

11:45am Friday, 05/30/2008
Hosting and the Woes Portland Ballroom 255
Ezra Zygmuntowicz (EngineYard), Jamie van Dyke (Engine Yard), Tom Mornini (Engine Yard) What are the day to day issues with Rails hosting. How can they be solved, and what are the best practise methods of avoiding them. Engine Yard have extensive experience with high volume Rails applications and would like to talk about what we’ve learned and what our customers have learnt. Read more.

1:50pm Friday, 05/30/2008
Faster, Better, ORM with DataMapper Portland Ballroom 256
Yehuda Katz (EngineYard) This session will cover using the DataMapper ORM with Ruby on Rails, and go in-depth into its code. It will focus on integration with Ruby on Rails and provide an advanced-level overview of the codebase and design philosophy. Read more.

2:50pm Friday, 05/30/2008
Rubinius – Under the Hood and Behind the Curtain D135-136
Evan Phoenix (Engine Yard), Brian Ford (Engine Yard), Wilson Bilkovich (Engine Yard) Rubinius is a virtual machine built from the ground up to provide a robust, high-performance runtime for Ruby code. The Rubinius team is guiding the development of 20,000+ specifications that define the Ruby language. Read more.

4:25pm Friday, 05/30/2008
The Launch: Dos and Don’ts of Real Life Deploys Portland Ballroom 255
Chris Wanstrath (Err Free) There’s more to launching an app than “cap deploy”—the process is as much a psychological challenge as a technical one. So, what does it take to launch an app you can depend on and be proud of? With a handful of production launches under his belt, Chris will talk about the big picture and little details of bringing your site to life. Read more.

10:45am Saturday, 05/31/2008
Assembling Pages Last: Edge Caching, ESI & Rails Portland Ballroom 256
Aaron Batalion (Hungry Machine LLC) When working on scaling Rails to millions of users/day with complex personalization, caching becomes essential. This talk will cover edge caching, edge side includes (ESI) in Rails, and partial page caching higher in the stack. It will also cover ESI as a fabric for assembling heterogeneous applications into a single, cacheable web experience. Read more.

11:45am Saturday, 05/31/2008
Advanced RESTful Rails Portland Ballroom 252
Ben Scofield (Viget Labs) Designing RESTful systems in Rails carries many benefits. It is not a problem-free approach, however; there are accessibility issues with the standard conventions, and some functions are more difficult to map to resources than others. In this session, we’ll look at solutions for these (and other) problems that arise when you take REST beyond the standard examples. Read more.

1:50pm Saturday, 05/31/2008
Build Your Own Distributed, Self-Configuring Rails Cluster Portland Ballroom 251
Dave Fayram (Powerset, Inc), Tom Preston-Werner (Powerset, Inc.) Fuzed is a Rails server stack written in Erlang that can replace standard mongrel/reverse proxy architectures. It focuses on reliability and ease of deployment in distributed environments. Read more.


2:50pm Saturday, 05/31/2008
Custom Nginx Modules: Accelerate Rails, HTTP Tricks General Portland Ballroom 251
Adam Wiggins (Heroku) Got a Rails app that needs even more speed? Adam Wiggins of Heroku will show you how to write a custom Nginx module to bring blinding speed to critical code paths (and do HTTP tricks that can’t be done with Rails and Mongrel alone), using examples from Heroku’s own authentication module ngx_heroku_gate. Dust off your C compiler and prepare to push the limits of nginx, Rails, and HTTP. Read more.

4:25pm Saturday, 05/31/2008
Metaprogramming and Ruby Internals for Rails Programmers Portland Ballroom 256
Patrick Farley (ThoughtWorks) Rails programmers are Ruby programmers. In this session we’ll cover some useful Ruby metaprogramming techniques as used in real world Rails applications and extensions. Then we’ll dig deep into MRI and JRuby source to gain a nuanced understanding of the implementation details of Singletons, Mixins and the Ruby Object model. Read more.

10:45am Sunday, 06/01/2008
Scaling Ruby from the Inside Out Portland Ballroom 252
Ezra Zygmuntowicz (EngineYard) This is a talk about what it takes to really scale Ruby applications. We will not only examine all the aspects of hardware and web server configurations, we will also look at scaling the ruby interpreter itself. Including performance quirks of MRI and how Rubinius is set to fix a lot of these problems. Read more.

11:45am Sunday, 06/01/2008
Everyday DTrace on OSX: A Guide To Using DTrace for Your Full Application Stack Portland Ballroom 251
Scott Barron (EdgeCase), Chad Humphries (EdgeCase) Have you ever wanted to know why a part of your application is slow? How about how long that query takes? Wouldn’t it be nice if you could get this type of information for ruby, rails, and the database server in one place? You can now with DTrace on OSX 10.5. We’ll show you how to best use this tool-chain to debug, profile, and gather more information about your application. Read more.

1:50pm Sunday, 06/01/2008
Building an app in 48 hours – A Rails Rumble Case Study Portland Ballroom 251
Josh Owens (Intridea, Inc/Web 2.0 Show Podcast), Chris Selmer (Intridea, Inc.) So you want to build a Rails app quickly? Competitors in the Rails Rumble had 48 hours to design, develop, and deploy a complete application. We’ll take you through the development processes of the winning four-man Tasty Planner team, and compare it with those of the one-man Your Pet Records team. We’ll discuss techniques, short-cuts, helpers, and Rails plugins that helped speed development. Read more.

Automagical RSpec: Sake Spec for your Scripts 3

Posted by Justin Reagor Thu, 17 Apr 2008 01:18:00 GMT

I’ve been trying to attempt at spec’ing every single tiny lil script and bit of code I write a long the way. This means I needed a quick, cross directory/app/project script that would run specs from the current directory.

I love Rake, and I love Sake even more.. and Sake was born to do this sort of system-wide task… so lets get to the code!

Throw this in your ~/.sake and smoke it:

desc 'runs specs in the current project, with its own SpecHelper setup'
task 'spec' do
  require 'rake'
  require 'spec/rake/spectask'

  module SpecBase
    def self.included(klass)
      Object.class_eval do
        require 'rubygems'
        require 'spec'
        Spec::Runner.configure { |config| config.mock_with(:mocha) }
      end
    end
  end

  Spec::Rake::SpecTask.new("spec") do |t|
    t.spec_opts  = ["--format", "specdoc", "--colour"]
    t.spec_files = Dir["spec/**/*_spec.rb", "./*_spec.rb"].sort
    include SpecBase
  end
end

As the description string states, this task encapsulates spec_helper.rb and runs any _spec.rb files in the current directory. This makes it very quick for writing specs for small scripts.

Of course, I try to maintain a convention of naming my spec’s just like in Spec::Rails. So if I’m writing a eat_bacon.rb script, I use eat_bacon_spec.rb as the spec file.

Also note: I’m loading Mocha up there, so make sure to take that out if you don’t need it.

Enjoy, with Sake!

Our server names 5

Posted by Colin A. Bartlett Wed, 16 Apr 2008 12:59:00 GMT

Every good tech company needs a sensible naming scheme for their servers. Ours has always been “film directors Colin likes”. I figured it would be fun to publish our list here. So, in no particular order, these are the server names we’re currently using:

  • Richard Linklater
  • Alfred Hitchcock
  • Joel and Ethan Coen
  • Quentin Tarantino
  • M. Night Shyamalan
  • Robert Altman
  • David Cronenberg
  • Martin Scorsese
  • Dario Argento
  • Guy Ritchie
  • Wes Anderson
  • Darren Aronofksy
  • George Lucas
  • Rob Reiner
  • Robert Zemeckis
  • Stanley Kubrick
  • Steven Spielberg
  • David Fincher
  • Hayao Miyazaki
  • Terry Gilliam
  • Danny Boyle
  • John Hughes

Some others have been retired over the years but we try to recycle names when we can. Any suggestions? Baz Luhrmann, Joel Schumacher, Alan J. Pakula are all on the short list we keep.

Automagical RSpec: Shared Example Loading from Separate Files

Posted by Justin Reagor Wed, 16 Apr 2008 01:05:00 GMT

I especially love Ruby because I can quickly customize it to my tastes and likes. With out regard for anyone else’s feeling but my own. With that said, I do try and use this power for good. For the better of my office mates.

Earlier today I was doing some of this…

describe Admin::ModelsController do
  shared_examples_for 'all admin pages' do
    code code code here...
  end

  describe 'when logged in' do
    more specific controller specs here...
  end
end

...and I thought to myself that I would really just love to do this…

describe Admin::ModelsController do
  it_should_behave_like 'all admin pages'

  describe 'when logged in' do
    more specific controller specs here...
  end
end

Loading it from some separated out module underneath the specific MVC spec/ sub directories.

I’ll explain more in a second… but using some code I was working on before, thanks to storing it in Yojimbo, I quickly wrote this into my spec_helper.rb…

Dir[File.dirname(__FILE__)+'/**/shared/*'].each { |group| 
  require group
  include Object.const_get(group.match(/.*[\/]{1}([\w]*)[.rb]./).captures.first.camelize)
}

As you can tell from the code, it will go through all sub-directories of the current one (RAILS_ROOT/spec in this case) and rummage for “shared/” directories. It will then try and load modules, within these files, named after the file’s file name.

Without having to require and include each single file/module throughout your spec files (or the parent spec_helper).

Examples:

spec/controllers/shared/all_admin_pages.rb
module AllAdminPages
  shared_examples_for 'all admin pages' do
    code code code here...
  end
end

Of course this is a smallish hack that I think really cleans out my specs. I generally got the idea from app/views/shared or app/views/layouts/shared directories in Rails. Keeping small shared view partials in separate, nicely organized sub-directories.

Let the flaming commence! j/k ;)

Introduction to the Internet and eCommerce

Posted by Colin A. Bartlett Mon, 14 Apr 2008 20:13:00 GMT

Each year I volunteer a few hours of my time to speak to a group of individuals interested in starting their own business as part of the Reading SCORE program. It’s always great to see new entrepreneurs and to relay whatever little nuggets of experience I might have gained during my trials and tribulations starting a company (or two).

I speak for a short time about the basics of building a website for your start-up business and then I answer questions. I’ve been using the same presentation now for ages. (I don’t even recall if I created it or if it was given to me.) But it was in need a refresh.

So I’ve drafted a whole new version which is more my style – less boring bullets and more basic points and pictures to help trigger me to recall things and prompt questions.

For those that attended, you can download the slides here.

Older posts: 1 2 3 ... 19