ben lowery

Visualizing Data in Dynamic Systems

2011 May 17th

Interactive Exploration of a Dynamical System from Bret Victor on Vimeo.

A user interface for exploring systems of differential equations. Every variable is shown as a plot; every parameter has a knob that can be adjusted in realtime. This ubiquitous visualization and in-context-manipulation helps the user develop a sense for how the parameters of the system influence its behavior.

Part of the Kill Math project: http://worrydream.com/KillMath

By Bret Victor: http://worrydream.com

Mike Rowe on Skilled Labor

2011 May 13th

Lessons from the Trenches

2010 Sep 24th

Paul, who I seem to be linking to a lot lately, just put up a great piece on lessons learned in the trenches of startups over the past few years. I’ve been thinking about this a fair bit myself lately, so here’s my take.

Always Be Learning

Paul mentions this too, but it’s worth reinforcing. New things come along very very quickly in tech and you must be able to quickly learn enough about them to understand if they could be beneficial. Sometimes things come along that can severely reduce your cycle time while developing, things like Firebug, Dojo’s Dijit widget system, any server-side system that doesn’t require recompiles, remote editing, Skype, screen-sharing. Cutting your cycle time means you can either get more done total, or you can get enough done in a sane amount of time.

Take Turns Up Front

When you’re running the show, it can be very hard to keep learning and it’s easy to burn out. Everyone is coming to you for advice, everyone wants direction. It’s overwhelming. Everyone needs a decision and they need it now, so most of the time you’re going to fall back on what you know. You’ll stop learning and you’ll get burnt out.

I like to take a page from pro cyclists. When you’re riding a draft line, one person rarely leads the whole time, riders in the group takes turns up front. One guy will blow himself out keeping the train running for a bit, then fall back and take a rest, while the next person takes his place. You can do this in tech too. To me, making decisions is the most exhausting part of being in a startup. If you can, take turns making them. Let someone figure out direction and then let the rest of the team take it and run. Implementation is easy, deciding is hard.

Getting this to work requires a flat team and small egos, so this can be tricky to pull off. The team as a whole has to responsible for the direction and the product.

Find Balance

There’s a severe temptation to work all the time when you’re in a startup. Don’t do it. If you’re working 80 hours a week, I can pretty much guarantee that at least 40 of those hours are waste. Software requires intense concentration and no one can keep that up for that long without a break. That said, when you’re working, work. When you’re not working, don’t be at work. I believe (and have seen, over and over again) that a well-rested motivated person can get more done in 30 hours a week than a tired, unmotivated, burned-out person can get done in 80. Or 800.

Yay for querySelectorAll. Boo for StaticNodeList.

2008 Aug 29th

In the coming months, all of the major browser vendors are going to implement a new API called querySelectorAll, which allows us web developers to query a document for elements matching a CSS3 selector and quickly get back a list of matching nodes. This is really fantastic news and should help to speed up one of the more common things we do in web apps.

We have basic support for the API in the latest Firefox 3.1 nightlies, IE8 beta 2, and WebKit, and Dojo has basic support in trunk for using querySelectorAll to drive dojo.query if it’s available, so I thought I’d try it out and see what happens.

Well, things … mostly … work. The selection stuff is great, but Dojo does one rather nice thing with the dojo.query interface: it returns an Array object that’s been decorated with the JS 1.7 array methods if they’re not natively available, plus some other Dojo-specific things, like connect and style and so forth, to make running operations against the result set easy. For some reason, a number of these methods were broken.

I did some digging and it turns out that the breakage is happening because the querySelectorAll return is not an Array or a subclass of an Array, but a new thing called a StaticNodeList. It looks mostly like an array and works like an array, but it doesn’t have any of the new array methods (at least on Firefox 3.1 and IE8 beta 2) and as it’s not an array, it fails an instanceof check. This means code like this:

var spans = document.querySelectorAll("span");
var divs = document.querySelectorAll("div");
var both = spans.concat(divs); // fails, no concat method

just plain doesn’t work. JS devs already have this array-ish problem with the return from document.getElementsByTagName and the arguments object available inside functions. From looking at the spec for the StaticNodeList, I cannot for the life of me see why this isn’t just a plain array with the standard array methods on it. It’s a static collection, so treating it just like an array should be fine, no?

If anyone can shed light on why the returned value from querySelectorAll is not just a plain JS array, I’d love to hear it.

Working From Home

2008 Jul 30th

Mandy’s always looking out for tips on how to make working from home work out for both of us and she found a great article with some tips for making it work.

For me, the most important things are:

  1. Having a routine with a clear separation between work and home,
  2. Having a set space in the house that is “the office” and
  3. Taking breaks, especially getting out of “the office” for lunch

If you work from home, what works for you?