My 5 year old loves to create "books", which to date consisted of stapling a few pages together and going to town on them. Lately he's been interested in "chapter" books with a little more structure: a picture and some text on each page.
He asked for my help in …
MoreUpdated, thanks to Simon Willison:
Say you'd like to pick part of your jQuery call chain dynamically - for example, to removeClass for many elements, but addClass to one special element. Here's how you do it:
var myfunc = some_condition ? 'addClass' : 'removeClass';
$('#someid').html('something')[myfunc]('some_class');
The first line selects the …
MoreNeat Javascript function scoping trick from Dustin Diaz, master of cool Javascript tricks. His Javascript Video Tutorials were the first time I was exposed to proper Javascript (Justin, do some more!).
Here's the trick:
var o = 'hello world';
(function() {
alert(this);
}).call(o);
And why is this neat? Because it …
MoreMy laptop suddenly and for no apparent reason started playing techno music. I started digging around, closing app and browser window after window until it finally stopped. Turned out to be coming from google reader. I re-opened reader and the music came back. I went thru and marked a bunch …
MoreI remember when I finally had Calculus, my final year of high school. It took a bit of effort to get my head around it, but once I got it I remember the distinct feeling of being pissed off. Pissed off about all the time wasted in Physics class. In …
MoreThere's a lot of info and tooling out there for building iPhone ready apps. But what about good old Blackberry? Are there good tutorials / docs on how to build websites that show well in the Blackberry browser? I get the sense it's not WML (or is it?)…
MoreMost of my contacts are in LinkedIn, but you can't store phones numbers, IM addresses, etc, there. The vast majority of my phone contacts are in my cell phone, but those die every time I kill a phone, which is about every 3-6 months these days. I used to use …
MoreHuh. I just did some dependency injection via monkey patching in what appears to be a valid use of both. Amazing that either technique would be useful in real life.
MoreWith 3 kids in tow I'm on the inevitable slope towards owning a minivan. Having long ago given up the last vestiges of pride in what type of car I drive, I'm perfectly ok with this, but the wife is not into minivans.
Just about everyone I know is in …
MoreI've noticed I'm picking up a lot of Twitter followers from Iran in the last few weeks. Anybody else noticing this? Is Twitter hitting mainstream in Iran?
MoreI haven't yet met a nation more in love with its equipment.
I live close to a bike path. Every weekend hordes of exercise minded Americans come to bike. It's a wondrous site to see.
Some subset of these folks are a bit overweight, carrying perhaps an extra 40 or …
MoreOperating systems and applications need to support a mode wherein typing the smallest identifying subset of keys will cause the appropriate file/function to be opened. Firefox 3 does this for history urls - start typing and you'll see URLs that contain that set of keystrokes anywhere in them. iPhone's safari …
MoreFrom W3C HTML Recommendation:
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
(Noting here because I always forget and have to look this up)
MoreI had watched about half of There Will Be Blood, enjoyed it, but was surprisingly un-motivated to watch the rest. Tonight I finally watched the second half.
The first half of the movie is quite good, and Daniel Day-Lewis is fantastic. But the second half takes an unexpected turn and …
MoreMentioned in passing by Roberto today. Sounds about right to me.
MoreI was surprised by the persistent constraint of "4 years, x dollars" that came up in the Engineering Dean's conference. Apparently any change to the university curriculum that challenges the 4 years or the cost basis for graduating is virtually impossible to make. This came up in the context of …
MoreI was part of the industry panel at the American Society for Engineering Education's Engineering Dean's Institute Conference last week on the "Defining the Engineer of the Future - What are the skill sets industry is looking for?" panel.
Most of the nonsense I spewed can be summarized as: don't approach …
MoreI'm sitting in front of a 67 inch HDTV reading rss on the iPhone. And blogging. Hopeless.
More