leah blogs

September 2006

17sep2006 · RailsConf Europe on index cards, part II

A note to the interested reader: These are the raw notes I jotted down at RailsConf Europe 2006. They are probably misleading, out-of-context and not particularly useful if you didn’t attend the sessions. Nevertheless, enjoy.

Jim Weirich: Playing it safe

  • Are open classes a poor fit for large projects?
  • The Chainsaw Infanticide Logger Maneuver
  • Leeroy Jenkins
  • “Guard against Murphy, not Machiavelli” —Damian Conway
  • use namespaces
  • 10 Node classes on his disk
  • Choose project name carefully.
  • Avoid toplevel functions and constants.
  • lessons from Rake
  • Avoid modifying existing classes.
  • Prefer adding over modifying.
  • When adding, use project-scoped namespace.
  • When adding public methods, ask first.
  • Chain into the next hook.
  • Only handle your special cases.
  • Limit the scope of your hook.
  • Preserve the original behavior.
  • Understand and respect contacts.
  • Require no more—promise no less.
  • Replaced behavior must be duck-type compatible.
  • All in all:
    • Be polite with global resources.
    • Preserve essential behavior.

Why The Lucky Stiff

  • Remove your moustaches
  • Ilias, anywhere?
  • sandbox demo

(unreproducible on index cards)

Hussein Morsy: Database Optimization Techniques

  • 1.5 years Rails experience, PHP before
  • works on a German Rails book
  • overview of his workplace
  • optimizing:
    • Rails code
    • Indices
    • DBMS
    • OS
  • optimize:
    • number of connections
    • transmitted data
    • DB itself
  • read the AR source!
  • AR strangeness (proxying)
  • selecting only what you need
  • preloading children
  • preloading and selecting
  • counting

Dan Webb: Unobtrusive AJAX with Rails

  • History
    • Dark age of DHTML
    • Fixed resolution
    • Web standards arrived
  • Benefits of Web standards
  • Behaviour: View layer among CSS and XHTML
    • enhancing a working app
    • graceful degradation
  • not the Rails way
  • Don’t use <a> with onclick= only
  • http://www.ujs4rails.com
  • Links should not have side-effects
    • use button_to
  • Form.serialize
  • Demo, sneakr.com

Hamton Catlin: HAML

  • “My other computer is open source.”
  • HTML Abstraction Markup Language
  • templating sucks in Rails, compared to the other stuff.
  • Principles
    1. Code should be beautiful
    2. XHTML is prone to errors when done manually
    3. XHTML structure matters
    4. Diet soda can help you lose weight.
    5. Common markup is good.
    6. DIVs are building blocks.
  • Demo
    • indentation matters (ugh?!)
  • no control structures (use partials, arrays)
  • partials are properly indented
  • http://unspace.ca/discover/haml

James Duncan Davidson: The web is a pipe, and more

  • Unexpected things tell us lessons.
  • Cigarette smoke is useful for finding cracks in airplanes.
  • didn’t expect that Ant will turn into a language
  • In the early days, we used FastCGI to deploy.
  • FastCGI turned out to be weak sauce.
  • HTTP is the real thing, stick to it.
  • You learn how stuff works best when you look how it breaks.
  • the simpler, the better
  • Flatten storage and memory
  • Amazon
    • S3, they use it themselves
    • EC2
  • Google: BigTable
  • MobileFS
  • CPU cycles *do* matter
    • more power
    • more energy
    • help save the environment

Dave Thomas

  • This conf had highest four-letter words concentration.
  • thinking about terrorism
    • not about killing, but leveraging fear, making people afraid
    • overreaction
    • fear is wasteful
  • lessons
    • assess risk
    • FUD
    • lately(?), FUD has started about Rails
    • Java is dynamically typed too (e.g. Collections, casts before 1.5)
    • “You can’t possibly use something before it’s being used.”
    • “Every publisher has Ruby books coming out—they’re all copycats.”
    • The opposite of risk is not safety—it’s stagnation.

NP: The Byrds—Glory, Glory

Copyright © 2004–2022