Archive for April, 2008

I ran across this piece of code in a program I am updating. The original author is a great game designer, but only a fair programmer. He also seems to have very limited experience with SQL.

  1. if ( $grab == 'Ammo' ) {
  2.     $check = mysql_query("SELECT * FROM BF WHERE owner= 'None' AND country='$fetch->location'");
  3.     $num_rows = mysql_num_rows($check);
  5.     if ( $num_rows != 0 ) {
  6.         if ( $fetch->location == $location ) {
  7.             mysql_query("UPDATE BF SET owner='$username', profit='0' WHERE country='$fetch->location' LIMIT 1");
  8.             $this->content .= "You got the Bullet Factory!";
  9.         }
  10.     }
  11. }

When writing database applications, you need to be as good at writing queries as you are at writing code. Here's a rewrite:


I tried to watch the movie Stakeout (1987). I kept getting interrupted by the children in my neighborhood, but I did see the opening scene or two.

Richard Dreyfuss and Emilio Estevez play police detectives and they are chasing a criminal on the docks near some body of water. In the second or third scene Richard's character has the suspect covered when Emilio's character pulls up in a forklift and breaks the line of sight to the criminal.

During the this first part o f the movie I keep waiting for Richard's character to ask Emilio's character what he was doing on the forklift. Forklifts are not generally faster than people and starting one often requires specialized knowledge (like knowing the location of the safety interlock switch). It is very unlikely that the forklift would have aided in the arrest.


Picture this. You are called in to a local court and asked by town officials about your earnings over the last year. It is revealed that you have had a really great year. Your pay went up and you were able to pay down your existing debt. You have a few skills that make your labor much in demand. Demand is so great that you will see a massive increase in pay this coming year.

Now, one of the idiot politicians asks, "Since you made so much money last year and since there is a shortage in alternatives to your work skills, why not work for less next year." I'm willing to bet that you would probably want to ask the idiot politician what he or she was smoking and whether they were willing to share.

Let me make sure you understand what I am saying. You have a highly demanded skill, but there are alternatives for your customers. Unfortunately, all those alternatives are even more expensive than purchasing your skills. Your customers are hitting hard times and they need financial relief from your high prices.


I just ran across this web site titled:

Don't Get Scammed - Top Internet Scams Exposed!

And in the tet I found this. I kid you not:

Our top pick is Grant Search Guide which is %100 free all you have to cover is the shipping costs ($2.95).

Let me get this straight. The bastion of honesty about internet scams is telling me a bold face lie and wants me to somehow believe that paying $2.95 is some how the same as 100% free.


Many years ago I lived on Long Island in Suffolk County, NY. I have always been an avid bike rider and I recall a personal best where I rode solo for 42 miles. I don't recall how I did the first half of the ride, but I took a beach road most of the way back.

I visited the beach on my bicycle at least once a week back then. I occasionally commuted to work 18 miles each way also. I even did Bike New York several times, but I remember that one day especially clear. Perhaps it was because I didn't plan it or perhaps it was that I didn't have to wait for others in my group to catch up. That day was just a magical day.