Archive for July, 2005

Tempus Fugit

July 30th, 2005 by daryl

I can’t even think (much less speak) in terms of the tenderness I’ve felt for Lennie recently. She’s started letting me put her to sleep at night. Sometimes this is a real challenge, with her bawling and struggling against me for a few minutes or waking up every time I think she’s good and asleep. Other times, like the last two nights, I go into the darkened kitchen with her and walk, and she snuggles in close with her head nestled into my neck. Sometimes, she pats or strokes my arm. The last couple of nights, there’s been no struggle. It’s been as if she finds me comforting and wants to be with me. After a couple of minutes of cuddling, she drops off to sleep, and then I go into the living room and sit in my chair, leaning way back, with her asleep on my chest. After another few minutes, I’ll finally lay her down on the bed so that I can get some things done. There’s something peaceful and almost meditative about holding your baby whom you’ve managed to put to sleep, and I think doing this is very good for me and hopefully for Lennie.

It’s very easy, when others are around to take care of the baby, to slip into a pattern of not spending as much time with her as I should. This is something I need to keep an eye on, because I take much pleasure myself in hanging out with Lennie, besides whatever good it may do for her.

So some quick updates now. I’m way behind, travel and work partially to blame. This comes mostly from emails Mleeka’s sent me over the last few weeks. Some things Lennie’s really ramped up on in the last couple of months:

  • says “deh” (there) and points to where she wants to be carried
  • says “toes” and points
  • says “beh-ee buh” and points to belly button
  • opens book, points inside, and says “Mama” to ask to be read
  • shakes finger at Moby when he begs for food during meals and imitates my “Get down doggie.”
  • lifts Mleeka’s shirt, says “mama” and makes “milk” sign
  • talks on phone and reads books to herself with different voice inflection
  • hears the office door open and starts saying “Daddy”
  • kisses baby doll and pats her back
  • gives kisses to people, particularly Mama, Daddy, and Ella
  • lifts her arms to request tickles, particularly when she’s finished eating (usually when we enthusiastically say “Stick ‘em up!”)
  • tries to lift leg to climb into bathtub (or onto many things, like chairs, her wagon, the coffee table)
  • put money in her piggy
  • dances
  • says “mmmmm” to ask for food
  • claps and expects to be clapped for

Let’s see, what else that’s more recent? She walks like crazy. Her hair’s growing like weeds (Mleeka trimmed her bangs for the first time the other day because she rips hair clips out). She drinks out of sippee cups like a champ and will sometimes say “wah-wah” for water. Her talking has become much more articulate. I don’t mean that she says many more meaningful things, but simply that she uses the parts of her mouth more; there’s more detail in what she says now. She climbs into her chair all the time and can twist and roll off the couch with no problem. She generally hates diaper changes but can be pacified sometimes if I give her a book to read while I change her. She does (sometimes almost on command) a scrunchy/squinty face. There must be tons more. That’s what I can think of for now, though.

Ruby on Rails and SafeLevel

July 27th, 2005 by daryl

This is another boring tech entry. My loving family (Ashley and Abbey in particular, are you reading?) can safely pass this one over.

I’ve set up Ruby on Rails several times now. Running the Webrick server that comes with it is nice for quick app development, but it’s not exactly a production Web server. So you obviously want to get it running with apache and mod_ruby. On one server recently, I got this to work without issue. Tonight, I’ve blown nearly three hours on it on another server.

The problem was that I kept getting security error messages like the following:

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:99:in `[]’: Insecure operation - [] (SecurityError)

And there’s precious little in Google that tells you precisely what this means, at least not until you use just the right search terms. It turns out that ruby tries to protect your system, and as part of that effort, it runs in a sort of safe mode that restricts some things your server can do. Which means that you get pretty much inexplicable error messages in your apache log. In my Googling, I read several things about setting $SAFE = 0 or passing the -T option to /usr/local/bin/ruby in the first line of your file to change the safety level, but it turns out that you can’t decrease the safety level using the $SAFE=0 method, and the default level for mod_ruby is 1.

So I Googled around some more and found the apache directive RubySafeLevel, but that too gives you an error (nonfatal) when you try to start apache and doesn’t in fact let you change the safety level.

Finally, it occurred to me to poke around in the source for mod_ruby, and it turns out that in mod_ruby.h, there’s a line reading “#define MR_DEFAULT_SAFE_LEVEL 1.” If you change that level to 0 and recompile (and maybe restart apache), the nasty safety error messages go away and Ruby on Rails will run. There are probably better, less security-worrisome ways of managing this, but I’m on a deadline, and this’ll have to do for now.

Keep your Nasty to Yourself

July 22nd, 2005 by daryl

Not so much insomnia tonight as a deadline to meet. So here it is almost 3:30 in the morning and I’m watching last Thursday’s Late Night with Conan O’Brien. He’s got Alec Baldwin on doing sort of a cameo, and they’re doing the “In the Year 2000″ bit, which I was thinking as it came on about how weird it is that I remember not only when the bit was timely (ie, pre-2000) but that I remember when Conan was new to late-night and a little pathetic (or so he would have had us believe — muwhahahahahaaaa). So but anyway, they’re alternating predictions for the year 2000, and Baldwin just predicted that atheists would win a landmark case in which saying “God bless you” when somebody sneezes is outlawed and in which it’s ruled that one should instead say “Yo, Zippy, you just sprayed me with some nasty.” Cracks me up.

Even as a curmudgeonly liberal-media-conspiring atheist, I think that’s pretty darned funny, though I fully expect the trigger-hair American Atheists to issue a press release (or actually, if I had been watching this when it was new a week ago, I would have expected them to issue a press release) about this blatant discrimination against atheists.

Changes to XUL’s getCellText() params

July 22nd, 2005 by daryl

I learned after about an hour of puzzlement tonight that the parameters for XUL’s nsITreeView::getCellText() have changed. Formerly, you passed a numeric id corresponding to the row in a tree as the first parameter and a string matching the id attribute of the desired column as the second. This provokes errors in recent versions of Gecko because the function now expects an nsITreeColumn as the second parameter.

A couple of nice people (db48x and gavin) on #developers at irc.mozilla.org pointed me to some docs that helped me unpuzzle myself. First, the idl file for nsITreeview, which clued me in to the fact that the second parameter is no longer a string. Second, a link to a mailing list posting about the change.

Basically, the change was implemented in order to do away with the necessity to give treecols an id. By generalizing the function a bit to expect an nsITreeColumn, Gecko can now figure out which column to use in a number of ways. For example:

tree.columns.getColumnFor(treeColElement);
tree.columns.getNamedColumn(treeColID);
tree.columns.getColumnAt(index);

In my recent case, I knew the column name, so I passed tree.columns.getNamedColumn(’identifier’) rather than just ‘identifier’ to the getCellText() function and it worked like a charm.

I post this pretty much for my own later reference.

Insomnia

July 20th, 2005 by daryl

The moon is made of cheese!When I was in high school, I was a bit of an insomniac. I remember trying many many nights to get to sleep all night, just lying there for hours, tossing and turning, trying to lie still, trying to regulate my breathing, trying to think of nothing, trying everything I could think of to get to sleep. And then I remember weeping because I needed sleep so badly and just couldn’t make myself drift off. It’s very frustrating.

I’ve had sort of a run of very very mild insomnia lately. Sometimes it’s been because my back has been hurting — not a bad pain, but the sort of irritating little pain that’ll keep you up all night because it feels as if your bones are just barely creaking. Other times it’s been I’m not sure why, maybe work stuff on my mind. Tonight I think it’s sort of both. I definitely had back pain (my searing neck pain is slowly diminishing thanks to a pretty regular dose of Aleve). But I also didn’t get a great deal done at work today, and there’s a technology I really dig but am having trouble getting my teeth into that I wanted to spend some more time in. So here I am at four in the morning still wide awake.

Since getting out of bed at a little after 1:00, I’ve done the following:

  • Clicked the little moon cartoon on the Google home page to see that they’ve got satellite images of the moon. As pictured here, if you zoom in very close, you’ll see conclusive proof that the moon is made of cheese. Contrary to popular reports, the cheese does not appear to be green.
  • Watched several videos about Ruby on Rails.
  • Took a half a page of notes about Ruby on Rails.

Here in a couple of minutes, I’m going to try to put some of my Ruby on Rails research to good use. I think I’ve managed to clarify a few things that I was hung up on, and I’m pretty excited about the technology.

I can’t decide whether or not I’m going to try to sleep any. It seems almost a waste of time to go to bed in an hour or two and wake up an hour or two later. But it also sucks to walk around all day tomorrow feeling completely eviscerated, as I tend to feel after a rough night’s sleep. If I don’t sleep tonight, I’m almost guaranteed a good night’s rest tomorrow (the case of insomnia being mild; there was no such guarantee when I was younger; I think I went for days back then with just a very few hours of sleep).

Damn ye, Insomnia! Damn ye!

Open Letter to Reality TV

July 19th, 2005 by daryl

Dear Reality TV:

Fuck off. Seriously. I get fewer than a dozen channels, and you’re on most of them tonight. CBS? Reality TV. NBC? Reality TV. ABC? Reality TV. The Weather Channel? By default, it’s Reality TV. PBS? Well, it too is largely Reality TVish.

Reality TV, you’re not totally to blame, of course. I turn the TV on, after all, and after I cringe after passing each channel, I often keep the TV turned on. It’s sort of like voting in an election even though all the candidates are douchebags, some just infinitesimally less so than the others. I pick the least bad of the worst, at least, when you’re my only real television option.

But I’m so tired of seeing you. Last night, I watched The Scholar, for crying out loud. You know the show, of course, Reality TV, because you are its perpretator, but just to refresh your memory (filled up as it surely is with the detritus of five solid years’ worth of Reality ™), the show details the journeys of high school seniors trying to showcase their various merits and win a full ride to the college of their choice. It was the season finale. C’mon, Reality TV. Did you think more than ten people would actually watch this? Even The Littlest Bachelor was better than this show.

But I did watch it, Reality TV, and I think what we’re seeing here is evidence that you’ve really gotten under my skin. You’ve colored my judgment. In a way, it’s as if you’re stalking me (you’re fucking everywhere) and I’ve resigned myself to the fact and have decided to accept you. I hate you, Reality TV. But oh I love you so.

Reality TV, I’m going to ask you for a big favor here. I asked it in my first sentence, but now I’d like to be a little more delicate about it because you don’t always get your way when you’re blunt about things. I need some space, Reality TV. Now I want it to be clear that this is about me and not about you. Actually, it’s partially about you, but it’s mostly about me and my lack of self-control. See, it’s that lack of self control that should reassure you about giving me some space, because it means that I’ll keep watching TV. I’ll keep watching the commercials that pepper whatever shows you make way for, and let’s be honest: It’s my commercial-watching that really attracts you to me (although I think there’s some truth to your saying that you found my sense of humor and boyish charm to be a draw). So give me a little space, Reality TV. I think you’ll find that doing so will make you happier, and I know it’ll be better for me.

You know, they say that if you love something, you should let it go, and if it comes back, it’s yours to love forever. Let’s test out the saying for ourselves. Let me go, Reality TV. Do it for love.

With Much Affection,

Joe Couch Potato

Laptop for Sale

July 19th, 2005 by daryl

Two weeks ago, while I was in California on business, my laptop died. I spent two hours on the phone with HP trying to figure out how to get it fixed without having to go without a laptop for the rest of my trip. They were kind of assholes about it, and I wound up having to just send the laptop in for repair. The next morning, I stopped by an electronics store and picked up a new laptop. Now I’m trying to sell the original HP to make up for some of the cost. As it turns out, there was in fact nothing wrong with the laptop itself. In spite of my pleas that, because their hardware died before I was able to get a recent backup, they not destroy my data if possible, HP wiped my hard drive apparently as their first step and sent the system back to me, apparently working. But it still didn’t work. Turns out it wasn’t the computer that was broken but was the AC adapter. So they sent me a new AC adapter, and the system works like a charm again, albeit without my data and with Windows running on it rather than Linux.

It was a good system. My only beef was that it was a little thick and heavy (I now have a Sony Vaio that feels paper thin by comparison). Sometine over the last few months, the case got cracked on the front left corner, and eventually, a fourish-inch piece of the molding snapped off. This appears to be a cosmetic thing only, and I’ve used the system without problems for months since the crack appeared.

If anybody’s interested in buying this thing, check out my auction at ebay. (I’m such a Luddite that this is the first time I’ve ever tried to sell anything there.) I’m asking $600 for a starting price and think that’s absurdly fair for a system like this. I’m hoping competition’ll eventually jack the price up to closer to $800 or $1000 (you’d be surprised how many hundreds of dollars some people will pay on ebay for real pieces of crap, by the way). If I get no bids, I’ll probably just find some group to donate it to and settle for a warm heart and a tax refund.

Dork, dork, dork

July 10th, 2005 by daryl

It’s midnight on a Saturday night, and I’m at a dork party I wasn’t sure I’d go to. It’s at a big house, and I’m one of thirteen in one of the den/living rooms. We’re all scattered about on couches, folding chairs, and the floor. There’s enough cable running around on the floor to, to I don’t know what. To put a small-to-medium sized business’s IT staff to shame. There’s much talk of browsers and xcode and extensions and so on and so forth. I donned my best dork shirt for the event (it reads /(bb|[^b]{2})/, which means something to dorks) and have already gotten a good cackle from somebody over it. I occasionally have to stop my diligent work to go to a terminal and type “iwconfig eth1 essid ‘bret’; ifup eth1″ to get back on the network, because I keep getting dropped. The other den full of people is apparently more social than my room, which is full of relatively quiet people. I’m probably the quietest. It’s not nearly as painful as it could be. If only I could get this makefile to work blah blee bloopety blooblah.

Being a Curmudgeon

July 6th, 2005 by daryl

Not even 30 yet, I’m an inveterate curmudgeon. I have been for many years. Case in point: Superhappydevhouse, a neat little party wherein a bunch of coder dorks come together and code and drink and for which I’ll be in town. It’s a chance to network and mingle with other coders, to share ideas, etc. If I were younger and unattached and idealistic, maybe I’d enjoy this. But the fact of the matter is that I’m actually sort of old for the industry, I do have family obligations (and I enjoy my family, so “obligations” isn’t really the right word), and I’m not idealistic. I enjoy doing much of the work I do, but it’s still work. I want generally to do it for eight or ten hours a day and then to do family stuff and read and sit on my ass.

Of course, I’m away from my family for the week, so all I can really do is sit on my ass and read. And that’s not nearly as much fun outside the comfort of one’s own home. So I should go to this superhappydevhouse. I doubt I will, though. Another problem is that I’m sort of a fish out of water here, in part because I’m not so invested in changing the world by writing programs that I find things like superhappydevhouses particularly super or happy and in part because I don’t speak the language.

What I mean when I say that I don’t speak that language is that, while I know a good bit about the Web and about some bits of programming, I’ve never been so into it that I’d go out of my way to talk about any of it in a social setting. Generally speaking, I’m happy to perform my couple of daily programming tasks and then move on to the other things that concern me without casting a backward glance at the computer (except where the computer actually helps me to do my other tasks). What I find of the people I’m surrounded by out here in Silicon Valley for the week is that they’re obsessed with technology. They have the fancy cell phones that have features the cellular networks here in America don’t even support yet. They speak in acronyms and exchange knowing grins when they talk about the various inside jokes of the industry out here, and they’re all absurdly well-connected. They all seem to be prodigies. I can’t really connect with these people, though at times I wish I could. I don’t care about some of the latest technologies, and a lot of the acronyms fly right by me. I don’t know the industry pillars, and in fact I’m in awe of them. I feel often like an amateur astronomer having a chance to meet Einstein, except that I don’t care as much about what I do as an amateur astronomer does about what he does. It is a job for me and not a fun thing, though often I do think my job is fun.

But I don’t really fit in with the crowd for whom this stuff is especially important. And so I don’t know that I’d fit in at a superhappydevhouse. It’d be awkward for me, and forced. I’d feel like I was pretending. This all makes me feel like a curmudgeon.

The funny thing is that those close to me, I think, think I’m sort of tech savvy. Some of them look on me as I look on those who surround me out here in Silicon Valley. I’m a medium-to-large fish in the web-pond that is East Tennessee, but I’m guppy shit here in the seat of Web technology. It’s very demoralizing. It makes me want to to sit in the car in the garage with a hose in my mouth or just quit and maybe work at some menial task for the rest of my life. It’s at times like this that I wish really hard that someone rich would die and leave me lots of money.

Packets out of Order

July 6th, 2005 by daryl

Just a quick reminder to myself that the easiest fix to the “Packets out of order” error that Ruby on Rails sometimes throws is to edit the mysql adapter to prevent it from trying to load code that handles mysql’s new password hashing algorithm. Basically, in mysql 4.1.x, a new password hashing algorithm was introduced, and Ruby on Rails tries to connect using the new algorithm if it determines that your server version is greater than or equal to 4.1.x. If your actual mysql passwords are in the old format (16 characters), the connection will fail.

Several fixes have been suggested, including installing C bindings for the mysql driver (gem install mysql), which didn’t work for me. Ultimately, working from a cryptic suggestion by a coworker, I went into my ruby libs and edited /usr/local/lib/ruby/site_ruby/1.8/active_record/connection_adapters/mysql_adapter.rb and commented out the line seen commented out below:

begin
            require 'active_record/vendor/mysql'
            #require 'active_record/vendor/mysql411'
rescue LoadError

This prevents the code that does the 4.1.x substitutions from executing and allows your install of Ruby on Rails to play nicely with mysql users that have the old password format.