Sunday, December 27, 2009

Facebook Politics

Facebook shows you more than the trivia of your friends' lives. It also shows you their politics, and how they think about the world. This can be fascinating and unsettling.

For example, some people I like recently joined Petition To Remove Group "Soldiers Are Not Heroes", a group that's a petition to remove the Soldiers Are Not Heroes group.

Leaving aside which group I agree with, the 'Petition To Remove' group scares the fuck out of me: their goal is to silence people who disagree with them. If you want to engage the "Soldiers Are Not Heroes" group in vigorous debate, argue with them, call them names, start a group called 'Members Of The "Soldiers Are Not Heroes" Group Are Clueless Ingrates' - fine. That's freedom in action. Let both sides make their cases.

But remove them from Facebook because you don't like what they're saying? Shut them down to shut them up? What could be less free, less noble, less American, than that? That's not what our troops are fighting for. That's the kind of death-to-unbelievers intolerance they're fighting against.

"I disapprove of what you say, but I will defend to the death your right to say it." - Evelyn Beatrice Hall

Thursday, December 24, 2009

That Dog Is Money!

Whenever we walk Jackson, we're careful to watch where he sniffs. Occasionally, he finds some sidewalk food, and we have to be quick to keep him from scarfing it down. He's swallowed more than one bit of street sandwich on my watch.

This morning, Jackson nosed at something, and I took a look...currency! A dollar bill, buried in the snow! Good dog!

That's a hell of a trick. And, if he does it another 2,000 times in the next week, we'll be about even on his expenses for the year. But I shouldn't complain - at least he's working.

Wednesday, December 23, 2009

Guard Dog

Monday morning, about 2 AM, someone tried to break down our front door. Scary as all shit, but, fortunately, this wasn't a home invasion crew, just a small, confused crazy guy. The door held, the police came in about a minute and grabbed him, and I got a look at the sandals he was wearing two days after a blizzard.

And Jackson had my back, from a safe distance. He came about halfway down the inside stairs and watched from there, 20 feet from the front door. Amazingly, he's able to instinctively calculate, and stay out of, potential lines of fire.

Still, Jackson had a part to play: when the police arrived, I opened the front door to verify that no, I didn't know the crazy guy. That was all they needed from me; they turned to leave and I started to close the door. Then one officer noticed Jackson on the stairs. "Is that a greyhound?" he asked, a big smile on his face. "He's beautiful!" Anytime, anywhere, any circumstances, people love greyhounds.

So, no harm, but we were all pretty revved up for the rest of the night. In fact, Jackson was so upset that he didn't get back to sleep for almost three minutes.

Sunday, December 20, 2009

Bootie Call

Media_http3bpblogspot_qjovh

Blizzard in Richmond this weekend. Jackson was born in Texas, and did his racing in Florida, so we figure this is probably his first encounter with a winter wonderland.

Friday night, with a couple of inches of snow on the ground, Jackson wouldn't come down the porch steps for his late walk. He did wander around in the backyard a bit, and take a much-needed pee.

Saturday morning, sixteen hours since his last poop, a full blast of snow on the ground, I dragged him down the porch steps. As soon as he started to walk, he cheered up. Yes, the world was different, but it wasn't bad. A whole lot better than rain. He got used to the step-and-sink rhythm, and set off in his determined fast-paced walk. We call it his "man on a mission" mode. And he realized pretty quickly that, when the whole world is soft, you can poop anywhere.

So the Saturday walks were pretty easy. This morning, though, we were worried about Jackson's feet. There's salt out there, and chemical salt, and puddles of cold water under thin sheets of ice that break into sharp pieces. Fortunately, a couple of weeks back, we had ordered a pack of Pawz booties

Media_httpwwwassocama_rdllq
for him. If you click the photo above, you can see one on his back foot as I trundle down the steps.

The booties worked! Jackson didn't seem to mind them. He had a little less traction, but the protection/warmth/dryness more than compensated. Downside: the booties are expensive, a little more than a buck per for what are really just thick balloons. They're reusable, but still. So you may want to put a couple aside for your own use: they're handy when you mule drugs through JFK, to raise money for the next order of booties.

Sunday, December 6, 2009

Colonel Barfoot Should Take His Flagpole Down

First, this isn't about the American flag. The Sussex Square Homeowners Association (SSHA) has no objection to American flags. It's about whether the colonel or anyone else in the community can fly any flag on a 21-foot front-yard flagpole. The SSHA says no.

Second, the colonel's military service and heroism are wonderful, but irrelevant. Would you say yes to a flagpole for the colonel, but no to a flagpole for draft dodgers like Bill Clinton or Dick Cheney? What if the stoner down the street wants a 50-foot flagpole for his Steal Your Face flag? Does he get it if he's a veteran, otherwise no?

Finally, this is about honoring a contract. When you buy a house that's managed by a homeowners association, you agree in writing to follow their rules. If you don't want to abide by their decisions, don't buy the house. But you shouldn't expect to have it both ways.

(If you need background, here's the Richmond Times-Dispatch article, and here's the misleadingly-titled Facebook page.)

Friday, November 20, 2009

The Asshole of Meadow Park

Meadow Park is a pocket park near our house, a block-long triangle of grass and trees. It's also the place for local dogs to meet and greet. No fences, so leashes on at all times, but there's plenty to see and sniff.

Jackson and I got there early this morning, around 6:30. There was one other dog, large and beige, at the other end of the park. At first, Jackson was content to follow the pee trail. But, after a few whiffs, he decided he wanted to say hi. I let him lead as we crossed the park.

When we were about 15 feet away from the other dog, its owner whirled around and said, "What are you doing?"

"What?" I said, truly confused.

"Are you following me or something?"

I pointed at Jackson. "He is. He's friendly."

He looked at his own dog. "Well, she's not. So go somewhere else. I don't need a dogfight first thing in the morning."

His dog seemed to have a different opinion. Throughout Jackson's approach and the subsequent pleasant chat, she stayed calm. She looked at Jackson a couple of times, but no barks, no growls, no tugging on the leash. If there was hostility from her, I missed it, and so did Jackson.

Whatever. "Okay, okay," I said, "be nice about it." We turned and headed the other way. They crossed the street and left the park.

I'll assume the guy isn't completely delusional, and that his dog has gotten into fights in the past. He seems to have no idea that his paranoid reaction to other dogs and owners isn't going to help. All he had to say was "She's not friendly." Instead, he almost turned it into a confrontation between me and him.

<brooklyn> And by the way, asshole - if your dog is so fucking dangerous, maybe you shouldn't be walking her in the one place where you're pretty much guaranteed to see other dogs, even at 6 in the morning. In fact, maybe she's not a good choice for a city dog, Einstein. Maybe you and she should both pack up and move to 10 acres in Goochland. That way, at least, I won't have to see your stupid fucking face. </brooklyn>

Monday, November 9, 2009

Caliente Brunch II

70-some degrees in Richmond today, so we went to Caliente for brunch on the patio again. Blissfully, boringly uneventful: we gave Jackson a rawhide treat, he plopped down on his mat, and he stayed put while we ate. The only other dog there wasn't cruising, so no casual sex.

Friday, November 6, 2009

Facebook: The New Google?

For many years now, I've thought of Google as top dog in the software world. But Facebook is challenging that. Yes, the frequent UI changes are odd, but the back-end tech is innovative and impressive. Talk about scaling: hundreds of millions of users. Daily number of writes is probably at least that. Daily number of reads is probably a couple of orders of magnitude higher. Hell, just getting all those email alerts out is impressive.

They're pragmatic: they use everything from PHP to C++ to Erlang (the billion-msg-a-day chat server), and they open-source a lot of stuff.

Freedom to choose the right tool instead of the popular one: priceless.

Monday, November 2, 2009

Who's A Widdle Widdle Pirate?

By popular (okay, Stacy's) demand, Jackson all dressed up for Halloween:

Media_http1bpblogspot_tspdo

And my favorite, because it has a sort of hellhound/spirit photo effect:

Media_http4bpblogspot_soafu

Sunday, November 1, 2009

The Graduate

Jackson passed his final exam in PetSmart Basic Training today! Things started badly - his normally reliable "down" deserted him. But he got it back, and he pulled a "stay" out of his butt to ace the test.

Jackson's gonna get so drunk tonight. Watch out, Mrs. Robinson!

Saturday, October 31, 2009

I Went to a Greyhound Party

Media_http2bpblogspot_pgrfc

We went to the GPA/Richmond picnic last Sunday. It was fun to hang out with 50 or so similarly-obsessed people and their dogs.

That's Jackson (we think) running at full tilt boogie in the time trial, chasing down the infamous sonic crack game call. The radar gun clocked him at 28 mph, which actually isn't very fast for a greyhound. Jackson has lost some quicks over the last few months. He doesn't get much chance to run these days - lots of long walks, but no sprints. So we're going to move to another house, with a big backyard. And we'll set up a training run, and let Jackson chase the game call. Seriously. We're going to buy a house to make our dog happy. I don't know what to say. What the hell is happening to me?

Anyway, the highpoint of the picnic for us was probably when I let Jackson get loose. He was lying in my lap, and I got sloppy with the leash, and someone squawked the game call, and off he went. Straight to the game call, a hundred yards away, where Stacy caught up with him while two guys pried the game call out of his mouth.

Finally, after everything was packed up, I had to walk Jackson around and through the time trial chute, to convince him that the source of that seductive noise was gone. We aficionados call that a "strong prey drive." Sounds much better than "wants to kill small furry animals."

Sunday, October 4, 2009

Osama bin Jackson

Media_http2bpblogspot_jzxcy

Update your watchlists - fashionista alert! Jackson is ready for winter and waterboarding in this sleek coat and snood combo from Coats 4 Greys. The chic advisory level is code black!

Friday, October 2, 2009

Choking The Chicken

Media_http3bpblogspot_gbjll

Media_http4bpblogspot_wjogy

Media_http4bpblogspot_phhhn

Actually, we think it's a flamingo. Not a chicken, not a pelican. My apologies for any confusion this may have caused.

Sunday, September 27, 2009

Jackson Gets Teabagged

Media_http2bpblogspot_mlvbn
Well, almost.

We arrived at Caliente to find the patio hopping: a large group next to us, with a kid, and three women nearby. With a male bulldog. Off the leash.

We headed for the empty corner table. The bulldog immediately trotted over to visit. Jackson was on-leash, which can make a guy defensive, so we were nervous. But, charmingly, the bulldog started licking Jackson's balls* like they were pepperoni. Jackson was okay with that. Of course everyone on the patio was in hysterics at that point. Except for Stacy: mortified, face hidden in hands.

After a couple of minutes of this extreme socialization, the bulldog's owner called him back, and, at Stacy's request, leashed him. Things settled down. Jackson had his favorite squeak toy, a pelican in a tutu (photo above). We were able to get him down on his mat for chunks of time, and we got through the meal. I got hammered on fine beers.

When the bulldog group was leaving, the owner apologized. I told her my dog wanted her dog's number. She said that the vet had told her that her dog was "totally gay." (I haven't kept up with canine sexual orientation testing; apparently it's quite advanced.) I said that Jackson was straight, but willing to experiment.

All in all, a successful brunch.

* What's left of them, anyway.

Saturday, September 5, 2009

Sick As A Dog

A few weeks back, we started giving Jackson marrow bones a couple of times a week. He loves them, and the hours of chewing do wonders for his teeth. Win-win.

Then, last Monday, I gave him a marrow bone and he disappeared it in minutes, not hours. Same batch of bones, and we were keeping them frozen, so no idea why this bone was different. Whatever. He seemed none the worse for it.

Tuesday into Wednesday, we both noticed that his poop seemed looser than usual. But not off-the-charts. Whatever.

Wednesday night, we came home from dinner with friends. I took Jackson out. His poop looked damn near like diarrhea. Hmm.

Then, back in the house, we noticed some diarrhea on the floor, near the door, as if he hadn't quite been able to hold himself together till we got outside. Hmmmm. We cleaned it up and crossed our fingers.

Then, about half-an-hour later, we heard an odd noise.

"Was that you?" Stacy asked from the living room.

"No. Did Jackson puke?" I asked from upstairs.

Stacy checked the kitchen; Jackson had puked. All his dinner had come out in one large tidy pile of kibble loaf, with pieces of bone in it. I scooped it up with a spatula.

Over the next six hours, Jackson spent a lot of time in the backyard, puking and squirting diarrhea. We used the hose to keep things clean. Stacy spent the night on the couch in the kitchen (big kitchen), next to Jackson, so that she could pop up and get him into the yard whenever he needed. Happened several times. Last puke around midnight, last diarrhea around 4 AM.

Thursday, we gave Jackson just a bit of kibble for breakfast, and stuck to the alleys for walks. Still diarrhea, but he had no problem holding it in till we walked - no accidents, no urgent trips to the backyard. And no puking. In the evening, we gave him a cup of kibble.

Friday morning, we gave Jackson almost his normal breakfast. Stools loose, but under control. Friday evening, full meal, and his poop was pretty much back to normal.

This morning, normal meal, normal poop, crisis over. Way leery of the marrow bones, though. I threw out the batch we had, and we know now that we shouldn't have let Jackson eat the actual bone. Once the marrow's gone, it's time to take the bone away.

Unfortunately, Jackson has to pay the tuition for our education.

Saturday, August 29, 2009

Wet Dog Walking

On the way back from our Meadow Park stroll this evening, Jackson and I got caught in a downpour. Ten minutes of hard rain. The first few weeks that we had Jackson, there was very little rain in Richmond, so this was the first time that I got to see his reaction.

Which was pretty much nothing. He took it in stride, literally. He was maybe a little less interested in checking out all the trees, and he seemed to want to get home. But he wasn't agitated. (Fortunately, this wasn't a thunderstorm - thunder and lightning are a whole other story. He freaks out big-time.)

Normally, Jackson pants for quite a while after a walk; tonight, he didn't pant at all. The cool rain was the difference. We're looking forward to some great walks in the fall.

Friday, August 28, 2009

What's In A Server Name?

In the beginning, the admins named the servers. So the servers got geek-culture names like gandalf and sauron, or enterprise and voyager. And it worked pretty well. People remembered the names, and they remembered that gandalf was the development box, and sauron was the production Oracle database.

Then some suit decided that the geek-culture names were unprofessional (whatever that means), so IT management stepped in. They came up with server naming conventions that embedded all sorts of useful information: data center, run-time environment, software configuration, server number, etc. And out came monstrous server names like NYCP3STDZ09. Which is a challenge to say out loud, and hard to remember, and doesn't connote much of anything unless you know the original conventions. Which hardly anyone does after a few years of turnover.

And NYCP3STDZ09 is a hard name to get right in a phone call, and an easy name to mistype in an email, and that's just so much extra fun in the middle of a production problem.

Meanwhile, sauron comes across clearly in phone calls and emails, even when you're frazzled because your boss's boss's boss wants to know when the fuck the system will be back up, even when your data center is offshore and your admin's accent is very different from yours, and you're on a conference call that sounds like a cell phone in a hurricane. It's a great server name when people need to communicate.

But it's unprofessional, and disorderly, and doesn't tell us anything about the server's role in the organization. So we have a winner: NYCP3STDZ09. Just be careful what you type. Don't want to get the wrong box rebooted again!

Sunday, August 23, 2009

Tough Guy

Media_http3bpblogspot_oaimb

The fuck you lookin at?

Cash For Chuckleheads

I really don't like the "Cash For Clunkers" program.

First, the supposed environmental benefits are "middling" at best. There are far more effective ways to use tax dollars to save the planet.

Then there's the moral hazard. The most common trade-ins include Ford Explorers and Chevy Blazers. Why should we reward people who made lousy mileage decisions? We should be letting the free market punish those decisions. I'd much rather reward the guy whose '95 Civic is still going strong.

Finally, the economic stimulus. Short-term stimulus for car makers and dealers, yes. Woohoo! But what happens six months from now? Remember employee pricing, the superstar of 2005? Remember what happened a year later, when there was no more demand in the pipeline? Remember the bankruptcies of 2008? A taxpayer-funded price cut isn't a rescue plan, it's a leaky life preserver in the middle of a big ocean.

So this is one of those odd moments where I find myself in agreement with immoderate Republicans like Jim DeMint. "Cash For Clunkers" gives Joe Taxpayer a piece of bail-out pie, so it's enormously popular. But that doesn't make it good policy. It's as misguided as the huge Wall Street bail-outs.

Friday, August 21, 2009

Poop Aesthetics

Greyhound poop tends towards the inchoate. But we've been mixing pumpkin into Jackson's kibble, and there are occasional triumphs: Stacy described his first poop this morning as a "beautiful big pile of shit." We are so proud. (Sorry, no photo. Maybe next time.)

Sunday, August 16, 2009

Road Trip

We have one car, an Accord, and our first few trips with Jackson were harrowing. I drove, Stacy sat in back with Jackson, and he stood on the backseat. That left him extremely vulnerable if we stopped short or turned hard, and made it pretty much impossible for me to see anything behind us. Stacy tried all manner of treats and cajoling, but Jackson stood tall.

We took a trip to Barker Field dog park yesterday, and we had a breakthrough. It was simple, in retrospect: Stacy sat on the middle of the rear seat instead of the end. That backed Jackson into the corner. At first, he stood anyway, like a four-legged danseur en pointe. But as soon as the car started moving, he decided that he didn't have enough room to stand, and he sat down. That got him a treat. A minute later, he lay down, head in Stacy's lap. Another treat, and a safe trip to the dog park.

On the way home, he lay down almost immediately. Woohoo!

Sunday, August 9, 2009

Born To Run

We took Jackson to the Hanover Dog Park yesterday. It was a playdate: our friend Debbie brought her brindle, Brady. And, of course, we wanted to see Jackson run.

He obliged, a bit. We half-expected him to take off like a Tom Seaver fastball as soon as we unhooked the leash. Didn't happen. We had the dog park to ourselves for a good half-hour. Jackson explored a lot, loping around at a leisurely pace. He ran when Debbie threw a tennis ball, and Brady chased it, and he chased Brady. And, when some pugs showed up, he ran with, or after, them. But he didn't seem to have any compelling urge to run, run, run for the joy of it.

Which is a relief to us. We have a postage-stamp backyard, so Jackson isn't getting a chance to run. Now we really believe that long walks are plenty of exercise, and he doesn't need to run. We knew that from the literature, but we had to see it.

The arrival of the pugs gave me a chance to try out our #1503 Scotch Predator Call. The "distress cries of a rabbit" are pure sonic crack for greyhounds. For me, it's like a remote control. Jackson immediately comes, at high speed, and he turns damn near feral: he wants to kill whatever is making that sound. It came in handy when he was bearing down on the pugs like a cruise missile.

Wednesday, August 5, 2009

Back On The Gravy Train

We put out the standard Kirkland kibble au jus this morning, and Jackson pretty much ignored it. A few bites. But we hung tough - no yogurt, and we dumped the nearly-full bowl after half an hour.

This evening, same food, and he inhaled it in about ten minutes. He paused a few times to look at us, to see if something wonderful might happen. But, when it didn't, back to the bowl.

Mommy and daddy are much happier now.

Tuesday, August 4, 2009

Jackson 1, Bob 0

Jackson had a good day. He met Stacy's brother Robert, and some other people, and nothing untoward happened. So we were optimistic when we put his dinner out. Costco kibble in water, dusted with psyllium: a classic. Yesterday, he was licking the bowl clean. Tonight, nothing. He approached it, then walked away.

Uh-oh. Two meals in a row, he wasn't eating right. We tried gentle persuasion. No go. On our side, mild panic.

Then I put a dollop of yogurt in the bowl, on top of his kibble. He ate most of the yogurt off the top, like a kid eating the icing off a cupcake. Then he walked away. Hmm. I swirled the remaining yogurt into the kibble. Better: he ate about 2/3 of the kibble. Hmm.

A little thinking, a little browsing, and we think we have the answer. Pieces of steak, spoonsful of yogurt - we were unwittingly training Jackson to expect better food. These treats were random, not tied to anything in particular. So, when the kibble appeared, he passed. Why not hold out for something better? Maybe it'll happen.

And, in a masterful counterstroke, he started training us: he stayed away from the kibble for a few minutes, and we added something tasty to it. I'm a quick learner: I learned to add yogurt after just two repetitions. Good boy, Bob!

Well, we're all over that scam now. No more fabulous treats till Jackson's back on the kibble. And we've learned something about training. From the trainee side, unfortunately, but still.

Monday, August 3, 2009

Trouble In Paradise?

Jackson ate just half his breakfast this morning. Very uncharacteristic. Every other meal, he's vacuumed up his food like a competitive eater at Nathan's on July 4th. Empty bowl in five minutes.

We gave him a couple of bites of steak last night. Maybe that threw him off, so we're going to stop that. On the plus side, his poops this morning were normal (where "normal" means somewhere between mousse and pudding.)

And his butt is raw from all the scratching he's been doing. He had fleas, so we started him on Frontline this past Friday, and we gave him a good workout with a flea comb last night. Not sure yet if he needs another trip to the vet. We're trying to walk that tightrope between overprotective and oblivious.

Sunday, August 2, 2009

Interviews 2.0

I've been doing some J2EE screening interviews for my company, over the phone. Some trends:
  • Candidates google as they go, so feature questions like What's the difference between a HashMap and a HashTable? have almost no value. All you're testing is how quickly and quietly the candidate can type.

  • Candidates have found a quasi-ethical way to embellish their resumes: describe a project in detail, but don't say which pieces you worked on. List every tool/technology used in the project, whether or not you were the one using it.

    Of course, this is pretty easy to blow apart. I've gotten some amusing explanations of Ajax from people who maybe used it once to clean a sink. Which brings us to...


  • Don't just ask people to explain a technology. Ask them how they've used it on a project. Any candidate who answers with an accurate general description of the technology probably hasn't used it much. A candidate who can tell you what he's done with the technology, the problems he ran into, how he worked around them - he's telling you the truth. Bonus points if he gets animated while he's talking about it.
Experience is hard to fake, even over the phone with a browser open.

Home Alone

We left Jackson alone for over two hours last night, with just a rawhide chew as company. No crate, no muzzle. No furniture assaults, no bathroom accidents. And two hours was enough time for us to catch a set of good music.

We had started alone training about a week ago, leaving Jackson alone for just five minutes. Gradually, we built up to an hour. Now we feel ready to spend the occasional evening out.

Of course, we're just at the ten-day point in this whole adoption thing. According to the literature, greyhounds can go through some dramatic personality changes over the first six months of adoption. So we may come home to an unpleasant surprise at some point. Fingers crossed.

Saturday, August 1, 2009

The Big Brush-Off

A good greyhound owner brushes his dog's teeth every day or two. So far, that's like asking me to defuse a bomb every day or two. It's a tad unnerving to invade the mouth of a hound who doesn't know you very well yet. Those teeth look real big up close.

So I'm nervous. Jackson knows that, and it makes him skittish. But we're making progress. For a couple of days, I did nothing more than hold his snout for a few seconds. Yesterday, I reached into his mouth and rubbed his teeth and gums. That got him a treat. Then I used a washcloth with some toothpaste on it to do a little brushing, followed by another treat. It's coming together.

(The greyhound folks gave us a toothpaste/toothbrush kit. The toothpaste is tasty, and no rinsing required. The brush has a long handle, so that you can get all the way up in the snout. But many people suggest using a cloth or gauze pad instead of the brush.)

BTW if you want to see greyhound toothbrushing done right check this out.

It's A Small Greyhound World

On our after-dinner walk tonight, we stopped at a local grocery store. I waited outside with Jackson while Stacy went in to shop.

Jackson is a stunning brindle, black and beige in a tiger-stripe pattern. He drew his usual crowd. People want to pet him, and that leads to questions about greyhounds and adoption. It's part of the fun.

Two women walking by were especially interested. "He looks like Chatter," one of them said. She stopped and petted Jackson. She asked me how long I'd had Jackson - a week, I said. Then she asked me what his name had been.

That confused me. Most people want to know his name now, but no one had ever asked about his racing name. That's ancient history. "Well, his name's Jackson," I said, "but he was JG Bacardi."

The two women stared at each other, stunned. "Chatter!" they shouted. Turns out we had bumped into Sarah, Jackson's first foster mom. He went straight from the track to her home. Two fosters later, he's with us for good. And, based on how well he's doing, Sarah did a great job at a critical time in his life.

She loved him up, and told us she would be happy to walk him for us anytime. She lives just three blocks away from us. We told her she can visit anytime, and we thanked her for the great job she did. Especially stairs - he's fearless, up and down like a mountain climber.

There are a couple of hundred thousand people in Richmond, and the surrounding counties bring the Richmond metro population to over a million. Jackson could have ended up anywhere in that crowd. Amazingly, he ended up three blocks from his first foster mom.

Saturday, July 4, 2009

Another One Bites The Dust

Just for the record, I predicted Palin's resignation months ago. Sure hope I'm right about the scandal part, too. That would explain her odd decision to announce her abdication on July 3rd.

Thursday, June 25, 2009

At Least We Knew Where Clinton Was

Turns out South Carolina mystery man Mark Sanford was out getting his package stimulated. First Ensign, now this.

Feel free to insert your own remark about astonishing Republican hypocrisy here. I'm worn out.

Friday, June 19, 2009

It's The Framework, Stupid

I'm looking at Scala. It uses static typing, albeit in a sophisticated, type-inferred-when-we-can way. But still: plenty of syntax, and rules, rules, rules. The last static language I learned was Java, about ten years ago. Since then, I've been much more interested in dynamic languages like Python and Ruby.

So why Scala? Because of Lift. I think we're at a point where framework trumps language, and I want to give Lift a try. Hence, Scala.

So why Lift? Because the value of a framework is in the code you don't write, and the worries you don't have. I've been learning/thinking about web security lately, and it's not trivial. Passwords, for example: pretty much everyone knows that passwords shouldn't be stored as plain text. But do you understand why adding a salt to the hash matters? Why you should use a different salt for each password? Why storing the salts as plain text right next to the passwords is not a risk? Which hash you should use? (If you want to dive into all this, here's a good starting point. Read the comments, too.)

There's a lot to it, and that's just passwords. There are plenty more ways to screw up web security, and I'd just as soon hand all that off to the framework. So, when I read this blog post by David Pollak, the creator of Lift, the stuff under the Lift offers unparalleled security heading got me all excited. It sounds like Lift has security baked in.

Contrast that with Rails, where there's still no canonical authentication/authorization solution. Plugins? Sure. But this functionality is critical. It belongs in core. That makes the code better, because you've got more people using it, looking at it, poking at it. And everyone gets the fixes automatically when they upgrade. Then there's the unescaped HTML thing. Rails still leaves it up to you, the developer. Over-all, I'm left feeling that security just isn't high on the list for the Rails core team. But leaving it to us application developers is dangerous.

Lift looks like a potential big win. It'll take me a little extra time to get the basics of Scala into my head, but I expect to make that time up pretty quickly. Within a project or two, if Lift works out for me. After that, it's all upside.

Sunday, March 29, 2009

Cleaner and Cleaner

Re: yesterday's post, I read a little more of the excellent and free Django book this morning, and I realized that template includes don't have to be hard-coded. They can use variables.

Woohoo! This lets me move all my special-case logic into the Python code. Instead of nested {% if %} statements in the template, I'm doing a simple list lookup in Python. Then I use one {% include d.template %} to pull the results into the template. This Django stuff cleans up real nice.

Saturday, March 28, 2009

The Template Made Me Do It

I've been doing a little Django lately. Django's template language isn't Python; it's a somewhat Pythonic template language, and it's limited by design. At first, it frustrated me; after a brief battle, it surprised me.

My template was pretty simple: generate a monthly calendar page. Every day gets the same HTML, except for three special cases: first Wednesday of the month, other Wednesdays, and all Fridays.

In my first version, I passed a list of datetime.date objects in the context. The template for-looped through the list, and did things like

{% ifequal d.isoweekday 3 %}

All by itself, that's mildly evil - the hard-coded magic number, though I can probably remember that isoweekday() starts counting at Monday == 1. Then I started nesting the if-else tags, and things got messy quickly. The Wednesday case, the Friday case, the first-Wednesday case: frustration. I wanted Python at my fingertips, not this crippled template language.

Which, of course, was the answer. I needed better abstractions for the template, and Python was the right place to create them. I subclassed datetime.date and added the methods I needed: is_wednesday(), is_first_wednesday(), is_friday(), is_special()

Which let me write reasonable template code like

{% if d.is_special %}
    {% if d.is_first_wednesday %}

And then the surprise: I realized that fixing the messy template had also made my Python code cleaner. I ended up with a nice little app-specific date class, unit tests and everything. That was the right thing to do, but I hadn't bothered till I needed it for the template. The limitations of the template language drove the refactoring.

And that makes me think that limiting the template language was a very good idea indeed.

Wednesday, March 25, 2009

The Company We Keep

According to this Amnesty International study, the U.S. had the fourth-highest number of executions in the world in 2008. First, second, and third were China, Iran, and Saudi Arabia. Fifth was Pakistan.

Granted, absolute numbers that don't adjust for population are skewed. And, granted, the U.S. number is going down. Still - Iran? Saudi Arabia? Pakistan? Do we want our country on this list?

And anyone who abhors the idea of spending tax dollars to keep killers alive should read this Economist article. Life imprisonment is cheaper than execution.

Sunday, March 8, 2009

Actual Numbers Trump Vague Threats

Daniel Gross has a very nice analysis of Republican tax increase FUD. If you're making $300K, you'll pay an extra two grand in taxes. Is that really going to drive a lot of successful entrepreneurs onto the welfare rolls?

Tuesday, March 3, 2009

Do Be Do Be Done

Do you ever feel like the big-name web frameworks have grown too much, that they're bloated from an endless diet of new features?

Here's fast relief for that bloated feeling: Sinatra, a lightweight Ruby web framework. Minimal docs, but $10 gets you traction from a couple of excellent screencasts.

Friday, February 27, 2009

Republican Lies!

I know, "Republican Lies!" is like "Rain In Seattle!" But this one is so flagrant.

Those high-earner tax increases that the Republicans keep whining about? They don't take effect till 2011. That's twenty months from now.

We can debate the dubious assertion that a modest tax increase turns entrepreneurs into slackers. We shouldn't have to debate how a calendar works.

Tuesday, February 24, 2009

Make An Effort(s)

I wrote some simple code today: a batch job that counts the number of items in a queue, then emails the count to a couple of people. My first version sent a message like this:

There are 3 item(s) in the queue.

Then I smacked myself and dove back into the code. Now the message looks like:

There are 3 items in the queue.

or:

There is 1 item in the queue.

Maybe ten minutes to code and test, and I feel better. The item(s) dodge is lazy, and looks so cheesy.

Friday, February 20, 2009

Lotus Domino - Sometimes Store And Forward Wins

In my day job, I babysit a fairly large Lotus Domino web application – call it ELF – at a very large financial services company. I do all the development and most of the production support.

Some parts of ELF work like this:

  1. A customer request comes in through the web front end. (ELF handles about a dozen different kinds of requests);

  2. The web server stuffs the request into a Domino database;

  3. A batch job moves the request to a relational database.
At first glance, step 2 seems redundant. Why slow things down? Why not just go directly to the relational database? After all, data redundancy is a bad thing. It can lead to discrepancies, it's wasteful, it's needless complexity.

All true, but this basic store and forward architecture has a real advantage: it's more robust than the typical web application (call it TWA). TWA looks something like this:

  • Web server running on one machine;

  • Application server, a separate piece of software, running as a separate process on the same machine, or on another machine;

  • Database server, a separate piece of software, almost certainly running on another machine.
That's three potential points of failure. Plus network risk. Maybe the application server is using web services to store the data – another potential point of failure. And there's configuration risk – more about that later.

Domino OTOH is a large, monolithic monster. It provides everything - the web server, the application server, the database server, even a batch scheduler. All in one server, on one machine. This eliminates a lot of the risks. If the web server is up, then the database server is up, and the web server can talk to it. If Domino can serve up pages, it can store the data that come back.

For ELF, this means independence from the back-end relational databases. If they crash, if they go off-line for maintenance, if there's a network problem, ELF doesn't care. It keeps accepting customer requests and storing them in Domino. Every couple of hours, it tries to reach the relational databases. If they're available, fine – it transfers the requests. If not, no worries, it tries again later. And the website stays up.

Here's a real-life example, from last week, that got me thinking about all this. I mentioned configuration risk. In TWA, the application server probably stores its database credentials – userid, password – in a secure configuration file. But what if some overzealous dolt disables the database userid? That kind of thing happens in big companies. And when it does, TWA stops working, till someone figures out what happened and gets it fixed. Again, in a big company, that can take a surprisingly long time.

But when this happened to ELF, it kept rolling along. We didn't even know there was a problem till the people on the relational database side noticed they weren't seeing any inserts. We looked into it, found the credentials problem, and got it fixed. But the userid went bad on a Friday, when I was out. By the time we got the problem fixed, it was Tuesday - five days. All that time, ELF accepted customer requests and stored them in Domino. Once the credentials were fixed, it transferred all the requests. No data loss, no unhappy website users.

TWA can't load-balance around a problem like this. But let's reshape TWA a bit. Let's have the application server write all the front-end data into a local store, on the same machine. Maybe it uses the filesystem, maybe sqlite. Whatever's fast and reliable. After that, let some batch job deal with it. Any problems reaching the “real” datastore are now in the background. The application server can still capture the user's data and send good news back to the browser.

Obviously, if your customers are trading stock, you don't want to do this. But if they're buying books or T-shirts, maybe you can get away with it. And it's a whole lot better than “Try again later.”

Sunday, February 1, 2009

Clojure and MySQL, continued

I've been working through the Data Access section of the Clojure in the Wild chapter in Stuart Halloway's Programming Clojure. Here's a MySQL version of the last-created-id form:

(defn last-created-id
"Extract the last created id. Must be called in a transaction that performed an insert. MySQL version."
  []
  (:last_created_id (first (sql-query "select LAST_INSERT_ID() as last_created_id"))))

Thursday, January 29, 2009

Clojure and MySQL

Here's the magical connection incantation to get Clojure and MySQL talking:

(def *db* {:classname "com.mysql.jdbc.Driver" :subprotocol "mysql" :subname "//your-server/your-db" :user "your-user" :password "your-password"})

Assumptions - you're using

  • Stephen C. Gilardi's clojure.contrib.sql library, and

  • MySQL's Connector/J JDBC driver, with mysql-connector-java-5.1.7-bin.jar in your Clojure classpath.

Clojure is elegant. It's from the future, with features like support for software transactional memory. Meantime, it's a close personal friend of Java, so it plays well with more mundane tools. I get a buzz when that happens. I've flirted with lisps before, but this one feels like a keeper.

Incidentally, the Connector/J license defaults to GPL, so it may contaminate your application like ice-nine. Hail Bokonon!


Thursday, January 22, 2009

I Accept Full Responsibility For This Post

Timothy Geithner is the latest government official to take (or "accept") full responsibility for a mess. So much courage in the public sector! But there's always an unspoken asterisk - full responsibility, as long as there are no consequences. As long as I don't lose my job. As long as it doesn't cost me anything.

In Geithner's case, the statement is especially absurd. Of course he's fully responsible - he did his own tax returns. Does he imagine that he's taking the heat off Intuit? Were fingers pointing their way because they left the "Do you work at the IMF?" question out of Turbotax's canned Q&A?

But even when the responsibility-taker sits atop an org chart and really is talking about the mistakes of people down below, the statement is meaningless. It's easy to take full responsibility when there are no consequences. How about "I accept full responsibility for my team's mistakes, and therefore I'm resigning"? That would mean something.

Saturday, January 10, 2009

See Ya, Dubyuh

Well, it's almost over. We're getting our country back. We rented it out to some lousy tenants, and they did a lot of damage to the place, but the eviction notice stuck this time. Soon we can start to repair things. (Except for the Supreme Court appointments. They'll be around for a long time, occasionally causing pain and embarrassment. Like herpes.)

Bush has had a chance to watch Obama in action for two months now. I wonder if he sees the difference, if he's picking up even a glimmer of how a real leader does things. Maybe he has a clue now about what went so wrong for the last eight years.

Probably not.