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.