Here’s the first of my notes from RubyFringe, the non-corporate, almost-non-sponsored, edgy Ruby-but-not-Rails conference organized by the folks at Unspace and held in Toronto (a.k.a. “Accordion City”) on July 18th – 20th, 2008. I’ve read on a lot of blogs that people have been calling it “the best Ruby conference ever” — I might go so far to say that it’s the best tech conference I’ve been to.
This first set of notes covers the following presentations:
- Adhearsion (Jay Phillips)
- Deployment Monoculture / Scaling Ruby Down (Dan Grigsby)
- Rockstar Memcaching (Tobias Lutke)
- Living on the Edge (Yehuda Katz)
- Testing is Overrated (Luke Francl)
Adhearsion (Jay Phillips)
From the RubyFringe program booklet:
Jay Phillips will talk about what’s been changing in the Adhearsion and VoIP scene and how people with virtually no VoIP experience can use Ruby and Adhearsion to write their first application in this generally foreign world of technology. If you’re building a Rails web application, with Adhearsion you could consider leveraging voice as a new, cutting-edge feature of it. If you’re a cowboy hacker with more personal ambitions, Jay will also talk about fun hacker projects and how you can go about implementing them. The world of voice is certainly a growing market and it can’t hurt to know a little about the technology!
- "Voice development on the fringe" - "There's opportunity in the fringe" - "Web development has this problem...it's saturated with innovation" - Rails integration is a one-liner - Asterisk's config file: complex and looooooong, app-specific config syntax - Adhearsion's config: Ruby Q&A - Does it scale? Yes - Asterisk breaks down at about 130 simul calls -- new box after that
Deployment Monoculture / Scaling Ruby Down (Dan Grigsby)
From the RubyFringe program booklet:
Most conversations about scaling Ruby web apps are pointed in the wrong direction. Instead of talking about whether Ruby can scale up — I think we all agree it can — I’d like to see it scale down.
As an entrpreneur, I launch dozens of ideas before I pick the one to turn into a startup. The Rails-inspired approach of deploying long running instances of the runtime, one or more per app, doesn’t scale down to support even a few side-by-side applications.
Instead of reflexively arguing that EC2 is cheap enough, this talk will challenge some base assumptions, take a hint and some inspiration from Google App Engine, and suggest another angle for deploying Ruby-based web apps.
- The programmer/entrepreneur lifestyle - Attractive - Hits the "sweet spot" -- lets you be who you are - It's all about controlling your own destiny - The trick is to find opportunities to build stuff and match it with people who want that stuff - Barrel research - It's a way of looking at markets and opportunities - Think of all the markets and opportunities out there as the volume within a barrel - Think of anything released into the market as a rock dropped into the barrel - The size of the rock in the barrel represents the size of the corresponding project or opportunity - Big rocks represent big projects taken on by big organizations - There are plenty of gaps between the big rocks, which can be filled in by smaller stones, representing smaller projects executed by smaller teams - It's fractal -- there are smaller gaps between the smaller stones, which can be filled in with sand, which represents even smaller projects by even smaller teams. - The ideal team size these days: about 3 - Our current tools allow us to create well-crafted stuff with a small team - Consider icanhascheezburger.com -- employs 9 people - "Happy end of the Mythical Man-Month" - If you're a hacker and have good hacker friends, you can do well - With this in mind, what ideas should you implement? - "Late-bound ideas" - You want to make multiple, small, narrowly-focused bets - Act darwinistically -- take on a number of projects and cull those that aren't "fit to survive" - Psychology and "Free" - Cheap is not free - Worry about spending money - Small psychological inputs can have a very large impact - Treat non-free things as dependencies -- try to get rid of them - Eliminating non-free things is part of a larger process: eliminating inefficiencies - If a customer is worth $100 -- Google will try to charge me $99 for it - Whoever your potential customer is, there'll always be someone out there who's going to spend more money than you trying to land that customer - Disproportional Reward - This part of the talk is going to be all about market hacks, "fuzzing the market" and getting a result that is disproportionately greater than the time/effort/money you put in - They're all tech-driven: does not require you to be a salesperson - These approaches are tech- and marketing-based 1. Breaking into the walled garden - PayMe.com was Pepsi to PayPal's Coke, with about 10% market share - We realized that auction buyers would be the big adopters of systems like ours, so we approached eBay who wouldn't take our ads because of an exclusive agreement - We found out that eBay had relationship with LinkExchange -- they sold a lot of ads in eBay - We bought out LinkExchange ads, many of which ended up appearing on eBay pages as per their arrangement, effectively doing an end run around eBay's refusal, getting out ads on their pages against their wishes - Exploiting this non-obvious relationship made our company successful 2. Baby's Mamma - The parenting market has a strong geographic component: new parents tend to clump together in the same neighbourhoods - Certain postal codes are parent-rich - Going after parents? Find out where new schools are being built -- that's where they are - School websites post which of their teachers are going on maternity leave -- send their colleagues coupons! - Take a page from the stalker book: use readily-available demographic information, sych as driver's licence registration, voter info registration - Do analysis on that information - Look for info that ties them to a specific demographic -- consider names that belong to specific generations, like "Hildegarde" - Use Freedom of Information Act requests - For example, Nate's dad gets an National Science Founation database of people who just got funding and uses it to cold call them - Often, he would be the first person to inform them that they got the funding, making him the bearer of good news and thus more likely to make the sale 3. Tai Chi Marketing - I wrote a script to auto-fill contact forms that I knew would lead to my getting called by a telesales person - I got calls from telesales people, whose jobs are tough - I'd explain that I wasn't likely to buy what they were selling, but told them that I have a product that would make their job easier; could they introduce me to their boss?" - End result: an inbound sales call was redirected and turned into a sale to them - Making emotional connection with people is key "At this point in the list, we're now approaching that fine line that separates an entrepreneur from a criminal 4. Dorm Spam - My first job: selling white box computers at dorms, a la Michael Dell - My major cost: shipping flyers - So I used the inter-campus mail system to send the flyers 5. Tragedy of the Commons for Fun and Profit - This was in the era of desktop-based file-sharing clients like Scour, Kazaa and eDonkey - Shared a lot of windows media files with the names of popular videos and movies - .WMV files back then could include an instruction to pop open a browser window pointing to a specific URL when the file was played - We used this as advertising Don't short this stuff: - As programmers, we have a tendency to bury ourselves in coding when things get tough - Some problems can't be solved with tech - Learn about handling people
Rockstar Memcaching (Tobias Lutke)
From the RubyFringe program booklet:
Memcached is what makes the web fast. It’s also the simplest thing ever: you put a little memory aside for it, you put some keys in, you get them out at a later time.
So why the hell do all of you geniuses use it wrong? I’ll teach you how to tackle your performance issues using memcached once and for all.
- "I'm here to present the most boring talk of the entire conference" - Memcached: "like a hash with Alzheimer's" - Originally for LJ ("which is about people cutting themselves) - Lots of people use memcache - How does memcached work? - Talking to servers - Simple protocol: get, set, delete - What do you store in it? - Object caches - after save to database, save it to cache - Expiry options - flush_all: the nuclear option - :expires_in - use an observer -- delete an activity after saves - Unique ID lookup
Living on the Edge (Yehuda Katz)
From the Rubyfringe program booklet:
Ruby is growing up quickly, and a number of Ruby’s mainstays are falling by the wayside. I’m talking about classics like Rails, Rake, Rdoc and much much more. This talk will help you squeeze even more developer productivity out of the latest edge tools that will be the mainstays a year from now. Of course, living on the edge is a dangerous game, so I’ll cover how to sanely keep abreast of the latest and greatest without having to spend all your time keeping your tool chain up and running.
I intend to cover Merb and DataMapper (briefly, as they are rapidly reaching escape velocity from the Land of Edge), Thor, YARD, basis and Johnson. I will also cover other edge tools that are released between time of printing and Rubyfringe. Rock on!
Testing is Overrated (Luke Francl)
From the RubyFringe program booklet:
Develper-driven testing is probably the most influential software development technique of the last 10 – 15 years. There’s no question that it has improved the practice of building software. And in a dynamic language like Ruby, it’s hard to get by without it. But is it really the best way to find defects? Or is the emphasis on testing and test coverage barking up the wrong tree?
- Testing is a programmer's solution to the problem of bugs - Coding's what we do, so why not make the solution out of code? - What's wrong with this? 1. Testing is hard - Developers tend to write clean tests describing the normal execution - Tend not to write "dirty" tests, which check non-normal cases, such as out-of-bounds conditions, bad data, various error states - Mature orgs write more dirty tests 2. You can't test code that's not there 3. Tests have bugs - A number of studies have shown that tests are just as likely to have bugs as the code they're testing - Who tests the tests? - There's also the matter of developers who comment out tests just in order to "get stuff done" 4. Developer testing isn't very good at finding defects - Complements to developer testing
1. Manual testing - A good tester is worth his/her weight in gold - A good tester I know is not only good at explaining how the bug occurred, but also very thorough about providing info about it, including the stack trace - Have testers do it rather than programmers -- besides, programmers hate it - Testers are also responsible for verifying fixes -- don't take the programmer's word that the bug has been fixed, confirm it!
2. Code reviews - A good measure of code quality is the number of "WTFs per minute" during the code review - The polite code review definition of "WTF" is "What is this function?" - There are sociological considerations for code reviews -- you are, after all, leaving your creation (and by extension, you) open to criticism - Try to find bugs, not rip your collegaues to shreds - Code reviews can motivate you to code better - Can code reviews make better developers? Possibly: consider Robert Glass' argument that reading code can help make you a better developer 3. Usability testing - Fun and easy - Jeff Atwood: Usability test failure is the ultimate unit test failure - The cheap way to do usability testing is to follow the model of Steve "Don't Make Me Think" Krug's "Lost our lease" usability lab: the testing computer and a camera, with you following the user through your application - "Don't get me wrong: I write tests, I'm just not fanatical about it"