Archive for April, 2005

Deixis and Booty Dancing

April 30th, 2005 by daryl

Lennie tries to get the kitty.Deixis. It’s not the plural of Deiks (or dikes or dykes). It means, basically, pointing. Words like “this,” “that,” and “there” that refer to particular things or places within their context are deictic. I mention it because Lennie has started to pick up on deixis more and more, and it’s a milestone for babies. For a while, she’s been pointing at tangible objects like the kitty cat or the ducky shower curtain rings, but she’s kicked it up a deictic notch now by pointing to things in books. We’ve got a grownup book about cats that Mleeka got when Tater was still a kitten and there was some hope left in the world that he might not be the evil cat he’s turned out to be, and Lennie likes little more than to sit on the floor and mangle the pages while pointing to all of the individual cats and inhaling each time as if surprised. She’ll do this for ten minutes at a stretch by herself and then for ten more when I join her. She often says “kitty” while pointing.

She’s also a little better now at differentiating between the kitty and the doggy, often applying the right label to each. (Side note: She doesn’t really say middle consonants yet. That is, “kitty” comes out more like “kihhy” and “doggy” more like “dohhy.” Basically, she hasn’t really gotten the hang of velar and alveo-palatal sounds in the middle of words yet, so she substitutes a sort of generic middle-mouth almost-non sound, much as ventriloquists substitute “th” for “f” and “n” for “m” to avoid moving their lips.)

She’s also started standing alone out in the middle of the floor without any help. It’s generally for just a few seconds and without any big to-do on her part (she’s very matter of fact about it, as if she’s been doing it her whole life), though the duration’s getting longer and longer. It’s not a particularly wobbly stand. She can also do a slow crouch from a standing position. While she does sometimes just plop down on her butt from a standing pose, she also frequently just bends her knees and slowly squats down until she’s on the floor. It seems very controlled and skillful to me. I’m not sure I could do as well.

When we read to her now, she likes to help flip the pages of the books. The kitty cat book aside, we try to keep her away from books with standard, flimsy pages. Mleeka sings her books to her most of the time now. There’s a Wocket in my Pocket is very adaptable to different tunes. We keep Lennie’s books and puzzles for now on a shelf below the TV in the armoire we use for an entertainment center, and these are the first toys Lennie usually seeks out. She’ll just go right over to the shelf and start pulling the books and puzzles down in spite of the fact that there’s a crate of colorful, inviting toys right beside her. This makes her bookish mommy and daddy proud.

Lennie loves windows. We keep the blinds raised enough on several windows that she can go over and have a look outside. She’ll stand there and bang on the windows with her palms, prompting me in many cases to shout in my best muted Dustin Hoffman voice, “Elaine! Elaine!” Then I shout in my best muted Abe Simpson voice, “Mrs. Bouvier! Mrs. Bouvier!” Yesterday, it was raining kihhies and dohhies, and Mleeka opened the front door so she could get a look out the storm door. I was in the office, but Mleeka reports that she loved it and was just thrilled by the rain.

And finally, she’s a dancing queen. She loves to dance. It started as a little head-bobbing when her Pooh (who crawls across the floor talking and playing different short riffs and who says, among other things, something that sounds to me like “swallow me”) would make music. Then there’s her ducky who plays tunes when you push buttons on his back. Her head bobbing at times now becomes full-throttle body bouncing. If we have music playing through the DVD player, she’ll stand up at the armoire (holding on for balance) and really shake her booty. The other day, I was in a bookstore with her in the sling and she started bouncing to the jazz they had playing. I’ve noticed that she often perks up at instrumental music with distinct notes. So, for example, at the beginning of the Statler Brothers’ “Flowers on the Wall” on the Pulp Fiction CD, when the first few single guitar notes are played, she’ll start to bounce. She dances to other music, of course, but I think that hearing a few distinct notes in succession (like what her toys tend to play) acts as kind of a cue for her.

And that’s the last couple of weeks in the life of Lennie.

Test Page

April 30th, 2005 by daryl

Test Page

Long week (or float week? or maybe int week?)

April 29th, 2005 by daryl

It’s been a long week of code-writing, to the point that I almost can’t help thinking of my week in terms of a little script. Here’s what I did this week:


var days=array('Monday','Tuesday','Wednesday','Thursday','Friday');

var daryl=new Person('Daryl');

for(var idx=0; idx < days.length; idx++){
    var hour=0;

    while(hour <= 24){
        var on_break=false;
        if(hour >= 6 && hour <=24){
            if(days[idx]=='Wednesday'){
                if(hour > 11.5 && hour < 1){
                    daryl.eat();
                    on_break=true;
                }
            }
            elseif(days[idx]=='Friday'){
                if(hour > 12.5 && hour < 2){
                    daryl.eat();
                    on_break=true;
                }
            }
            else{
                if(hour > 12 && hour < 12.5){
                    daryl.eat();
                    on_break=true;
                }
            }
            if(hour >= 18 && hour <= 20.5){
                if(hour > 18.5 && hour < 19){
                    daryl.eat();
                    on_break=true;
                }
                else{
                    daryl.play_with_baby();
                    on_break=true;
                }
            }
            if(on_break == false){
                daryl.work();
            }
        }
        else{
                $daryl.sleep();
                on_break=true;
        }
    }
}

function Person(name){
    this.name=name;
    this.nutrition_quota=0;
    this.sleep_quota=0;
    this.baby_playtime_quota=0;

    this.eat=_eat;
    this.sleep=_sleep;
    this.play_with_baby=_play_with_baby;
}

function _eat(){
    while(this.belly_full_percentage < 100){
        this.nutrition_quota++;
    }
}

function _sleep(){
    var dog_bathroom=Math.floor(Math.random()*65+1);
    var dog_bathroom_again=Math.floor(Math.random()*65+1);

    //Note that this isn't 100 percent by a long shot. :(
    while(this.sleep_quota < 85){
        this.sleep_quota++;
        //The dog makes me let him out at least twice a night at a cost of five minutes of sleep each time.
        if(this.sleep_quota==dog_bathroom || this.sleep_quota==dog_bathroom_again){
            this.sleep_quota+=5;
        }
    }
}

function _play_with_baby(){
    while(this.baby_playtime_quota < 100){
        this.baby_playtime_quota++;
    }
}

Monday/Tuesday

April 26th, 2005 by daryl

6:00 a.m. Alarm goes off. Get up and work until noon.

12:00 p.m. Quick lunch and shower (I think I showered).

12:20 p.m. Resume work until 6:00 p.m.

6:00 p.m. Feed baby, eat, spend time with baby until she’s tired of me and wants Mleeka (which doesn’t take long today).

7:40 p.m. Go back to work. Beat head against wall for an hour on one stupid problem previously solved but newly reintroduced in a slightly different form.

11:10 p.m. Quit working for the night (having fixed the reintroduced bug, among other things). Get ready for bed and try to do some reading.

11:35 p.m. Baby’s asleep on the couch. Mleeka’s getting ready for bed. <Thump, waaaaanhhhh> Uh oh, baby fell off the couch. Work to get her calmed down and sleeping. Try to read some more. She won’t sleep.

12:00 a.m. Baby’s pinching and climbing Mleeka. Get baby and walk around for a while, cooing and soothing.

12:20 a.m. Baby’s asleep. Climb into bed, hand her off to nurse some if she wants (she does this in her sleep).

2:00 a.m. Dog’s gotta pee. So do I. Get up, let dog out, pee, let dog in, get back in bed.

2:40 a.m. Gotta pee again (gallon of sweet tea a day’ll do it). Up, pee, back in bed.

4:00 a.m. Dog’s gotta pee again. So do I. Get up, let dog out, pee, let dog in, get back in bed.

4:15 a.m. Dog wants in bed (which is too tall for him to jump into) and cries until he gets his way.

6:00 a.m. Alarm goes off. Get up and work until noon…

Weird Button

April 21st, 2005 by daryl

Weird ButtonSo I’m working on adding a little button to a Firefox toolbar. If you click the button, it performs a default action. If you click a little arrow next to the button, it produces a menupopup from which you may choose another action. For an example, check out the Forward and Back buttons in Firefox. Clicking the main button moves you forward or backward; clicking the arrow produces a list of where you’ve been or where you can go. The thing is that by default, this sort of toolbar button is kind of big, and I want a tiny, unobtrusive little button. So I’ve been experimenting with different ways of implementing the button. In one case, it’s fairly small, but it’s got an extra arrow icon and has some extra horizontal space as a label placeholder, even though I don’t want a label.

My latest iteration breaks new ground in UI design. If you look carefully, you’ll see that there’s a little green bullet sort of thing (an icon squished down) and then a button wrapped around this small button in the shape of a sideways “U.” If you click the wrapping button, sure enough, you get the popup. If you click the inner button, you get the default behavior. I fully expect this sort of button to begin appearing in software packages very soon.

Knock, Knock

April 21st, 2005 by daryl

No, this isn’t a joke, though it made me laugh. To date, Lennie has had very little awareness of anything outside a radius of maybe three feet of where she happens to be sitting. That appears to be changing. She’s gotten to where she’ll take off crawling in some direction, then suddenly stop, turn around, and look back at where she came from with a big grin. She’s clearly developing a sense of “I was there where you are, and now I’m over here,” but until just recently, it’s still been her-centric; it’s been her going away and thinking “I was there.”

So this afternoon, I was locked up in my office working, music blaring and oblivious to the rest of the household. All of a sudden, I hear a knocking at my door. It’s pretty low down on the door, as if the cat is batting at the door, which he dometimes does. But it’s a more firm knocking than the pawing the cat usually manages. And it keeps going. So I get up to see what’s going on (suspicious that it might be Lennie and curious as to why she’s roaming around unsupervised knocking on doors), and sure enough, when I open the door, there’s Lennie beaming up at me proudly.

And there’s Mleeka, who had the impulse to pick Lennie up but just couldn’t resist witnessing the cuteness. Which I appreciated.

So now there’s an “otherness” sort of component to Lennie’s awareness. It was “I hear something in there, and think I’ll go investigate.” I like to think there was also something of “Hey, my daddy’s in there playing without me, and I think I’ll go join in the fun because he’s pretty much my favorite person ever” going on in her head but I’m not equipped to prove it, so I’ll withold the hypothesis for now.

Auto-Updating Extensions

April 19th, 2005 by daryl

Eric Hamiter’s tutorial on how to enable extension updates is pretty handy. As he points out, in order to make it so that the “Update” button in the extensions manager actually does something for your extension, you simply provide a value for the updateURL paramater within your extension’s install.rdf and make sure there’s a valid RDF file being served up from that URL. This file contains information about the current version and from where the latest xpi file can be downloaded. When you highlight an extension in the extensions manager and click the update button, it checks the current version number against what’s listed in your remote RDF, and if yours is old, it pops up the update wizard that walks you through doing an update. Very nifty.

But let’s say I want to force an update (or at least prompt the user to let him or her know that a new version exists. Supposedly, there are some configuration options you can set to cause extensions (and Firefox itself) to automatically update (thanks to Nigel McFarlane’s Firefox Hacks for this):

extensions.update.autoUpdate /* set to true */
extensions.update.severity.threshold /* set to 0 (lowest severity) */
app.update.autoUpdateEnabled /* set to true */
app.update.enabled /* set to true */

That didn’t work for me, presumably because there’s some sort of timer. It seems to me as if I’ve heard at some point that different versions of Firefox do their updates at different times once a week. But say I have an important security release for my extension and want to prompt people to upgrade immediately, whether they’ve just installed it two days ago or whether they’ve had their browser open for three weeks without a restart (a tempting method for checking updates would be on browser load).

Luckily, Firefox’s mechanism has interfaces exposed that allow you to tap into some of the functionality. Unfortunately, there’s not enough exposed to be extremely useful, but there’s enough to get by. Specifically, there’s a function available through the nsIExtensionManager component that allows you to display the extensions manager wizard, as follows:

var nsIUpdateItem = Components.interfaces.nsIUpdateItem;
var gExtensionManager = gomponents.classes["@mozilla.org/extensions/manager;1"]
.getService(Components.interfaces.nsIExtensionManager);
var itemType=nsIUpdateItem.TYPE_EXTENSION;
//The guid here is the guid for the extension in question.
var items = gExtensionManager.getItemList(’{e9f3a1cb-98a9-4384-879b-c6d1e39ef5bf}’, itemType, { });
var updates = Components.classes["@mozilla.org/updates/update-service;1"]
.getService(Components.interfaces.nsIUpdateService);
updates.checkForUpdates(items, items.length, itemType, Components.interfaces.nsIUpdateService.SOURCE_EVENT_USER, window);

The trick, then, is to check the current and remote versions of the extension and to display the wizard only when there’s a discrepancy. Else you wind up showing a blank wizard. This is easily enough managed by querying the extensions RDF for the version number and then polling a remote script that serves up the current version of your extension (I use a different output source here than the updateURL RDF because all I really need is the number, and I want to conserve bandwidth. I could find no way to check the remote version using built-in interfaces without spawning the update wizard, though I may have overlooked or misunderstood some code. In pseudocode, the routine runs as follows:

  • Check a timer to see if we need to check for an update.
  • If so, query the extensions rdf to get the installed version number.
  • Check a remote file for the current version number of the extension.
  • If there’s a difference, use the code given above to pop up the upgrade wizard, which walks the user through the process.
  • Set the timer to now plus the update check interval.

Naturally, you kick this off in an onload handler so that any time your browser is started, it checks immediately for updates and then checks periodically for as long as the browser’s open.

Round Two Launches

April 13th, 2005 by daryl

In February, I started a new job that it’s been really hard describing to people.

>> “What do you do?” they’ll ask.
<< “I program stuff.”
>> “What do you program?”
<< “Web services.”
>> “What’s a Web service?”
<< “It’s something that allows another application to access your data.”
>> “But isn’t your company tied up in Firefox somehow?”
<< “Yes. I write Web services that we hope will help enhance the browsing experience.”
>> “How?”
<< “I can’t really say very much about it right now. I’m writing extensions to go along with the Web services.”
>> “How’s your company going to make money?”
<< “Nice weather we’re having today, huh?”

Well, we finally launched our Web site yesterday after a lot of work by a guy named Joel Apter, whom I hooked up with as a developer resource on the Spread Firefox project, and a designer named Bryan Bell who’s great at icon work in particular and who can be contracted for pretty darned reasonable rates. These guys did the bulk of the site so that I could work on my mysterious Web services and extensions with limited distractions. And I think they did a great job.

I spent some time the night we launched doing some benchmarking and tweaking to make sure our site scaled pretty well, and I’m happy to say that we weathered a slashdotting with aplomb, the site hardly affected by the heavy traffic.

For now, our site doesn’t say a whole lot about what we do. Out of the gate, our offering is sponsorship of several popular Firefox extensions. Basically, we’ve given money and other resources (server infrastructure) to these developers both to support their great work and to attach our name to their popular products. We have a lot more on the horizon, and with a little luck and a few more twelve-hour days on my part, we’ll have a beta release of what we hope will be a pretty exciting extension near the end of the month.

Comment Spam

April 13th, 2005 by daryl

So I was just poking around my blog admin tool to see what I could find out about XML-RPC options, when I noticed that there were 118 comments that I hadn’t seen anything about. I thought I was set to get notifications when comments came in. Of the 118 comments, 97 were spam, and they’re now gone. I’m hoping that my marking them as spam will get similar comments automatically marked as spam in the future. If you posted something relevant, I skimmed and approved it but don’t have time to go back and address everything. Thanks for posting, though! Now that I know that Word Press 1.5 might be holding onto comments it’s not sure are valid, I’ll try to check more frequently so there’s not a backlog.

More, Baby

April 12th, 2005 by daryl

No, this isn’t about a cliche pop song. Just documenting the latest news in babyland. Last week, Lennie started saying “bah bah” when looking at pictures of babies (including herself) and at herself in the mirror. She’s definitely attaching the word to babies. Her system’s not foolproof, however. As with Duh-dn-duh (kitty cat), she for a while attached the word to other things as well because she was being validated for saying it. That seems to have leveled off now, and she’s pretty consistent with the usage.

Sunday night, we stopped at Hardee’s while we were out, and she did something close to the “more” sign as we were feeding her little bits of food. To do the sign, you clump the fingers of each hand together and have the fingertips of each hand kiss the fingertips of the other. Her rendition of it is more like pointing into one cupped fist with the other hand, but it’s close enough. At first, she wasn’t very consistent about doing it, but she’s done it more and more since then, and she did it reliably enough tonight at dinner that I’m convinced she knows what she’s doing. She’ll stick a pea in her mouth and do the sign. We’ll put another pea on her tray, she’ll stick it in her mouth, and she’ll do the sign again.

Also, she’s got a soft (as in foam and cloth) block with a duck on one side that quacks when you squeeze it. When she was very young, I’d pretty frequently imitate the tone and rhythm of the sort of nasal, grating quack sound. I’m pretty good at it. I still do it from time to time when we go to look at the ducky shower curtain rings in the guest bathroom, and it often gets a laugh out of her. So today, I squeezed the duck block, and when it was done quacking, she did a pretty darned decent immitation of it, matching the number of quacks (eight) and possibly even trying to match the rhythm and intonation a little (though that could have been coincidence or wishful thinking on my part). At any rate, it’s a pretty cool accomplishment as far as I’m concerned.

Not to be limited to the performing arts, Lennie also tried her hand at the visual arts today. Mleeka gave her a crayon, sat down on the floor with her and showed her what to do with the crayon, and she went to town, trying very deliberately to apply the crayon to the paper. Of course, she would have done the same with a block or a stuffed animal or her own finger if prompted, but it’s fun to think there’s something more to it.