Monday, March 26, 2007

ImageMagick, Travel Pictures, and Getting Pictures to Import

I had a problem importing photos on my Ubuntu O/S. I received the following error.
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Operation not permitted). Make sure no other program or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.

It worked fine on my old Fedora Core system so I hit the web to find the answer. It only took a few minutes, and some help from Google, to find the answer. It appears to be a bug.

Here's the link to fix it.
https://launchpad.net/ubuntu/+source/libgphoto2/+bug/91250

You can read the whole thing but here's the crux of it.

Edit /etc/udev/rules.d/45-libgphoto2.rules
replace
BUS!="usb*", GOTO="libgphoto2_rules_end"

with
SUBSYSTEM!="usb_device", GOTO="libgphoto2_rules_end"

On another subject, to change a bunch of photos at once, you can use a tool called ImageMagick. Here's a perl script I use to shrink photos for email or web posting. If you're using LINUX, you put it in a directory where your files are located and run it. At the end, you should wind up with some _sm.jpg.

#!/usr/bin/perl

## this perl script converts jpgs to smaller jpgs and set the maximum size.

$size = '640';
@files= `ls *.jpg`;
foreach $file(@files) {
chomp $file;
print "Infile is $file\n";
($outfile,$ext) = split(/\./,$file);
$outfile .= '_sm.jpg';
print "Outfile is $outfile\n";
$cmd = "convert -geometry $size $file $outfile";
print "$cmd\n";
system $cmd;
}


Here's another version that changes the formate from jpg to png. Note, you only need to change the filename extension to make this happen.

#!/usr/bin/perl

## this perl script converts jpgs to png and set the maximum size.

$size = '640';
@files= `ls *.jpg`;
foreach $file(@files) {
chomp $file;
print "Infile is $file\n";
($outfile,$ext) = split(/\./,$file);
$outfile .= '.png';
print "Outfile is $outfile\n";
$cmd = "convert -geometry $size $file $outfile";
print "$cmd\n";
system $cmd;
}

For more information about Image Magick, visit their site at http://www.imagemagick.org

Saturday, March 17, 2007

Wives Complete, Children Change Part 1

This was a small blog that, as I wrote it, expanded into a multi-part series. In this series I'll attempt to explain my personal philosophy of marriage and parenthood. As with most philosophies, mine is based on observations from my life and the lives of others.

In this installment, I'm going to talk about the reasons not to get married. In my opinion those reasons are
  1. Your Parents
  2. Your Friends
  3. Yourself
If you marry young, the primary example you have of how a marriage should work is your parents. Your gut, visceral reactions to marriage stimuli will be that of one or both parents. It is only calm and reason that will overcome this ( or a lot of therapy ). Therefor, if your parents had a bad marriage, you should enter into the institution carefully. By way of explanation, I'll give you some of my history.

I was raised in a house with parents that fought constantly. I was told from an early age the only reason my father was still in the house was to see the children graduate high school. After that, we were informed, he was gone.

I'm the third of four children. My parents had two children and decided that was enough. They had their boy and girl and therefor the perfect 1950s nuclear family. On top of that, my brother Chris was a hellion. He brought stress and trouble weekly, if not daily. His antics had my mom near a breaking point.

So, seven years after Chris arrived, mom discovered she was pregnant with me. She insisted it was only appendicitis (that had gone on for five months) and went to the doctor to be diagnosed. I'm not sure what the doctor said or how he said it. I'm sure he was happy and expected mom to be happy as well. She wasn't.

She came home and threw her purse at my father who, more than likely, was reclining in that old red nagahide chair drinking beer from a tupperware 'glass'. When the purse missed my father my mom yelled for all the neighbors to hear, "You bastard. You got me pregnant!"

Dad just smiled.


Worse, on the day I arrived, Doctor Shelton brought me in all bundled in baby blue and told mom, "Congratulations, its a boy."

"Not another boy!" my mom screamed and began crying. Then as the doctor laid me on my mom she began another kind of tears. I'm told they were tears of joy. "He's so beautiful," she said.

I'm told I was the perfect baby and easy to raise. When my younger sister came three years later it wasn't such a shock. Mom had already resigned herself to a middle age of raising children.

God, my friends, always has the last laugh.

As time wore on, my mother changed from the perfect wife of the fifties to a liberate (in a sense) woman of the sixties and seventies. I'm told by my older siblings, that one day mom had had enough. It was almost as if she carried any slight or insult my father gave in a bag on her back. When she exploded, the bag was flung at my father and it was the gift that kept on giving. Unfortunately, this occurred when I was a pre-teen and kept going until dad have his first heart attack.

Something about my father's brush with mortality changed the relationship between my father and mother. Its as if father understood he could die soon and mother pondered a life without my dad and decided things should change. They had a happy marriage after that (more or less). Unfortunately that didn't happen until after I graduated high school.

Entering college, my opinion of marriage was a low one and that opinion remained until my thirties due to the second reason not to get married; your friends.

I had two close friends whose marriages failed. One married his high school sweet heart and stayed married for seven years. The other, married at the end of a whirlwind romance. Both friends were miserable at the time of divorce. I'd known each of them for a long time and had never known anyone as sad as friends when they lost their wife.

Now I'll be the first to say I had a low opinion of both of these women. It was that they were horrible people, it was just that they made my friends sad or treated my friends poorly during their marriage. It was always odd going to their house. I always felt as though I was intruding. In fact, you could tell that any time spent with a 'single friend' was considered bad by the wives.

So, my overall impression of the union of my friends was that marriage was a horrid institution to be avoided at all costs. In the interest of full disclosure, they both did much better on their second marriage.

The third reason not to get married is yourself. Maybe your parents were always happy. Maybe your friend are still unmarried or have happy unions. But deep inside, you know, you aren't ready.

If you're thinking this, my opinion is, you're probably right. If you haven't met someone you're willing to be with for the rest of your life or you don't want to give up your life as it is then don't get married.

When you meet the right person, it will be as if you didn't have a life before. You want to spend every waking hour with them and think nothing of giving up Friday Night Poker. When you find THAT person, then you're ready to make the leap.

In the next installment, I'll detail how I found Zack's mom and how we fell in love.

Until then....

Friday, March 16, 2007

Top Things I Learned While in Germany

My job requires I travel a great deal. I don't really like this aspect of my job as it keeps me away from home. On the bright side, it does broaden my world view and lets me see how other people live on planet Earth

Normally I travel within the United States. Occasionally I travel overseas. During my career I've travel to England, Korea, Hong Kong, and Greece on business. On vacations I've visited Canada (not really a foreign country), Mexico, Scotland, and Ireland. I place California as an honorary foreign country list. While marginally part of the US it is, well, out there.

Today I'm in Germany for two weeks. I'm staying in Mainz City on the Rhein River. Mainz is a pleasant, old city which houses many museums and fine restaurants. Mainz was a major Roman fortress and the city has many museums dedicated to that time period. The city also houses the Gutenberg Museum with some of the original Gutenberg bibles on display. Basically, the city has a lot to offer any tourist.

From what I've seen so far, the rest of he country is equally as nice. The food is outstanding here. Never have I found a country that can cook steak like Germany. I come from Texas and from a family of ranchers. While I prefer my steak spiced differently than the Germans, I can't fault their selection of meat or their cooking method. When you order a medium steak here its medium all the way through. Heck, most Texas steak houses can't do that.

I think Germany has the best bread in the world. I'm on a diet. Correction, I was on a diet. The diet has suffered greatly here. For you see, Germans eat a lot of sausage, bread, cheese and potatoes. None of this is on my diet but I can't seem to stop eating it.

I haven't tried the beer yet. I know it to be good as I've had it in the past. I drink wine mostly these days and I have to say German wine is pretty good.

And so, on this St. Patrick's Day, I have a confession to make. Ireland has been replaced by Germany as favorite foreign country. In Germany the people are nice, the beer flows freely, and the countryside beautiful. My apologies Ireland, Germany blows you away in all categories.

So, now, the part you've been waiting for. Top ten things I've learned while in Germany.

1) German drivers are polite but fast. If you use your turn signal a German driver will slow down and let you in. In Austin a turn signal usually leads to the other driver speeding up and close the gap. The fast yet polite statement, at first glance, may seem to be a bit of an oxymoron but I think I have an analogy that fits; an armed society is a polite society. In the same vein, a fast driver is a polite driver in Germany.

2) 90% of all German work out clothes ( bike shorts, sweats, t-shirts ) are black.

3) The river Rhein is beautiful and rightly part of the World Heritage of Mankind.

4) Germans love sour kraut. For some reason I find this funny.

5) Germans are friendly and helpful. They smile when you try to speak their language and reply to you in English.

6) German waiters consider it rude if you leave their tip on the table. You should hand it do them. The tips here are smaller, only 5-10% of the tab.

7) German words make sense. Their language often puts words together to form a noun. This makes it an easy language to read once you learn the 'base' words.

8) Germans have a good world view. It is a proper mix of pragmatism and optimism.

9) Never present a German a problem unless you intend for him to solve it. He may take days but he will come up with a solution.

10) German food is Wundervoll!

Go Tigers

Go Tigers!!!!

I'm forced to say that now for the mighty Tiger is the mascot/name of my son's very first soccer team. Zack has turned four, you see, so it is time for him to give up his childish ways and turn to sports.

Sports. Just say the word a few times. It rings with power. It rings with determination. It rings with parents living vicariously through their children. Sports; civilization's alternative to war.

We signed my son up at the local YMCA to play soccer. "He's too young," you might say. But I say that you are never too young for a photo op that makes your parents smile. And smile we did as Zack took to the field for the very first soccer practice complete with team jersey, his own bright red and black ball, and over sized socks that covered his little shin guards. Man, was he cute.

Deb and I beamed as Zack excitedly took to the field. Of course, he was the cutest kid out there. After all, he's OUR son. He was equally cute when he asked that Deb stay with him during practice. Man, was that cute. He was even cuter when the couch asked the kids to kick the ball to the line then kick it back. He was the cutest ever when he kept kicking the ball into the next field, then down the embankment, then over to another field full of children. The cuteness wore off when he kicked the ball into the road and ran after it with Deb and I chasing after our adorable son yelling.

After that, embarrassment set it. Zack really isn't into the whole team thing. You see, in his mind there is an 'I' in team. The 'I' stands for 'I want to kick the cool ball over here'. Zack spent the remainder of practice kicking the ball here and there. He even kicked the ball where the couch told him to... once. He kicked the ball into the net then shoved his face into the net thinking it felt cool to have his mouth out one hole and each eye through another.

All the other kids stayed in line and did as told. All the other kids gathered in a huddle and talked about how much fun they were going to have this season. Zack ran here and there kicking is bright red and black ball where the ball led. In his defense, he kicked it a lot straighter than the kids who listened. I'm holding on to that. I have to for there is little else.

In his defense, Zack is only one of two children that have never played before. The other, a girl who is a year older, couldn't kick the ball well at all. As I said, I have to hold onto something.

A lady who sat next to Deb and I (she talked to one of us as the other was playing Zack goalie) asked if Zack was an only child. In a way he is. He has two older half-sisters that are 11+ years his senior. So it turns out he has three moms and is the only child of his dad. With all this he is, as expected, rotten as heck.

For Zack believes he is the center of the universe. I don't see this as a good thing or bad thing. It simply is the way it is. At the very least, he knows he is loved and that's more than I can say for a lot of kids... but I digress.

Zack, as the lady said, acts like most only children. He does what he thinks is fun. Following a group is not his normal mode of operation. He leads. If others follow that's OK. If they don't, well, that's OK as well. He'll have fun whether they're there or not.

After the practice, Deb and I were tired. Zack thought soccer was the coolest thing ever. Not better than Christmas or a birthday but pretty darn cool none the less. He was excited about hitting the field again. Maybe next time we can actually keep him on the field.

I understand they don't keep score at this age. All they try to do is teach the children how to kick the ball and hope beyond hope that they manage to get it in the correct goal. They don't enforce the rules either. At first I wondered about this. Then as I saw Zack kick the ball through a neighboring group of kids I understood. Its not about the score its all about the game and the fun of playing the game.

Zack has one more practice before his first game. I can't wait to see that first game. Regardless of the outcome it will be cute. After all, this is Zack we're talking about. And I'm holding on to the fact that he will, at least, kick the ball straight.