Archive for the 'RailsConf 2007' Category

Final Keynote by Dave Thomas

Wednesday, May 30th, 2007

I have to say that all the RailsConf keynotes I went to were good, and I heard that the others were good, too. Is that level of quality sustainable? I hope so.

Dave noted that EuroRailsConf was the most profane conference ever. He thought this was a bad thing.

We all were getting a bit loopy at this point, so my notes are short and fragmented. Here’s what I can piece back together.

Ze Frank talked about what to do when you have many amateur authors. This was an interesting problem that we wrestled with back in the day at Gap Inc.’s intranet. You can ignore them (obvious bad consequences). You can try and control them, but this doesn’t scale. You can shut them down (draconian). He suggests that you instead facilitate conversation. Which sounds fine, but fuzzy now that I write it down here. Should have gone to his talk, I guess.

Dave warned about Cargo Cult programming — definitely a danger in the Rails community. He then listed some assumptions we should question:
– The web browser: it’s a freakin’ full-duplex mainframe terminal!
– Object-oriented programming. The world is not hierarchial, it’s chaotic. Why are we so class-centric? Try to write a program without classes and you might be surprised by how it works.
– Relational databases
– REST

Laying Tracks: How to Contribute to the Ruby on Rails Open Source by Josh Susser

Wednesday, May 30th, 2007

This talk was practical advice on how to do just what the title says: contribute to Rails.

Josh comes from a Smalltalk background. He also worked on OpenDoc, “A technology that no one has heard of it.” You are wrong, my friend — I remember when it was all the buzz at MacWorld Boston ‘96, and my boss was wondering if we should become OpenDoc developers. Ah, CyberDog, we shed a tear for you.

Anyway, Josh now works at Java Card.

The session’s audience:
15% use the Rails Trac
10-15% opened a ticket
10% contributed a patch
5% had patch accepted

Prerequisites for contributing: Rails Trac account, Subversion, subscribe to the Rails Core discussion list.

First steps:
1. Create a local, vanilla Rails projects for this work
2. svn co to vendor
3. Set up tests
4. Ensure tests run

You need to use TDD, follow code style, write docs, write tests, and ensue that the rdoc builds. Use SVN diff to generate patch. Create a Trac ticket with [PATCH] in the subject.

How to get some patch accepted
– Make tiny changes
– Discuss big patches first on Rails Core
– Need good code
– Need tests
– Get buy in for Rails developers

“Get used to disappointment. “There’s a backlog.

JRuby on Rails: A Taste of Honey (for the Enterprise) by Charles Nutter, Thomas Enebo

Wednesday, May 30th, 2007

Here’s a real advantage of a conference over email: I learned that Charles Nutter has an awesome Midwestern accent! I’ve got a whole new voice in my head while I read his posts, and there are a lot of them. Does Charles Nutter sleep? He seems to churn out emails and blog comments about JRuby 24/7.

On to the talk. For the record, I am not sure how I feel about the whole Rails running on JRuby inside a WAR on Glassfish stack at the enterprise data center. Sounds like a tall, tipsy stack of dinnerware to me. But I do like JRuby. It’s been really handy at C o n – w a y for calling EJBs, using mainframe proxies, and running JUnit test suites. And there’s a real possibility that the Java VM could become a great VM for Ruby.

This session’s poll:
25% of the audience are Java developers
25% ex-Java developers
15% ex-Perl users

Who uses which database?
40% MySQL
5% SQLite
10% MS SQL Server
20% Oracle
1% DB2

Why use JRuby instead of C Ruby?
– Unicode support
– Native JVM threads
– The big pain point …

What are the biggest differences?

1) Database support. Ruby MySQL works about the same. JRuby can use JDBC, of course, and JNDI to look up connection pools. DB2 support is not 100%? (Works pretty good for me.) Oracle ActiveRecord tests are not 100%

2) Native Ruby extensions don’t work out of the box. Need porters.

3) Command-line performance because Java start-up time is slow.

Charles and Thomas demoed Goldspike, a way to package a Rails app into a J2EE WAR:
rake war:standalone:create

And they demoed a Glassfish gem! Hm, well, theoretically, if all this just works, it could be pretty cool. Though I dread digging through the stack trace.

RESTful Modeling and Active by Record F. Morgan Whitney

Wednesday, May 30th, 2007

Vonage seems to have done a really nice job of integrating Rails with their legacy J2EE apps (cracks me up to write “J2EE apps”). This talk was somewhat of a rehash of Mapping Rails to Legacy Systems, with more details about the REST bits.

Turns out that Vonage essentially implemented Rails 2.0’s ActiveRecord six months before the Rails team.

Angel on the Shoulder by Jarkko Laine

Wednesday, May 30th, 2007

Another good guy and kindred spirit, Jarkko’s central point was how to build an effective framework for developers. Or, precisely, what are the principles that make Rails’ framework effective? Good stuff, but not enough for a full-length RailsConf session. Don’t mean to sell you short, Jarkko — I’ve spent a bit of time recently building an internal testing framework while using Rails, so maybe the principles feel obvious.

It really boils down to the carrot-and-stick approach: make it easy for developers to do the right thing. And the right thing should be sensible, terse, and as intuitive as possible. The “wrong” thing should be hard to find, documented with warnings and deprecations, and lead to many more lines of code. (This is certainly characteristic of Rails. Whenever it takes me more than 3-4 lines of code for something simple, I immediately suspect that David’s already thought of a better way to do it.)

Carrot: How dead simple it is to write an automated test in Rails
Carrot: All the magic REST methods
Stick: CruiseControlRB

Jaarko says that you should ask: “How does this help the user kick ass?” He’s the lead a developer at dotherightthing.com, and he wrote, “Beginning Ruby on Rails E-Commerce.”

The Business of Rails

Saturday, May 19th, 2007

This was a panel discussion: Joe O’Brien, Nathaniel Talbott, Justin Gehtland, Geoffrey Grosenbach, Robby Russell, Andre Lewis.

When did you decide to work for yourself?
– When CEO decided it was more important to have his boat instead HR staff
– Job ended
– Wanted to pursue music career (Robbie)
– Wanted to write code, and work with Rails
– Wanted to junk the traveling consultant lifestyle
– Wanted to build things for yourself

“Never do fixed bid.”

Companies come to Planet Argon asking for Rails — they don’t need convincing. Other people bid projects in RoR and Java, and let the customer decide.

How to compete with cheap people? How to talk people out of fixed bid? Tailor response to customer:
– Hourly rate or 2-3 month projects ballpark estimate
– Maybe for a big client, you could double or triple your price and do a fixed bid
Talk to client, and if you don’t convince them, bail on the work. Maybe do first iteration at time and materials, and do a bang-up job. If you measure and refine your process, you can do fixed bid.

Words of wisdom: “Can’t rewrite GMail for $20K.”

How many are thinking of going out and doing consulting o your own? 20% of the audience.

Tips

Do marketing via user groups, etc. Getting leads sucks, but sales is actually fun. Don’t be superficial about it. Give back to community.

You can email for a contract template andre@earthcode.com

Employees cost about the same as contractors, but you get more value because of collaboration
Incorporate, fool! So that your personal bank account is not at risk
– LLC or S Corp
– Talk to a CPA
– Need to build business credit history; fix separate taxes.
– Get a separate bank account
– AMEX card and buy something on it every month
Go to a local bank, where they will take your business seriously
– When that $100K check comes in, the banks will put a 15-day hold on it if they don’t know you

How do you manage to only work 40 hours a week?
– You don’t
– Hard to separate work and home when you work at home
– Have to be firm with yourself
– Find an office space

Marching Band!

Saturday, May 19th, 2007

The last talk was interrupted by what looks like a gay marching band with big drums and batons. Awesome.

There are a couple of Google recruiters here: two cute geeky girls in tight Google T-shirts chatting with guys.

I just saw a “I broke the build” T-shirt with a big pointing finger on it. And based on my last work email, I should be wearing it. Sorry, Paul.

Saturday Morning Keynote

Saturday, May 19th, 2007

I became distracted after the first half of the keynote. Here’s what I remembered.

Cindy from ThoughtWorks led off. She tried really hard to throw in Star Trek references and a few cuss word, but occasional corporate consulting speak slipped in: e.g., synergy. 40% of ThoughtWorks’ new work in in Rails. They are building Rails apps for banks, telecoms, newspaper, media companies.

ThoughtWorks is rolling out RubyWorks
– Ruby prod stack (Mongrel, etc. in a package)
– 24/7 support offering
– 24/7 JRuby support
– dev tools and libraries
And Mingle: Agile project management tool. Rails + JRuby.

Tim Bray from Sun did more polling:
50% of the audience work for start ups; 40% for established companies; 10% for service providers.

Ruby was the first web framework for 1% of the audience.

30% of the audience came from Java
20% from .Net and C#
40% from PHP

Mapping Rails to Legacy Systems by Stephen Becker, Devon Jones

Saturday, May 19th, 2007

I liked this talk. A Vonage architect and a senior developer talked about how they use Rails in Vonage. They use it a lot, which gives those of us chained to an enterprise paycheck great hope. This was a nice practical guide on how to intelligently use Rails in an enterprise. Here are the highlights:

You “must transform legacy app into small programs with transparent interfaces.” Change gradually and consistently because:
– People fear change
– Small projects are low risk
– You can adjust course rapidly
– You can show success early and often

Do small programs and projects; use transparent interfaces.

Hand-raising poll!
How many maintaining J2EE systems? 10%
How many hate it? Same 10%

Don’t rewrite: whole-scale enterprise legacy app replacement tends towards bloat. “Like working on a car while traveling at 60 mph.” So don’t tackle them in very small projects. The Standish Group did a survey: large projects tend to fail.

Write small programs. J2EE transforms small apps into one big app (ain’t that the truth!). Instead of reusing code, create simple programs with flexible interfaces.

Use transparent interfaces like REST
– Design for visibility and consumption, inspection, and debugging
– Interface inputs results in a predictable and dependable output
– This allows for easy re-use

How to rip apart the system
– Wrap features in simple RESTful servers
– Create a functional test suite

There are many systems in prod today that no one understands, so you need to identify a choke point for your feature. Start by creating a RESTful servlet that calls down into your DAO or service classes or whatever. Your new shiny Rails apps can call that. Use functional test suite and JDBC logging to map possible endpoints.

How to cope with bad database design? Databases degrade over time, just like code: no documentation; nonstandard database schema.

The speaker gives examples of eight different ways to represent ‘false’ in the same database column, dates stored as text, comma-separated values. The audience thinks this is funny, odd stuff. Look pretty familiar to me!

Did it work at Vonage? Yes.
– Quick time to market
– Maintainable code
– Now have tests
– Reduced lines of code

Where Does Rails fit?
– Rapid prototype
– Mission-typical tasks when performance and reliability aren’t as critical
– Cost analysis: When developer time in more expensive than hardware

Q & A:
Vonage versions their interfaces in their services — the response include the version number. Vonage is developing a RESTful service for customers, so that you could check your voicemail vi a your Rails app.
How do you manage deployment of many small services instead of one big EAR? JRuby
Real business rules are in the old code. When you ask people how things work, they are often wrong.
Sell speed and control over features to management to win their support.

Lessons From The Real World by Dirk Elmendorf

Friday, May 18th, 2007

Dirk, the speaker, is a founder of rackspace managed hosting. They have 1600 employees.

Dirk develops for the enterprise, but he’s not an “enterprise developer.” I.e., Gantt charts, ties, TPS reports.

Three big steps in building an enterprise Rails app:
1. Build a team
2. Build the app
3. Get it to play with others

Build a team

An anchor (someone who knows Rails ) makes it easier.

The Learning Rails Curve
1. Everything is so weird!
2. The “black magic” is annoying. (And scary.)
3. Tasks get done with little code
4. You look up how to do thing in Ruby
5. You realize how much faster they are at building things
6. You stop saying: in Java/Python/PHP, I’d do this …
7. Why didn’t I switch a year ago?
8. On Rails
Payoff is at #8.

More hand-raising polls! Only one person was a Ruby developer before they became a Rails developer.

First rackspace Rails app used to manage Katrina evacuees in San Antonio. Developers always say that we have no time, but they had people getting on evacuation buses before the app was coded. (I think this isn’t the only Rails app that is Katrina-inspired.)

Build the app

“Finish lines are only for consultants and demos.” People depend on your app, and downtime is bad. So you need tests.

50% audience knows what Test-driven Development is. 40% do TDD. The speaker, Dirk, doesn’t actually do it. He recommends rcov to check for test coverage.

He asks: How many of you use IE? Me (Scott) and like two other people raise their hands! News flash from Dirk and me: your users use IE!

Selenium is great, but … if your UI design isn’t set, it will become a huge time sink to keep the Selenium tests running.

Get it to play with others

No app is an island in the enterprise. Integrate early because things that seem easy — are not; and integration takes time to figure these things out. That sure is my experience with Banfield’s WPA project and our integration with Petware 1 and 2.

Integration testing is hard with enterprise systems, and mock objects help here. The rackspace team is arm wrestling over FlexMock versus .

There is nothing that they haven’t been able to integrate with.

gears