slayeroffice - web experiments gone horribly awry

Looking for the drawings? They're over here, and my drawing blog is this way.

05.12.2008 - Does it .match?

I've been doing some work in AS3 of late and stumbled onto a bit of a gotcha last week that I thought I'd share since it caused me about 15 minutes of frustration.

The gotcha pertains to a significant difference in how Javascript and AS3 handle the match method of the String object when the global flag is passed. Consider the following Javascript snippet:

var r = /[a-z]/g
var s = "abc";
var x = s.match(r);

This will return an Array with values "a,b,c" in both Javascript and in its AS3 equivalent.

Now, consider this code, replacing the value of s with something that will not match:

var r = /[a-z]/g
var s = "123";
var x = s.match(r);

In Javascript, this will return null, but AS3 will return a zero length Array. Which means that this...

if(s.match(r)) {
// do stuff...
}

..would always be true in AS3, but false in Javascript. I spent about 10 minutes thinking there was something wrong with my regular expression, and another five thinking there was something wrong with AS3's regexp engine before I realized what was happening.

So who has it right? According to the ECMA 262 spec, AS3 does (see page 101-102). Of course, Mozilla's documentation claims that it will return an Array as well with no mention of null on that page, while Microsoft's JScript documentation admits it will return null if no match is found.

Good times.

[ 6 comment(s) ]

03.12.2008 - Emre Grayson Chipman

My son, born this evening weighing in at 9.33 pounds, measuring 20 inches.

(And that's why I wasn't in Austin this year!)

[ 22 comment(s) ]

03.07.2008 - SXSW Time!

And I'm not gonna be there this year. I know, I know - I should have told you sooner. You're probably already in Austin or in flight, now wishing you had advance notice of this turn of events so you could have just stayed home. I'm sorry, I really am. This really was terribly inconsiderate of me.

Soldier on, brave geeks, and know that with enough Shiner Bock, anything can be fun even if I'm not there. Be strong. And take lots of pictures. And twitter a lot. Let me experience Austin through your internets.

(Any day now I'll have an announcement of why I'm not there this year...)

[ 3 comment(s) ]

01.02.2008 - Three Drawings and a PSA

These three drawings I did leading up to Christmas - I've kept them private on Flickr and not published them here as they were gifts for family and I didn't want to spoil the suprise.

Colored Pencil Drawing entitled Clara at 17 Months

  • Clara at 17 Months
  • 8 x 10"
  • Colored Pencil on Eggshell Mi-Tients Paper
  • November 20, 2007

Colored Pencil drawing entitled Big Smile

  • Big Smile
  • 8 x 10"
  • Colored Pencil on Cream Mi-Tientes Paper
  • December 11, 2007

Colored Pencil drawing entitled Clara at 18 Months

  • Clara at 18 Months
  • 10 x 8"
  • Colored Pencil on Eggshell Mi-Tientes Paper
  • December 21, 2007

And with those, I'll no longer be posting drawings on slayeroffice. 2008 seems a good a time as any to get the site back on the web development talk track. If you're interested in following my portraiture work, you can find it on my new drawing blog. Or, just grab the feed.

[ 9 comment(s) ]

12.13.2007 - Page 222

My good pal Mr. Lawver has included a reference to my Page Info Favelet on page 222 of his new book.

Congratulations to Kevin, Kimberly, Christopher, Rob, Meryl and Mark on the book. I'm not sure when it comes out, but with that caliber of authorship (and obvious good taste) its a must-own.

[ 0 comment(s) ]

11.14.2007 - Maya

Graphite portrait of a friend's new baby entitled Maya

  • Maya
  • Graphite on Cold Press Illustration Board
  • 11 x 8.5"

A portrait of a friend's new baby.

[ 0 comment(s) ]

11.09.2007 - Self Portrait III

Graphite drawing entitled Self Portrait III

My first go at graphite in about 12 years. It didn't take nearly as long as a colored pencil drawing, and it was awfully nice to be able to use an eraser. I may stick with it for a little while.

[ 3 comment(s) ]

11.07.2007 - The Angry Cow

Colored pencil portrait entitled Clara the Angry Cow

Clara in her Halloween costume impersonating her Daddy's scowl.

As well, Happy 5th Birthday, slayeroffice!

[ 4 comment(s) ]