Blue Sky On Mars

Thoughts on Building Software Products

Introducing the DisplayShelf widget

by Kevin Dangoor

This afternoon, at CodeMash, James Ward and I took over an open spaces table, got some extra displays set up and hacked up a TurboGears widget wrapper for Ely Greenfield’s Display Shelf Flex component. The Display Shelf gives you the effect that Apple created in iTunes 7 with the cover art view. Now, in TurboGears, you can display your own photos the same way trivially. Just call the widget with a Python list of image URLs, and you’ve got your shelf!

This was completely unrehearsed live coding, and it went surprisingly well. The widget itself is far simpler than Ely’s Flex component, so Ely really deserves the credit for how cool a widget this is. This was a good chance for me to learn a bit more about Flex and the Flex Ajax Bridge. James got to learn about making TurboGears widgets. Some screencasts might come out of what we did there, and I’ll link to them if they pop up.

In the meantime, you can easy_install DisplayShelf to get the widget, or go to the DisplayShelf Cheeseshop page to get the source.

Great job, CodeMash organizers!

by Kevin Dangoor

This year was the first CodeMash conference, and I hope it’s not the last. Unfortunately, I could only stay for one of the two conference days.

What makes CodeMash great is that it’s a software developer conference that covers all the bases. There were lots of Python talks. There were .NET people all about. Lots of Ruby love. Many Java folks. (There were many well known folks there as well.) It was a great theme for a conference and it was really nice to have it in the midwest.

The organizers did an excellent job. From a speaker/attendee’s perspective, everything seemed very smooth. The Kalahari hotel (and indoor waterpark) was very nice, and I’m only disappointed that I didn’t have a chance to go into the waterpark while I was there.

Bruce Eckel’s CodeMash keynote on a dynamic world

by Kevin Dangoor

Bruce Eckel is no longer a fan of “eyes forward” talks, where you sit and listen to someone give a talk. He points out that we can do that on the web. When we get together at a conference, we should do the things that we can’t do when we’re separate. That’s why Bruce is a fan of open spaces discussions.

He makes a very good point, and I know that I’ve gained a lot through hallway talk at every conference I’ve been to.

He went on to talk about the Burning Man festival and all of the compressed creativity of the event. He talked about how he built his shade structure and the things he learned by doing that. The only way that he could learn what he needed to know was through experimentation.

Bruce brought up DeMarco and Lister (Peopleware, Waltzing with Bears) and how “project estimation is a dynamic statistical process”. I saw Tim Lister speak at GLSEC, and I really agree with the principals here. Thinking in terms of probabilities will help you be more accurate in estimation.

Dynamic languages let you experiment and fail faster. Bruce talks about how good designers rapidly throw out ideas that clearly won’t fit the constraints.

This talk was wide ranging, non-technical and yet engaging. Bruce has a good storyteller style. The overall theme of failing quickly and being open to changing things to really meet the requirements came through quite clearly. Bruce is worth seeing, if you have a chance.

Neal Ford on DSLs at CodeMash

by Kevin Dangoor

Neal Ford, from Thoughtworks, did the opening keynote session at CodeMash. His talk was about language oriented programming and domain specific languages as the next evolutionary step for programming. (LOP and DSL were both terms coined by Martin Fowler, also of Thoughtworks). Neal traced through the history of programming languages to determine how we got to the languages we have today. Then he started in on DSLs and had some compelling examples of DSLs in the real world (Starbucks, Waffle House hash browns, etc.).

He used log4j configuration (which also applies to Python logging) as an example of something that is just begging to be turned into a DSL. (Which he does in Java for log4j… yes, you can make DSLs of a sort with Java.) One area where this has been picked up in the static language world is in the mock object libraries, where expectations are described using something more like a DSL.

Neal talks about all of the XML configuration files we have today as DSLs and also contends that Unix, if it was invented today, would have XML configuration files all over the place. Ick. I’m of the opinion that XML makes for painful and verbose DSLs, and would rather have much more pleasant DSLs.

He cited Martin Fowler’s strategy pattern DSL example where he talks about a reader for positional record files of the type you often get from mainframes. He made a Ruby version of that same example that was quite nice and readable, and I thought this was the perfect example of why you wouldn’t want to create such DSLs with XML. XML would have been far harder to read.

The last part of the talk went into the notion of “Language Workbenches”, a new category of tool that puts the abstract representation of code at the center of the universe (rather than your source) and then puts different kinds of projections on top of the abstract representation. JetBrain’s Meta Programming System lets you create DSLs with their own highlighting editors that support pull downs and context sensitive error displays.

None of the language workbenches are ready for prime time yet. It’s something to watch for, but nothing prevents us from making DSLs in our existing languages where it makes sense to do so.

I think it will be interesting to see how DSLs evolve over time (literally: when you make a DSL, how well do you maintain backwards compatibility?)

Neal’s talk was thought provoking in that designing around the vocabulary of a domain is not the main way most of us design.

links for 2007-01-18

by Kevin Dangoor