HyperTextMatters
17 January 2006
 
Ben Franklin Father of Open Source (Hardware)
On this 300th anniversary of Benjamin Franklin's birth, it strikes me.  Watching a tv program about him on the History Channel, it was noted that Franklin did not patent, and therefore did not profit from, a couple of his most prominent inventions, the "Franklin" stove and the lightning rod.

Wouldn't this make Ben Franklin the father of open source, albeit hardware?
Posted by htmatters at 8:46 PM | Comments (8)
14 January 2006
 
The Irrelevance of Joel Spolsky
From Joel Spolsky's forward to a new book regarding software startups aka "MicroISV"s, his first and presumably most important piece of advice is: "Don’t start a business if you can’t explain what pain it solves, for whom, and why your product will eliminate this pain, and how the customer will pay to solve this pain."  On the very same web page however -- on all the web pages on joelonsoftware.com in fact -- there is a pane in the left hand column the first link of which is "more about (Joel)".  Following that link leads to a paragraph with the heading "Fog Creek Software" (Mr Spolsky's own software startup) in which he recounts:  "We didn't start with a particular product in mind...."

There's no mention of this in the foreword.  Too bad, because an explanation of this seeming change of heart is probably what could have made this piece meaningful, instead of a misplaced plug for CommonLisp.  Indeed, these inconsistencies and irrelevancies smack of nothing more than jumping on the Paul Graham bandwagon.

So which is it Mr Spolsky?  Do as you say?  Or do as you do?
Posted by htmatters at 7:47 AM | Comments (7)
6 January 2006
 
EIBTI for Javascript: explicit is better than implicit
Javascript's "prototype" driven nature allows programmers to alter the behavior of built-in types thusly:

String.prototype.isEmpty = function() { return /^\s+$/.test(this); }

Just because you can, doesn't mean you should though.  For instance, a method you add to String's prototype might require two arguments, but a future update to the language itself might add the very same method with the arguments reversed.

Consider this alternative:

function FormValue(str) { this.str = str}
FormValue.prototype.isEmpty = function() { return /^\s+$/.test(this.str); }
var test = new FormValue(" ");

Note you must explicity instantiate a FormValue instance, rather than implicitly operating on a String (primitive).  Consider this a feature.  For instance, Python has popularized the acronym EIBTI, or "explicit is better than implicit."  No wonder MochiKit, "a production-quality framework that brings powerful and well-known Python idioms to JavaScript," rightfully leaves String.prototype alone.
Posted by htmatters at 11:55 AM | Comments (5)