RailsConf2007

Get Started. It's Free
or sign up with your email address
RailsConf2007 by Mind Map: RailsConf2007

1. Friday 5/18

1.1. DHH Keynote

1.1.1. Rails 2.0

1.1.1.1. claims it has nothing earth shattering, just a lot of things better

1.1.1.2. default scaffold includes Restful xml interface

1.1.1.2.1. easily get any format

1.1.1.3. actvieResource

1.1.1.3.1. easily give an API to scaffold

1.1.1.4. loggr in IRB?

1.1.1.5. add logic to single controller and you get it for all formats

1.1.1.6. ActiveWebService is gone, instead use ActiveResource

1.1.1.7. Other allies of rails

1.1.1.7.1. maybe Atom

1.1.1.7.2. maybe OpenID

1.1.1.8. 9 more favorite 2.0 features

1.1.1.8.1. Breakpoints

1.1.1.8.2. automatically bundle your js and css in gzip, big improvement in user response time but you keep well factored scripts

1.1.1.8.3. browswers only open 2 concurrent sessions to the same domain, but theres something to set up spoofing of subdomains to get more concurrent downloads of your "assets" (images, etc)

1.1.1.8.4. query cache

1.1.1.8.5. use erb and/or builder for rss/atom

1.1.1.8.6. configuration is simplified

1.1.1.8.7. sexy migrations

1.1.1.8.8. http authentication

1.1.1.8.9. MIT license assumption

1.1.2. good community support for newbies

1.1.2.1. rubyorails-talk google group

1.1.2.2. irc channel

1.1.3. textmate

1.2. Clean Code, Robert Martin

1.2.1. he prefers RSpec to TestUnit

1.2.2. "Open Close" principle: open for extensibility, closed for modifcations

1.2.3. some IDE's have autotest: constantly running tests as you type and tell you as soon as something is broken

1.2.4. approximate quote: "if you're worried about the function of your code alone, you shouldn't be in the software business"

1.2.5. productivity on a project decreases with time

1.2.5.1. the implication is this is in part because of all the bad code that builds up

1.2.6. Bad code is the hardest thing to change

1.2.6.1. you can change bad social dynamics

1.2.6.2. you can change bad schedules

1.2.6.3. you can change bad requirements

1.2.7. Be a professional

1.2.7.1. Test First

1.2.7.2. Clean often

1.2.7.3. The Only way to go fast is to go well

1.3. Scale Rails Wihtout Bounds on Amazon EC2 Thorsten von Eicken, Gary Burke

1.3.1. My open questions:

1.3.1.1. How do you backup a db to S3?

1.3.2. Common workflow:

1.3.2.1. Load to s3

1.3.2.2. enque items

1.3.2.3. worker leases an item from que

1.3.2.4. worker puts result in s3

1.3.2.5. worker tells que it's finished

1.3.3. RightScale has a little framework which provides an easy place to provide your particular code that does

1.3.3.1. prework

1.3.3.2. your code

1.3.3.3. post work

1.3.4. RightScale archetucture

1.3.4.1. mysql master and slave

1.3.4.2. backup to s3 every 10 minutes

1.3.4.3. daemons (all ruby)

1.3.4.3.1. 3 processes query ec2 nonstop

1.3.4.3.2. 2 processes querying SQS nonstop

1.3.4.4. code deployed with capistrano

1.3.4.5. can be served from s3

1.3.5. xen based virtualization

1.3.6. dynamic dns

1.3.6.1. roundrobin dns

1.3.7. weakpoints

1.3.7.1. DNS

1.3.7.2. vertical scaling of db server

1.3.7.2.1. partitioning of db is very important

1.4. Standing on the Shoulders of Giants Adam Key

1.4.1. "today we stand on each othere's feet" Richard Hamming

1.4.2. usually takes 5x more effort to read code than to write it: improve yourself so it's not quite such a bad ratio

1.4.3. "Protect yourself from yourself 5 days ago"

1.4.4. Topic: How to Read Code

1.4.5. Good code to read

1.4.5.1. xmlrpc4r

1.4.5.2. Beast Josh Goebel Rick Olson

1.4.5.3. authenticate_system.rb

1.4.5.3.1. someone wrote it and it ends up in lots of plugins

1.4.5.4. RAKE

1.4.5.4.1. overloads the language

1.4.5.4.2. lots of blocks

1.4.5.4.3. basic DSL behavior, not really metaprogramming

1.4.5.5. acts_as_versioned

1.4.5.6. class eval and instance eval

1.4.5.7. http://whytheluckystiff.net/

1.4.5.8. pickaxe book

1.4.5.9. RJS

1.4.5.9.1. new ajax way in rails

1.4.5.10. err the blog and the rails way

1.4.5.11. activesupoort

1.4.5.12. marcel molina s3 library

1.4.5.13. capistrano

1.4.5.14. something ??tech?? code by Donald Knuth

1.4.5.15. "Code Reading" book has mixed reviews, he hasn't read all of it yet to comment

1.4.6. Spelunking metaphor

1.4.6.1. keep focused on the task at hand, don't get lost in side channels

1.4.7. Tips

1.4.7.1. 1. Look at url, look at routes.rb

1.4.7.2. 2. Check out controller or skip to view

1.4.7.3. 3. Grok controller filters

1.4.7.3.1. Before

1.4.7.3.2. after

1.4.7.4. 4. Grok controller action

1.4.7.5. 5. Grok any method the action calls

1.4.7.6. 6. Check the template and any helpers it might use

1.4.7.7. 7. filters in app controller and app (something?)

1.4.7.8. 8. observers validation, callback in models

1.4.7.9. 9. know whats in lib and plugins folder

1.4.7.10. 10. method_missing and iterator-defined methods

1.5. Adding Tests to Legacy Rails AApps Rabble Henshaw-Plath

1.5.1. Topic: joining a project that doesn't have testing, how do you begin?

1.5.2. Write tests for bugs that you find, write tests for anything you refactor, and you're good

1.5.3. RCOV

1.5.3.1. code coverage

1.5.4. fixtures are painful, some other possibilities include

1.5.4.1. mocks

1.5.4.2. activerecord fixtures

1.5.4.3. zentest

1.5.5. HECKLE

1.5.5.1. what a crazy idea: it mutates your code on the fly, manipulating the parse tree

1.5.5.2. if it mutates your code and your tests still pass, then your tests weren't complete!

1.5.5.3. ruby2ruby seattle.rb

1.5.6. RSPec....test:unit