Thoughts on Systems

Emil Sit

StackOverflow DevDays Boston 2009, Afternoon

The afternoon of Boston DevDays 2009 was, in my opinion, not as broadly appealing as the morning sessions (see my writeup of the morning here). However, there was still a lot of interesting material presented.

Joel welcomed us back from lunch by plugging StackExchange and how it’ll mean the end of “crappy old copies of Usenet” (by which he meant phpBB). He showed a pretty graph of StackOverflow edging out ExpertsExchange in traffic. He also announced a new job search site called careers.stackoverflow.com that charges job seekers some money and asks you what your favorite editor is. There was also a video ad for the FogCreek training videos. This man knows how to monetize.

Patrick Hynds and Chris Bowen

The first technical session of the afternoon was on ASP.NET MVC. Patrick started the session with an explanation of ASP.NET MVC’s history relative to ASP Classic and ASP.NET, and why one might want to use a model-view-controller (MVC) architecture for a website: for example, much finer control over generated HTML compared to traditional ASP, test-driven development, and better URLs for SEO.

The rest of the talk was a demo of creating a hello world MVC application in Visual Studio. The presenters walked through updating models and view and controllers, setting up some basic routing. It seems that ASP.NET MVC is a fine re-implementation of Ruby on Rails or Django for the Microsoft world. One concrete tip I learned was that in Visual Studio, Control-. will offer you some completions or other shortcuts.

Reception to this talk was somewhat mixed, at least as far as I can tell from the blogs and Tweets about it. The talk itself could have been improved, of course; for example it would have helped for Patrick to have explained what MVC stood for (with a few architecture diagrams) before plugging its advantages for ten minutes. My take is that if you knew nothing about MVC, it was a straightforward talk that gave an introduction to the concepts and the implementation in .NET. If you were already familiar with MVC, I think you would have thought it pretty content-free as there wasn’t a tremendous amount of focus on the ASP.NET side of things.

John Resig

John Resig, the creator and lead developer of jQuery, a very popular JavaScript library, next took the stage to talk about JavaScript testing.

“Developing for JavaScript is a lot like whack-a-mole,” John reported. The large space of operating systems, browsers, browser versions, JavaScript engines, and browser plugins mean that typically if you fix one thing you’re more than likely to break something else. And so, in some informal studies, John found that people just don’t test. This is something John would like to change.

A unit test suite for JavaScript apparently isn’t that hard to write. John threw up a bunch of increasingly feature-rich test harnesses—with asserts, grouping by role, and a test runner web-page—using a few dozen lines of JavaScript. The hardest part of writing a test suite is likely to be adding support for asynchronous events (e.g. XMLHttpRequests). Fortunately, there are several pre-built suites such as QUnit, JSUnit, YUI Test, and Selenium. John spent a bit of time talking about the differences between these frameworks, and particularly plugged QUnit and YUITest.

Selenium is of particular interest since, unlike the others, it is not just a unit test framework. It also has plugins to allow recording and scripting events to a browser, so you can do whole site testing. It even comes with Selenium Grid which will let you distribute and automate testing. This seems like a big win.

There are JavaScript engines like Rhino. To help test code in a browserless environment, John wrote env.js, which is a browser-like environment that runs in pure JavaScript. He talked about how this could be used for screen scraping.

"John Resig plugs testswarm.com for distributed JavaScript testing." Finally, John introduced testswarm.com. This is a SETI@Home style site where anyone can visit the site, download some tests to run and report back the results. This should give very broad coverage and allow developers to get feedback from a wide range of real environments (e.g. mobile!).

Overall, John’s talk was a rapid-fire overview of JavaScript testing resources from a JavaScript ninja. It was very practical, easy to follow and probably great for anyone who does JavaScript development. However, it lacked the “Python is awesome!” feel of Ned Batchelder’s morning talk and so for a non-Javascript developer such as myself, it was not as appealing.

Miguel De Icaza

Miguel De Icaza closed out the day with a talk on Mono. Miguel explained that he wasn’t really sure what he should talk about—Mono is a giant universe and explaining “Mono” it is “kind of like explaining God”—and his informal survey didn’t really provide a mandate. He would up giving some nice technical demonstrations of some recent Mono developments, with a fair amount of personal flair to keep the audience engaged.

The core of Mono is an implementation of the Common Language Runtime for Linux. One of the goals of this project was to bring the best development tools to Linux.

The first demonstration Miguel gave was an impressive combination of tools. Using a plugin to Visual Studio, Miguel demonstrated that you could develop a Linux port of a .NET application entirely using Visual Studio on Windows, and seamlessly testing and packaging on a Linux machine (or VM), by walking through a live example of porting BlogEngine.NET. This made use of Bonjour to dynamically discover the Linux machines, pushing execution to the selected machine, and viewing the debugging results in Visual Studio.

Miguel then decided that a developer might want to publish their application as a software appliance, so he walked through a complete demonstration of using SUSE Studio. He seamlessly built an RPM on his Linux box from Visual Studio and pushed it into “the cloud” of SUSE Studio. From his browser, he configured an appliance with that RPM, baked it the way they do on cooking shows, booted the virtual machine in the cloud, accessed it using a Flash-based console in the web browser, and accessed the port of BlogEngine.NET that he had just booted.

For his second major demonstration, Miguel moved over to MonoTouch. This showed using MonoDevelop, an IDE for Mono developers, running on a Mac, to work with the iPhone interface builder application, to build a simple flashlight application (i.e., a giant white button) for the iPhone simulator. He talked a little also about the technical work involved here, which was to compile the developer’s Mono code into ARM assembly and link it into the Mono runtime, to create an iPhone application. This gets around Apple’s “no interpreters” rule.

Miguel’s talk was easily the most entertaining one of the day. It was perhaps most entertaining because, in addition to his wry humor (check out the pictures from Ian Robinson’s Tweet, for example), as he performed his live demonstrations, things would break, whereupon Miguel would think, realize what was wrong, pop open a Terminal and fix it. That’s not something you see in the usual carefully scripted demos at most shows. Of course, Miguel was also demonstrating some interesting technical features and giving an advertisement for a wide-range of Mono-related tools as well, so there was something for everyone.

Wrap-up

After Miguel’s talk, Joel suggested that the audience break up into informal groups and get dinner, loosely organized around seven areas that he suggested. I hadn’t planned for that and had to get home; not sure how many people went.

Overall, I think DevDays was well worth attending. On the networking side, I got to meet a few local developers (of whom I’ve posted a few pictures on Flickr) and catch up briefly with some acquaintances from school. On the technical side, I got a broad overview of several popular technical areas from leading figures in those areas.

Comments