Calendar Girl

Given all the talk about the Enterprise Software Should Be Sexy-Meme, I can't believe nobody's brought up JWZ's Groupware Bad, with the classic quote:

 Your "use case" should be, there's a 22 year old college student living in the dorms. How will this software get him laid?

Though I like what Nick Bradbury had to say:

Calling software "sexy" sounds weird to me.

Seriously.  The way Scoble talks, next someone's going to come out with the software equivalent of the Snap-On calendar. 

— Gordon Weakliem at permanent link

I ran across some sample code with that was writing out a <script> block with something like this:

document.write('<script src="http://www.example.com/example.js"></scr' + 'ipt>')

I assumed that splitting the end tag was some sort of workaround for a literal string length (the actual example URL was much longer).  Turns out that splitting the end tag is necessary to make the document.write() work correctly, and there's actually a functional reason for this.  The short story is that the browser doesn't parse the contents of <script> tags, because there's  no guarantee that it knows how to parse the language specified in the script, so it can't tell if it's a real end tag, embedded in a string literal, part of a comment, whatever.

Lesson learned: if you're outputting a <script> block in document.write(), you need to express the end tag in some way that hides it from the parser.

— Gordon Weakliem at permanent link