Dave Thomas Closing Keynote

Posted by patjoyce
May 20, 2007

Starts out by thanking Matz.

Would like to see Rails set the standard for integration of people into the communitry. Talking about women, and why there are so few in the industry. Thinks that Rails can help welcome people. Asks for women to trust us a little by clearly participating as women

So far over $26,000 raised for charity thus far.

Challenge: Let’s try to make this the type of charitable donation standard for technical conferences.

Ze Frank talked about Anxiety.

The first keynote was 3 people and a dog. Now there are 1600 people at rails. 2 21 inch monitors telling him exactly how much time he has left. There also is the photographer right in front of your face.

Ze said some deep stuff, interspersed between the discussion of airplanes.

Normally people
  • ignore
  • control
  • shutdown

Ze tries to facilitate conversation. This is what the rails community should do as more people start working with rails. Documentation may be one area to improve.

BC rails requires less effort it makes more apps possible. Opens up programming to new people (designers for example)

Scott Raymond: Orthodoxy and Orthoproxy. Orthodoxy – believing the correct things. Orthopraxy – doing the right thing.

Telling the story of Cargo Cults.

Cargo Cults we are following

  • The Browser – the browser is essentially an IBM 3270 we’re talking dumb terminals Only difference between a browser and a 3270 is that a browser can display better porn. Not just browsers. We keep repeating ourselves. Prediction: 5-10 years from now dominant interface will be thumbs. Need to think of new ways to interact with users.
  • Object oriented Programming – Simula. Suggests that you try simula. It’s called object oriented, not class oriented. Yet we spend all our time working with classes. The world is not hierarchical. There are almost no inheristance hierarchies in nature. Challenge: try coding ruby wihtout classes.

Challenge: think about what we do that is a cargo cult. Why do we use relational DBs? Why are we falling under the spell of REST?

Crowd shouting out: Macs? MVC? Social Networking? Showering? Wearing Black? Mongrel?

Mongrel is a good one.

TDD? Agile?

Not saying anything is good or bad, just saying that you should question.

The content of a conversation is in the focus – Ze Frank

The important thing is that we can facilitate people talking to eachoterh.

Rails: is a tool. OO, REst, TDD: are techniques Gurus: are just insecure people.

It’s not about any of that. It’s about you.

Have Fun!


Impromptu Open Mic (Rails Security: Theory and Practice Cancelled)

Posted by patjoyce
May 20, 2007

Dan Moniz

The speaker is a no show. Aint that about a bitch.

Impromptu Open Mic (I love that you can have a talk cancel and have 20 people immediately ready to talk about something cool that they threw together over the last week. I just can’t get over the energy and ingenuity of this community):

Zed Shaw. Utu

Author of Mongrel. Talking about his new chat project utu which is a replacement for IRC. That is based on hate.

Adding Strong Identity, Reputation, and Retribution,.

The internet right now is like Detroit. The cops are worse than most of the criminals. Going for a Giulani style cleanup of the internet, but he’s not like Giulani.

Is there going to be redemption? If he can set it up so you can work off hate via charity. No love option to prevent bots.

Zed is a pretty amazin speaker.

Treetop

Nathan Sobo

Parser generator – basically parser based on regexes. Runs in linear time. Doesn’t require lexing.

Cool. Pretty clear to read. Easiest parser grammar to read i’ve ever seen.

GPL’d right now.

gembuilder

creates binary versions of gems. Will be on rubyforge soon.

ActiveWarehouse

Research on how to use DWARF algorithm to return answers really quickly. Tree data structure to handle multiple dimensions for tens of millions of rows. Implemented in ActiveWarehouse. What they found out is that Ruby is slow for computation and ActiveRecord::Base is slow, but ruby is so expressive it lets you right the algorithm easily.

embedded_actions plugin

Partials require that you load the data in eac controller that uses it. this plugin replaces partials with a full controller action/view that can be embedded into a page. Makes it easy to cache and invalidate caching.

Available soon at http://nycrb.rubyforge.com

Fuzed

Mongrel is awesome, but sort of a pain to deploy. Writing a system in ERLang that handles that whole stack.. As fast as Mongrel, but dynamically configurable. Been working on it for a week. They’re going to use Amnesia (distributed fault tolerant DB that comes with ERLang) that they’re going to use code.

Integration

This guy heard “we need to talk to ASP.Net and Java” He demos some code really easily talks to them over SOAP and it all worked fine. Rails uses multiple DBs connects to Salesforce.com via WS-*

assert_request plugin

Lets you assert the type of request in controller actions. If you get a request that doesn’t match. They use their functional tests to make sure that actions that they don’t want get bounced. Doesn’t require AR models.


Rubber Meet Road: Working with Designers

Posted by patjoyce
May 20, 2007

Amy Hoy

Designers working with developers. We’re all nerds, but different types of nerds. We think differently.

Designers

Main question is What? they worry about form. they think about purpose (why does it have to exist). what does it do for people on a spiritual way. They worry about context. They only care about what the user sees.

Developer

We’re artists because we’re a little fucked up. code is just our canvas. – Kevin Clark

Question that guides us is How? Worry about connections – how things fit together. Worry about functionality.

Designers should be involved early and often. Even if it’s just you, you need to where a designer hat early.

Where’s the hand-off?

Need to have a feedback loop.

Discussion of different design process.

Ideal is having designers and devlopers meeting in the middle and working on the html/css views together

Start with really low fi sketches through grayscale comps all the way through full color fully photoshopped comps.

How to work with each other. You have to collaborate. Please don’t dictate. This is a big barrier. Telling other people what to do destroys any team dynamic.

Show, don’t tell. This includes technical stuff. Don’t tell your designer how to use svn, show them. Programmers are really good at imagining abstractions, normal people don’t train that part of their brain so much.

Don’t say: Can’t do that. Look for solutions, or explain why you don’t want to do it, and figure out a solution. Everything involves trade offs and designers can’t do their job well if they don’t understand the trade offs. Teach them.

Design is not fluff.

Dig Deeper. Designers need to explain the underlying need, not just the end result that they want. As a developer, ask them.

Rails – programming is hard, especially for the normal people. be kind to non-developers. Rails doesn’t make it harder than it need to be.

ERb is one of the best templating languages. Layouts, views, and partials can be explaind. AR objects can be explained to non designers. Designers can deal with code tags if you explain it to them.

Could be freindlier.

  • Write ruby code for your designers.
  • Create cheat sheets.
  • Write helper methods.
  • Comment the code.
  • Don’t forget to teach them svn

Questions

What about other templating styles like MasterView

She thinks its harder to see what’s going on.

Popular opinion is that there is a big divide between desingers and devlopers? What do you think that Rails does for this?

Ruby on Rails is pretty. It tries to make things human. This is a good thing for designers because designers care about appearance and rails is gordeous.

Where do you find designers?

She is working on a design collective. Note for designers: best way to improve career is to learn how to program a little.

How do you work with clients?

Keep things low fi as long as possible. Lot of interviewing up front. Iterative!

When you work with the client do you bring both developer and designer or just designer?

If they’re not the same person, absolutely. Just don’t let the developer talk too much (laughter0

Getting Real

Good thing to read. Clients don’t ever want to do that.

How about splitting AJAX between designers and devlopers?

Paper prototyping. Got to work together.

Wireframe tools?

Paper and Pen. She uses omni graffle for low fi computer ones.


Scaling Twitter

Posted by patjoyce
May 20, 2007

Britt Selvitelle Alex Payne

Preconceived notions about twitter, because a month ago, the “5 questions” explosion. Didn’t say that scaling on rails is hard. He said that they run rails and scaling is hard.

The story of twitter. Twitter went from being a small side project of ODEO’s company that was the brainchild of Jack Dorsey to the largest rails app in the world. He was fascinated with AIM status messages. Problem was that you had to be in front of the computer. Wanted to bring it to the rest of the world.

Started last march with very little traffic until SxSW last year, where there were visualizers and it blew up. Huge traffic spike. Then there was a lull. Then the media picked up the story and there was a bigger spike.

So… how do you scope for that?

  • More boxes.- still just one DB with master / slave replication.
    • 32 cores of sun machines at joyent
    • 120 mongrels across 19 coress
    • Message processing across 16 cores
    • Jabber across 2 cores.
    • MySQL on one big 8 core box.
    • 16 GB + of memcache.
Why the need it?
  • Average 200-300 connections per second
  • Spiking to 800 connections per second
  • They’ve done 11,000 connections
  • MySQL did 2,400 per second.
  • Alexe (take with a grain of salt) says they have a ton of traffic, and that doesn’t even count API traffic which is a lot of their traffic. API was 20x their web traffic last time they checked.

Memcache is their savior (cache_fu / acts_as_cached)

They use the extended cache_stats plugin to get the stats.

They wrote a custom API caching plugin that is implemented as before and after filters. They are planning on sharing it once they can extract it. The hard part is caching invalidation. They do both time based expiration and event driven expiration.

Denormalize. Lists of IDs and such. To cache lists of ids. this takes a ton of pressure of their DB by preventing them from doing joins. Select from where id LIKE (List)

Showing their code that splits off everything into code. Actually method name is fugly_dist_idx. Replaced with Starling. Is distributed queue written in Ruby. Sat down with Paul (the creator of GMail) and tried to figure out how to make the distributed queue robust in the face of system caches. They were overarchitechting it. How many messages a second? 9. How many in a 6 months? factor of 10. Just pipe it to disk.

They hope to open source their queueing system. It speaks the memcache system. Any language can push to the queue via memcache so you can use any language with a memcache client.

Community

One of their most helpful thing has been talking to the community. You can’t bunker down in your office and go from there. The community is helpful. Talk to them Treat scaling plan like a business plan and you need to get a board of advisors. So many brilliant people in the community there is no way you need to use them.

More thorough slides from another presentation.

Quesitons

Where does the logic live to do event driven invalidation in the cache?

(In Mongrel)

Rails and XMPP integration?

Jabber server, completely separate ciient that they wrote in ruby that processes them.

When do they participate partitioning and how will they handle arbitrary relationships between users?

Users isn’t the key. The reason they haven’t partitioned yet is that they want to partition based on time because most requests are very temporally local. They plan on doing this in the next 3 to 4 months. Oracle does this out of the box but Alex says he’ll eat his hat before he buys an oracle license. So when they figure it out they’ll push it out.

Trying to figure out how to effectively open source things. Trying to be more

SMS gateway? Capacity? do you have to pay per message?

Bunch of companies that do this for you. They use their APIs. Capacity isn’t a bottleneck. They used SimpleWire and starting to use new people. It’s “hella expensive” and the carriers hate you.

What is your business model? How do they plan to make money?

Everyone asks this question. Short answer is Next Question (Laughter). They have some ideas, and brilliant people working on something. It won’t be traditional.

How many eJabberd nodes do they have?

A lot. They beat the hell out of it.

Any trouble syncronizing between ejabberd and rails users?

No.

With all those mongrels, how do you do a deploy and keep everything running?

They want to know from the audience. They push a lot. They do a review and push. If you’re connected when they do a deploy it 500s the users. This is terrible. They don’t have a graceful way to handle this yet. Queue in the mongrels, they were blown away by Ezra’s talk yesterday.

So when you restart do you kill all your mongrels, or do a “rolling blackout”? Questioner’s company does a rolling blackout.

They drop all theirs because the queue is in the mongrels and if they do that then all the queues get filled up. They’ve tried it, but they’ve had mixed results.

Comment on “Twitter is stupid because they don’t do ETags” (Tim Bray called them out in the keynote)?

They do use ETags, but not valid because they have a stamp at the bottom that shows message request time. Web traffic is such a small portion that it doesn’t really matter. Yahoo High Performance group put out slides yesterday that it doesn’t matter.

Wouldn’t ETags help with API Caching?

Only if the client obeys them, and most don’t.

What’s next?

Callback API has a lot of potential. They want to do it, the 3rd party developers want it. Look for it.

We love XMPP and are working with the people in the Jabber community to push it forward. Working with them on some cool new ways to use Jabber.


The Rails Way: Jamis Buck and Michael Kosiarski

Posted by patjoyce
May 20, 2007

The Rails Way

Goal is to describe the code style of rails through some examples.

Skinny Controller Fat Modeler

Common anti pattern is a fat controller. Difficult to test. Common newbie mistake is to equate model with DB table. A model can be anything that encapsulates your data. It doesn’t have to have anything to do with the DB. One benefit of splitting things out are that you can now easily test independently from your controller. Also you can now use the form builder helpers that rails provides.

with_scope antipattern

before_create hook naming

Don’t depend on naming hook methods before_create etc. that is a readability issue. give the method a meaningful name and then use the before_create class method to hook it up.

Association proxies

Code at the level of thought, not DB. example: @john.documents instead of Document.find_all_by_user_id(@john.id)

Apart from the readability benefit there are performance gain because subsequent calls in the same request won’t have to hit the DB.

Routes file

Use map.with_options to reduce documentation.


RailsConf Day 3 Overview

Posted by patjoyce
May 19, 2007

Extra Action Marching Band

I wanted to go to RejectConf or the Pivotal party at Rock Bottom, but I’m just too tired so I’m giving up and going to bed.

But first, highlights of the day:

  • They’re was a crazy ass marching band playing at lunch.(See above)
  • The Sun Startup Essentials Program looks cool, def something I’ll have to check out.
  • The RailsEngine guys are doing some really cool stuff with Xen paravirtualization. I am entirely uniterested in physical infrastructure so I’m really glad that there are people who love it and are producing things that I can just drop apps to.
  • I sort of was in a conversation with Tim Bray! (OK, I wasn’t technically in the conversation because I didn’t say anything but I was standing close enough to the conversation that he felt it polite to acknowledge my presence with eye contact. That’s something… right?)

And finally, a note of thanks. Like an idiot I left my Lockheed Badge and Secure ID token sitting on the chair next to me after the keynote last night. The guy who found it made it his mission to find me and get it back to me. He eventually tracked me down via IRC. He absolutely could have ignored it and left he ID on the chair, or he could have left it at the registration desk. I’m really glad to become a part of a community where people will go out of their way to help someone out like that.


Open Mic Demo Session

Posted by patjoyce
May 19, 2007

MasterView Template Plugin/Gem

We need to work better with designers. Can work with html files that come from desingers that then kick out the rhtml templates and partials.

YikeSite

Simple content Management. Canadian startup. evolved from php to ASP to ASP.Net 1.1 to Rails.

Uses FCKeditor to edit pages. They use liquid templates. Right now primarily for their own cusomers, but they are pushing it out as a public app next month.

Revolution Health Fabric

Revolution pages, personal page creation tool that they recently released.can “clip” parts of pages and can let you syndicate them as well. Uses 5 or six mudlues under the head. Can drag and drop the articles around. Has built in snap lines. Toolbar on the left side. Really amazingly cool. Can do wiki style collaborative editing, can do individual editing. Basically a way to let users create long term pages. Sneezing page ended up in the top 25 of google in a few days.

blog

CnuConfig

Allows you to overlay config files. packaging it up as a gem and should be on rubyforge shortly.

Matchable

Borrows ideas from ML and allows you to do pattern matching.

CruiseControl.rb

Fair to say that original version takes about a week to setup. Shows setting up CC.rb. Takes no time. All you need to do is add a project by supplying the subversion repository. That is crazy impressive.

Pibb.com

Group Discussion Tool around OpenID. Persistent chat. Similar to campfire.

divine caroline

Parker Thompson, Pivotal Labs

Created a CM tool that allows them to build the site. They launched on Good Morning America. They had a perf problem

They wrote a plugin to do distributed page caching. Went from 20 requests per second to 3500 across 3 app servers.

MyWaves

Share, view, and publish apps via mobile phones.

All web interface. RoR mobile interface as well. Created an Auto-Channel for RailsConf and

The MOle Plugin

How to figure out how your users use the app so that you can figure out who uses what. About tracking actions not events. Pretty cool.

Statisfy

Guy from BountySource

Javascript snippet that lets you put code on your website that produces a Google Maps mashup that shows where your hits are coming from in realtime.

Thought of App on Thursday, built on Friday, rented a server on saturday, and got dugg on sunday.


Practical Design for Developers

Posted by patjoyce
May 19, 2007

David Verba, Adaptive Path – Came there to work on measuremap the rails app that got sold to google and just pushed as the new version of Analytics

Slides

We can tell that one site is better than another, but we can’t tell why (This is exactly what part of our conversation at lunch was about yesterday)

Design is important. iPod differentiated on design. not just visual, but interaction design, information design, and service.

successful products depend on both the experience and how well it solves a problem.

old style of design: use best practices” and your own experience until you actually talk to the user.

You must know and design for ALL your users. Put some ffort in up front to know their context, motivations, and challenges.

Use low-fi prototypes early so you focus on interaction not visual design.

JJG has written about the elements of user experience:
  • surface
  • skeleton
  • structure
  • scope
  • strategy

Strategy: what do we want / what do our users want.

  • Know your stakeholders (anyone who has an interest in the project)
    • What do they want? revenue? operations efficiency?
  • Who are your users? Best way to understand them is to talk to them. How do they use it? How do they want to use it?
    • Our users are just like us, No they’re not. Even if you’re a blogger and you’re users are bloggers there are a lot of types of bloggers.

Scope

Draw a line from your strategy to your features. Don’t try to be everything to everybody. Prioritize features by talking to your users. Ask them what they want first.

Select core features – then fulfill by enriching the feature set, then you can expand into new areas.

Use APIs and produce APIs. This means that you don’t have to be everything to everybody

Structure

How do the pieces of the site fit togeter? Interaction Design

Do we do just plain pages? Do we go AJAX?

Think modularly. Want consistency across the app.

About Face 2.0 – Classic of IA design.

Information Architecture isn’t just for sites with a lot of information.
  • Granularity – keeping at the right level of abstraction.
  • Labeling – call things what your users are looking for. “human resources” < “employment opportunities” < “jobs”
  • Consistency – use the same word for the same thing

Skeleton

Four principles of Interaction Design:
  • discoverability – make finding things easy
  • recoverability -actions should be without cost
  • context – a sense off time, place, and meaning
  • feedback – how the system response

You can use these as a generative process. How are we going to make our site more discoverable?

One way to reduce the cost of user errors is to help them not make errors (autocoplete, etc.)

Be careful about performance architechting when doing rich apps.

Context

Classic example is the amazon checkout pipeline (where am I, how many steps are there)

Feedback

Provide Clear Error Messages for Users. Error messages are written for users.

Provide feedback. yellow fade. disable submit button, show a spinner or something. Action at a distance – keep actions relatively localized. if you can’t provide some other feedback. I just handled this in an app I was working on. I’ll blog about that later.

Design is not just cosmetic. But it IS cosmetic.

People have an attractiveness bias. Kennedy v Nixon debate. Radio listeners thought Nixon won overwhelmingly, TV viewers thought Kennedy won.

People make their initial judgement of your site in hundredths of a second – Appearance Matters!

Personality. Flickr is playful. Establish a personality for a site and run with it in visual design, copy writing et cetera.

Non-designer’s design book – great book, i read it last year and immediately made a difference in my ability to layout sites.


Xen and the Art of Rails Deployment

Posted by patjoyce
May 19, 2007

Xen and the Art of Rails Deployment

Ezra ZygmuntowiczEngineYard.com

Founder of Engine Yard.

Deploying Rails has changed a lot over the last few years. Servers change, but the basics remain the same. CGI to Apache/mod_fastcgi, Lighttpd/fcgi, lighttpd/scgi, lightspeed none of them are great.

Mongrel is the way to do rails deployment.

What is Mongrel?

HTTP Server Librbrary written by Zed Shaw.

  • Fast HTTP Paarser
  • Fast URI Classifier
  • Ragel State machine parser with provable correctness

HTTP is a well kown and well tooled protocol, Easier to setup, transparent wire protocol

But Rails isn’t thread safe, so one concurrent request per mongrel.

You can use a bunch of different servers to front your mongrel cluster.

Nginx:

Russian web server focused on performance. Small resource footprint, stands up under the heaviest loads without leaking memory. Killer rewrite and proxy modules. Has an approachable author and growing community.Direct hit to memcache.

Nginx + Mongrel
  • his favorite stack
  • blazing fast
  • flexible and readable config

Gotchas:

  • Buffers uploads so no mongrel)upload_progress. Great performance improvement, but no progress bars.
  • No connection rate limiting for proxy module.

Dropping mod_rewrite, adding httpscript_module that embeds NekoVM directly in nginx.

Perfect Simple Stack:

  • Linux
  • Nginx
  • Mongrel(mongrel)cluster)
  • Monit

Swiptiply: Evented Mongrel

  • Hot patches ruby to Removes Ruby’s Thread’s and Socket handling from MOngrel Core replacing them with an EventMachine loop. So Mongrel becomes single threaded and event driven.
  • Ruby uses green threads which have a huge context switching overhead.
  • Mutex threads are expensive.

Event driven higher throughput because of the less overhead of green thread context switching. I don’t follow all of this, I will have to read up on it.

Swiptiply: Proxy

faster than haproxy. Mongrels connect to the proxy server instead of the other way around. They keep an open, http connection that reduces overhead.

You can start and stop as many mongrels as you want td they get auto configured in the proxy!

The Zen of Xen

Virtualization is the future.

  • Old Linux way wsa dedicated boxes running all services in one big hodgepodge on one kernel.
  • New school is sharply targeted virtualized linux with each VM running just a single tier or service. This allows you to scale much easier, because all you need to do is move VM’s / allocate resources not redo architecture.
  • Don’t think of physical machines, think of the abstraction of the machine.
  • If you have a perf issue you can easily find what service is the bottleneck.

Scaling to multiple boxes

  • Add a new compute node with Xen installed.
  • Pick the services that need more resources and migrate them LIVE to the other machine.
  • Much easier to scale.

Description of EngineYard’s setup. Pretty cool. I don’t know much about that infrastructure stuff so I don’t have much of an opinion.

What you end up with is a Fabric of Computing and Storage. So you get cahing across instances, easy deployment, easy scaling up and scaling down.

Most Rails apps are RAM bound way before they are CPU bound.

  • Rmagick abnd :include are the worst culprits
  • 95% of Rail apps will leak memory at one pint or another
  • He’s talking about lack of tooling to monitor memory usage, I think this is where the DTrace stuff will be awesome.

Friend relationships in social networks are a good example of a w

Rails eats DBs

  • Indexes are your friends learn when and where to apply indexes.
  • Check your logs for the activerecord generated sql, a little optimization can go a long way.
Tips and tricks:
  • don’t ever use file system sessions.

script/runner is crazy ineficient. you don’t necesarrily want to store all of rails in your background tasks. Think about doing it in plain ruby with the db library.

Don’t use script/runner to process incoming emails. Run a daemon in a loop that plls the mail server with net/pop3 net/imap. Otherwise you’ll fork a whole Rails process ofr each incoming email this will NEVER work in a production environment.

Rails lives the 80/20 rule, but if you need that las 20% you need to learn to write custom mongrel handlers. Figure out when optimization isn’t premature.

Caching is the key. You can’t get faster than cached static html Memcache is your friend.Don’t store your whole AR object, just store the attributes hash.

Parting Thought: When it comes to performance test and benchmark changes for yourself to be sure. Trust what people say, but verify it to be safe.

Questions

Is the event driven mongrel available?

Yes, see Swiptiply.


script.aculo.us Inside Out

Posted by patjoyce
May 19, 2007

Nick Merwin

The talk is about getting an understanding of what is going on under the hood in script.aculo.us so that you can create your own effects.

“Prototype”http://prototypejs.org

Some of the best documentation ever.

Default document.getElementById("element_id') is really clunky. Prototype gives us $('element_id') much cleaner.

Parts of prototype tha

  • Enumerables – ruby style enumerables instead of c style iterations.
  • closures
  • Object creation – prototype gives similar to ruby. define aninitialize method that is called on new.
  • Object.extend.
  • Option parsing – pass core

A bunch of various DOM utilities that make changing code much easier.

The Animation Engine

  • time based – given start time and finish time in relation to the browser’s gettime()
  • core effects- instantiated as an object as itself. eg. new Effect.Move
  • combo effects – eg. Effect.Fade, combines other effects into one.

The power stip just crapped out, my battery is dying, and this is pretty in depth code and requires some serious concentration to follow. So no more notes.


Ruby Tooling: State of the Art

Posted by patjoyce
May 19, 2007

Brian Leanord

How’s Neteans Like Rails
  • Free
  • Open Source
  • Plug-in Architecture
  • Large community

Download latest Ruby-only IDE from ther CI server

Or you can download the IDE 6.0 preview (M9)

Daily improvements. They do a milestone every 5 weeks.

Not actually Ruby, it runs with JRuby But configurable to use Native Ruby

Code complete, integrated RDoc. You can jump from controller to view and vice versa. You can also jump directly to the tests via keyboard shortcut.

Can run servers (mongrel or webbrick)

Can run arbitrary generators and get their descriptions in one place from the IDE.

The integrated RDoc and code completion is really cool. I love textmate, but I often wish I didn’t always have to remember the exact name for every single method call. DHH even botched a method name during his keynote yesterday. I don’t know if it would be a good idea to learn rails or ruby using this but I definitely think that there is a huge amount of potential for tooling moving forward. What I’d be really interested in is how they handle figuring out scoping and such with such a dynamic language but unfortunately this seems like more of a commercial than a technical discussion.

It has Local history! This is a feature that I really loved in Eclipse and miss in all the other editors I use.

I like their visual diff.

They have “templates” that are similar to TextMate snippets. They have a bunch, and are planning on cloning all the TextMate snippets.

They have built in regex documentation and builder that is ctrl-space sensitive. They also have one for date format strings. Nice!

Debugging

They have a graphical debugger that is built of of the Fast Ruby Degugger gem. Only works with native Ruby for now, not JRuby. Similar to Visual Studio or Eclipse interactive debugger. Will loook really familiar to any of their users. I think that the irb based debugger that DHH demoed yesterday may be more powerful, but not having to context switch may be valuable. I think that this debugger might be really useful for learning the framework or an app.

Can set breakpoints in view code. Pretty cool.

Can you kick into the debugger from tests?

He thinks so.

Can you run the tests?

Tests are run from the rake task in a console window. Not yet a harness that shows everything green and red or continuously runs them in the background or anything.

They’ve really doe a huge amount of work, but part of what this shows is how little

To-do

  • Rails Console
  • Automated Refactoring
  • Better code completion for rails framework.

Tim Bray Keynote:

Posted by patjoyce
May 19, 2007

Question to start: who are all you people?

A lot of the crowd works for startups, a similar group works for other companies, and a smaller group are consultants.

Most of the crowd came from Java, some from PHP, and fewer from PHP.

Thinks that Ruby is as important as Rails.

What is Sun doing with Ruby?
  • Sun sent them a big old server box to the Ruby 2.0 team for their SVN box.
  • Sponsoring conferences (this one for example) Equipping NetBeans with Ruby and Rails tooling.
  • The example of NetBeans are really impressive. Check out Tor Norby’s blog
  • Hired the JRuby guys. Charles comes up on stage to talk about JRuby.
  • Bringing Cindi back on stage. Why is ThoughtWorks using JRuby? It might help you deploy it, but it will certainly help you sell it.

Hi, the answer is Java. What was the question? – Sun for the past 10 years

Trying to change the dialog. Sun is doing this to move Servers, OS, etc.

Identity management is an area that needs a lot of work. They are doing a Rails attachment for Sun Identity Sever.

Decisions that drive growth are not made by CIOs. It is the developers who have slip things in the backdoor that actually work. Any tech company needs to know what those people are thinking if they want to know where the market is going.

That’s why we love you? We’re greedy.

How do you make money off free?

  1. Adoption – If people don’t use it, you can’t make money on it. Adoption is about removing friction. Dropping the payment step greatly reduces that friction.
  2. Deployment – After they get it, they have to start using it. It is not until after this that users get value
  3. Monetization at the point of value – Hypothesis is that no serious business will deploy a serious app without support. If you believe that then you want to remove all friction at the beginning of the process.

Talking about London trip served as Web 2.0 “ambassador” to big investment banks. CIO / Strategist groups see that structure of information dynamics are changing. Got some traction with those people.

Had a tougher sell to the tech people about their rails. His argument was that Rails isn’t going to run the world, but it is going to change the way that all existing frameworks are going to work. So much money at stake, their can’t ever be down.

Let’s assume that Rails succeeds beyond our wildest dreams. Everyone uses it. New problems.

Namely, Java will never go away. PHP willnever go away. COBOL will never go away. The network is the computer and the network is heterogenous so we need to work with interoperability.

One option is to run on the Java platform. MOst of what we sneer at when we sneer at Java is the Language. But the JVM is great, and there is a lot of good, well documented code. Ruby needs to improve its documentation. Security is a benefit. Wide collection of APIs. There is a huge community of people who use it. Wrote the APE in JRuby because there isn’t a Relax validator in Ruby but there is in Java.

The answer to integration is REST. In practical terms when you talk about doing REST you talk about doing the web style. Architecture of the WWW Volume One is a good place to learn.

He is really escited to see the new caching focus that David talked about.

ETags

Less than a quarter knows what they are.

The idea is that you can send a signature. So you send a digest and don’t necessarily have to pull the whole thing back. Rails doesn’t do ETags very well bc they recomopute the whole page, so it saves somoe bandwidth, but doesn’t save the CPU. To do better we’ll probably have to save the tags in the DB.

Atom Publishing Protocol

Atom is REST.

Atom is simple enough to go through in the next 15 minutes.

Slide detailing the process.

Interoperability is coming along.

Rails resource flavor is very similar to the Atom protocol. Dream of the Atom protocol is that Everything should have a PUblish button. Every email client, every spreadsheet, every phone, every camera, Everything.

Is REST all there is?

WS-* 36 specs ~1,000 pages total. Thankfully crack’s are starting to appear in the future. WS-* sucks, who doesn’t know this, But it won’t go away entirely because of WCF. Everyone needs to integrate with Microsoft, so you’re going to need to have support for it around.

Tooling is important. Advantages to IDE are incredibly important.

It is fair to call a language where you can’t write the standard libraries in that language to be a “toy language”

Conventional wisdom: *Java performance, tooling
  • PHP scaling, ease of use
  • Rails – Time to marke maintainability

He argues that time to marke and maintainability are the two issues that really matter.


RailsConf Day 2 Overview

Posted by patjoyce
May 19, 2007

What a day. I’m glad I am taking notes, because this morning’s sessions fell like they were weeks ago.

Notes on the day:

  • I met Martin Fowler !!! Unfortunately, by met I mean to say that i walked up to him at lunch and stammered nonsensically for 30 seconds about how much his writing has taught me and how grateful I am. He was nice and very gracious in the face of my complete failure at intelligent speech. Next year I swear that I’ll have something meaningful to say to these people who I admire so much.
  • Ze Frank was consistently laugh-out-loud funny. But at the same time he clearly has a better feel for this whole web 2.0, user generated content, “i knows me some ugly myspace” than pretty much anyone.
  • The Amazon S3 BoF I just got back from was really interesting. The amazon evangelists were ok, but Michael Winser from pi really stole the show. They are developing an app using EC2 and S3 for their complete hosting infrastructure and it sounds like they’re doing some really amazing stuff with the AWS. I’m going to have to do a post at some point comparing EC2 / S3 and Joyent’s accelerator. My gut right now is that EC2 will be infinitiely scalable and probably cheaper in the longrun but will require more work, Joyent’s will be easier to get up and running and more importantly will provide you with their expertise in scaling out apps.
  • I sat at a table at lunch with Dr. Nic I didn’t say anything while he was talking, but learned a bit by listening. After he left I talked to Michael Kovacs the co-founder of PitchWire about their business and general design, usability, and other stuff for a while. There was another Dutch developer we were talking with who I think was friends with Dr. Nic and had breakfast with Martin Fowler so I imagine is pretty involved in the community, but I forgot to get his name.
  • I suppose I am owed a slap for not succeeding in finding dinner companions. But I still feel good about the number of people I actually talked to so I don’t think I deserve it.
  • The musical performance between keynotes was incredibly nerdy but pretty funny.

I can actually feel my brain expanding. The last time I felt like this was the weekend in Spain where I finally crossed from “I’m learning Spanish” to “I speak Spanish” I’d studied Spanish since I was in 5th grade, been there for about two months, lived with a Spanish family, and took University history and linguistics courses in Spanish. But I had an American roommate, and also knew a bunch of Americans socially so I still spoke English every day. This particular weekend every American I knew happened to go away. So I hung out exclusively with Spanish friends and from Thursday afternoon until Monday morning I neither spoke nor heard a single word of English. The whole time I my head felt like my brain was reshaping itself and at the end of it I spoke Spanish.

That’s what I feel like now. I don’t expect to have the same mastery of rails at the end of this weekend that I did of Spanish at the end of that weekend. Still I think that this is an extremely important step in the right direction.


Ze Frank Keynote

Posted by patjoyce
May 18, 2007

Ze Frank on Stage

Chad Fowler intro: talking to Ze about the conference he was expecting goofy, but talking to Ze was like talking to Malcom Gladwell.

Opening joke “you know what sucks is that my talk is word for word the same for Avi” (laughter)

How do you have a talk at 8PM? It’s like they adjusted to programmer time.

God damn he is funny. I’m going to stop blogging and enjoy it.

You have nothing to fear but fear itself. that’s recursion! you have infinite fear.


Avi Bryant Keynote

Posted by patjoyce
May 18, 2007

Ze Frank on Stage

I need to learn Smalltalk. Avi seems to be one of the smarter people I’ve ever seen speak.

I don’t come from the outside, I come from the future – Avi Bryant (received with laughter)

Avi Bryant is much younger than I would have thought.

Ruby in 2025
  • Fast JIT compiled VM
  • Multiple commercial Ruby vendors
  • Best way to predict future is to invent it.

He’s not talking about Ruby in 2025 he is talking about smalltalk today.

Ruby and SmallTalk are the same language. Slide of Urdu and Hindi of the same phrase. Writing is different but they are said the same way and mean the same thing. People who speak urdu and hindi can talk to each other and apart from accent not know that they’re speaking “different” languages.

Ruby community can treat smalltalk as alien technology that we can learn from.

Ruby’s features make it inherently slow: false. True 20 years ago but we solved that problem

sun started strongtalk bought it all back and turned it into the JVM

And this is one of the greatest tragedies of the technology world.

Does performance matter? twitter cares, the rest of us don’t. ruby is fast enough. but there are other reasons to want fast implementations. Namely we want to be able to write ruby in ruby. Right now too much of the stdlib is written in C. (Note: there was a great blog post a while back about why it is important for a language to be self compiling a while back)

What if your Ruby ObjectSpace were transactional and persistent, could be distributed, wasn’t limited by memory, with no restrictions on what type of object (threads, etc.)

GemStone does this for SmallTalk now.

Objects get better with age – big difference between rails and seaside, in ruby you use objects for milliseconds. in smalltalk you keep them around for a really long time. A lot of the work is in creation and deletion of objects, if you get rid of that then you have a much better ratio.

State is your friend. In web development we work on making web apps stateless. If you embrace state then you can do a lot of amazing things, you can have a paradigm that feels like desktop gui programming.

Questions

Is SmallTalk good at interacting with the rest of the system?

If you use a smalltalk environment you are giving up textmate, svn, grep. You don’t work with text files, you work with objects. It does not integrate with normal dev process. Can you call out to C or environment? yes, but he likes ruby api for extending C libraries better. The bulk of DabbleDB is in Smalltalk, but they use http to call to ruby to handle some integration.

What is the first step to having turtles all the way down? (pure objects)

Implementation of the Ruby Standard Library in Ruby instead of C.

I agree they are similar. It seems like there are significant differences (mixins, multiple inheritance, argument passing, etc)

He thinks that Ruby can be implemented on a stock smalltalk VM. He’s implemented ruby mixins in smalltalk as an exercise.

Could you run us through an example of how you develop in Squeak? How do you cleanup when you have messy data without control-c and starting over?

He brings up a smalltalk image (think core dump of irb session) of dabbleDb. If you don’t save, you can go back to a fresh memory DB. He keeps a DB instance in the smalltalk image and he can just reset the DB. “So your objects may get screwed up, but you through them away”

What about Rubinius?

He thinks that it is great that there are all these implementations going on, but commercial smalltalk vendors have spent a whole lot of time and money to get really optimized VMs.

Rails seems to be moving away from object systems towards loosely coupled interfaces?

He agrees that Rails and Seaside/Smalltalk have very different philosophies. But he thinks that it is a good idea to see what other dynamic languages (smalltalk) has gone. If you reject that, cool, but you should at least know what is possible. He is opinionated but with different opinions than rails.

Seaside was a tough sell to ruby and java people until I showed them the debugger in seaside. Demo it

You get a stack trace in the browser, but if you hit debug, you get a debugger in your image. You can edit the method in the debugger an save it, then hit proceed in the browser and finish the response. Similar to the irb command line debugger David shows this morning. Continuations let you hit back and go back to the error that you had before. I’m describing it poorly, but that is one of the best things I’ve ever seen. You can run the debugger or class browser in the browser.

I know a lot of SmallTalkers who are glad to be off it because of image based development and collaboration

It did suck. First thing that he did when he got his first consulting gig was to write his own version control system. Similar style to Git other distributed version control systems.


Steven Smith Keynote: "Enterprise" is not a four letter word

Posted by patjoyce
May 18, 2007

Steven Smith of FiveRuns

Is Rails ready for the Enterprise?

Is the Enterprise ready for Rails?

Rails is becoming the certer of an evolving exosystem. Example, last year there was no exhibit hall. This year the conference has tripled in size and there are a fair amount of companies in the exhibit hall.

He’s talking about quotes from various magazines, uptake indicators (1 mil downloads, 700,000 in the last year) Big name companies using rails.

Notable tools built with rails: 37signals, 43things, jobster, Revolution Health.

He argues that Enterprise isn’t a four letter word because it is a validation of the adoption of rails.

Ever popular monty python killer rabbit sketch. Rails being the rabbit, knights being the enterprise / enterprise web frameworks.


Mapping Rails to Legacy Systems

Posted by patjoyce
May 18, 2007

Devon Jones, Architect of Web Systems, Vonage Stephen Becker, Developer, Vonage

They’re going to talk about the way that they have integrated with their legacy systems.

Rails at Vonage
  • Subscribe System
  • VFax
  • A bunch of internal things like Metrics Mole to show business people decision so that they can
  • RESTful services

Last year facing a software crisis. Rapid customer growth led to software developed quickly and crufty.

Large projects are a problem. They try to do small programs and projects, deliver on the order of months not weeks, and have 1 or 2 features per app, with transparent interfaces so they can chain them together.

When you have a system that is hard to change eventually you decide to replace it. Traditionally you go with a long project trying to replace the old one and owing to scope creep you end up trying to do to many things. (Sound familiar to anyone? PAS?)

Working on a legacy system is like working on a car while it’s going 60.

He is citing the Standish Group study. This has got to be the most cited study ever.

Change gradually and consistenly because people fear change, the smaller a project is the less risk there is, allows for rapid course adjustments, and it shows success early and often which helps sell stakeholders.

He just quoted ESR from tAoUP which is funny because I was thinking how much what they are describing sounds like the unix way.

Forget code reuse look for program reuse. Simple, transparent interfaces like REST (or unix pipes) make it easy to debug, test, and chain programs together.

Ripping apart a lafre legacy EJB system.
  1. Find what specific feature you need\
  2. Wrap it in a RESTful interface
  3. create a test suite for that RESTful interface.
  4. Implement the RESTful service outside of the legacy system

Suggestion 1:

Use the system. See what features / services are used. Step through in a debugger until you find where the real logic is.

As soon as you find it drop a RESTful service around it and then you can build the rails front on that.

Now you can make the legacy code use the RESTful service.

Now you have enought understanding to build a Ruby functional test suite for the RESTful service. U

Use the functional test suite and JDBC logging to figure out what is done in the old DB.

Now you can tun off the old code. The rest of the legacy app is still there and is still crap, but represents future targets.

Active Record in Legacy DBs

  • Database Degradation
  • Documentation
  • Nonstandard DB schemas
    • 8 different ways to represent false in the same column
    • terminated spelled 6 different ways in the same column
    • Dates stored as varchars
    • csv data in columns

You can define custom module methods to fix this. Exclude columns

User Interface Integration
  • Transparent Proxy: Noodle, Transproxy and Squid – Less legacy change
  • Single Sign On Keys – Alternately you can use SSO keys. – More legacy change

It worked at Vonage. They get more maintainable code out quicker, it’s well tested and has much fewer lines of code.

They repurpose old data. They have project tracking tools, test harnesses for java code written in rails,

Where does Rails fit?
  • Rapid Prototyping. You need something small and quick this is the framework.
  • Mission Typical tasks – Applications that are a little more forgiving, not quite “mission critical” things
  • Cost analysis – Development time vs. hardware. Hardware is cheap, developers are expensive.

What are they working on: composite keys

Resources

Questions

What do they do with their DB?

What they try to do is create clean services, then when all DB clients are using the service they can clean up the data without fear of breaking existing apps.

In terms of risk management, does the slow migration force your hand in terms of design?

A little, you have to maintain compatibility with legacy services.

Are they working on a API. eg. can we get access to our voicemail

They’re working on it, but management isn’t sold quite yet.

How do they do SSO?

Most solutions aren’t very cross language / platform. They rolled their own. Simple, textual interface.

From a deployment operations perspective how do you deal with the many small apps?

Take a look at JRuby. You can use your existing deployment strategy by using WAR files. If you don’t want to push to J2EE. Use Capistrano.

My take: Automate everything and I imagine that you’ll be fine.

When a Rails app shares with a legacy how do you use fixtures?

His opinion is that you shouldn’t use fixtures for testing. He is in the mock camp because he doesn’t think that a fixture based test isn’t a unit test. If you want to use them have the DBA create a separate schema with the same structure but no data. Developer: suggests kissing DBA ass.

A lot of the issues with legacy work are building relationships and bringing people who control the legacy systems don’t want them to change.

Do you gather business rules or reverse engineer?

The code is the business rule. People get confused about rules, the code doesn’t.

How do you maintain business owner interest in infrastructure improvement?

Deliver early and often shows real benefit. Once you can show them that they can get features they want quick they won’t go back. Projects like this thrive on agility. They use two week development cycles. Ability to readjust priorities is a huge win.

Is there an online communithy around these issues

Enterprise Rails Yahoo group??


Lessons from the "Real World"

Posted by patjoyce
May 18, 2007

Dirk Elmendorf, Cofounder of Rackspace

This presentation was a bit basic but I think that it is a great description of how to get a team of “normal” developers working in rails. It strikes me that a lot of things that they do “aren’t the rails way” but it seems to work for them.

Twitter faces capacity scaling. Not easy, but not interesting to him.

He does internal apps. Growth limited by size of company.

Building a Rails Team

  • Having an anchor is important. They didn’t have enough, so they cheated and hired ThoughtWorks
  • Buy the book , read the book, learn it as a team. Gives some shared experience. Rails is a DSL for web apps. Since you’re already a developer learn Rails first, then dive into mastering Ruby as you go along.
  • Introduce advanced topics over time. KNow your team and its limitations. Don’t throw metaprogramming at newbies.
  • Names are important, things have a place (convention over configuration) spend a bunch of time teaching the team this. Make sure they get this.

First App Safelist was built for the Red Cross to provide a place for them to organize the 10,000 Katrina evacuees in San Antonio. Time was short. People were on buses on their way to San Antonio. Only one person knew Rails at that point. The situation was special, because they were reuniting families and such. But the lessons weren’t special. The same patterns have repeated for other apps.

Building the App

We all think about our apps as our babies and we want to get to the finish line. Finish lines are only for consultants and demos. All successful apps evolve. If you screw around you end up with an app that is a nightmare. Changes have consequences. Downtime is important to avoid. Testing is the tool that helps to alleviate that pressure. Tests are a safety net that answer the question: Does it still work?

They support a number of apps and don’t work on all of them all the time. Tests help you get back into an app after a layoff. Tests are interactive documentation. Tests enable change. By having that net they show problems that pop up in another place and gives yo a chance to fix it and fix it before anyone even knows.

rcov is a coverage tool that will show you how good your test coverage is. They’ve learned that if your coverage is < 75% then you really need to do manual testing. If your coverage is perfect you still need to test.

Supporting IE. Use Selenium to test the UI in the browser. See my notes on the first morning session. Delay selenium usage until the UI design has stabalized because selenium tests are very closely coupled to the app.

Another App: Sensei. Performance evaluation tool. Two weeks to build it to avoid another year of paper process. Had to work and be secure because private information that. How do you verify that? Testing. Roled the app out right before RailsConf last year. Changed the app a lot over the last year. Added collaboration so that multiple people can review employees and made sure that they could still audit the security.

Playing with others

Cardinal rule of enterprise: no app is an island. Integrate early. Sometimes things seem easy that aren’t.

  • SOAP wasn’t seamless when connecting to Java CRM. They had to get the head of the SVN trunk for Ruby SOAP. This proved to be a hard thing to track down.
  • LDAP Authentication – They built out a custom LDAP plugin. That way all their apps can use it and it allows for really clean code sharing. By segmenting from the app, it removes the temptation to code to the app.

Testing with integration is hard. This is where you do mocking and stubbing. They use both flexmock and mocha. They will arm wrestle to choose at the end of the conf.

  • XMLRPC with a python app. Blew up on mongrel. Content length was being sent twice. They monkey patched the bug so it would work after submitting it to the Mongrel project. You want to standardize the location fo this type of change. Make sure that something nonstandard like this is really clear. They created a dir called app/core_ext
  • WS is just a function call across a network. so it really isn’t anything like a function call. They aren’t reliable. They added a bunch of code to handle edge cases. They’re setting up a message bus. ActiveMessaging on top of ActiveMQ??

Final App: IP Space Commander Manage > 200,000 IPs and many multiples of that of private IPs. Obsessed with IP blocks. Doesn’t do anything else. Has to integrate with CRM, Ticketing, provisioning, authentication, etc. They are buildig a collection of apps where they have to integrate smoothly. They go with a message bus.


How to do REST right

Posted by patjoyce
May 18, 2007

Scott Raymond, works on BlinkSale

Had to stand for the first half of the talk so no notes. I’ll try to braindump them later. Hopefully the slides will be up, they are really good.

He started off with a discussion of what REST is and isn’t. Simply put, it isn’t the specifics of any given implementation (even HTTP) What it is is an “Architectural Style” so a level of abstraction above a specific architecture (like web architecture which in turn is above implementations like HTTP) but below straight communications theory. Simply put, I would describe REST as “the way the web is intended to work”. There are better discussions of what REST is and isn’t than I can provide elsewhere

How do I do partial updates? Essentially it’s a scoping issue. If all you want to do is update the first name for a person object that lives at http://site/person access it at http://site/person/first_name

I’m special; I need more than the GET/POST/etc semantics. – No you don’t. Anything can be modeled in this way. It may not be the best, but it works.

How should I do authentication? REST people generally frown on cookies. Normal auth is based on cookies. The problem is that application state now lives on the server. Individual requests aren’t self sufficient. This creates brittleness (can’t restart everything without dropping session information) hurts caching / replication. Next idea is HTTP Basic – problems: UI sucks, security sucks. HTTP digest: improves method, but sucks. Best of both worlds, put the session em in the cookie. Good UI, requests are still self sufficcient.

Should content type go in the url? last year the idea was that this is dirty. but if you do this then you can’t link. Rails is famous for being opiononated which is great with internal but not for UI. URLs are UI think for yourself. don’t blindly follow “the rails way” for UI.

Reliability in REST? Fans of SOAP will criticize this. Since 3 of 4 http methods are idempotent they are reliable. POST is a little harder. He does this by dividing POST into two steps. POST first to a factory method that gives you a new URL. Second phase POST to the new URL. If first request fails, you can keep trying until it succeeds. If you fail at the second phase you can post until it succeeds or you have a url you can test against. This is an imp;lementation of Two Phase Commit (here is an article I read a while ago talking about situations where it might be a good idea NOT to use two phase commit)

What about transactions? Same answer as the last one. This is really a scoping issue. Solution is to come up with a name for the specific transaction.

What about concurrency? Use some sort of etag??? that represents the current version of the resource so the server can detect and attempt to update a stale version of the resource and reject it

Multiple representations wit the same media type? Danger is that with you can’t add another representation. First look to use a specific, not generic media type. Hence, use atom not xml. Rails answer is to use a new URL

How do I do asynchronous ops like notifications? Polling is one way. But this is something that we need to put some information into. Register a URL to twitter event so that they post to that url. That way we don’t need to poll. That’s a really cool idea and shouldn’t be that difficult to implement.


Full-stack webapp testing with Selenium and Rails

Posted by patjoyce
May 18, 2007

Alex Chafee and Brian Takita, Pivotal Labs

slides

They’ve done 15 ruby on rails app in the past 18 months.

Selenium scripts the browser (Mozilla, Safarie, IE) so it allows you to test the whole application. The use Selenium RC that lets you automatically start / stop / control any supported browser that allows you to do cross browser testing in one test run which is useful for CI.

What you want is a whole lot of unit tests (Test::Unit / jsunit) and a few integration tests (Selenium) that test the whole thing.

Demo of them running their selenium tests that are integrated into their rake build. Selenium lets you test AJAX / DHTML stuff.

Selenium IDE is a firefox plugin that lets you record selenium scripts by clicking through your web app.

You can write selenium tests in an internal Ruby DSL! You can also use Java, .Net, Python, Perl. Because you’re writing in ruby you can access activerecord objects, etc as well. You can stub email by using action mailer.

Don’t forget to extract common actions into a DSL (eg. login, logout) You can provide QA with login_as_user, login_as_admin etc and then they can either write low level (click on this button) or high level actions. This makes tests a whole hell of a lot more legible, debuggable, and generally easier to work with.

Showing the architecture of the Selenium RC Architecture. It is a bit complicated, but I imagine that it needs to be to pull off everything that they are doing.

Question: Can you only use Webrick?

No, they’ve used Mongrel before, but it doesn’t have a huge perf impact. Yeah, it’s not the exact same production stack, but that is by design. They want to be able to load fixtures and stub email, etc.

They have a virtual farm of parallels instances running on a mac mini that lets them do Unix, Windows, Mac Safari, Firefox, IE. Idea is to let them have there

Because AJAX and DHTML are asynchronous and dynamic they are hard to test. The way you do it is using wait_for (which runs in ruby) and wait_for_condtion.

Good slide showing the types of different tests. You only want a few Selenium tests. Why? they are slow, and they can kill CI. You do want to use it because it is incredibly powerful. They’re experience is that integration tests are the most important. It is a good idea to have a smoke test, just makes sure it doesn’t blow up. Even a single selenium test that walks through the whole app doing just the nominal case can have a huge test. Don’t use for every edge case.

To counteract the speed issues, break into two suites a slow suite and a fast suite. So run the fast suite before checkin, but kick the slow suite in the CI. so if something in the slow suite breaks you’ll know in the hour.

Selenium tests are less DRY than unit tests just as unit tests are less DRY than prod code. Selenium tests are supposed to exactly mimic user interaction.

Questions

I appreciate the value of this in a large team. Do you recommend this for a small team?

Still recommend Selenium RC so that you can do cross platform testing. Also it lets you write your tests in Ruby. Can still be add a lot of value for a small team.

Pros

  • Top-down
  • Test passes features done

Cons

  • Brittle
  • Slow

How to get started?

OpenQA. Documentation will be improved as they open source their rake tasks.

Can you script x/y coordinate clicks to test Flash?

Yes. Testing Flash with Selenium is apparently a huge pain.


DHH Keynote - A Peek at Rails 2.0

Posted by patjoyce
May 18, 2007

Crowdshot of the Opening Keynote

Starting with a story about textmate. He liked the mac, but hated all the editors, so he got involved with textmate and helped it come out. Same thing with Ruby he liked it, but didn’t like the web stuff and that is what led him to do rails.

What we have:

  • Plugins. Hundreds of them. Original implementation was just 5 lines. Rails coders aren’t just users, they are participants and plugins is one of the best examples of that.
  • ~10K people on rubyonrails-talk big community. For the most part helps new people out. IRC channel also is useful.
  • Commercial opportunities. Funny job advertisement asking for 3 years of Rails Experience which is a year longer than the framework has existed.
  • Number of books both in English and in other languages (6 japanese, french, german, portugese, etc.) Example of the breadth of community.
  • Tooling – a lot of really cool stuff coming out: netbeans, aptana, jetbrains, codegear, etc.

Rails 2.0

Not going to change everything. It is relatively humble. Not going to talk about a single bomb dripping idea because there is so much to catch up on.

Last year talked about a world of resources. The experiment worked. RESTful development is getting more popular and those who tried it love it.

Rails 2.0 will focus on RESTful principles.

Example of a create method responding to three different formats: html, xml, and javascript. The ActiveResource stuff really is beautiful, I’ve thoroughly enjoyed playing with it.

95% of what he shows today, works today.

Routing – Adding namespaces to routing. Idea that single resources can be represented in multiple ways.

One of his original concerns about REST was that it turned routes.rb into a form of configuration files ‘It’s not that I don’t like config files it’s that I don’t like config files that make me configure things I don’t care about it”

Demoing creating a new address book web app free. Rails 2 scaffold is the resource scaffold. Default UI is exactly the same as the old scaffolding, but it is different under the hood. Default now has complete xml restful implementation for free. Demo showing adding csv representation. Format representations can be added without changing anyting other than the controller code. He forgot a render directive in the code and it blew up. Laughs as he tried :render => :string and finally :render => :text to get it to work.

Opens up irb and demoing the power of ActiveResource. Pretty much the same interface as ActiveRecord, but going out over the network to get the info.

What if my app isn’t just CRUD? What if I want to do search? Showing adding search to the REST index operation. Pretty cool. After adding search to the controller you get it for the other formats for free.

Who uses it? Public Highrise API 22 of 24 controllers on highrise work. they have an action with 6 formats., shopify marketplace has an internal restful api, fluxiom, etc.

What about Active Web Service? No longer bundled with Rails 2.0. Rails is not Switzerland, it has an opinion whether it be on how you should structure your DB and how you should wire up applications over the web and it isn’t SOAP. you can still use Active Web Service.

Friends:

  • Ajax!
  • REST!
  • Atom? Getting as fundamental as HMTL to support. Trying to figure out a way to make it native to rails.
  • OpenID? Hugely interested in it. There is a plugin. It isn’t quite to the point where support is a must.
9 Other Things I Lkie About Rails 2:
  • Breakpoints are back (applause) Fixed the bug that breakpoints depended on in Ruby 1.8.5. New debugging library integrated into rails 2. Just write debugger where you want to inspect and it dumps you into irb when it hits that. full access to all your models. You can introspect the call stack, go up, down, backtrace, etc. That is freaking cool.
  • HTTP Performance – For a long time he didn’t think it matttered. Bandwidth is plentiful, it won’t matter. Wrong. It does. If you factor out jyour js and css you have a huge amount of files. bad for performance, good for understanding and structure. Needs to be that way in development, not in deployment. <%javascript_include_tag :all, :cache => :true %> wraps all in a single gzipped call. Awesome. Thought that the big performance problem were action responses. Twitter taught that it was http performance. Two connection HTTP connections per host is a huge pain. One line to add 4 subdomains to structure for all images etc. I had to try to handcode this in ASP.Net at lockheed and it was a massive pain. This is awesome.
  • Query Caching – improved query cachiig based on checking if the SQL is the same. completely transparent.
  • action.mimetype.renderer – index.html.erb instead of index.rhtml decoupling response type and format.
  • environment.rb clean up. split up environment.rb into multiple files to be cleaner.
  • Sexy Migrations – declare type frst (t.integer) instead of name first (t.first_name) This reduces duplication.
  • HTTP Authentication – He used to poo poo it for html apps because it sucks for gui apps. But it is awesome for computer apps. Works great for APIs. Showing example using different types of authentications
  • The MIT assumption – plugin generator now defaults to MIT license. if you want something else, fine, but you have to change it. He loves the MIT license, so do I.
  • Spring cleaning – dropping a lot of things that were deprecated. Moving some things out of the core and into plugins.

That’s it. Good talk. Time to figure out what sessions I’m going to go to. The slides will be up after the conference is over.


Chad Fowler Introduction

Posted by patjoyce
May 18, 2007

Chad Fowler’s intro: wants to set the focus of the community. Specifically he wants to reduce the arrogance. Using the pragmatic guidebook as an example, they raised of $12,000 dollars for charity yesterday. You can donate here.

The biggest success of rails is that the community has an impact on the way that people think beyond the actual adoption. Do we want the world to say “look at those arrogant shitheads, or look at those people who are really changing the world?” You can change the world with rails. We’ve got power, we’ve got passion, and we’re really friggin smart (that’s why we’re arrogant) so lets do something with it instead of just pissing people off.

Now he plays the Eukalele while DHH is introduced.


RailsConf Day 1 Overview

Posted by patjoyce
May 18, 2007

Well, the first day of the week I’ve been waiting for all year is over. So… how do I feel?

Great! I am so incredibly glad that I’m here. The day was long, and as I sit here typing and drinking a great locally brewed amber ale (did you know that Portland has more breweries per capita than any city in the world?) I am tired.

A few thoughts before I go to bed:

  • Both my tutorials were good. I think that JRuby has great potential to let corporate drones such as myself convince the corporate bureaucracy to let us use Ruby and Rails during the day, instead of just on nights and weekends. Also it’s just really freakin’ cool technically.
  • Portland may be the cleanest city I’ve ever been in.
  • The weather is ridiculous. Today it was 70 degrees with blue skies, and the cleanest air I’ve ever breathed. You know those 3 or 4 days each spring in DC where you just walk around marveling at how nice it is? That’s what it was like today.
  • I went for a really nice run by the river The parks around the river remind me of Sevilla but with a wider river, greener grass, and a lot less people drinking Cruzcampo in public ;) People can run here. I’m not fast, but rarely get passed when running at home. People were blowing past me today like I was standing still.
  • The number of people on bikes in this city is astounding.
  • The crowd at the conference is much different, and well, cooler than I’m used to for a bunch of nerds. Back home if you go to a gathering of coders you see a bunch of people dressed in ill fitting khakis, ugly polo shirts, and white cross trainers. The crowd here looks like something you’d see at an indie rock concert.
  • Everyone I’ve talked to so far has been unbelievably nice. Goal for tomorrow: stop being a punk and talk to more people. I’ve got to get over this being shy around strangers thing. If you hear that I ended up eating dinner alone again tomorrow night you officially have permission to slap me.

Final thought:

I think I’m a pretty good developer. Since I got out of school, stopped working two jobs, and found some free time I’ve worked really hard to learn everything I can about my craft. I demolish books. I program Rails in my free time. And this is going to come off as sort of cocky (because it is, and I normally wouldn’t admit this in a public forum as my parents raised me better than that), but I think that if I’m not the best developer I’ve worked with, then I’m certainly in the top 3.

The people here are on another level.

The best way I can describe the feeling is relating it to sports. I played soccer pretty seriously through high school. But I’m the oldest child, and so we didn’t even know about NCSL and State Cup and ODP and the way that youth soccer works in this country until I was in high school. So me and my best friend played for pretty middling teams until we were sophomores in high school. Our teams weren’t bad (everyone made their high school varsity) but our teammates either weren’t passionate, or didn’t train as hard as they should have, or just had other things going on that were more important to them then soccer. So we were generally the best players on our team. Finally we figured out the way things work and found a good team. Me and G didn’t suck, we could hold our own at the higher level (in fact we both started, and our team won D1 our first season), but the jump to playing at the higher level made it abundantly clear how much harder we had to work.

Coming to this conference is like going from playing third division NCSL to first division.

I’ve always tried to stay cognizant of how little I really know and how much I still need to improve, but I’m glad to get this really sharp reminder of how bad I suck. I haven’t felt this ignorant since my first week at Agnik when I’d never developed software outside of class.


DTrace on Rails BoF

Posted by patjoyce
May 18, 2007

Just got back from the a birds of a feather session about “DTrace” and the work that Joyent has done to instrument Ruby and Rails. I’d read about DTrace, but listening to the guy who used it to knock 80% off of Twitter’s CPU usage is pretty cool. Afterwards I got a chance to talk (and by talk I mean stand next to and listen because I don’t have anything to add) one of the guys from Joyent, some of the developers from Kongregate talk about XMPP. The guy from Joyent talked about watching the TCP window shrink via DTrace while a Ruby XMPP thread was blocked. I’m botching the retelling of the story now, but it was incredibly impressive that you could watch the internals of the TCP protocol at work.

I just can’t describe how unbelievably cool DTrace is. You can time all your rails function calls, then all the system calls they kick out to the db, then all the internal calls in the db and all the way back up. With this level of instrumentation you can pinpoint exactly where your bottleneck is.

DTrace is going to be in Leapord along with a really sweet GUI called Xray. I just hope I have an app someday where I’ll have enough load that I need it.


Harnessing Capistrano: Notes Part 2

Posted by patjoyce
May 17, 2007

Jamis just made a joke about the sea of macs. I guess I’m not the only one who thought that it was noteworthy.

there are before and after hooks as well as a bunch of callbacks. start and finish are only tied to top level tasks.

Upgrading to Capistrano 2.0

shouldn’t be too bad unless you did a lot of customization.

  1. capify . to set up.
  2. 3rd party extensions like mongrel cluster won’t work.
  3. overridden or extended tasks might blow up
  4. some of the variables have been changed
    • there is a “compat” mode that provides a facade of tasks with 1.4 names delegating to 2.0 cap -Ff compat
    • seems like compat mode would be a good way to figure out what has been deprecated in your resumes and what you need to change.
  5. cap -Ff upgrade upgrade:revisions dropped the revisions log in 2.0. There will be a file in each release directory that says called “revision” that specifies the revision that was built.

Done with the slides.

Questions

Why wasn’t Capistrano developed as an extension to rake?

Similarities are mostly superficial. Rake is dependency oriented. Capistrano is declarative. Rake for local, Capistrano for remote and hasn’t encountered much overlap.

What is up with Ezra’s shell?

I don’t really know what they are talking about but I’ll need to know.

What is the recommended way for setting environment variables?

There is some method that you can pass

What other types of cluster admin tasks do you do?

Cap isn’t moving away from deployment. Deployment will always be a central task, but Cap 2 makes it much more modular and more accessible for sysadmins. 37s uses for troubleshooting. Their sysadmin keeps cap shell all the time. Uses to check filespace etc, which was a big deal before they moved to using S3 (they were running out of space) Someone uses for their config files. They set their apache config files as erb templates.

Design question: Dependency checking is a very hardwired syntax have you thought about a more general way to do dependency checking?

He didn’t know there were other options. Just wanted to get something working. Open to someone coming up with a better way to do it. Need to support windows as a platform to deploy from limits choices. Example Jamis had to declined patch do to cd syntax differs on windows from POSIX.

Most deploy example seem to be simple. Where can you go for examples of more advanced stuff?

Eventually: Capify.org The wiki is a cool tool also. Right now the best place is the list. Another good place is blogs example. Tim Lucas. Capistrano is soft of hard to learn. There is an O’Reilly book that covers the basics, but is small and doesn’t get into detail.

How do you parametrize tasks?

Suggestion: use either environment variables or capistrano variable. Do it the same way you would parametrize a Rake task.

Isn’t it kind of messy to use environment variables?

The problem isn’t so technical, but how do you specify those on the command line. Jamis likes the env variable. Dirty on windows (what isn’t? that’s mine) A task that needs to take many parameters is a smell. Can prompt by using lambda.

Demo of “CocoaCapistrano” little ssl like thing

How did you record your scripting demos?

wrote a script called text_movie. The demos were smoke and mirrors.

What do you do with long running migrations (order of days)?

He doesn’t know. There longest migration was 3 hours. The guy asking now just runs them and prays. Another guy uses Capistrano to kick off the processes and has a separate system to do the migration and monitor it.

Deployment Migration. Can’t running deploy without migration break?

Yes. But safer than messing up data. Very hard to stop alter table on a row with 4 million rows. You can roll back if you blow up your app by not doing a migration. If you think deploy should migrate by default you can make it by putting an after hook. This is what they do at Shopify.


Harnessing Capistrano: Notes Part 1

Posted by patjoyce
May 17, 2007

First off, I can not overstate how overwhelmingly popular the mac is. There are probably 100 laptops in the room right now and I see 4 non macs. It was the same this morning in the JRuby session which is where you would expect to find the more corporate people. Those who do have non macs appear to be running Ubuntu. I think I’m the only person with a windows box in the room. And I am a Mac user who only has this dell because work gave it to me. Not that this is news or anything, just thought I would mention it while I’m waiting for the room to fill out.

Presentation Slides

Capistrano started out as a deploy tool when basecamp got pushed to multiple servers. Now it is used for more, It can be used for
  • ad-hoc monitoring
  • server maintenance (they edited nfs mounts against 6 app servers with one command)
  • troubleshooting – grep logs across multiple servers

Capistrano is a tool for executing tasks on remote servers.

Capfile

  • internalruby dsl similar syntax to rake, but not compatible.
  • specifies what servers to run against and what task to do.
  • Gateways – Allow you to manage a cluster by tunneling through your 1 gateway server. Useful when the individual cluster servers aren’t publicly accessible.
  • Can specify multiple roles (a role is a collection of servers) and limit takes to particular roles.

invoke lets you run a particular command against whatever servers you want (even without a capfile) shell lets you run a shell (better than invoke because less typing and faster bc connections are cached) this is experimental so beware, but I can see how it would be crazy useful.

Namespaces

  • new in Cap 2.0.
  • default tasks, task named :default can be executed as the namespace name.

Variables

  • set, eg. set :deploy_to, "$HOME/rails-apps/#{application}"
  • -s foo = bar (sets after recipes loaded)
  • -S foo=bar (sets _before recipes loaded)
  • in capfiles check if the variable exists before setting to avoid conflict with command line parameters

Transactions

  • not overwhelmingly robust, but is pretty cool and definitely helps

Deployment

  • love how opinionated about the need for source control they are. I agree 100% if your code needs deployment it needs source control.
  • looks really easy. Like everything with rails I’ve dealt with well thought out.
  • deployment tree looks like a good way to manage releases

Dependencies

dependency checking is a good idea. lets you check things about servers like whether the expected directories exist, their permissions are correct, and subversion exists. you can add your own dependencies as well. Custom dependencies let you check if arbitrary directories, gems, permissions, PATH. this is effin brilliant. still sort of experimental, only does what Jamis needed but will be growing.

script/spin tells how to start server. see slides for details. compare to process supervision tools like init, svscan, runit. You can override deploy:start

some tasks use sudo by default.

deploy:cold – first deploy. laughs at “it never works the first time.” Problems are normally that the webserver / mongrel / fcgi setup.

cap deploy will push a new version. cap deploy:rollback does exactly that. Note: deploy doesn’t run migrations by default. Jamis thinks any prod DB changes should be explicit. I agree (not that my opinion is very valuable ;) )

Deployment Strategies

  • different ways of deploying apps. pretty cool. extensible so you can write custom ways of deploying apps.

Can use other types of source code control other than subversion. none of the stuff we use at work is supported. lots of other things are.


Your First Day on JRuby on Rails: Notes Part 2

Posted by patjoyce
May 17, 2007

They're working on a stripped down version of GlassFish that gives the benefits of an app server without the whole JEE stack, and they're starting to work on it. GlassFish developers managed to put a gem together during JavaONE last week. ("this thing is two weeks old and it's already at version 10" laughter) Benefits of doing this is that you can use GlassFish as a dev server. If interested read GlassFish blogs, wiki, and JRuby extras project. Could be cool in the future, but I still think that the main benefit of JRuby is slipping ruby in the back door. So the WAR deployment is really useful, and if you're setting up your own servers I would lean towards doing it the native ruby way.

Talking about running Mephisto (what runs this blog) on JRuby.

MySQL has no known issues and passes 100% ActiveRecord tests and is hooked up to their CI server. If you use mySQL don't worry about it.

Derby (JavaDB) and HSQLDB are replacements for SQLLite and works really well but there are a few failures. Good target for small apps and are useful because they are embeddable and shippable. Mingle is using Derby. Unpack and run and your app is up. Doesn't require DB setup.

PostgreSQL has a few failures, but they haven't gone after it real hard yet. Failures are almost exclusively with migrations. The other buggy areas are quoting and rounding of BigDecimals.

Oracle focus is just starting. They haven't done much direct work with it, but some people are doing prod deployments with it. Progress is quick on the ActiveRecord-JDBC gem because it is .

SQL Server hasn't been examined at all. Some people are using it, but they JRuby developers aren't using Windows (shocking for Sun employees, I know) so they have trouble testing this.

Migrations work well, but some DBs lack required features. For instance Derby can't ALTER TABLE

Fixtures work well. Bugs are normally with the JRuby YAML implementation

Native Extensions. Option 1, don't use it. If you use pure ruby you can use out of the box. Option 2. Use a Java library. Option 3: port the library. sometimes pretty easy to translate. Option 4: Port by wrapping a Java library. basically create a facade. for example JRuby Digest was originally written in ruby by pulling in java crypto stuff into ruby code.

OpenSSL was completely reimplemented in Java for JRuby. Pretty impressive and about the worst case situation. YAML was originally written as a pure ruby implementation and then was rewritten in Java for the performance gains.

You can deploy with Mongrel. It works, but it isn't the best way to use JRuby bc you don't get the benefits of the JVM. WAR files are the best for eiting servers. this is what you're going to want to use in a big enterprise. Can take advantage of existing investment in infrastructure. Pool DB connections, cached results, pool execution threads and request handlers.

Good line: "Java EE has a lot of bathwater, but a lot of baby" i haven't used JEE enough to know, but I would imagine that they had to get some things right. ;) Good things are like (Java Message Service, Java Persistence API, Java Transaction API, Easy deployment, clustering, failover, management and it scales great (even though the complexity of the platform makes it tricky)

Eventually they wannt to have a Grizzly/GlassFish lightweight, gem installable version. You get the installation benefits of Mongel, and the managements and clustering benefits of an App Server.

Tom is demoing Mephisto in JRuby by packaging it as a WAR using GoldSpike. The WAR file will contain JRuby, all the Gems, and your application code. Benefit: each app within the app server is completely independent and can be running different . Wow. That deployment was easier than getting this blog running on DreamHost. They've also got Typo working recently and are moving all their blogs over to Typo on JRuby.

"Java is mature, trusted, reliable (and often boring)" but there are a lot of libraries out there. Another good line: "'To them: 'it's just jave', to you: 'it's just ruby'"

demo of using ROME to add Atom feed to demo app. automatically produces ruby style properties so that you don't have to use java getters and setters in Ruby code. this is really cool.

Demo of NetBeans Ruby support. Some really cool stuff: Integrated RDoc, code complete, go to definition. This is impressive and I'll have to check it out. I have had a post floating around the back of my head about tooling in dynamic versus static languages. I love textmate, but this would be really nice to have. Basically my argument is that these things would be great to have with ruby but you can live without them. In Java or .Net it would be unbearable to have to write code in a text editor. There also is a Swing based IRb built in to the code. It handles embedded grammars (eg. ruby in an rhtml file) I'm going to need to check out the tooling talk later in the week.

Someone is snoring. Jesus, I used to sleep in class in college, but this is actually useful, expensive, and brief. Unbelievably rude.

Questions: Discussion of compilation to bytecode. Approx 50% of the ruby syntax can be compiled. Currently done in a JIT manner.

DSLs in JRuby. Good idea, you can write Ruby based internal DSLs for ugly java APIs. Good point, the "rubyfication" of the java libraries makes much prettier apis. Not quite a DSL, but much more useable.

Exceptions: you can catch Java exceptions, to catch a specific one just import it.

Initialize in Ruby vs. constructors in java. They chain nicely.


Your First Day on JRuby on Rails: Notes Part 1

Posted by patjoyce
May 17, 2007
Streaming notes:

Why they are doing it? expand java, expand ruby's reach. no better way to learn a language than to implement it. also it's just freaking cool.

they ask if java sucks. not many say it. they like ruby better (who doesn't)

jruby allows you to access java libraries. once pulling in java you can use ruby language features (enumerable, concatenation, etc.)

even converts ruby case "set_size" to java 'setSize" when calling java methods.

Thomas is demoing the install. Really simple. set the environment variable and that's about it. I've got to figure out how to slip this into LM. you can also check out from svn and build via ant. plug to help. I'm going to have to try this.

comes with gem. Mongrel supports JRuby. RDoc runs crazy slow. Rails "just works" because it is pretty much all ruby code. Thoughtworks is pushing mingle 1.0 on JRuby to calm "enterprises"

ruby unicode support sucks (my word, not theres) threadings, scaling Rails, and having to write in C to get performance. Good point. No one wants to write C they are trying to get the benefit of optimized JIT bytecode compiling

Unicode support: JRuby has their own identical ruby 1.8 striing implementation but also exposes java unicode strings and switch back and forth between java and ruby strings well.

Supports ruby thread api. They hate critical=, kill, raise because there is not a safe way to do this (I'm real rusty on this, bc it has been a while since I've written real multi threaded code) Make less assumptions about control of threads and you'll be fine.

JRuby threads generally equal system lhreads owing to JVMs being native threaded. This lets you use multiple cores out of the box. Also does thread pooling. Get true concurrent threading. You can screw it up (like any concurrent system) but the internals are good.

What is the biggest benefit of JRuby? My argument: you can convince your PHB to let you use it.

Pretty much all pure ruby code runs fine.

Tom demoing installing rails and bringing up an app. WebBrick boots up nicely. Installed mongrel, brought it up. They are emphasizing the same thing that strikes me, what is remarkable is how unremarkable it is. Everything looks really simple.

DB implementations. Pure ruby connectors (MySql, Postgres) run fine. jdbc adapters run fine and faster. You can use JNDI for connection pooling. Connection pooling important for licensing requirements if connecting to oracle (many connections = mucho dinero)

Classpath sucks. you can do the traditional, or you can just drop whatever you need in JRuby/lib directory.

Setting up JDBC is also really simple. Migrations work fine, but required a lot of db specific work under the hood because JDBC doesn't handle schema management. MySql passes 100% of ActiveRecord tests. Postgres has 17 failures out of over 1000 tests.

C Extensions don't work (unless they're ported to Java) Example RMagick doesn't work but is in progress.

Performance. Java isn't slow, but it is slow at startup. After startup about the same speed as the C implementation, some specific cases are faster. Command line performance still sucks.

Deployment.: Mongrel should work. A couple things like forking off subproccesses and process management don't work. JRuby deployments are normally done by deploying to a App server. Project is called GoldSpike, and is a rails plugin for ulding WAR files. One plugin in pure ruby, produces a deployable, server agnostic WAR file.Plug for Glassfish ("it's tiny for an app server, which means it's huge" laughs from the room)

Tom demoing deploying a rails app on an app server. one rake task, produces a war. Wow! that was really easy. I think that this is going to make bringing rails to big companies much easier.

Break


Eric Sink on The Business Of Software

Posted by patjoyce
May 17, 2007

The Business of Software

During my flight from BWI to Portland (via Vegas and San Jose) I read Eric Sink on The Business of Software. The book appears to be a compilation of his columns for MSDN magazine. Even though I could have found the content online, I am glad that I bought the dead tree version because, well, I really like books. Plus it would have been hard to read a blog on the plane when I don't have internet.

Eric is the founder and CEO of SourceGear a small (25 employees) software company that sells developer tools. The focus of the book is on small ISV (Independent Software Vendors) The company is fairly successful and grown without outside capital so he knows what he's talking about. Thus far I am extremely impressed with the book and the clarity of Mr. Sink's writing. The book is organized as a series of essays grouped around a particular topic. The first topic is Entrepeneurship itself and discusses accounting, temperament, and planning amongst other things.

The second section is focused on people, and primarily hiring. I find hiring an incredibly fascinating topic and think that Mr. Sink gives some excellent advice. I particularly like his discussion of the negative correlation between people with PHDs in Computer Science and good developers. (Original article: Hazards of Hiring) I worked at a small startup ran by a professor while I was in college. All the developers were still undergrads. So as the senior ("senior" used lightly as I was the oldest at 21) developers we would interview candidates for development positions. The people who were brought in all were at a minimum Masters students in CS and most had PHDs. I imagine they were all excellent computer scientists (the professor running the company was brilliant in his field of research) but didn't know a thing about shipping software. We eventually told the professor that we weren't going to find good candidates by interviewing PHDs (being so young I think we actually said something much less diplomatic like "PHDs can't code" which is a bad idea when talking to someone with a PHD). The professor's solution: we were no longer asked to interview candidates and we never came close to shipping any software while I was there. I still believe we were right that there is a strong negative correlation between getting a PHD and shipping software and one of my biggest regrets from my time at that company is that we were unable to effectively convince management that shipping great software and being a great computer scientist are two different skills, and it is rare for someone to have one of them, let alone both.

The only point I have disagreed with so far was his response to Paul Graham's Great Hackers, Great Hacker != Great Hire. I think that Mr. Shrink reads a little too much into Paul Graham's arguments and takes the knocks against windows a little too personally. I work in Microsoft languages at my day job to pay the bills. While given a choice I wouldn't use ASP.Net for web application development (I am at RailsConf after all) nor would I ever use Windows (except for in a nice, neat, parallels window on my Mac so I can do IE browser testing) I am no where near as virulently anti Microsoft as many developers. .Net is a decent, if inelegant, tool and there are cases where it is appropriate for the job. Someone who simply rejects tools based on religious zealotry isn't a great hacker, they're a jerk. Furthermore I agree that Paul Graham (whose writings I adore, and is obviously a huge influence and inspiration) can come off as quite arrogant at times. I think that when Graham says "Great Hackers will refuse to work on inferior tools" he is being polemic and what he means is great hackers care deeply about there tools and will go out of their way to avoid using inferior ones. Also, I think it is clear that what Graham knows and talks about is hosted software. When your software is hosted it doesn't matter what language you use and users don't care. It isn't a marketing decision and it doesn't limit the size of your market as Mr. Sink says. Those things may be true for shrink wrapped software that will be installed on a client machine but I don't think they fall under the situation that Graham was talking about. Also I think that Mr. Sink misunderstood the point on great hackers and customers. Mr. Sink seems to read Graham as saying that Great Hackers don't ever want to deal with the customer. I think that great hackers crave interaction with customers; what they dread is customers can capricously force the developer to make changes that lead to inferior software. I think the "disagreement" is simply one of different assumptions. That said, if everything that Graham said was intended literally then Mr. Sink is absolutely correct. There is no room in a small company for someone who is so arrogant they can't be pragmatic.

The third part deals with marketing and the fourth with sales. There is a lot of good information in there.

Bottom line: if the thought of starting a software company has ever even crossed your mind go read this book now.


Off to Rails Conf

Posted by patjoyce
May 16, 2007

I hate packing, so instead I'm procrastinating by writing this post. Tomorrow I will spend most of the day traveling to Portland for RailsConf.

I've never been good at taking notes. Seriously, I used the same 4 spiral bound notebooks for all of college. I'm also not particularly good at blogging regularly. So my plan is to kill two birds with one stone this week and post a quick recap of each of the sessions I attend immediately afterwards.

Oh well, enough procrastination. Time to pack.