Categories
Etc

haircut

before
before

after
after

Categories
Computers Work

Yay for querySelectorAll. Boo for StaticNodeList.

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.

Categories
Coffee

More Roasts

Since the HotTop arrived, I’ve gone through four roasts. The first roast (which I’ll call roast zero) was a total failure and I was quite bummed. That is, until I realized that in my excitement and haste, I had forgotten to install the rear filter. Without the rear filter, way too much air was drawn into the roasting chamber by the fan, which quickly stalled and then killed the roast. 250g of baked beans went right into the trash.

Once I figured out what I’d done wrong, the next few roasts went swimmingly. Here’s the data for roast of some of Sweet Maria’s Moka Kadir:

Time Temp Heater Fan Notes
0:00 167 100 0  
0:30 168 100 0  
1:00 177 100 0  
1:30 188 100 0  
2:00 201 100 0  
2:30 213 100 75  
3:00 226 100 0  
3:30 240 100 0  
4:00 253 100 0  
4:30 266 100 0  
5:00 278 100 0  
5:30 289 100 0  
6:00 300 100 0  
6:30 309 100 0  
7:00 318 100 0  
7:30 325 100 0  
8:00 334 100 0  
8:30 341 100 0  
9:00 347 100 0  
9:30 354 100 25  
10:00 359 100 25  
10:30 365 80 25  
11:00 370 80 25  
11:30 374 80 25  
12:00 377 80 25  
12:30 381 80 25  
13:00 386 80 25  
13:30 388 60 75  
14:00 392 60 75 First Crack starts
14:30 395 40 100 Rolling First
15:00 397 40 100  
15:30 399 40 100  
16:00 401 40 100  
16:30 401 40 100  
17:00 401 40 100 First Crack finishes
17:30 402 40 100  
18:00 402 40 100  
18:30 402 40 100  
19:00 402 40 100 Second Crack starting
19:30 404 40 100 Second Crack rolling

My second roast was some Ethiopia Organic Sidamo Dry Process Special Selection.

Time Temp Heater Fan Notes
0:00 167 100 0  
0:30 172 100 0  
1:00 181 100 0  
1:30 194 100 0  
2:00 208 100 0  
2:30 221 100 75  
3:00 235 100 0  
3:30 249 100 0  
4:00 262 100 0  
4:30 275 100 0  
5:00 287 100 0  
5:30 298 100 0  
6:00 309 100 0  
6:30 318 100 0  
7:00 327 100 0  
7:30 336 100 0  
8:00 343 100 0  
8:30 350 100 0  
9:00 357 100 0 Slight crackle
9:30 363 100 25  
10:00 368 100 25  
10:30 374 80 25  
11:00 379 80 25  
11:30 383 80 25  
12:00 386 80 25  
12:30 392 80 25 First big pops of FC
13:00 395 80 25  
13:30 399 60 75  
14:00 402 60 75 FC rolling
14:30 406 40 100 FC ends
15:00 408 40 100  
15:30 410 40 100  
15:45 411 40 100 Stop roast. SC just starting
Categories
Coffee

New Roaster Pics

The seller sent along some pics of the roaster and here they are, in case you were wondering what in the world I’ve been blabbering on about.

Categories
Coffee

A New Roaster

After burning through (not literally) a few pounds of green beans with the iRoast that AJ graciously sent me, I quickly realized that I really enjoy roasting coffee. I like the iRoast, but it has a very limited capacity and it’s really not known to be a great espresso roaster, so I started doing some digging around. After reading a bunch of reviews and forum posts on Coffee Geek and Home Barista, I settled trying to find a used HotTop to continue my little roasting adventure. One post to Coffee Geek and a few emails later and I’m soon to be the proud owner of a slightly used roaster, formerly owned by a church in Pennsylvania.

So.

Excited.

More when it arrives.