You can’t write taste tests for cucumber flavored pepsi, which incidentally is available only in Japan (of course), but you can write tests with Cucumber, which is a framework created by the maintainer of RSpec, David Chelimsky.
Cucumber – scenario based high level test framework by David Chelimsky
Jay Fields discusses the immaturity of testing
Jay gave a talk on testing in the Ruby/Rails world.
Common test mistakes
- forgetting tests
- testing everything
- custom test cases
- slow test suites
- 100% test coverage – that is not the goal
I asked Jay what he thought of autotest, and he said unequivocally that he hates it. “If your tests take less than a second, why do you need it? Just click the button.” I think I disagree, because I don’t remember to click the button, and because i don’t always remember that i just changed something that could have broken something else. I’m often surprised when growl pops up a notification that something is broken.
Jay covered problems and benefits of current testing tools:
Selenium
- 15 different ways to drive it
- soo slow
- large test suites become unmaintainable
- selenium – best tool for cross browser testing
- runs against the full stack
- focus on the five most important selenium tests
Test::Unit
- no mocking infrastructure built in
- syntax is ugly. argument with chad fowler on this.
- extremely developer friendly
- However, granular defect localization
- Easy to write
Rspec
- too much magic
- false positives/negatives
- too based on english
- consistent to mancrest, not ‘principle of least surprise’
- encourages behavorial testing
- built in mocking
- no testing facility is complete without a mocking framework
Two Bleeding Edge Ideas
Synthesis written by George Malamedis
Expectations Gem – gives you a recorder
Solutions for slow tests
- nulldb
- unitrecord
- arbs
JRuby is Just Ruby – Overview from Charles Nutter and Thomas Enebo
Charles and Thomas couldn’t be here in person so they’re skyping and controlling the screen to give an overview with running Ruby on Java. Good talk overall, though slightly marred by skype connection difficulties. One bright spot was the talk was a great advertisement for Yugma – the web conferencing tool that integrates with skype and makes remote screen sharing easier. If you’ve run WebEx a lot, you may want to take a look at Yugma.
- They gave a good overview of performance in jruby vs just ruby, particularly with the ways the Hotspot VM optimizes Java code.
- Developers are unaware of how far Java performance has come.
- The Hotspot VM has had 500 man-years of development
- JRuby on Rails 2.2 – with threadsafe rails and glassfish shows impressive memory improvements
- 1000 requests @ 55MB of usage vs 1000 requests @ 233 MB w/Rails 2.0.2
Yummi.us – a channel based messaging platform launched by the Phusion Passenger Team 2
The Phusion Passenger guys (Hongli and Ninh) are speaking right now at Rails Summit Latin America. They just unveiled their ‘surprise announcement’ – a messaging platform that looks like the love child of IRC, Twitter, and Campfire called yummi.us. It’s in private Beta right now, but you can contact Ninh at ninh @ phusion.nl if you want an invite.
- You can have public and private channels
- It’s integrated with twitter so updates to yummius will show up on your Twitter feed
- It has syntax highlighting for most languages so pasted in code will be readable. Support for most of the languages TextMate supports
- You can attach files – you will have a large amount of storage space but they have not decided how much yet
- The focus seems to be for developers as there’s a Rails plugin for embedding a channel in your own site, and the ability to lock down the channels means you can use it like Campfire as a collaboration tool.
Chris Wanstrath – let other people do the filtering for you
Chris Wanstrath, one of the authors of github, spoke to end the sessions today.
- Serious full time projects such as Rubinius and Merb started as side-projects
Started working for trucking logistics company, which had no version control, no configuration, but thought that he could use yaml. But there was no PHP parser for yaml, so he wrote spyk – yaml parser in php. Which helped him get a job at GameSpot, which, with recognition from other side projects, got him a job building Chowhound in Rails.
Get rid of time sinks – stop wasting your time reading RSS
- take a month off from rss reading
- let other people do the filtering for you
- the big stuff will find you
Don’t bother with books on practice and theory
- apply the Jerry Seinfeld calendar theory
- just do a little a day
- you want to see that x in the calendar because you worked on your side project for a while week
- now you can’t say that you don’t have time because you have plenty of time
You don’t need a good idea
- play with a new framework, like sinatra, rhino or johnson, or master your editor, etc.
- vi users, learn why people love something like emacs and use that information against them
- alternatively, do something hard.
- github started as a side project they worked on, only on sundays.
- scratch your own itch
- github took 3 months
- used github to self-host github and their ‘day job’ git repository.
The People You Meet
You will be the same person in five years as you are today except for the people you meet and the books you read. I can’t remember who said that, but you could describe that sentence as the late 2008 rails community theme (aside from the other ‘will I have a job in 2009′ theme.)
I’ll go back and cover the Chris Wanstrath talk in a bit. Generally I’ve noticed that the topic of the season is brand building. Jay Fields has talked extensively about his efforts and how it lead to a better job with a bigger salary. Chad Fowler talked eloquently about being notable. And ‘Dr Nic’ – Nic Williams – talked about ‘the future you’. The future you who will be thankful that you blogged at work about your code, and invested in an open source library or two, and got feedback on your code. Hyperbolically, Dr. Nic says that it’s worth it, even if you get fired – the future you will be grateful.
Chad Fowler – Be Remarkable
So far the highlight has been Chad Fowler’s address. Particularly, what does it mean to be a Ruby/Rails developer in a bad economy?
- Market yourself. Be remarkable. From the book Purple Cow – “remarkable means something that is remarked on”
- You have a moral imperative to market yourself. If you are 5 times better at programming and you’re doing tech support because you don’t market yourself, you’re robbing from your company.
- Java’s competitive advantage is the number of developers. In a bad economy, this takes away Java’s main competitive advantage, because the number of available programmers goes up. In a sense, this means it’s a great time to promote the benefits of Rails to your organization. There are more developers available, and Rails is more efficient at accomplishing the same task.
- Used the example of Charlie Parker, the jazz musician. He was both critical and criticized, which means
- doing something sufficiently interesting that people were talking about him, and
- doing something interesting and important enough that he scared people
I’ll add other notes as I have time later today.
DHH Speaks via Skype
We’re 1/2 of a day into the conference. So far i can’t say it’s been live blogging but from here on out i’ll post every hour or so.
DHH spoke via skype as he is in Sweden, and took questions. He covered some of the questions that seem to always come up when he speaks, like not having a roadmap, why open source projects shouldn’t promise release dates, etc. But he had a few good answers to some audience questions. For smaller applications, he recommended Phusion Passenger, which he noted was just simple and took away a lot of the burden of deployment. For larger applications he recommnds taking the approach they took with Basecamp, where they use apache, HAproxy, and mongrel. (I could be wrong on the apache part)
He also said the Rails community needs some sort of site that allows for the review, listing, and ranking of plugins. I do believe there are a few sites that try to do this, but no one mentioned them.
Chad Fowler had a great talk, i’ll cover that in the next post.
English-language live-blogging the Rails Summit Latin America
I’ll be live-blogging the conference as it progresses today. Most of the speakers are in English and they have simultaneous translation into English, Spanish and Portuguese as appropriate.
Erlang Uber Alles
I’m stepping out on ruby. I started researching the language and realized that it is missing a few things. First, a good MVC framework (sorry Erlyweb). Second, a company like 37signals promoting the language. Third, a central place to read news about the language. So, I decided to do something about it, and I don’t have time to write a web framework or start a hosted software company. But I did start The Best Erlang News Blog on The Web: Erlang Inside.