Digesting Google Wave
posted by pete on May 31st, 2009
I got an odd sense of deju-vu while watching the 90 minute Google I/O conference keynote video where they announced Wave, a next-generation communication platform that many people are rightfully excited about. The last time I felt this much gee-whiz factor excitement was at a Microsoft Developer Days event in 1996 when my dad and I saw a preview of Visual InterDev, the amazing new “server side” partial-GUI development environment.
Up until that point I’d made a bit of a name for myself by creating a bridge between Visual Basic and IIS, the Microsoft HTTP server. Imagine a situation where every call to a form submission called a function in a single-threaded COM object running in Transaction Server, and you can understand why seeing what was quickly re-branded as Active Server Pages (or ASP) was like confirming the existence of a higher power.
To their credit, ASP really did change everything. I used it every day of my professional life until a scary run-in with .NET in 2004 sent me packing for the Ruby hills.
There’s certainly a lot to like about Wave, and Google should be applauded for being willing to work on the plumbing of the Internet. Unlike the typical Microsoft strategy of giving everything a new name which they’ll be rushing to deprecate in 30 months, Google is making it crystal clear that Wave is a web application, a platform, and a protocol. They seem genuine in their desire to make it open source, and after attending a (very nice) community information session Microsoft hosted and hearing about the legal wrangling required to do something as simple as submit bug patches to GPL projects, it’s clear that this could never have come out of Microsoft.
And that’s a shame, because they were undeniably the pioneers of Ajax. Anyone else remember using Outlook Web Access back in 2000?
Microsoft could have had this victory. We could easily be talking about Microsoft Wave right now; of course, it’d all be based on Exchange and we’d have to install .NET and the licensing for governments, schools, and non-profits would be very gracious.
That said, I feel a certain raw cynicism as well. Don’t get me wrong; I can’t wait to fire this app up, and I am kicking myself for not trusting my instinct to attend I/O. I could be hacking on the beta API right now!
It’s just that while they deserve credit for executing this, we as a developer community should be slightly ashamed that it’s taken this long for it to happen. There’s been so much petty in-fighting over our tools (web frameworks, authentication, Javascript libraries), business and marketing models (endless discussion about the relevance of Twitter and the Long Tail and the decline of intellectual property) and hyperbolic wank over whether your code is safe “in the cloud”. How come it never occurred to anyone that a generic server push implementation layer would have enabled a large part of the innovation seen in Wave several years ago?
Given how many PhD’s they had working on the genuinely hard federation and concurrency issues, the real accomplishment is in the subtle UX touches that make the end result work exactly how you expect it to. The theme at Emerging Tech a few years back was magic. This counts as magic specifically because if you showed Google Wave to a person just learning how to use a computer, they wouldn’t be impressed in the way that we are. It’s just the next major iterative step, and once the shock wears off then the real hard work can get started to make the whole damn web speak in the same language.
Remember the last time this happened? The Facebook Applications Platform. They tried to build a walled garden full of spammy quiz apps and if I’m not mistaken, on the whole that project hasn’t been a home run. Google Wave feels fundamentally different, and that’s because they are fighting the good fight, instead of trying to lock in their users.
Cascading View Paths for Fun and Profit
posted by mike on May 20th, 2009
We built an iPhone site and an accompanying app for a major Canadian sports broadcaster, and after we launched it, we wanted to add functionality so that any mobile device could log on and be presented with the content in a way appropriate to the unique characteristics of that device. Screen size, resolution, HTML support, etc.
One Rails feature that really helped us along was the view path system in ActionController::Base. To put it simply, view_paths is an array that contains a list of paths in which to look for templates. If a template isn't found in the first path, it continues onto the next path until it reaches the end, at which point a "missing template" exception will be thrown. By default, this array has one element, RAILS_ROOT + '/app/views', but you can use prepend_view_path and append_view_path to add more paths to the list.
We took advantage of this cascading view path system to create a tree of templates that can fall back to lower-priority paths to display pages to the client in a way custom tailored to their device, while at the same time keeping things very DRY. We do this by detecting the remote device type at request time, and then categorizing the client into what we call "device groups". Each device group has a special view path that contains the views tailored to their device type, but we only wrote custom templates where required. Where the default template sufficed, we allowed the view path to fall back to a lower priority path.
For example, an iPhone connects and is given the default view path. But when a Moto RAZR connects and is classified as a "narrow" device, we prepend blackberry_views, then wap_views, then narrow views. The Blackberry views directory is our base view path for non-iPhone mobile devices, but some of its templates have too much data for a small WAP phone, so we prepend wap_views ahead of it. Along the same lines, a WAP device which has a particularly narrow view, like the RAZR, needs some further templates overridden so that things look just right, so we prepend narrow_views as well.
This system worked great for our purposes, but there's one gotcha. The view_paths array looks just like an array, and the paths contained therein look like regular strings. And you can prepend/append strings to the view paths array:
>> view_paths
=> ["/Users/mferrier/dev/thescore/app/views"]
>> prepend_view_path RAILS_ROOT + "/app/views/narrow_views"
=> ["/Users/mferrier/dev/thescore/app/views/narrow_views", "/Users/mferrier/dev/thescore/app/views"]
But upon closer examination, these aren't just regular arrays and strings:
>> view_paths.class
=> ActionView::PathSet
>> view_paths.first.class
=> ActionView::PathSet::Path
Interesting. But why should you care? Here's why:
#from vendor/rails/actionpack/lib/action_view/paths.rb:99
def templates_in_path
(Dir.glob("#{@path}/**/*/**") | Dir.glob("#{@path}/**")).each do |file|
unless File.directory?(file)
yield Template.new(file.split("#{self}/").last, self)
end
end
end
Oof. Adding strings to the view_paths causes filesystem traversal... expensive stuff. In fact, in the same file, a kind Rails contributor has alerted us about this very issue:
#from vendor/rails/actionpack/lib/action_view/paths.rb:3
def self.type_cast(obj)
if obj.is_a?(String)
if Base.warn_cache_misses && defined?(Rails) && Rails.initialized?
Base.logger.debug "[PERFORMANCE] Processing view path during a " +
"request. This an expense disk operation that should be done at " +
"boot. You can manually process this view path with " +
"ActionView::Base.process_view_paths(#{obj.inspect}) and set it " +
"as your view path"
end
Path.new(obj)
else
obj
end
end
If we follow this advice and call ActionView::Base.process_view_paths and pass it an array of the paths where our views reside, it will return some nice preprocessed ActionView::PathSet::Path objects. By processing these at boot time and then sticking them in memory, we can use these instead during the request and can avoid those costly filesystem traversals:
class ApplicationController
cattr_accessor :preprocessed_pathsets
# preprocess some pathsets on boot. doing pathset generation during a
# request is very costly.
@@preprocessed_pathsets = begin
%w(blackberry touchphone narrow wap).inject({}) do |pathsets, device_group|
path = ApplicationController.device_view_path(device_group)
pathsets[path] = ActionView::Base.process_view_paths(path).first
pathsets
end
end
end
Yup, good times.
Nothing is personal anymore
posted by pete on May 19th, 2009
I appreciate Ryan Carson, although I wish he’d drop the fedora from his shtick. I can’t quite put my finger on it, but the fedora fills me with cynical, existential dread.
Anyhow, about a month ago Ryan posted ”building a community from scratch”. This is a topic which I have a fair amount of experience with! I’m the survivor of being in a rock band and I do my part to encourage a really amazing Ruby community in Toronto. It’s fairly safe to say that I disagree with several of his major points.
While I agree that we have to be willing to put ourselves out there and be somewhat transparent online, his suggestion that the road to success involves accepting every Facebook friend request is completely baseless and probably quite harmful.
I should explain that I’m actually kind of uptight about semantics; I’m passionate about very specific UX details (for reasons which most of the human population would find quite inconsequential). For example, I was horrified when people would ignore the Facebook “is” in status updates. As in, “Pete Forde is Wheeeeere’s the beef?!”
I found this to be a horrible abuse of a clever nuance which was obviously intended to force people to think before they robbed two seconds — from hundreds of their friends — without guilt or consequence. It’s a hinting; an affordance. It’s magic if it works, and insipid when it doesn’t. Some people loved is while others hated is. I saw one comment refer to “is” as being “just like fascism”. I’m sure that it’s actually nothing like fascism, but I appreciate their enthusiasm regardless.
I was also really big on Poking for a long time, as those around me would attest. Sadly, Poking seems to have become a 2nd class citizen in Facebook-land, because I think they were really on to something. I called Poke the first genuinely new form of social interaction since the advent of ICQ instant messaging. It isn’t just a creepy euphemism; it’s a way to cross a communication void in a truly passive way. It allows me to tell someone that I am thinking about them, even if I don’t have anything important to say. This is a gift, as we live in a world of unlimited information inputs which scream at us to respond all day long. A poke doesn’t alert you, or sound a bell, or distract you. Most importantly, it doesn’t imply that you are waiting for a reply.
It’s come to this: we’re at war with information overload. If you love someone, you won’t needlessly send them things which will distract them without just cause. Therefore any medium which allows us to communicate our affection passively is truly a medium for the times. Anyone who has spent time as a teenager talking to their love on the phone late into the night understands what it means to prostrate themselves for another — speaking between the lines, through the ether.
Approving every friend request on every social medium completely dilutes any value that these networks offer as a positive force in our lives. The social web can quickly become a pathetic race to the bottom… nothing more than a place to receive product recommendations from complete strangers. The only people who could possibly enjoy having everyone on the Internet in your flist are people selling server RAM and people with few real world friends in the first place. What possible use is having thousands of “friends” that you don’t know on Facebook?
On Twitter — I get that… barely. I am a low follow count kind of guy, but I think Twitter is a fundamentally different medium.
Does adding everyone you meet casually build a community? Not in my world it doesn’t. In fact, it seems fundamentally disingenuous, unless you’re trying to build a fake community of incredibly shallow “relationships”. BudCamp might arguably be shallow, but it’s very hard to argue that the Bud Fans which attend are anything except incredibly passionate fans of Bud.
Does inviting a whole bunch of people with like interests out for a monthly pub night build a community? You bet your ass it does! And apparently, Kathy Sierra agrees with me:
Important topic, and I agree — building community is both tricky and time-consuming. But if you’ll forgive me for using lolcatspeak– if it takes 2 years, ‘ur doin it wrong’. The painful, least-effective way to “build community” is to hire a Community Manager who tries to connect users with the company. Far quicker/better to hire a “Director of Kicking Ass” whose sole job is to help users get better and better at whatever it is you can help them do, and to connect users to other users who share that passion and can help.
A look through Gary’s WineLibraryTV comments shows why he is so successful… it’s not because Gary is the guy everyone wants at their dinner party–it’s because he helps his viewers become the guy everyone wants at a dinner party.
Some community managers appear to have a strategy modeled after: “Get users to want to party with you.” More sustainable (and do-able) might be: “Give users a reason to party… without you”
Meetups and beer are awesome — especially when they’re about connecting users with other users. Our job as community builders is to not so much to connect with our users, but to give them more and more compelling reasons to connect with one another. And the best way to do that is through helping them learn and grow and ultimately–kick ass. The “at what?” doesn’t matter nearly as much.
I agree that the marketing budget could be far better spent on community–especially when community means putting the user–not the company–at the center of a passion-fueled ecosystem. Even things like openness/transparency matter only to the extent that they dramatically support (or potentially harm) our users’ ability to do whatever it is we’re helping them do.
Think about some of the things that truly make your life more interesting, engaging, productive, etc. — and most of us can find things where the product, service, support, user community is so damn useful that we really don’t even notice (let alone care) that the company isn’t “engaged”. In the end, we’re just not that into The Company. And a community manager that tries to change that is in for a long, painful, ultimately disappointing journey.
We are “into” our own journey, and any company that helps us do it–either directly through products/services that help us kick ass — or indirectly through sponsored community efforts that help us learn/grow/kick ass at something (even entirely unrelated)– will win our hearts. Excitement for a company/product is simply a wonderful side-effect of a company/product that helps us do something amazing. When a community manager makes passion for the company as a goal, two years or even ten will likely never be enough.
God I love this topic, Ryan. Thanks.
So there you have it folks: don’t set out to make people want to party with you when you could enable them to party without you. Jazz hands!
My advice is to guard your friends list, jealously. If we can’t control our computers, shouldn’t we turn them off?
What is all of this crap?
posted by pete on May 18th, 2009
I just came across this really fascinating (and totally unscientific) logo visualization that attempts to show how the perceived “key players” of 2006 actually did circa 2009. I have a few reactions to it, some positive and some negative.
I’m overwhelmed with how irrelevant most of the product offerings represented on the diagram seem to me. Who uses this garbage? What purpose does it really serve? I sincerely hope that whatever second-wave dot.bomb optimism fueled the creation of some of these projects has been thoroughly reality-checked by the recent economic situation. I weep to imagine the good that could have been done in the world if instead of building “Zoozio” or “Noodly”, the folks involved had volunteered their time digging wells in impoverished countries.
I frequently have to convince myself that I’m not a “real” demographic, that my friends and I — alpha nerds — are not representative of the masses who flock to MySpace and leave millions of comments on YouTube. And yet, I think there’s a fallacy there too, because even those “great unwashed” folks that “consume” all of this awesome “content” we create are a lot smarter than self-identified smart people give them credit for.
However, on the positive side of things, I think it’s actually a pretty optimistic perspective on the risks involved with running a web startup.
These numbers are rough:
- 150 companies on the original chart
- 59 companies in the deadpool
- 28 companies purchased by a larger company (aka a liquidation event)
You know what? Those are actually remarkably good odds, considering that entrepreneurs are routinely told that after massive initial cash outlays, they should not expect to make profit within five years AND only 1 in 5 companies should expect to even make it to five years.
Allowing for a significant percentage of dormant entities on the chart, it seems like your average Web 2.0 bet measures up well against starting a restaurant, or a dollar store. I doubt many of them have turned a profit, but that’s never the point on the social web, right?
Thank goodness we still have Whuffie, or some of us would be really broke!
The article which inspired this is here.
The First Toronto Ruby Job Fair
posted by pete on May 14th, 2009
I’ve been thinking a lot about the nature of controversy lately, and I’ve concluded that regardless of whether you love or hate the weekly Ruby personality cult showdowns… at least we’re a lot more fun to watch than those other guys. My experience has been that the overwhelming majority of people that are drawn to Ruby are unfailingly nice, interesting and creative. Yet, we have something of a reputation for being arrogant and elitist as a whole. Are we lucky to have a supportive Ruby scene in Toronto? It’s possible, but I firmly believe that the only way to undo the unfounded negative connections that people internalize is to demonstrate our true nature in a selfless and intimate way.
In Toronto, Ruby developers are friends. We help each other out when times are tough, we recommend talent when we’re too busy, and we find each other for proactive social networking — the meaty handshake and beer kind — when we’re looking for the next gig.
We’re not competing; we’re building something bigger. Did you know that we started Rails Pub Nite to encourage people to form companies and compete with us? In those early days, we had zero competition and it was hurting our credibility. Competition wasn’t just good for Unspace, it got us off the ground.
There will be no computers of any kind allowed!
Some folks have been perplexed by our insistence on leaving the MacBook Pro at home. This will force an opportunity to speak passionately and eloquently about their work, and why they love Ruby. All too often, the almighty demo serves as a crutch for geeks that are rarely called upon to demonstrate their social tact. Frankly, some people do not know how to be personable, and the secret is that practice makes perfect.
After all, good companies and potential partners are looking for the right combination of attitude, skill, and experience. All too often, non-technical people are intimidated into hiring lame developers simply because of a mile long list of acronyms on their resume.
The event is free to the public and there will be quiet places to meet with potential clients or employers. There’s only room for about 40 boards, and they are available on a first come, first served basis. We expect and encourage junior Ruby developers to participate as well as more experienced Rubyists; honesty really is the best policy, especially when paired with a great attitude and a willingness to learn quickly.
Participation will cost $15 for students, $20 for individual contractors, and $30 for small companies for each bristol board they want to put up.
More information will follow, but we intend there to be desirable prizes for things like best poster. We’re going to promote this event, and we hope that you will treat the occasion like your next gig depends on it.
Are you hiring or looking for a technology partner for your new start-up? There is no better place for you on June 6th! Come and meet the best developers in the city.
We Rubyists are in a prime position to take advantage of the economic downturn and use it to our advantage. It’s an awesome time to start-up, or use some down-time to learn new tricks or even try a new hobby. We can demonstrate that we’re not just clever early adopters, but an honest to goodness community that creates opportunity while everyone else waits for the sky to fall. Rubyists are not risk-averse and by definition many of us are early adopters… there’s a huge number of would-be entrepreneurs looking for your skill-set right now.
What should you do to prepare? Well, in addition to busting out the magic markers, sparkles and stickers, we recommend that you put some choice screen shots and maybe a chart or diagram up as a centerpiece on your board. Make sure that everything is legible at a reasonable distance, and if you’re keen to show off your code then we suggest printing it off and sticking it in a duotang. You should also bring business cards to hand out. The goal is to show a potential employer or business partner why you’d make a great addition to the team. It wouldn’t hurt to think through some of the basic questions a random visitor might ask you:
Why should I use Ruby instead of X? Does Ruby scale? Is Ruby ready for The Enterprise? These might be tired to the point of cliche, but it doesn’t matter when someone wants to hear your explanation. In fact, knowing the answers to these questions is a big part of why people hire us: a bleeding-edge Ruby developer is going to bring a valuable new perspective that we take for granted.
Learn more and sign up at http://rubyjobfair.ca/ and watch #rubyjobfair
Press, sponsors, or people with ideas to promote the event please drop us a line at info@rubyjobfair.ca. We heartily encourage you to put the Employment.nil? badge above on your blog!
Scratching an itch
posted by pete on May 10th, 2009
When I fell in love with Ruby and Rails some years ago (Unspace turns 5 this fall!) it was David’s framework that got me in the door, why’s eccentricity that made me feel at home, and the rush of a rapidly growing community of almost universally fascinating people that kept me grounded. I can’t believe how many friends I have met through working with Ruby! It’s surreal to wonder what my life would be like today if I hadn’t met folks like Hampton Catlin and Tobi Luetke.
The English-speaking Ruby community sure has had its share of controversies, and watching how everything plays out — sometimes being involved — has been a total blast… for the most part. It’s like a distributed network of creative individuals that are all scratching their various itches with a tool we share a deep affection for.
Well, sometimes if something itches a lot — won’t stop itching, in fact — it turns out that it’s not an itch at all. Sometimes it’s actually a cancer, or perhaps gangrene. In both examples, they can be prevented to some degree; in any case, early diagnosis and response is the best hope of removing something before it removes you.
This whole Rails Maturity Model debacle has been fascinating to watch, regardless of your stance on whether it is good, bad, or ugly. I have nothing but respect for Obie, and I’m curious to see if his itch gets scratched. I see RMM as equal parts “make the community more accessible to new Rubyists and transparent to the entities that would hire them” and “establish Hashrocket as an obvious baseline for defining a quality Ruby development shop”. Personally, I wish him all of the best with that, even if that’s not the itch I need to scratch.
Where RMM fails me is not any fear that Unspace wouldn’t measure up. Everyone involved with Unspace is here for a good reason, and we’re all different. I like how Giles described the fluctuating best practices at ENTP best.
What RMM does not do is facilitate an early warning for the other kind of itch: the cancers and the gangrenes that creep into otherwise healthy systems and take advantage. The Ruby community tries to be so polite that we end up being totally spineless when confronted by a shared threat. We don’t want to hear about our new cancer, think about that slowly creeping gangrene — even though our paralysis to act on things we know aren’t right are causing us harm.
What are we supposed to do when there are people or companies in our community that should be pilloried for their regretful behaviour? There are people amongst us that are, for all intents and purposes, frauds. They lie, cheat, and steal; things most people would consider problematic beyond anti-social Internet troll antics and IRC melodramas.
It’s painful when you’ve personally talked to 3-4 start-up founders that have all been victimized by the same individual. I’ve put a huge amount of my life into making Ruby-backed web applications the obvious choice for new ventures in Toronto, and so it’s beyond embarrassing when people are in visible distress because one of the rare bad apples made a whole bunch of promises, took their money, and ran. Ruby was sold to them as being a way to identify people who were team players at the top of their game. These are people who will likely think twice about anything we as a community promise a second time. That’s a huge shame.
I sincerely hope RMM serves whatever needs it was created to take care of. In the meantime, what I want — the Ruby blacklist — is something that most people are terrified about discussing for fear of social, business, and — let’s face it — legal backlash.
That’s a real shame, because these cancers are eating us.
Heads up! iPhone development workshop in Toronto
posted by pete on May 4th, 2009
Our friend Justin from Refresh Events just let me know some exciting news: they are running an iPhone development workshop on June 19th. The instructor will be Dan Drew, who is a really smart guy.
Check it out here.