Author: Kevin Lawver

  • Changing Style Elements In IE

    Everyone knows what I’m working on, right? Well, this is a little story I’m telling so I don’t have to remember it. I’m working on the generic style API so users can change stuff, and wow… I didn’t think it would be as painful as it was. What caused the pain? Oh, you should know by now that it was caused by Internet Explorer for Windows!! Hooray for the truly strange!\
    The other browsers (Safari and Firefox, chiefly) did fine with removing the existing text node in the style element, and replacing it with the new one. I tried using the CSS DOM, but that was a lost cause, so I wrote a simple CSS parser in Javascript (only about 10 lines) to throw all the selectors and properties into objects and then more functions to change, update, delete, etc, properties and update the associated style elements.\
    What happened in IE? It blew up as soon as I tried to remove the child text node of style, or even set innerHTML. What did I have to do? I had to crawl the properties of that element’s object and find the styleSheet property, which is an object and has a property of cssText, which I can set.\
    So, now my code looks like this (\_style is the style element, output is the text I’m setting and yes, I’m using Dojo):

    <code>if ( !isIE ) {
    dojo.dom.textContent(_style,output);
    } else {
    _style.styleSheet.cssText=output;
    }</code>
    

    I hope you never have to do this, but if you do, that’s how.

  • Bad Mommy, proof # 6294

    Everyday I have to wait at the bus stop for my kid, or the driver won’t let him off the bus (it is a kindergartener rule). Today, I was engrossed in Beauty and the Geek I had on tivo and missed leaving at my usual time. When I realized I was late, I fled out the door, barefoot, in my pj pants, the shirt I had slept in and a black sweater (with no bra on) and ran down to the stop. FYI- cold, uneven concrete hurts. I missed what the clock said so I didn’t really know what time it is. I didn’t know if I actually missed him. (I am usually really early and stand around for 10 minutes.) I also didn’t know if the bus would come back around again one more time before taking him back to school. I didn’t have a phone with me, so I couldn’t call the school and I was afraid to back and get the phone in case I missed the bus during this time. So, I was barefoot, dressed oddly, standing on the corner, in the winter and I got lots of strange looks. After awhile, I decided to chance heading back for my phone, constantly looking over my shoulder for the bus. I ran inside and grabbed the school’s phone number, my shoes, my phone, and my cellphone and ran back half way to the bus stop. My cellphone was dead, but luckily my real phone still worked at this distance. I called the school and the nice office lady told me the bus driver was bringing my son back to school. What, no second drive by? Come on! So, I thanked her and went back home. I had to change the baby and change my pants, put on some shoes (I forgot about a clean shirt and a bra) and off I went to claim my son. And then we went to Friendly’s.\
    There were extenuating circumstances though. Brian woke up 2 hours later than normal, and it threw off my internal timeline. Since we hadn’t had snack and he hadn’t gotten cranky yet, I forgot to look at the clock.

  • Mountain View: Day One Recap

    Yes, I am in Mountain View, and I really wish I had more time to see all my friends out here (I’m especially bummed about not having time to hang out with my brother, his wife, and Sam. It’s just a two day trip, and it’s chock full of meetings, all about this. We did a big presentation yesterday about it, what’s coming (shhhh, it’ll be cool), and how the world can join in. It was extremely gratifying to see geeks get really jazzed about it. It proves that even though I can’t explain it worth a damn, we’re headed in the right direction.\
    I’m having a really good dinner last night at Nola’s in Palo Alto, and laughed our fool heads off. We rehashed the “good old days”, talked about geek energy and how to harness it, and what it feels like to be working on something we can truly be proud of.\
    I was talking to Joe afterwards about stuff we’d worked on before, the old projects that still hold a special place in our hearts, and I thought about this silly fulfillment system I wrote when I first came out to Virginia to finally become a “real developer”. It was a maintenance system. People submitted tickets, filled in a bunch of detail about the affected system, the problem, the request, etc. Then, someone got the ticket, did whatever was in the request and then closed it. It ran reports, was extremely flexible in setting up types of requests, etc. I wrote it almost 6 years ago, and thought it was dead. I hadn’t touched it in about five years and figured people stopped using it and forgot about it long ago. Then, I got an e-mail about a month ago (and an IM yesterday) about it, asking who owned it, and if someone could add a feature to it. I was stunned. This thing that I thought was dead and buried has been used every day for five years by a couple different teams. No one’s touched the code, cleaned out the database or anything in five years and it’s still running like a champ, taking requests, running reports, etc. I thought the thing I was most proud of was what I did on AOL Search, but I think I may have a new winner. Almost everything I’ve ever written has a fairly short shelf life between versions. This tool is ancient and still going strong, which not only scares me, but makes my geek pride swell.\
    Today? We’re talkin’ modules, modules, modules and javascript. Oh, and between all the module talk, I have to figure out how to create CSS blocks on the fly in Javascript. I’m really close, but man, does that spec need some work.

  • Uhhhh, yea, I suck

    I just screwed up making instant pudding.

  • Two Whole Days And Long Pants

    Enough about I Am Alpha (for now, anyway), this is about my foot, and I know you can’t read enough about my stupid foot. I spent Wednesday and Thursday walking around in normal shoes and doing OK. I even wore long pants on Thursday for the first time in seven months! There were some pangs and general discomfort, but no outright pain. This morning, though, my foot was a rock: stiff, kinda purple, painful and pretty much not hearing any requests for shoe wearing other than driving to and from physical therapy. So, I’m back in the boot today, snug in its warm fleece embrace and remembering why I hate it so much.\
    Tomorrow? I’m going back to shoes, and we’ll see how it goes.

  • This just in!

    Lawver family breaking news: Kevin wore pants yesterday for the first time in 8 months.\
    Why is this exciting news? It means Kevin is out of the boot. YAY! Sadly, he is still sore and gimpy and can’t help out around the house or go on walks yet.

  • Announcing I Am Alpha

    I can finally reveal what I’ve been working on for the past couple months that’s making me write all this javascript. It’s I Am Alpha, something kind of new and interesting for AOL. Why? AOL doesn’t do public development. We’re usually very close-lipped about what’s going on with a product. We just launch stuff on an unsuspecting public. We also don’t often foster any sort of interaction with the outside developer community. There are things like AOLserver that’s open source, and the new AIM plugin stuff is open to the public, but I can’t really think of much else we’ve done in the area. That’s changing, as of today, with this thing.\
    What is it? Well I Am Alpha is just a prototype to give folks some idea of what’s coming, and to introduce our microformat for transporting modular content and the idea of creating modules for this new product.\
    I think this is really cool. No one’s paying me to say it’s cool, either. I think getting more people to create microformatted content is great, and I think our microformat is pretty cool (don’t know what a microformat is?). I think some of the stuff we don’t have a live prototype for, like server-side modules is super-cool.\
    It’s going to be a little rocky. We don’t have a lot of experience with the whole public development thing, and a lot of things won’t be public (old dog, new tricks), but we’re trying. We’re really really trying. We’re going to be using Dojo for our internal framework and for modules. We’ve released the microformat under an extremely liberal license, and with this alpha, are actively seeking feedback.\
    It’s great to be involved in a product at AOL that feels so open, and with forward-thinking standards at its core. It didn’t take hours and hours of red-faced pleading to get us to create a microformat for modules instead of YATXS. It didn’t take kicking, punching and hiding bodies to get us to agree to create (as much as we can) valid, accessible pages. Of course, we don’t control what goes into modules, but we’ve set up the pages that will be saved (the current ones aren’t perfect or what’s going to be final, to be sure) will be valid XHTML, and we’re requiring that all modules are valid too.\
    Oh yeah, and it’s the first public facing thing I’ve done at AOL where I was the designer and wrote almost all of the content. So, if it sucks, it’s my fault. I didn’t build the prototype, but I helped design the microformat, the server-side module process, and wrote 95% of the documentation. Hooray for flying under the radar!\
    I’ll try to keep the posting about it here to a minimum. Mostly, I’ll be yakking about it over on the unofficial official blog. Come join in the fun!

  • Flying With A Flat Tire

    We got back from Austin yesterday, so it’s time to rethink this whole traveling thing. The trip was great from a trip perspective. I got to eat good Mexican food, barbecue and hang out with the Browns. But, my ankle wasn’t real happy about spending time in the air (swelled up pretty good), standing in line or walking through the airport (pain and more swelling). I didn’t bring the Home Electrocution Kit with me, so I was left with hotel ice in ziploc bags to dull the throbbing.\
    I have a full plate of travel coming up that I’m not about to cancel. But, this was a relatively short trip to a domestic destination. Being injured, and injured for a long time, sucks. Walking around the airport in the Velcro Terror was no fun.\
    But, I got to hang out with the Browns, and Jen had a lot of fun. So, I guess it’s OK.

  • The Areas of My Expertise

    Reading...

    Reading…\
    This review may be a little weird. I read it solely while either getting heat or ice at physical therapy. I loved it. It’s ridiculous, in the way the best Monty Python skits are ridiculous. It’s smart, well-written and extremely sly. The jokes are constant, and really really funny. If you think the following things and people are funny: Dave Eggers, Good Omens, McSweeney’s or, The Onion, you’ll love this book. Now I have to find something else to read while getting cooked, frozen and electrocuted. I’ve been reading The Meaning Of Everything, which is really good (almost done… can’t wait to see how it turns out! do they finish the dictionary??!!), but dense. It takes concentration to read, which I don’t really have when being tortured… any suggestions?

  • Driving In Foreign Countries

    I’ve never driven in a foreign country. When we drove around Ireland, I made Porter do all the driving. Now, I’m going to France for the Plenary, and I’m renting a car. The only thing that’s making me less jittery about doing so is having a friend who lives there and is feeding me driving tips for driving on the Riviera like:

    • Traffic coming from the right has right-of-way unless they have a solid white line or dashed white line.
    • Always lock your doors while driving
    • No turning on red
    • France now has speed cameras, and they’re not friendly.\
      Oh, and I have Doctor Who on my iPod. MoviesForMyiPod rules.