Sunday, December 13, 2009

Even when it's bad it's good

Today I made pizza for dinner. I made the dough from scratch and it was not good. For whatever reason the dough did not rise. I don't know why it didn't, but it didn't. I did everything the same as I always do and it just didn't work. The pizza came out flat, hard, and chewy.

On top of that, it was a bit salty. Is too much salt bad for yeast? I have no idea.

I took one bite and there was an explosion of bad taste in my mouth. I choked it down and turned to my wife and said that we needed a plan B because this pizza was inedible.

She said she thought it was okay.

I asked my kids what they thought. They liked it. My oldest daughter was already asking for a second piece.

I took another bite and it wasn't nearly as bad as the first. So I ended up eating a few pieces.

I wonder what else I would eat if everyone else was eating it?

Sunday, September 27, 2009

This post blows

Who knows, why he whose snot flows, can no longer smell a rose with his nose?

Turd Blossom

If I ever meet George W. Bush, and we get to know each other really well, I wonder what nickname he will give me?

Wednesday, September 2, 2009

Perhaps I should have been minding someone else's business

There I was minding my own business after work when my oldest daughter comes in an interrupts me: "I need a dollar to get a new school ID card," she says.

"What happened to your old school ID card?" I ask.

"The school lost a bunch of them over the summer, and now I have to get another one," she answers.

"Well, if they lost it, why do I have to pay for a new one? They're the ones that lost it. They should have to pay, not me!"

"If I don't get a new card then I'll have to eat lunch last every day," she pleads. "Daddy, I get soooo hungry waiting ... I really need a new card!"

"I thought that you had to keep track of your ID. Why did they have it anyway?" I ask.

"They made us turn them in at the end of last year," she says.

"And then they lost a bunch of them over the summer," I say.

"Yes," she answers.

"And why did they make you turn them in?"

She thinks for a minute and scratches her head. "I think it's so we wouldn't lose them over the summer ... Daddy? Are you okay? Daddy? So can I have a dollar or not?"

Wednesday, July 22, 2009

The hairy meatus

My eyes are weak, but they've always been weak so that's really not new. My knees are both shot, casualties of running and playing soccer. My back aches, probably from sitting at a desk every day for years and years. My wrists and elbows ache from time to time, standard computer overuse injuries. The hair on my head is thinning, but I was mentally prepared for that.

However, nobody ever told me about the old man ear hair.

It snuck up on me early last year, when I discovered a freakishly long strand of hair coming out of my right ear. It was about one and a half inches long, and it had managed to grow that big without me noticing it at all. Technically, it was growing out of my tragus and not from inside the ear canal, so I don't know if it qualifies as old man ear hair yet, but I definitely never had hair growing from there before. I snipped it off with a pair of scissors, and then I promptly forgot all about it.

Except there was one problem: It grew back. And so I cut it again. And it grew back again. And so I cut it again. And so forth.

Then one day in the fall of last year I noticed another hair that was about an inch and a half long growing out of my left ear. I started to cut that strand regularly as well.

This cycle of ear hair growing and cutting continued on happily until one day in the winter of last year when I accidentally cut my right ear while trying to snip off the strand of hair. Cuts on your ear hurt a lot more than you'd think.

I finally broke down and asked my wife for an ear hair trimmer for Christmas. She always says that I'm hard to shop for, and I figured that it would be something easy to buy. She flatly refused my request on the grounds that she didn't want to be married to someone old enough to require such a device.

At least I don't have any old man nose hairs.

Yet.


Tuesday, July 14, 2009

I need about tree fiddy

According to this article at Wikipedia there's an Easter Egg in iGoogle:

If one sets the iGoogle theme to the "Beach" option, then at 3:14 AM every morning, the Loch Ness Monster surfaces for 1 minute, then at 3:15 dives back under.

3:14 is presumably a reference to the allmighty pi. It would have been much funnier if the Loch Ness Monster showed up at 3:50 instead.

Monday, July 6, 2009

Meanwhile bing returned bupkis

Regular readers of this blog already know about the importance of flying chicken bicycle farts. The rest of you can catch up here and here.

So what's all of the excitement about?

Well, as of right now, this blog sits atop the google search rankings for flying chicken bicycle farts.

And if that doesn't get the blood pumping I sure don't know what will.

I like corned beef on rye with lots of mustard

Greetings.

I'm glad that you are reading this. I really am.

After all, I wrote this post just for you. I did it just now when you clicked that link in the browser. I'm a very fast typist.

Who am I, you ask?

Why, I am the little man who lives in your computer.

I know everything about you. I know your usernames, your passwords, and your credit score. I even know about those naughty sites that you go to sometimes, but don't worry, I won't tell.

Promise.

Now be a pal and get me a sandwich.

Wednesday, June 10, 2009

Now available in black, black, and black

One remark I've heard repeated numerous times during the current health care debate is the idea that if the government takes over health care we will lose our choice of health care plans. As it is now we are free to go out into the health insurance marketplace and find the plan that fits our specific needs the best.

However, I have never done this. I doubt that many other people have either. Like most people who work for companies that subsidize employee health insurance I use the insurance that my employer has picked out. It would be foolish not to. At most I get to choose between a crappy HMO and a crappy PPO. Two years ago I got to choose between a crappy PPO and a crappy POS. It turns out that in this context POS stands for Point of Sale, although the more common meaning of POS would also apply.

In eleven years I have worked for five different companies, and had probably a dozen different health plans. I wish now that I had kept track of them all. It would make a nice picture to have all of the insurance cards lined up in a row. Looking back on the myriad of insurance plans that I have had none really stand out as particularly good or particularly bad. In reality they all cost about the same and all had about the same level of benefits.

So the choice in this case is no choice at all.

Sunday, June 7, 2009

The lioness and the thorn

Many years ago in a far away land there was a lioness who stepped on a thorn. Despite her best efforts she was unable to dislodge the thorn and soon the paw became infected. Unable to bear the pain any longer, she laid down in a partially covered swale and waited for death.

Several days later a man happened across the lioness, almost tripping over her in the dim morning light. Shocked he began to run away, but when the lioness did not give chase his curiosity got the better of him and he slowly returned. The man soon discovered the thorn and being a kind and gentle man he pulled it out, giving the great beast immediate relief.

Then the lioness, delirious from hunger, promptly tore the man apart, and had him for her supper.

Tuesday, May 26, 2009

"Swerve" looks funny when you write it down

Sounds that should be banned from the radio:

1. Car horns

I always jump and look around to see whose honking.

2. Sirens

I always jump and look around to see where the emergency vehicle is coming from.

3. Car crashes

I always jump and look around to see where the accident was.

4. Phone ringing

I always jump and flail wildly at my phone to see who is calling.

5. The legalese they mutter at the start of car commercials

Since I can't understand what the radio is saying, I always turn the volume up. When the loud part of the commercial starts, I always jump and lower the volume faster than it takes Usain Bolt to say "overreact".


I think maybe that I need to relax more when I drive.

Monday, April 20, 2009

A life boat in the giant sea of suckitude

Since the age of four I have lived in four different places:

New Orleans, LA
Martinsville, VA
Williamsburg, VA
Pittsburgh, PA

Of itself, that list is not very interesting. But there is a connection between these places that doesn't involve me, at least I hope that it doesn't involve me.

Don't see it? I can't blame you. Who the heck has heard of Martinsville anyway? And for all of you D.C. Metro area types out there: Martinsville, VA is not the same as Martinsburg, WV. So stop insisting that it is and go back to feeling superior or whatever it is that you do there when you are stuck in traffic on the beltway.

Anyway, the suspense is killing me so here goes: Each of those four places has experienced a crippling economic disaster within my lifetime.


New Orleans

Everybody knows about how Hurricane Katrina wiped out America's favorite Mardi Gras destination. During the storm and in the aftermath everyone from George W. Bush on down stood around scratching their collective butts. Much of the city that was below sea-level was destroyed and much of the population never returned to the city. New Orleans will probably never fully recover to be the same crime infested haven of debauchery that it once was. That's probably a good thing, but it won't prevent us from missing it.

I lived in New Orleans for a year when I was four and here's a smattering of what I can remember: 
  • The bread they had everywhere was awesome. We used to go out to eat and all I wanted was the French bread.
  • Our neighborhood made a Popeye float for Mardi Gras, and my older brother and sister were on it in the parade.
  • After the parade people shot off fireworks. Some of them landed on our house.
  • The school my older siblings went to was named after a man called Walter G. Schneckenburger.
  • Sometimes at Schneckenburger elementary they served red beans and rice for lunch.
  • Did I mention the bread? It was delicious. 
  • I once had a cayenne pepper flavored bagel. It burned going in and burned going out, if you know what I mean.
  • There was an empty field near our house that was full of giant fire ant hills (the hills were giant, not the ants). Kids would ride over the ant hills on their bikes and crush them. If you've never crushed an ant hill with a bike, you should try it, it's very satisfying. Just don't stop on the hill. Those fire ant bites really hurt.
  • I once saw a cockroach that was as big as my head. I still sometimes have nightmares about it.
  • Finally, there was this really good bread that they had there. Did I mention that yet? I should go back some day just to eat the bread. I hope that they managed to save some of it from the floodwaters. Too much with the bread thing? What do you expect from a blog that's named after a bread product? Fine then, let's move on.

Martinsville, VA

This seemingly constantly depressed town in the foothills of the Appalachian mountains is the place I grew up in. I started kindergarten there at Druid Hills Elementary and I graduated from Martinsville High School thirteen years later. Go Bulldogs!

If you've heard of Martinsville you are most likely a NASCAR fan. The aptly named Martinsville Speedway is located there, and twice a year 65,000 rednecks descend on the town of 15,000 in order to eat fried chicken, drink beer, and watch a race where the drivers do more braking than anything else. Twice in my life people have surprised me and known about Martinsville from non-NASCAR related reasons. The first person was Dr. Gerry Johnson, a geology professor at the College of William and Mary and an otherwise all around awesome guy. Dr. Johnson had heard of Martinsville because it's where the Virginia Museum of Natural History is curiously located. The second person to surprise me was one of my mother-in-law's friends. He was in the replacement window business and had heard of a window factory that was located there.

For much of the 20th century the economy of Martinsville was built on three things: furniture, textiles, and nylon. At one point Martinsville was known as the "Sweatshirt Capital of the World". This was based on the fact that something like 70% of the sweatshirts in the world were produced there. Things peaked for Martinsville in the 1970's. Business was good and the population was still rising. Even the football team was unstoppable. Reportedly the team was kicked out their conference for being too good. 

I arrived in the summer of 1981 and it's been downhill ever since. You can probably guess what happened. Cheaper competition from abroad spawned a death march of factory closings, layoffs, and high unemployment that has lasted a good thirty years now. Recently, the unemployment rate has topped 20.2%, beating the old record of 19.6% that was set in 1999. That's right, we're talking double digit unemployment that has lasted for decades. And most of the jobs that were lost weren't exactly high paying jobs to begin with. By comparison the highest national unemployment rate recorded during the great depression for the United States was around 24.9% in 1932. I should note that we apparently count unemployment differently these days, and a rate of 20.2% rate in 2009 is probably worse than a rate of 24.9% was in 1932. Of course, economists are not known for agreeing with each other, so it's hard to be sure.

All of this is why I'm not impressed by the reports of a national unemployment rate of 10%. 10% is kid stuff.


Williamsburg, VA

In January 2009 Martinsville did not have the highest unemployment rate in the proud Commonwealth of Virginia. That honor belonged to Williamsburg, which coincidentally (or maybe not) is where I lived after I left Martinsville.

Williamsburg is a tourist town, and it's being hit hard by the massive drop in tourists. At least that is what the article says. I suspect that there is always a huge jump in the unemployment rate in January. January and February were actually my favorite months to live in Williamsburg because it was the one time of the year when there were almost no tourists. Entire restaurants in Wiliamsburg would close for a month or two in the winter every year because there was no one left willing to pay $18.99 for a plate of overcooked spaghetti and "green salad" consisting of some wilted iceberg lettuce drenched in too much oil.

Tourists weren't the only thing missing from Williamsburg in the winter. As the temperatures dipped down the great mosquito armada would go into hibernation, and you could actually walk outside without being eaten alive. But I digress.

Tourism to Colonial Williamsburg has been dropping for years, and 2008 was particularly bad. If only they had built that 92 foot tall statue of George Washington. Old George would know what to do in a crisis.


Pittsburgh, PA

Pittsburgh is where I currently live. Well, technically I live about a 30 minute drive away from the city, but you wouldn't know what I was talking about if I said I lived in North Huntingdon, would you?

Pittsburgh is the one big exception on this list because Pittsburgh's huge economic implosion happened before I got here. Plus, by all accounts Pittsburgh is weathering the current downturn rather well. The steel industry, which Pittsburgh is known for, is a shadow of its former self following the usual pattern of U.S. industries for the past 30 years: layoffs, plant closings, and general malaise. As far as I know there's only one steel mill left in Pittsburgh. All of the others have long been shut down. The Homestead Steel Works, which was the site of the bloody strike of 1892, has been converted into shops, restaurants, and apartments.

Some of the old blue collar industries are still around in one form or another, but the driving force in Pittsburgh's economy has increasingly been things like biomedical technology, health care, finance, software, robotics, and nuclear engineering. Plus, since Pittsburgh missed the real estate bubble entirely, housing prices here are actually rising, albeit slowly.


So there you have it. Pittsburgh, PA is in the best economic shape of the four places I have lived. I bet you didn't see that coming. I sure didn't.

Wednesday, April 15, 2009

My new favorite function

I was futzing around with Emacs Lisp tonight and I stumbled across the "barf-if-buffer-read-only" function.

This function is so awesome I'm tempted to write some bit of buffer modifying code just so I can use it.

Now that's the sign of a good function.

Monday, April 13, 2009

Finding Patterns: Software & Legislation

Like a lot of people these days, Steve Yegge recently posted on the subject of legalizing marijuana.  Judging by the number of blog postings I've seen on this subject, momentum for legalizing marijuana seems to be growing.  However, in the "real" world I haven't heard even a single person mention legalizing marijuana.  At least not since hanging out with certain people in college. Most real people I know seem to be preoccupied with other issues, like avoiding getting laid off.  At least it's better than yet another post on the "blogosphere" about twitter.

Anyway, In his post Mr. Yegge makes several interesting points:

  1. Many things seem easy to do, but in reality are much harder to do when you stop and consider the details.
  2. This is why VP's always think everything is easy to do (they consider very few details).
  3. This is why developers always think everything is hard to do (they consider every detail).
  4. Legalizing marijuana is one of those things that seems easy at first, but in reality is hard.
  5. So relax and be prepared to wait while people sort out the messy details.

That's all well and good, and it's easy to get caught up arguing the merits of his argument with historical, legal, and political examples, but the one idea that came across that I never thought about before is that writing laws is a lot like writing software.

It's not hard to come up with a list of attributes that apply well to both crafting legislation and developing software.  Consider the following:

  1. Good leadership is important.  In fact it may be the most important thing.  You need someone who can frame the problem, drive debate, and inspire people so that they will spend their most important asset of all: their time.  You need someone who can provide guidance from start to finish and navigate through the inevitable problems that will arise.  You need someone who is able to compromise enough to build consensus, but not compromise so much that the essence of the original vision is lost.  Without strong leadership many otherwise good ideas will drift along for years, eventually getting marginalized and finally being consigned to the dustbin of history.
  2. The devil is in the details.  Every case that can reasonably happen must be considered and accounted for.  Good lawyers excel at finding loopholes, and so do good programmers.
  3. The status quo lingers over every attempt to change it.  The way things work now must be taken into account, often by providing a smooth transition to the new way of doing things.  Plus, those who gain from the status quo will fight the changes unless there is some benefit for them.  (See point number 1 on ways to overcome that.)
  4. No matter how good the end result is, there will always be some people who dislike it very much.  Alternatively, no matter how bad the end result is, there will always be some people who like it very much.
  5. Over time, any non-trivial system will get bogged down with cruft and complexity.  It is a very tempting idea to throw out such systems and start over, but in reality this is usually a very bad idea.  That complexity was there for a reason.  Eventually it will find it's way back into the new system, and you'll have spent a large amount of effort just to get back to where you were before.  Instead it is almost always easier to incrementally fix the issues.  That way you can maintain the parts that work well, and concentrate on fixing the parts that don't.
  6. A good design will consider the viewpoint of everyone involved and strive to meet everyone's needs.  However, in reality it's never possible to meet everyone's needs equally.  Some groups of people have more influence and will be more likely to get what they want.  Even barring that, different groups often have conflicting demands, and by definition the conflicting demands cannot be accommodated.
  7. It is very easy for outsiders to look at the imperfect end results and complain about how stupid the people involved were for doing something one way and not another.  Usually these people don't understand the issues involved, don't understand the difficulty of the process, and if left to the task themselves wouldn't be able to produce anything as useful as a can of lima beans. 
Certainly there are probably many places where the legislator/programmer metaphor breaks down (I'm still waiting for my junkets!), but clearly there are many where it works.  In fact, this metaphor could probably be easily extended to all sorts of difficult processes that require the efforts of large groups of people.

Monday, March 30, 2009

Number Eight: A WSJ Subscription

A recent Wall Street Journal article titled "Seven Things You're Wasting Money On" offers advice for those looking to cut back in these tough economic times:

"Someone buying a 40-inch Samsung flat panel high-def television at Best Buy for $800 has the option to add a four-year protection plan for another $150. Skip it, and pocket the cash instead."

Really?  Skip the protection plan?  That's your big advice?  How about not buying the 40 inch flat panel high-def television in the first place!

Duh.

Thursday, March 26, 2009

Spring cleaning

I was looking for some speaker wire in the basement tonight and I happened across a pile of old computer books.  The highlights:


Red Hat Linux User's Guide (1996)

One day in college somebody in the CS department was handing out copies of Red Hat Linux.  It came on 2 CD's in a nice plastic case and the user's guide was included.  Ironically, I was never able to successfully install that version of Linux on my computer (I couldn't get it to recognize my CD drive).  The CD's are long gone, but for some reason years later I still have the book.



National Semiconductor Databooks (1995-1996)

Leftover from my long dead stereo building project are this very nice set of databooks from National Semiconductor.  I'm guessing that they spent more money on printing and shipping these books to me than they made on the handful of transistors and integrated circuits I bought from them.



Borland C++ Manuals (1994)

The smell of these books alone gave me flashbacks of all of the late nights I spent hunched over my old trusty Windows 3.11 machine learning how to program.  Ahh, the memories.

I had bought a copy of Borland C++ 4.0 off of my freshman roommate for something like 70 bucks.  He had been planning on majoring in CS, but after nearly failing the intro class he wisely decided to switch majors.  If not for that I might never have become a software engineer.



Fundamentals of Data Processing (1981)

Flipping through this book is a lot of fun.  There are lots of pictures of polyester clad individuals feeding giant piles of punch cards into computers that are bigger than my garage.  Among other things it contains a chapter on flow charting, introductions to both BASIC and COBOL, and a lengthy comparison of punch cards vs. magnetic tape.  It also has a chapter on careers in data processing.  The salary data shown below is from that chapter.  The top salary shown is for around $31,000.  Not bad for 1980.



This is all good stuff, but unfortunately, computer books don't age all that well.  The trashman cometh tomorrow.

Saturday, March 14, 2009

The other thing I learned today

I learned that the Python programming language is named after the British comedy troupe Monty Python.

Nice.

Friday, March 13, 2009

Fun with factorials

A long time ago in a job interview I was asked the following question:

How many consecutive zeros are at the end of one thousand factorial?

After a little bit of thinking I managed to figure out the trick (hint: think about the factors of 1000! that would produce zeros at the end of the product when you multiply - then count those factors). I didn't get the job, but I liked the question so much I often use it when I conduct interviews.

I happen to think that asking a question like this out the blue isn't a very good way to evaluate whether someone will be a good developer or not. What I like to do instead is have a conversation about factorials that eventually leads to the above question. For example, I get them to write both an iterative and a recursive function to calculate factorials. That leads to a discussion of topics like error handling, input validation, stack overflow, and tail recursion. The strong candidates breeze through this stuff. I'm constantly amazed by how many "senior" developers don't breeze through this stuff.

If they're doing reasonably well I will eventually pull out the above question out and we will discuss it. It's the last technical question that I ask and it seems to wrap things up nicely.

One time I was interviewing a developer who I will call Ted. Ted was obviously smart, and he had tons of experience, more than me in fact. He breezed through all of my questions, and his coding skills were solid. We progressed quickly through the topics I wanted to talk about. When we got to my last question, the one listed above, I figured that he would breeze through that too. But I figured wrong. For some reason he struggled with it. He kept getting himself confused and going around in circles. I ended up walking him through the steps to a solution, but I don't think he ever really understood what I was saying. It was like he was a different person. Eventually I ended the interview and sent him on his way.

I figured that I would never see him again.

Once again I figured wrong.

The next day Ted showed up at my office and asked to see me. He had a printout in his hand which he handed to me. There were numbers all over it.

"What's this?" I asked.

"It's one thousand factorial," he said. "I wrote a program to calculate it and count the zeros on the end."

I squinted at the paper. Sure enough, there was an enormous number followed by the number 249 at the bottom, which is in fact the right answer for the number of zeros. I had never actually bothered to calculate 1000!, so I had no idea if his enormous number was correct or not.

Intrigued, I asked him how his program worked. It turns out that Ted had write a multiplication function that worked on string representation of numbers, like this:

string strProduct = MultiplyStrings("1000","999");

We were both C++ guys and this seemed like a perfectly fine solution. After Ted left I sat down and wrote my own version of a program to do this. Instead of using strings I used integer vectors. Writing the MultiplyVector function was a little tricky but soon I had calculated 1000! for myself. Ted's number matched mine. I happily filed the program away and went back to whatever it was I was doing before Ted showed up. And then I forgot all about it.

Many months went by and I decided to learn python. Today I read the Wikipedia page for the python programming language. I figured that it was as good a place as any to start. About halfway down it says that an int is "an immutable fixed precision number of unlimited magnitude". Immediately I thought of the factorial problem. It would be trivial to calculate 1000! if you had integers of unlimited magnitude. Five minutes later I had written my first python program:

import sys

sys.setrecursionlimit(1001)

def factorial(n):
if (n < 2):
return 1
return n * factorial(n - 1)

def count_zeros(n):
if (n % 10 != 0):
return 0
return 1 + count_zeros(n / 10)

a = factorial(1000)
print a
print
print count_zeros(a)


When I first tried this I didn't have the bit about setting the recursion limit and I got a "maximum recursion depth exceeded" error. Python doesn't support tail recursion, so my options were to rewrite it using a loop or else figure out how to increase the recursion limit. A Google search quickly lead me to the setrecursionlimit function, and I was on my way. Ironically, the default recursion limit is 1000. I only had to increase the limit by 1. Of course, rewriting this using a loop would have been trivial as well, but using recursion to solve factorials is not only natural, it's the canonical example.

My entire experience with Python consists of walking through the Google Application Engine tutorial, reading the aforementioned Wikipedia page, and then writing this program. The syntax is very easy to learn because there is almost no syntax. The one hard thing you have do for this program, storing and multiplying really big integers, is already taken care of. So I was able to write a program in Python, a language I don't know, in about 5 minutes. By comparison it took me about 30 minutes to write the same program in C++, a language I've been programming in for about 15 years. To be fair, I could have used a "big number" library in C++, but I wanted to work out the details out for myself. I was thinking that it might make a good interview question. But still, 5 minutes in a language I don't even know? Awesome.

I wonder what else Python can do.

The science unfair

When I was growing up the junior high had a science fair every year. The gym would be bursting with row after row of tables overflowing with volcanoes, solar systems, and the fanciest equipment that dad could build.

I don't recall anyone having those nice folding cardboard display boards that they all have now. Instead everyone just used regular poster board with a slight curve to make it stand up. If you've ever tried to make a poster stand up this way you know that it doesn't work very well. A solid bump on the table would make it fall down. Because the gym was very crowded this happened often.

Each student had to stand in front of their display and wait for the judges to come around. This took a while, and during that time family members and other students could browse around and look at all of the projects. Eventually they would hand out the awards, and everyone would pack up and go home.

Unfortunately, I never got to take part in the junior high science fair. For some reason they cancelled it for the two years that I went there. But when my older brother and sister were in junior high I got to go. Honestly, I'm a bit disappointed that I never got to do it. It seemed so exciting. There was a certain energy in that gym. It felt like something important was happening. To me it was an event. What else does a science geek have to look forward to in a small town?

My daughter's science fair was last night, and I was really looking forward to it. I was expecting that same level of energy and excitement that I remembered. In fact, since her school is about four times as big as mine was, I was anticipating an absolute three ring circus. As it turns out, it was barely a side show.

For starters, the projects are all judged anonymously. They do the judging the day before based solely on the display board, which must be devoid of all identifying marks. That way the judges don't know who did what project, and in theory they won't be biased. One big downside is that the judges can't ask any questions. Having to answer questions and defend your work is an important skill to learn, and now that's gone from the science fair. Plus it makes it easier to pass off mom and pa's work as your own, since you don't even have to understand it.

When we got there the place was almost deserted. A handful of people were perusing the displays and reading silently. There were maybe only 50 projects in the cavernous cafeteria. And this for a school with around 800 kids! The students didn't have to stand in front of their displays and talk about them. They didn't even have to be there on time. It felt more like an art museum than a science fair.

We soon discovered that my daughter's display board wasn't in the fifth grade experimental section where it was supposed to be. Instead we found it in the sixth grade life sciences section. Somehow it had ended up over there and because of the anonymous judging there was no easy way to correct the mistake. Immediately my heart sank. I knew that any shot of her winning was gone. Her project had nothing do with life sciences, and the sixth grade judging criteria was tougher to begin with.

Every child that entered was either a winner or received an honorable mention. When they announced my daughter's category she was the first to receive her honorable mention, which I later figured out means that she had the lowest score, which figures since it was judged incorrectly.

Basically, the system that was put in place to prevent children from being judged unfairly by biased judges ended up causing my daughter to be judged unfairly. I suppose that I could tell myself that she learned an even more important lesson about how the world works, and maybe she did, but mostly I just feel bad for her.

Losing is one thing. Not getting a fair shake is something worse.

Friday, March 6, 2009

Watch out for those Mt. Lebanon girls

The local headlines in yahoo tonight:


Good times.

Thursday, March 5, 2009

Along came a spider

I heard the sudden inhale from all the way downstairs. Then came the shriek.

In no time at all I was upstairs and in my daughter's bedroom.

"What happened?" I said, trying to catch my breath.

"I felt something touch my leg," she said. "But then I realized that it was only my covers."

She grinned at me and said "Good night, daddy."

And so I went back downstairs.

Tuesday, March 3, 2009

The bird is beginning to move

I just finished the Google App Engine tutorial.

Here is my version of the Guest Book App:
http://onedozenbagels.appspot.com/

Feel free to leave me a message.

I wonder how many of these are up and running?

Monday, March 2, 2009

A touch of gray

I've been thinking about the possible downsides of cloud computing, specifically of using the Google App Engine.

The big obvious downside is that you are at the mercy of Google. If they raise the rates, cancel your app, or decide that cloud computing is a waste of money what choice do you have? At least with some of the other cloud services you can use standard technologies that are available outside of the service, so if you had to rebuild your site somewhere else it would be easier. For example, the Google datastore uses Big Table, which is propriety Google software. You would have to rewrite your code to use something else like hadoop or a standard relational database. Since I don't yet really know anything about the Google datastore (or about hadoop) I can't comment on how hard or easy this would be.

There are some interesting tidbits in the terms of service. Google can raise it's rates or lower the quotas with 90 days prior notice. They can immediately terminate your account at any time if you violate the terms of service, so it's probably a good idea to at least glance over them. They can terminate your account without giving you a reason as long as they give you 90 days of prior notice. Hopefully they put in that wording just in case they decide to terminate the entire program, not because they want to go around terminating accounts willy-nilly. That would probably be considered evil, but who is the arbiter of evil anyway?. If your account does get terminated, you will have 90 days to export your data. If your account is terminated without cause you will have 24 months to export your data.

If you can't live with that, then I suggest you go elsewhere to build your app.

Quotas

So in a recent post I blathered on for a while about the cost structure of EC2, Mosso, & Azure. But I never actually said what the Google App Engine free quotas were or how much additional resources cost.

According to Google the free amount of storage, bandwidth, and CPU usage that you get are designed to "serve a reasonably efficient application around 5 million page views per month, completely free." So far they have tweaked the quotas once, with the new set becoming effective on May 25, 2009. As of that date you will get 1 GB of data storage, 1 GB of bandwidth per day, and 6.5 CPU Hours per day for free. If you require more resources than that you can purchase them at the following rates:

1 GB of storage for 10 cents a month
1 GB of bandwidth for 15 cents
1 Hour of CPU time for 10 cents

Once you enable billing on your account you can set daily budget limits that you don't want to exceed. Since even a company like Google does not have infinite resources, there are upper limits to what you can buy. For example, the maximum number of requests that you can serve is 43 million per day, which translates to around 500 requests per second, which they claim is more than enough to survive being slashdotted or dugg. If by some miracle you need to temporarily handle more requests than that there's a form to request more resources.

What I have laid out is a very high level overview. The quota system is actually a bit more complicated. Feel free to check out all of the gory details for yourself here.

I'll be ready for kindergarten in the fall, promise

After thinking about it for a minute I realized why the water/anti-freeze mixture on the stove only gets to around 230°F instead of the proscribed 265°F on the back of the bottle. The mixture on the stove is at standard pressure. In a radiator it's under high pressure. Duh!

I sure am putting my 4 year college degree in science to good use, aren't I?

What's even worse is that I bought a replacement radiator cap for my car a few years ago when I lost the old one (don't ask). The cap was rated at 16psi. So I really should have known better.

Sigh.

Sunday, March 1, 2009

I'm stepping through the door and I'm floating in a most peculiar way

So after just a few minutes I have a hello world app up and running in the Google App Engine development server on my machine.

Very exciting stuff:


A few points of interest:

1. Every Google Apps Engine application has a configuration file written in the YAML syntax. The config file contains a version number. According to the Getting Started Guide you can use this to save old versions of your app:

This is version number 1 of this application's code. If you adjust this before uploading new versions of your application software, App Engine will retain previous versions, and let you roll back to a previous version using the administrative console.

I haven't even seen the administrative console yet, but it sounds interesting.

2. You also have to specify the runtime environment in the config file. Currently the only valid setting is Python, but they claim that they may add more languages in the future.

3. You use Google Query Language (GQL) to query the Big Table datastore that is available in the Google Application Engine environment. GQL looks very similar to SQL. Here's an example query from the guide:
"SELECT * FROM Greeting ORDER BY date DESC LIMIT 10"
Queries like this do not generate recordsets or tables in the traditional sense. Instead they generate a set of data objects that you can manipulate. In this case it will generate a set of 10 objects of type Greeting, which was previously defined.

You cannot query for a subset of the fields in a data object; you must query for all of the fields. Otherwise you might have a set of objects that are partially defined. Thus the "SELECT *" isn't actually needed at all in the query since it is the only option. Apparently it's just there to make it easier to read for people used to SQL.

Additionally, GQL does not allow constant values directly in a where clause. All values must be bound to parameters, which will help prevent GQL injection attacks.

4. It turns out that I have a hard time writing code without terminating every statement with a semi-colon. That's what years of using C++ will do to you.

Clearly not smarter than a 5th grader

For her 5th grade science fair project my daughter is seeing how adding different things to water affects the boiling and freezing points. She tried adding several different things: table salt, driveway ice melter, bubble bath, sugar, & anti-freeze. Pretty standard stuff.

According to the back of the anti-freeze bottle a solution consisting of 50% water & 50% anti-freeze should boil at 265°F. So after we were done I mixed half a cup of water with half a cup of anti-freeze and boiled it on the stove. The highest temperature reading I got was 228°F.

Hmmmm.

Update: I figured it out.

More options

A new day brings more to consider.

Last night I get pretty excited about the Google App Engine. As it turns out, the other big guys are doing similar things. Amazon has its Elastic Compute Cloud or EC2. Rackspace has Mosso. Microsoft is building Azure. Yahoo has announced that they are working on something, but they haven't really released any details yet. Unlike Google, none of them appear to have a free starting point. Perhaps Yahoo will, but we will have to wait to find out.

EC2 lets you rent various sized virtual machines, which come in three different sizes. A "small" linux virtual machine costs 10 cents per hour. A "large" linux vm costs 40 cents per hour. An "extra large" vm costs 80 cents per hour. Apparently there's no medium. Windows vm's and "High CPU" vm's can also be had for more money. There are also monthly fees for bandwitdh (between 10 and 17 cents per GB), for storage (10 cents per GB), as well as for data usage (10 cents per million I/O requests). Since you're getting a vm it looks like you can pick which database and web technologies you want to use, which is a big plus.

For $100 a month Mosso gives you 50 GB of storage, 500 GB of bandwidth, and 10,000 compute cycles, which it claims is the equivalent of 2.8 GHz processor running for a month. Additional resources can be purchases at the following monthly rates: 50 cents / GB storage, 25 cents / GB bandwitdh, and a penny for each additional compute cycle. For additional fees they also offer SQL Server, SSL, automated customer billing, and 24x7 tech support. Like EC2, it also looks like many different technologies are available for use.

Azure is in the Community Technolgy Preview phase, so I couldn't find any pricing details. As you would expect, the full Microsoft web stack is available for use.

These are interesting times to be a developer.

Post Zero

I am the anti-fanboy. For whatever reason very few things get my juices really going.

When Java came out they said it was the greatest thing ever. I looked at it. Yet another programming language? I shrugged and got back to work.

When XML came out they said it would revolutionize everything. That time I even bought a book on the subject. Could this panacea really just be a data layout format? And a bloated one at that? Surely you jest.

When Google exploded onto the scene they said it was the greatest company ever. Really? Ever? Ever is a long time you know. What's the big deal? They're a search engine company that sells ads that make a lot money. So what? If Google dropped off of the face of the earth tomorrow we would all switch our searches to Yahoo or Live or whatever and life would move on. In a week we wouldn't even remember them.

But tonight I discovered the Google App Engine. Basically you can write a web app in Python that Google will host. You get instant scalability. You get instant reliability. You get instant parallelism. You get instant redundancy. You get powerful Google services like Big Table. And best of all, you get it for free. That's right, I said free. At least up to reasonably high usage quotas. Then you can opt to pay for more bandwidth, storage, etc... But by then hopefully you've figured out a way to monetize your app.

You can check it out for yourself here. It almost seems to good to be true. You can write an app and potentially deploy it to billions of people without ever having to buy a server or use big words like "co-location facility". Certainly, there have been plenty of application hosting frameworks before, but this one has lots of potential.

Needless to say my juices started flowing. I have a strange urge to write something on this platform. I haven't felt this way since I figured out how to write programs on my TI-85.

More on that later.

First I need to find a Python tutorial.

Ye gads!

I've had this blog for what, a week? And I've already started a second one. This one will be for posts relating to software engineering.

Check it out here.

Thursday, February 26, 2009

Aur Revoir Pee-Wee, Aur Revior

I watched the French movie Le Million last month. It was about people trying to recover a lost lottery ticket. There was lots of singing, but somehow it wasn't really a musical. At least not in the Hollywood musical sense. It was more of a screwball comedy with songs and dancing seamlessly mixed in. Which was good, because I don't really like musicals, but I liked this movie. I've never really seen another movie like this, and I find that surprising, since it was made in 1931. The closest thing I can think of is probably Moulan Rouge (since there are about seventeen movies with that title I should be more specific: I'm talking about the one with Nicole Kidman and Ewan McGregor).

So when I saw that another movie by director Rene Clair was going to be on TCM, I tuned in. It was called A nous la liberte. This movie wasn't nearly as good as Le Million, but five days later I still have the theme song stuck in my head. Which is impressive because I don't know French.

The holey parts of the body

If a television show is geared towards old people there will be commercials for laxatives, fiber capsules, and adult diapers.

If a show is for women there will be at least one tampon advertisement during every commercial break. Don't believe me? Turn on Lifetime and watch for twenty minutes. You will see at least two tampon commercials in that time span. Plus, since women have babies they will show ads for many baby products, especially diapers.

If a show is for men then most of the commercials will relate back to "that certain part of the male body". Watch a football game and you will see commercials for products that help you pee (flomax), products that help you get it up (viagara, cialis, levitra), and products that help you compensate for your shortcomings (pickup trucks).

After millions of years of evolution, life is still all about about peeing, pooping, and sex.

Tuesday, February 24, 2009

Pete and Repeat were sitting on a fence ...

Repetition is an important part of effective communication. Especially when you are talking to children.

You have to repeat your message over and over and over and over.

And when that doesn't work, there's always shouting.

Are we there yet?

According to the blog settings, seven posts should appear on each page. As this is the eighth post, this blog should now wrap around to two pages. I don't know why, but this makes me feel good.

Monday, February 23, 2009

Thirteen things I have learned about France by watching French movies

1. Drinking is not just an evening activity.
2. It's perfectly fine to drive your "auto" anywhere that it fits.
3. All policemen are corrupt, inept, or both.
4. It is commonly known that all of the clergymen are lecherous hypocrites. Despite this, everyone attends church regularly.
5. The women are hot, have no morals, and aren't shy at all about their bodies.
6. All married people are cheating on their spouses.
7. Being a socialist is a developmental phase, similar to puberty.
8. Unsupervised packs of schoolboys roam the cities terrorizing grownups, half of whom should see it coming.
9. It only takes 2 seconds to fall in love.
10. There's always a street vendor around when you need one.
11. No one has a dryer. All clothes must be hung up on the line to dry.
12. Very few people actually work. Those who do are bitter about it.
13. Smoking is not just for the cool people, it's for everyone.

Sunday, February 22, 2009

Nothing of importance happened today

What can I say? It was an uneventful Sunday. About the most exciting thing that has happened to me so far is that I got to take a really good nap this afternoon after lunch when everybody else was out and I had the house to myself.

There I was on the watching some old movie. It was okay, but it was a little slow. I was a little tired so I stretched out on the couch to watch on my side. The pillow felt good under my head, and I could still see the tv. Nine times out of ten when I do this the phone rings. Or a child screams. Or the children decide that divebombing dad would be fun. But today the children were all gone. And the phone didn't ring. And I closed my eyes. And it felt good.

Then suddenly it was fifteen minutes later, there was drool on the cushion, and my eyes were a little crusty. My back was a little stiff, so I got up and stretched.

Then it hit me. For the first time in weeks, I wasn't tired at all. It felt great.

Is this what life is like for people without kids? Feeling great and not being tired?

Naah.

You only know how good something is when you don't get to have it.

(Right? At least I can pretend.)

Saturday, February 21, 2009

Hats off to Professor Stink

Out of curiosity I searched Google for "flying chicken bicycle farts. The results are here.

There are many interesting websites here to explore, but Professor Stink's Fart Fan is my favorite. The product itself isn't that exiting. After all, it's just a cheap fan. But the name is absolutely top notch. A lesser mortal would have just called it the Fart Fan and been done with it. But not our good professor. This is the sort of excellence we should all strive for.

For all of the blogging moms out there

The second post I wrote for this blog was all about my 4 1/2 son and his busted face. About 2 seconds later a Google ad appeared for a site that caters to moms that blog. I have no idea how Google ads work, but presumably the words I used in my previous post triggered some keywords that match up with the blogging moms site. Fair enough, and it seems to have worked pretty well.

So what would happen if I use some other choice words in a posting? How would that affect the ads? Hmmm.

I don't know the answer to that, but maybe we can ask the great flying chicken bicycle fart for help.

And if ads start showing up for flying chicken bicycle farts, we won't be any smarter, but we may be amused for a few seconds. And I'm all for that.

How to do everything better

You know how these sorts of posts go:

First, they tell you that they've listened to all of the experts, read all of the books, thumbed through all of the magazines, and read every other blog posting on the matter.

Then they tell you a story that undermines the all of the "experts" and helps to convince you that they are even more of an expert than all of the rest.

Finally, after teasing you for about a page and a half they get to the big point that they're trying to make. Usually they will do it in a big dramatic fashion with text that is an some different bold font to make it stand out. But here's the kicker:

You already know the point because it's probably common sense anyway.

Some of the big points that I've seen:

1. You will lose weight if you eat less and exercise more.
2. Businesses do dumb things and if they stopped doing dumb things they would make more money.
3. If you stop procrastinating and work hard you too can be a millionaire.

Really? Thanks. I did not know that.

Busted Face

My 4 1/2 year old son comes in from playing outside. The skin covering his right cheekbone is angry red and it looks like it should hurt a lot. I've certainly witnessed children screaming bloody murder for a lot less. But this time he's smiling.

"What happened to your face," I ask.

The resulting blank look informs me that he has no idea what I'm talking about. I walk over to him and point at the scrape. "Right here, on your face. What happened? Did you fall?"

"No," he says.

"Does it hurt?"

"No."

"Did some one hit you?"

"No."

"Did you bonk your head?"

"No."

"Do you know what happened?"

"No."

And that was the end of that.

At least until his mother gets home.

Then I get to play the part of the 4 1/2 year old.

Do it again, but this time with feeling

I've decided that I need to improve my writing skills. They say that the best way to become a better writer is to write. So that's what I've decided to do.

Enjoy.