Windy City Rails 2014 Notes

These are notes I took during the two days of Windy City Rails 2014 Conference. Since I attended on behalf of my employer, Springleaf Financial, my notes are skewed towards ideas that may be applicable in a enterprise setting. For anyone who might randomly find this post, keep this in mind, as the speakers had plenty to say on topics outside of the enterprise application development domain.

Rubinius X by Brian Shirai

  • Get slides
  • Promises in JS in Rubinius / New Concurrency
  • Logan Note: An article on explaining Javascript’s Promises
  • Ruby functions as first-class functions versus “module_functions”
  • Use dynamic or static typing with static type checking if desired
  • Immutable String Type
  • Clarity in the Behavior of object changes. “to_s” vs “to_str” example.
  • Character encoding standardization.
  • All APIs use keywords, no position-significance

Recommendation Engines with Redis – Evan Light – Rackspace

Devise by Lucas Mazza

Upfront Design by Mark Menard

Legal Talk by Daliah Saper

  • Useful for non-corporate work. Advice for freelancers.

Domain Driven by Yan Pritzker of Reverb

Go for Rubyists by Ken Walters

  • Mostly Go, not much for Ruby/Rails
  • Watch if you’re interested in Go or Concurrency ideas

Local Government on Rails by Tiffani Bell

  • Code for America work with Atlanta and Detroit
  • A discussion on sample projects with government, but no big takeaways for corporate work

Functional Languages with Rails by Sean Griffin of thoughtbot

  • Get his slides
  • IO should always be concurrent
  • Concurrency ideas from Scala could go into Ruby/Rails
  • “Rails API is too far removed from HTTP”
  • “We will break Rack”
  • The Matz Tweet agrees with Sean’s point on future of Ruby
  • “Promises” in JS == Futures in Scala
  • Monadic gem

The New Era of Orchestration: From Docket to BOSH to Cloud Foundry by Dr. Nic Williams

  • Orchestration: Automated arrangement, coordination, and management of complex computer systems, middleware, and services
  • Book Recommendation: The Phoenix Project: A Novel about IT, DevOps, and Helping Your Business Win by Gene Kim, Kevin Behr, George Spafford
  • In his consulting experience, CIO concerns for the next 10 years:
    • Reduce time to value
    • Unify access among applications to all data
    • Mobile access
  • Goals for Orchestration:
    • Deploy Quickly
    • Deploy Framework/Language of Choice
    • HTTP Routing to Web Processes
    • Integrate DBs/Services/APIs
    • Logging
    • Simple, fast scaling
    • Automatic Recovery
    • Package assurance/Version control
    • Reproduce production environment for debugging
    • Auditing who/what did what change?
    • Access controls
    • Internal billing/accounting
  • Orchestration should let you focus on being valuable and engineering
  • Use Pivotal Web Service and Heroku until someone says you can’t!
  • Beware DIY Orchestration: No Unix app for the whole list
  • Orchestration is a system, not an app
    • Docker is good, but doesn’t cover the whole list
  • Where Docker is Good:
    • Package control
    • Process monitoring
    • Port and data binding to host machine
    • Dockerfiles, community involvement
  • Weakness of Docker: Across clusters of servers that change is hard
  • Try CloudFoundry: trycf.starkandwayne.com

Meet the SLAs: Rails at Constant Contact by Dinshaw Gobhai

  • Slides at: http://dinshaw.github.io/meet-the-slas/#/
  • Building for Scale from Scratch
    • Don’t Do it
    • Don’t Over-Architect
    • Don’t Prematurely Engineer
    • Don’t Solve Problems You Don’t Have Yet
  • Measure: Ruby-prof and DTrace for Profiling Apps
  • Rails and N+1
    • preload(:association) – Separate Queries for Associated Tables
    • eager_load(:association) – One query with all associations LEFT OUTER joined
    • includes(:association) – Picks one of the above
    • joins – One query with all associations ‘INNER’ joined
  • aRel Gem
    • aRel on Github
    • Example usage and Youtube video in slides
    • Shows how to do anything in SQL in Rails!
  • Serialization: Skip your ORM
  • include? Causes variables to be downcased!
  • Excessive Logging:
    • Don’t log in loops!
    • Logger messages are generated even if your logging levels mean it isn’t saved! Something to be mindful of if speed is an issue.
  • Use Delete instead of Destroy. Destroy instantiates objects, delete just erases the record.
  • Move “Unique” validation to database, not in models. This uses one less Read to the DB.
  • dgobhai@constantcontact.com

Greenscren: Digital Signage Powered by Chromecast

  • http://greenscreen.io
  • Not Ruby/Rails related, but came out of a hackathon at Groupon
  • Could be useful if we want to have apps or pages displaying on TVs in office

Charming Large Databases with Octopuses

  • If application is read-centric, replication can help you get more performance.
  • Replication: Split up database with master and Slaves. Write to master, read from slave. Balances traffic.
  • Sharding: Take a database or table and split among many physical instances.
  • Db-charmer gem:
  • BUT DB CHARMER ONLY MYSQL AND NO RAILS 4 SUPPORT
  • This is where the Octopus gem comes in: Octopus Gem on Github
  • Provides examples of DB Charmer and Octopus in slides

More TDD by Jessica Kerr

RubyLisp by Dave Astels

  • One of Authors of RSpec
  • bitbucket.org/bastels
  • daveastels.com/rubylisp
  • Scheme for Ruby/RubyMotion
  • Interesting but nothing immediately useful for us

Developing Developers by Dave Hoover of Dev Bootcamp

  • Two Pronged Approach to Growing a Company
    • Hiring Already Great People
    • Training People
  • At old company obtiva, started an apprencticeship program
  • Elements of Good Apprenticeship Program
    • Mentor, Team, Owner
    • Sustainable Ratio of Senior-to-Junior People
    • Culture of Learning+Collaboration > Curriculum: Encourage customized learning
    • In the Trenches: Get apprentices doing real work with team
    • Pet Project: Can fill time if team busy, educational, allows for mistakes
    • Milestones: Keep people on track
    • Feedback loops: Most important, should include pairing
  • Company must support Learning > Demanding Immediate Competence

Cucumber Still Relevant?

  • Answering the question: How Does this legacy app work?
    • Docs?
    • Tests?
    • Cucumber!
  • Scenario/Given/When/Then syntax
  • Cucumber bridge between devs and biz
  • Setup->Action->Assertion
  • A shared language between biz and devs. The language words should be decided by BIZ.
  • I was unconvinced.