1. RubyNation 2010 Live Blog Day 2

    10 April 2010

    RubyNation 2010 Live Blog Day 2


    April 9 - 10 Reston, VA

    RubyNation 2010
    Agenda

    Saturday



    • 4pm
      Block, Procs and Lambdas, Oh My! Functional Programming in Ruby by Paul Barry
      From RubyNation2010

      All programming languages are opinionated
      First-Class Functions And Higher-Order Functions
      First-Class Function: Procs
      Immutability: value > reference
      Basically a bunch of stuff has been happening involving Clojure and Scala. I’ve played with Scala some but not enough to really follow with Pauls’ examples

    • 3pm
      Common and Useful Software Learnings From a Long Living Rails Application by Derrek Long
      From RubyNation2010

      Working on the same app for a long time can cause some fatigue.
      Derrek is bribing the audience for participation by throwing candy at us. Awesome speaking technique
      It’s working, he’s getting some horror stories. Mistakes people make on large systems.
      Derrek’s example is a mistake with TimeZone information
      Australia has 1.5 hour time zones
      POSIX has timezone directory /usr/share/zoneinfo
      While there isn’t much for me to write (it’s a lot of audience interaction) Derrek is a pretty good speaker. Funny guy, keeps the pace moving and it’s been interesting


    • 2pm
      Tales of the Resistance; A Dialog on the Ruby Insurgency by Joe Obrien and Jim Weirich
      From RubyNation2010

      Joe and Jim are play acting out different scenarios of how big business might find it difficult to adopt Ruby
      Making the argument that “Ruby is faster to develop in” is not an argument that big business is going to buy
      A lot of the problems Ruby is solving now have been solved in other languages for a long time
      A better sell is to explain that the cost to make changes to a Ruby code-base is very cheap
      15% of a budget is spent on development
      80% is spent on maintenance
      When Ruby is finally adopted by the business sell the Agile process as part of the total package
      Agile might not make sense for all businesses. If it is not a logical fit, don’t push for the process change


    • Noon
      Rails 3: Living in the Future by Jeremy McAnally
      From RubyNation2010

      Jeremy is going to speak about bringing your Rails pre3.0 app into the future (Rails3)
      The ActiveModel mixin can be dropped into any class and it work like a model in Rails
      ActiveRelation will create intelligent queries
      The new router syntax DRYs up the router quite a bit
      View helpers that used concat in Rails2 now should return just a string

      Upgrading:
      Lazy Way: rails_upgrade
      It will give you a list of things to fix in your app to make it “Rails 3”

      Generate a new application on top of an existing one -> feels a bit strange for a migration path
      Bundler does gem managment, creates a new gem environment for your app

      What is deprecated in 3.0 will break in 3.1

      ActionMailer is nicer in Rails3, much cleaner DSL

      Some JS helpers are gone (i.e. link_to_function)
      All strings are automagically escaped for Views

      No movement on ActiveResource


    • 11am
      MongoDB: The Way and its Power by Kyle Banker
      From RubyNation2010

      It was a hard choice between the MongoDB talk and Pure RSpec by Jon Larkowski but I already read Jon’s slides. Both talks look awesome. Too bad they’re scheduled at the same time.
      The MonoDB “Way” is the middle path
      The simplicity of key/value stores is the reason for their scalability
      MongoDB gives you two things:

      • A rich data model

      • Scalability of a key/value store


      Try MongoDB
      mongoimport allows you to import JSON from a file
      Mongo’s query language takes a document
      Mongo has an explain method
      Geospatial indexing
      Mongo’s Ruby wrapper gives you a Hash. When you save to the DB it translates to BSON
      Comparing SQL to MongoDB…. I wonder if a NoSQL argument is going to break out in the Q/A
      Arrays are indexable
      Indexes are B-tree indexes
      Ruby driver has some overhead (read post comments from Kyle for explanation)
      Auto-sharding will be rolled out in Mongo 1.6
      Sounds like Twitter might be the “mystery” company that pushed MongoDB for the geospatial stuff

    • 10am
      Mock Aren’t Stubs, and Fakes Are Better by Corey Donohoe
      From RubyNation2010

      Too much stubbing == brittle tests because of too much assumed domain knowledge
      I think the speaker is jumbling the definition of a mock and a test spy.
      Overall this is a pretty good talk on the reason to mock and stub, how to do so, showing the different libraries.
      Now Corey is turning to Fakes
      Distribute your test behavior in the form of a Ruby gem
      Treat your code with the Adapter Pattern, you can switch out the real library and the faked library, they should be 100% interchangeable
      Flip a switch and you can run against the faked library or the real library
      Sounds like Engine Yard creates a lot of fakes that just write to a local datastore instead of an external one to speed up their test suites considerably
      How to:

      • construct plain old ruby objects about your domain

      • disconnect those objects from any transport layer

      • spec it all out with end to end integrations

      • use that behavior to drive in memory representations




    RubyNation 2010
    Agenda