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
- Some interesting topics worth reading more on
- But did not use statistical methods
- If we ever had a need for recommendations, we’d probably spend some resources for better models
- List of topics/tools I noted that I was not familiar/hadn’t used for future reading:
Devise by Lucas Mazza
- Discussion of Devise internals and future
- Slides will be on his Speakerdeck
Upfront Design by Mark Menard
- Agile Manifesto Misinterpreted: “Working Software over comprehensive documentation” does not mean no planning.
- Create Sequence Diagrams online tool
Legal Talk by Daliah Saper
- Useful for non-corporate work. Advice for freelancers.
Domain Driven by Yan Pritzker of Reverb
- Bridging Rails Way with Enterprise Logic
- Slides on speakerdeck
- Use CodeClimate to measure your class complexities
- Monolithic app design can be better than microservices!
- Martin Fowler link below
- Separate What the System “Is” Versus “Does”
- Lean Architecture Book
- Data, Context, Interaction OOP Pattern Link below
- Where does business logic go?
- Controller vs Model, Skinny vs Fat
- Martin Fowler in POEAA: “Active Record is a good choice for domain logic that isn’t too complex, such as CRUD”
- Domain Layer: Skinny framework, healthy business logic, no fat
- Jon Cairns link
- 8th Light Blog Links
- A lot of things we already do! Regarding keeping logic in its own classes.
- Domain Driven Design
- Listener Classes
- Good naming conventions inspire ideas for architecture
- clean-ruby.com
- Grape API
- Links:
- Martin Fowler on Microservices
- Data, Context, and Interaction OOP Pattern
- Jon Cairns: Fat Models, Skinny Controller is a Load of Rubbish
- Screaming Architecture
- The Clean Architecture
- Repository Pattern – They don’t actually use this one, but still recommended reading
- Books:
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
- Brian Shirai discusses Promises
- Logan Note: Scala Tutorial/Docs on Futures
- 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
- Get pure JSON out of Postgres using Serializers
- Dockyard Article on Generating JSON Response with Postgresql
- 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:
- http://dbcharmer.net
- ActiveRecord Connections Magic: Slaves, Multiple connections, sharding, etc
- 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
- Get her slides
- QuickCheck- A Haskell Generative Testing framework
- John Hughes on Generative Testing Academic Paper
- Test the API, Not the Implementation
- rantly gem
- Her gem: generatron
- Generators are worth the time
- State why the output is correct
- Fixing the test fixes your mental model
- Why the old methods are popular?
- Anecdotes vs Evidence
- People think in Anecdotes
- Generative Testing provides evidence
- Jessitron Blog
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.