.comment-link {margin-left:.6em;} <$BlogRSDURL$>

Friday, April 29, 2005

Cub-On! 

I don't know why they call it that, but YW and I are going to the Cub-On (aka, a camp out) this weekend. It should be way fun, what with the sleeping on the ground and the archery and the canoeing and the hiking, etc. It's actually a pretty good first camp out since there's a dining hall and real toilets at this campground. You don't want to confront a kid with too much roughing it the first time out of the chute. There will probably be bonus kid-blogging on Monday since the pictures will probably be way fun.

Friday Kid Blogging 

This being America, the boys spend a certain amount of time watching TV. Are you ready for a rationalization, internets? Here it is: if they don't watch at least some TV how will they ever be able to make their generations snide references to the popular culture of their childhood? For instance, I can still sing the Brady Bunch theme song. I know what the Banana Splits are. Conjunction Junction.


Friday Random 10 

I think the best band name in this week's group is The Muffs but that can't hold a candle to the band some friends of MLWN were in called The Bushwhackers.


Thursday, April 28, 2005

I like that 6 editor 

I am an unrepentant computer geek, and I still have trouble diving into the emacs vs vi editor wars. I am perfectly willing to concede that emacs can do more things (hell, there's even a psychoanalysis module for it), but I refuse to climb its learning curve. Back in the days before multiple open terminal windows were possible it was probably worth the effort, but I can do everything I need to do with several open windows and the most superior of all text-editors: vi (or as an old bio professor of mine once called it, 6 (geek trivia: it actually stands for visual interactive)). And I keep stumbling across things it can do that I didn't know about. For example I have a bunch of compressed files (created with the Unix utility named, amazingly enough, compress). I wanted to look at the contents of one of them and opened one up without first using uncompress to turn it back into its regular self. vi opened up and uncompressed it on the fly. Now that it is pretty cool.

Monday, April 25, 2005

Getting Geeky 

I haven't gotten all geeky for a while. At work I'm dealing with a database that stores TIFF files for later use. But what usually happens is that the TIFF file is converted to a JPEG and the JPEG (or portions thereof) are displayed on a web browser. The first version of the database used the file system extensively for saving the TIFF and JPEG files as well as squirreling away other things that IMHO should be stored the database. This is all well and good but if you can't get the images back out of the database and manipulate them, then all you have is write-only memory which is no good to man or beast. Being the Python guy that I am I want to do as much as possible in that most superior language. The first step was getting the TIFFs into the database, that was pretty easy. Getting them back out and displayed was only slightly more difficult. But I've been pounding my head against the wall trying to get PIL to compile. I finally did that and then had to get it to work the database; more head banging. Here's the situation: let's say you have a table called pic that stores a TIFF file in a longblob called tiff (Oh yeah, this is all being done in MySQL), you have a connection to your database called db (a wrapper around MySQLdb.py) and you have the Image module loaded. Here is an example of Python debugging:

buff = db.query("select tiff from pic where id = %d" % pictureId)[0][0]
image = Image.open(StringIO.StringIO(buff))

Chokes and dies with a IOError: cannot identify image file exception. No matter how many times you try it, even if you try explicitly setting the mode to "RGB" it throws the exception. If you read a copy of the image from the file system into ram and put it into a StringIO instance it works fine. But then the epiphany: MySQLdb returns blobs as array instances, not strings! Aha! How about:

buff = db.query("select tiff from pic where id = %d" % pictureId)[0][0].tostring()
image = Image.open(StringIO.StringIO(buff))

That works like a charm. No exception thrown and if you call image.show() you see the picture! Woo!

This is another instance demonstrating Hank's Axiom. What is Hank's Axiom you ask? Why nothing could be simpler, internets. Hank's Axiom: All bugs are small Or to put it another way, really big errors in your program are not bugs, they show your fundamental misunderstanding of the problem. A bug, OTOH, is some finicky little thing that, when you find it, makes you crazy because it is so trivial and lame you should have seen it half an hour ago.


I am a bad person 

The other day I was chatting with one of YW's classmate's dad. This being the land of really high gas prices, filling up the tank is often a topic of conversation. He said that the needle was on empty so he filled the tank on his vehicle and it cost him $100. He does drive a Suburban and he put 39 gallons into the tank. Here comes the I'm a bad person part: I laughed and said it cost me $21 to fill up the Civic the day before.

It's going to take a serious bribe for me to not buy a hybrid when the time comes to buy another car. And, just for fun I'll almost certainly get it modded to have a plug for home charging. Since I am the Dad that I am, I what I really want is hybrid minivan with a diesel engine. Diesel, as you should know, has more energy in it that gasoline, so you can get better mileage from a diesel than from a gas engine of the same displacement. Combine that with the plugged-in electric motor and (I'm getting giddy here) biodiesel fuel and you're talking some serious efficiency. Too bad nobody makes one.


Sunday, April 24, 2005

Bonus Sunday Kid Blogging 

I couldn't wait to post this picture because it cracks me up too much. YA doesn't feel that a bath is complete unless it includes a shampoo-stiffened Mohawk.


Friday, April 22, 2005

Friday Kid Blogging 

Last weekend we went on another stroll along old Highway 1. Eventually we will get to the point where we know we're more than halfway to Montara and just have to go all the way and take the bus back home. Be that as it may, on the way back YW got tired of carting a load of urine around with him. For those of you who haven't been here, there's an incredible amount of poison oak around Pacifica and we spend large amounts of breath warning the boys away from it when we go on our Walks On Dirt. YW thought that peeing on a sprig of Poison Oak would teach it a lesson.


Friday Random 10 


Thank you YW! 

Yesterday was my Birthday (HBTM!). About 2 weeks before my big day, YW told me that my present from him was going to be a book. But, he informed me, he didn't know which book I wanted. I said that Collapse by Jared Diamond looked very interesting. Life continued and YW never had a chance to go Birthday shopping with MLWN.

The night before my Birthday I was reading books to YW before bedtime. There was time for one more book so I plucked The Story of Ferdinand off his shelf. I told him that it was one my favorite books when I was his age. We read the story and admired the pictures and then he went to sleep on his glorious bunk bed.

In the morning I was in the kitchen getting ready for work when he got out of bed. As far as I can tell, he remembered that it was my birthday and that he hadn't gotten me a book, because when he came out to the kitchen he looked like he was about to cry when he said "Happy Birthday Dad." I said, "Thank you YW" and he whipped out from behind his back the Ferdinand book and said, "This is for you." It was one of the sweetest things he's ever done.


Thursday, April 21, 2005

Commuting 

On the days when I actually have to appear at my place of work, I drive 63 (in my 35 to 40 mpg Civic thank you very much) miles from Pacifica to Santa Cruz down scenic Highway 1. Yesterday as I was approaching Pigeon Point I glanced out at the water and saw a whale spouting about 200 yards off shore. Right here. I pulled of the road and watched it swim around for a while before continuing on my way. So while I don't want to do the drive all that often, I do like scenery quite a bit. I've also seen a bobcat, several coyotes, innumerable raptors, and a couple of road-kill feral pigs.

HBTM 

Happy Birthday to Me!
Happy Birthday to Me!
Happy Birthday to Meeeeeeeeee!
Happy Birthday to Me.

Not the most sophisticated lyrics, but they are from the heart

Monday, April 18, 2005

See, it's true 

The guy in the red life jacket and blue shorts, who is in the process of being launched into the bow of the boat from the force of hitting the wave, is your humble author. For the curious, that is Troublemaker Rapid on the South Fork of the American River, near sunny Coloma (the site of Sutter's Mill where James Marshall discovered gold in 1848). I'm not sure exactly when the picture was taken, but based on the haircut and the the gear visible in the boat, it's probably around 1985. Twenty years ago... I. Am. An. Old. Man.

Update:: If you look closely you can see that I am wearing a watch. This means that I was the Head Boatman on the trip. The HB has a schedule to keep. He needs to get to lunch on time. He needs to make sure that camp is reached with enough time to finish cleaning up the dinner mess before it gets dark. The regular boatman on the tripd doesn't care what time it is. He just wants to have fun going down the river and entertaining the folks in his boat. When he gets to lunch, he makes lunch; when he gets to camp he does the camp thing. If he's washing dishes in the dark, then the HB should have been looking at his watch more often. So when I wasn't the HB, I didn't wear a watch; I didn't want to have any unsightly, unnecessary tan lines


Rafting Flashback 

So there's this article in the Washington Post about, among other things, Karen Hughes and her new job at the State Department. She's supposed to be in charge of selling the American Brand to the Muslim world. The money quote in the article is:
"The administration is convinced that if only the Muslim world understood us better they'd like us more, whereas many Muslims feel it's precisely because they understand us that they're unhappy," Carothers said.
Way back in the gogo days of the 1980s I worked for a whitewater rafting company that did trips on rivers all over the American West. For a while I was on the Rogue River crew (You really should go it's lovely and lots of fun). (To get all SAT for a moment Guides are to Fighter Pilots as Office Staff is to Ground Crew. The mission can't get flown without the ground crew, but the guy that tops off the fuel tank is just not in the same club as the guy who blasts off into the wild blue yonder.) One of the perqs to working in the office of a whitewater company is that you can go along on trips from time to time. It's fun for everyone, the guides get to make friends with the people who keep the schedule full and the office person gets to experience the company's product. The only thing the guides ask of the office guest is a bit of help in camp with the cooking, etc. One summer we had an office person who came along on a 5 day trip and it was good. Then she hung out and went on the next one, and it was OK. Then she stuck around went on the next one and it was not good. It's not that we didn't like her, but she was the houseguest that wouldn't leave. Towards the end of the 3rd trip tempers were beginning to flare and all she (a refugee from the 60s) wanted to do was talk about why we weren't getting along because somehow this would magically make us start getting along again. Sorry, but no, we're not getting along because you're acting like you're one of the guides and you're not. At the end of all the talking, we really really really understood why we didn't like each other at the moment.

Instead of trying to talk to the Muslim world about how America is actually not evil, and in fact pretty darn neat-o, how about if we try just not being evil? It's easier to convince people to believe something if that thing is actually true.


Another Quiz 

Your Inner European is Irish!

Sprited and boisterous!
You drink everyone under the table.
Who's Your Inner European?

I suppose it's appropriate, my ancestors loved going to Ireland, meeting exciting new people, killing them and stealing their stuff. My forebears were so popular that people even said prayers about them: "From the fury of the Northmen preserve us, O Lord."


Wow, I'm a Midwesterner 

But, a midwesterner who has lived all over the US except for the South and New England

Your Linguistic Profile:

70% General American English
20% Upper Midwestern
10% Midwestern
0% Dixie
0% Yankee

What Kind of American English Do You Speak?

Friday, April 15, 2005

Friday Kid Blogging 

YW attended a Birthday Party at the local Bowling Center (I've been instructed by my cousin who married into a bowling-center-owning family that you don't call them Bowling Alleys). Here he is celebrating a strike. Note the darkness and the red lights in the bumper rails: it was Groovy Bowling or maybe Disco Bowling, I can't remember which right now.


Friday Random 10 


Wednesday, April 13, 2005

Alcohol Is Not The Answer 

Hi Internets, it's Brother Atom Bomb of Warm Humanitarianism (I just like typing that).

I've called you all together to talk about alcohol. Specifically, the burning kind. I, like a good Running Dog Liberal, wish for our country to achieve Energy Independence, and most especially to wean ourselves from dependence on Foreign Oil. From time to time I read out there in Blogtopia® (Y!SCTP!) the wish that we used much more ethanol for our transport needs. Now, I haven't run the numbers, but I'm pretty sure this just won't work.

I spent a certain amount of time working on my Grandfather's farm back when the Earth was young and have a more than casual acquaintence with the process of growing Maize (or as we like to call it, Corn). Let's run through steps:

  1. Plow the field.
  2. Disc the field.
  3. Fertilize the field.
  4. Plant the seeds.
  5. Cultivate the field.
  6. Spray the field with herbicide.
  7. Cultivate the field again if necessary.
  8. Harvest the corn.

So now we have corn that's ready to be made into ethanol. Note that we drove forth and back on the field with a very low mileage tractor 8 times.

But how does corn become alcohol? It just so happens, internets, that I used to brew beer. Brewing beer is quite similar to the beginning steps of making fuel-grade alcohol. Not only that, but I took a lot of Organic Chemistry in college (Go Gauchos!) so I'm familiar with the post-brewing procedure as well. Lets list them all:

  1. Grind up the corn.
  2. Mash the corn (this is a brewing term that means convert the starch into simple sugars in a warm, aqueous solution using enzymes that come from malted barley.
  3. Boil the wort (the sugar solution from the previous step) to increase the sugar concentration.
  4. Ferment the wort (add yeast which eat the sugars and produce Carbon Dioxide and Ethanol).
  5. Use Fractional Distallation to get a solution of concentrated alcohol suitable for burning

That's 5 steps, 4 of which require heat or motion. I've left out the moving the corn from the field to the distillery since we have to move oil from it's starting point too.

Let's review. There are 13 steps from seed-corn to a tankful of useful ethanol. Of those 13 steps we have to expend serious amounts of energy in 12 of them. The yeast are happy as long as we maintain things around room temperature. They do through off heat as part of the fermentation, which can require cooling (ie, energy), but I'm disregarding it. Even with Super-Fabulous American Industrial Farming I have trouble believing that we end up with more energy available for burning than we used up producing it in the first place. If any of my loyal readers (all three of you ;^) know the numbers on this, please feel free to correct me.

In conclusion, internets, Alcohol Is Not The Answer.


Tuesday, April 12, 2005

Unitarians United for Oneness 

My Unitarian Jihad Name is: Brother Atom Bomb of Warm Humanitarianism.
Get yours.


Monday, April 11, 2005

Then Go Back To Arkansas 

News Flash

The Chron has an article this morning about some woman out in Fresopolis that thinks she's plugged into God's wishes about who should get to marry whom. In addition to that she seems to be cranky about living in California: "But down here in the valley, we are real people. This is a red state." I've just got to say that I'm beyond tired of the implication that people who live near salt water aren't real Americans. She and her uptight white neigbors don't like the homos, and since she has a direct line to her Imaginary Friend Jesus who told her that they're yucky, the rest of the state should kowtow to her intollerance.

But wait, they're not intollerant: "We are not against the homosexuals. We don't have a problem with what they want to do in private. We just don't want it in our faces." I'm pretty confident that the last thing any of our homosexual friends want to do is go to Freston and engage in smooching in Crazy Old Lady From Fresburg's house.

I don't understand how two people in love declaring their love for one another and setting up house together is 'in her face.' I guess it's how they then open up their Gay Lifestyle Recruiting Offices and go on door-to-door conversion missions like that other in-your-face cult the Mormons.


Friday, April 08, 2005

Joe Smith & The Cub Scouts 

The title would make a pretty good band name.

Somehow I've been drafted into helping run YW's Cub Scout Pack. This means once a month I go to a meeting and discuss plans for the future. This is fine. I don't mind having a say in how the Pack is governed. I think of myself as a deep cover mole infiltrating the Boy Scouts. <snark>Since I don't collect and distribute kiddy porn perhaps my cover won't work</snark> This meeting happens at the local LDS Church (for those of you not up on your TLAs (Three Letter Acronyms), that would the Mormons (my farming grandmother, toward the end of her life was afraid of them. She thought they were a cult and were likely to kidnap her and force her to renounce Lutheranism for their fiendish beliefs. If she saw young men wearing ties and white shirts while riding bicycles she would hide in her bedroom nd not answer the door so they wouldn't break in and take her away. But I digress.)) In the spirit of my previous post, I think they are proof of the God == Imaginary Friend hypothesis.

The Church of Jesus Christ of Latter Day Saints was founded by Joseph Smith. Joe lived somewhere in the Eastern US in the early 1800s. One day out in the woods an angel (Moroni, if you can believe it) appeared to him and revealed the Truth of the Word to Joe. Joe started the Church and the rest is history. Now that was less than 200 years ago and there are millions of people around the world who think that a man who halucinated and heard voices in his head was talking to God's own representative. Today we call that kind of person insane.


The Tooth Fairy Miracle 

Last night I wasn't tired enough to go to bed, and I was noodling around on my computer while the TV was on for background noise. In the current Pope-apalooza, PBS had on some panel discussion about Faith and God. Now understand internets, I was brought up about as Lutheran as it is possible to be. I am descended from a long line Lutheran Pastors. I went to Church for my entire childhood; I was an altar boy. My farming grandmother used to look down on the "Bohemians" in the next county (when I was a kid I didn't know much about hippies other than that they seemed like they were having a lot of fun and that sometimes they were called Bohemians. I _really_ wanted to go see what rural Minnesota Bohemians were like. Then I found out that she was talking about the Czech Catholics that lived a few miles down the road. They weren't Lutheran so they weren't quite right. (Listening to A Prairie Home Companion is like listening to stories about my family.)) So I'm familiar with the God talk. This panel kept going on and on about Faith and belief in Miracles and how science can't really get at the answers about God. It was driving me insane. It was people very earnestly debating the nature of their imaginary friend.

One thing they kept going back to was the 'historical' fact of Jesus. Historical? Are there any documents from 2000 years ago (besides the Bible) that mention a man claiming to be God who was executed and then came back from the dead? Anyone? Anyone? As far as I can tell, the documentary support for the physical existence of Jesus is a book that was very heavily edited in the centuries after his supposed existence by a bunch of men who had a vested interest in people believing the book was revealed truth.

I'm rambling here, but as I get older I get less and less able to handle discussions of faith. If you really believe in God that's great, but I still think you're soft in the head.


Friday Kid Blogging 

Here's another photo from our trip to Yosemite. The boys have discovered a large rock on the way to Vernal Falls.


Friday Random 10 


Tuesday, April 05, 2005

Me 

I can hear you internets. You've seen pictures of YW and YA and you really want to know what I, Hank, look like. The above is what I look like in Southpark.


Monday, April 04, 2005

Spring Break Photo Blogging 

YW was on Spring Break last week. On Thursday we drove up to Yosemite to play in the snow and wander around in the outdoors. It was huge fun. We sledded, we hiked, we napped, we ate crappy food, we stayed in a marginal hotel. Actually, the hotel (in Mariposa) wasn't that bad, but in Minnesota a couple months ago I paid less for much nicer room and had free wireless internet access (the Mariposa place charged for it) and had one of the better complimentary breakfasts I've ever encountered. I guess when you're close to Yosemite you can charge whatever you want.


This page is powered by Blogger. Isn't yours?