|
1 September 2004
If Penny takes a nap late in the day, there is a better-than-even chance that she'll wake up as the angriest, fussiest, most-saddest baby ever. But Matt has found a cure. He puts her in the stroller and walks her down to the neighborhood playground, and puts Penny in one of the toddler swings for a while.
Someone has cut the restraining straps off both swings, so Matt has to hold her in the seat as he swings her. It's pretty hard on his back, so sometimes to give him a break, I'll sit on the big-kid swings and hold Penny on my lap. (It's a pale substitute, but she accepts it.) If we've remembered to put shoes on her, sometimes she'll walk around the playground and play with bits of mulch and leaves and stuff. But it's the swings that are key. They never fail to make her grin and laugh. One of these days, I'm going to remember to bring along some twine to jerry-rig the restraining strap. So yesterday, I was not only an Amazing Geek, but I was also the Queen of Redundant Efforts. See, Matt had written a little program for himself that would do 7th Sea roll-and-keep dice rolling. He distributed it freely, but it required that the .NET framework be installed, and I don't have .NET installed on my work computer. And obviously, it wouldn't work on a Mac. "You know," I thought, "it wouldn't be that hard to code in PHP. Put up a browser page, so it'd be platform-independent." Matt gamely agreed to send me his code so I wouldn't have to work out all the algorithms myself, and I started playing. I was maybe five minutes into it when I thought, "Hey, if I did it with JavaScript, I wouldn't have to reload the page every time I wanted to re-roll." Mind you, I've only ever done about two things in JavaScript, and they were both so absurdly basic as to not have qualified even as "Hello, World!" programs. But, hell, I'm a programmer, or at least I was. And my greatest asset, as a programmer, was that I could pick up a new language in just about nothing flat. And JavaScript tutorials are all over the web. I didn't finish it until fairly late last night. (Well, "late" as I understand it these days, which is to say, around 9:30.) It's still pretty damned ugly - I haven't done anything at all with the formatting or layout or fonts or colors. But it works. Not only does it work, it accounts for a whole lot of special cases: Exploding and non-exploding rolls, Drama Dice (both during and after the initial roll), free raises, a roll of more than 10 dice, a Trait of 0... And the results all show up in a nice, neat text box, so they can be copied and pasted elsewhere. The only special case I forgot to take into account was the initiative roll, where you don't add up the total. But that would be pretty trivial to add. I may pretty it up some today - play with various layouts and such, add some color to it, move the instructions below the form so they're not in the way... I'm quite happy with the whole thing. It felt good to code, even such simple algorithms. It felt good to learn something new. I posted it with pride. Even if it was redundant. Speaking of gaming... This morning, as Matt was cleaning up the kitchen, Penny managed to get the tenderizer mallet out of the dishwasher. I didn't come quite fast enough to see her wielding it like a tiny LARPer playing a Valkyrie warrior with a battle-hammer, alas. But she did seem to be having fun.
|
Currently Playing: - Neopets Current Projects: - Writing: Silver and Green and The Willow Bough - my blog - my photo album - Penny's 1-year scrapbook Diet Progress: - 35 lbs lost / 30 weeks |
|||
| ||||