Tuesday, October 23, 2007

Blast from the past

I came across some really old "vanity web page" crap I did back in 1998. It was just a start and never got published but, hey.

Bachelor Necessities

As a bachelor with many (too many) years of experience I feel it is my duty to document my experience somewhere. For those of you about ready to embark on the journey of bachelor life or those already on the trodden path, here are some things you might want to pick up along the way.

A Mini Fridge
This really isn't a necessity but something, for some strange mystical reason, a guy must have. Typical uses: beer. Typical placement: garage, basement, bedroom, television room - wherever you spend the most time. Estimated cost, $100.
George Foreman Grill
God bless you George "look at the lines, that's good eatin'" Foreman. This little bugger is so helpful and so easy to use any guy, no matter how dumb you are, can master one. Doesn't do a good job on steaks with bones in them but is perfect for frozen chicken breasts (don't bother thawing, just chuck'em on), burgers, fish, and just about all meats. Estimated cost, about $70.
An Outdoor Grill
You can go propane but you'll find you get the most use out of a small charcoal grill you can take with you in your car or let rust on your back porch/front step. Estimated cost, about $30.
Crock Pot
Another gift from the heavens to the bachelor. Just follow the recipes that come with the device. So easy, I was actually able to teach my dumb-ass complete waste of an ex-friend "L" how to cook. See my chili recipe. Estimated cost, about $40.
Microwave
Like, duh. Just buy a good one then treat it well and it will outlast you, all the women you are intimate with, and probably every dwelling you'll ever be in (even your casket). Estimated cost, who the hell knows - I bought mine ten years ago.
Big Screen TV
Even if you are stuck in the bedroom of your parent's house, you need a big screen TV. The big screen TV represents the following: a symbol of your manliness you can share with friends at football parties, a showcase for your best DVD movies and/or your porn collection, and a constant reminder of just how in debt you really are. Estimated cost, about $3600 (gotta get a good one, man).

Chili ala' Grouch

If you read my "bachelor necessities" above you should have noticed a crock-pot as one of the items there. This is what I use because a) I'm lazy, b) I'm a guy and need the flexibility of a crock-pot to hide my cooking inadequacies.

Ingredients

  • Two pounds of ground chuck or ground round (i.e. raw hamburger)
  • A can of chili beans
  • A can of tomato sauce (name brand, no generic)
  • A can of tomato paste
  • A can of diced tomatoes (or cut up a bunch of tomatoes, no seeds)
  • A can of green chilies (usually found in "Mexican" section)
  • One stalk of celery
  • One onion
  • Two green peppers
  • One jalapeno pepper
  • Two or more cloves of garlic (comes in bulbs, peel them to get cloves)
  • Chili powder (spice)
  • Pepper (the kind you shake)
  • One bay leaf (another spice) or Chinese 5-spice (yes, a it's a spice too)
  • Cumin (a spice)

Instructions

  1. Brown the ground beef (this means you cook the hamburger until it turns brown, I had a family member that wondered why his chili had so much blood at the top - he was adding it raw). Here is how I do it: a) throw the wad on my George Foreman Grill, b) insert the sliced cloves of garlic into the meat, c) liberally add pepper and chili powder, d) grill, e) crumble into the crock pot.
  2. While your biff is browning, cut up the veggies. Put the onion, celery, and jalapeno (and garlic) into the crock.
  3. Open the cans. Dump in the green chilies.
  4. Drain the grease from the beef (or don't, I don't care) and put it in the pot.
  5. Add the bay leaf (or a couple shakes of 5-spice), a pinch of cumin, some pepper, some chili powder.
  6. Dump in the tomato paste, then beans, then tomato sauce, then rinse cans with about a cup (measuring cup, i.e. a little bit) of water then dump into crock.
  7. Start cookin (5-7 hours on high, 10-12 hours on low).
  8. About one (high) or two (low) hours before the chili is done, stir in the green peppers. The reason I do this is because when I added the peppers at the beginning that's all I could taste in the chili - green peppers.
  9. When done cooking, serve hot and enjoy with a beer. Don't ruin with crackers or I'll shoot you.

Variations: Tex/Mex". Replace can of chili beans, stalk of celery, and green peppers with black and/or pinto beans, a half a can of corn, a red pepper and a yellow pepper. Unlike the chili beans (which usually come in a sauce), you should drain and wash the black/pinto beans.

Dealing with Depression

If you are like me, and (according to some news sources) like over thirty percent of the population in the United States, you deal with depression on (sometimes) a daily basis. These feelings usually manifest themselves in the form of feelings of hopelessness or you might feel tired all the time.

What not to do.

Drugs are NOT the Answer.

When I say drugs I am describing anything from prescription drugs like Prozac to binge drinking. Drugs are only a temporary solution to the problem and usually make things worse. I have seen some co-workers on the drug Prozac and they are both psychos, one step away from full-out fruitcake. I have family members on different prescriptions and they aren't any better. One has been on various prescriptions for twenty (yes, 20) years. The physicians just keep giving him the line "let's try this one". These quacks have no idea what they are doing, they just continue to milk the system. One of my friends smoked marijuana (i.e. pot, reefer, weed) to escape his depression. That loser is still depressed and now half his tenth-grade brain is gone. The common thread is that all of these people are still taking drugs and they are all still just as depressed, if not more than they ever were.

Shrinks are NOT the Answer

If you a rock star or some wealthy Hollywood name, then a "shrink" might work for you. For the rest of us that need to work for a living, you might as well just stop someone on the street or sit next to someone at a fast food joint because you are likely to get the same answers. Basically you pay a "shrink" to listen and make observations but every single session boils down to a prescription (see above). They do not have the answers or if they do they are canned answers you could probably get from a box of cereal or Miss Cleo. I saw a psychiatrist once, and that was enough. There are no easy answers to anything, but there is something that can be prescribed.

Is God the answer?

Maybe… Part of the problem with religion or other social groups is that they remove your self-esteem by placing everything in someone else's hands. Instead of depending upon yourself, being responsible, and understanding your strengths and weaknesses, everything is now controlled by an external entity (i.e. God or insert religious icon here). It works for you if you can completely give yourself. For most people it works temporarily until that first bout of doubt sets in, then there is the possibility

My Solution?

Be depressed.

Seriously. Believe it or not, depression is a completely normal state of being just as happiness, sadness, ecstasy, and indifference are. It's okay to be depressed. If you are depressed, chances are good there is a reason why you are depressed. A couple of days later, you might still be depressed or you might do a one-hundred percent turn-around and be glowing with joy. It might even take a month or a year or your entire puberty. It's part of life. Depression makes happy days happier but can be overwhelming at times. Most people that "suffer" from depression have succumbed to it. Don't succumb to it. When the day is done, go over to the calendar and mark off the day because it's over.

Thursday, February 08, 2007

Psycho SQL

Back in the old days on an AS/400 with DB2/400, we didn't have the luxury of a CASE statement or IF or DECODE and performance was at a premium when attacking a gigantic detail table. We needed a way to provide real time performance on huge tables summarizing values by quarter without the benefit of a temporary work table or sub-queries. The AS/400 did not have "if-logic" but it had MIN(value1,value2), MAX(value1,value2) and absolute value (ABS(value)) so I cheated and used those functions with some math to produce the result set.

The goal for each quarterly column was to reduce the month (m in examples below) down to a zero or a one (false and true) then multiply that times the quantity and amount being totalled (value). Zero (false) when multiplied would produce a zero and therefore not add anything to the SUM. One (true) when multipled would produce the same number and be added to the SUM.


SELECT grouping_code
, SUM(value*(1-MIN(MAX(m-3,0),1)))
, SUM(value*(1-MIN(MAX(ABS(m-5)-1,0),1)))
, SUM(value*(1-MIN(MAX(ABS(mm-8)-1,0),1)))
, SUM(value*(1-MIN(MAX(ABS(mm-11)-1,0),1)))
FROM large_freakin_detail_table
WHERE criteria = 'whattheywerelookingfor'
GROUP BY grouping_code

So you are probably wondering what the blue heck all that SUM MIN MAX ABS crap is doing. Sometimes it is best to look at results. Assume the left-most column is the month (1 through 12) and see how that number is transformed into a true (1) or false (0) through the magic of math.


SUM(value*(1-MIN(MAX(m-3,0),1)))

m-3 MAX MIN 1-r
1 -2 0 0 1
2 -1 0 0 1
3 0 0 0 1
4 1 1 1 0
5 2 2 1 0
6 3 3 1 0
7 4 4 1 0
8 5 5 1 0
9 6 6 1 0
10 7 7 1 0
11 8 8 1 0
12 9 9 1 0

The first quarter is simple: subtract 3 (March) then take the highest of that value or zero. The 0 is higher than -2, -1 and 0, but not higher than 1, 2, etc. Now we have a zero in months 1, 2 and 3 (1st quarter). By looking for the lowest value between 1 and the last result you will get a 1 for 1 or more but the zeroes will stay 0. Subtract the result from 1 (0 = 1, 1 = 0) and now you have the true/false value to multiply against an amount to either zero it or not before adding it to the SUM. Tricky, eh?


SUM(value*(1-MIN(MAX(ABS(m-5)-1,0),1)))

# m-5 ABS r-1 MAX MIN 1-r
1 -4 4 3 3 1 0
2 -3 3 2 2 1 0
3 -2 2 1 1 1 0
4 -1 1 0 0 0 1
5 0 0 -1 0 0 1
6 1 1 0 0 0 1
7 2 2 1 1 1 0
8 3 3 2 2 1 0
9 4 4 3 3 1 0
10 5 5 4 4 1 0
11 6 6 5 5 1 0
12 7 7 6 6 1 0

The remaining quarters are more difficult but by using the absolute value (the positive value) you can eventually get the number you are looking for.


SUM(amount*(1-MIN(MAX(ABS(mm-8)-1,0),1)))

# m-8 ABS r-1 MAX MIN 1-r
1 -7 7 6 6 1 0
2 -6 6 5 5 1 0
3 -5 5 4 4 1 0
4 -4 4 3 3 1 0
5 -3 3 2 2 1 0
6 -2 2 1 1 1 0
7 -1 1 0 0 0 1
8 0 0 -1 0 0 1
9 1 1 0 0 0 1
10 2 2 1 1 1 0
11 3 3 2 2 1 0
12 4 4 3 3 1 0

This query used one sweep through the gigantic table and one sort for the group by. Grouping on month would have added an additional sort so that was not an option.

Tuesday, February 06, 2007

George Carlin's new rules for 2007

  1. Stop giving me that pop-up ad for classmates.com! There's a reason you don't talk to people for 25 years. Because you don't particularly like them! Besides, I already know what the captain of the football team is doing these days -- mowing my lawn.
  2. Don't eat anything that's served to you out a window unless you're a seagull. People are acting all shocked that a human finger was found in a bowl of Wendy's chili. Hey, it cost less than a dollar. What did you expect it to contain? Lobster?
  3. Stop saying that teenage boys who have sex with their hot, blonde teachers are permanently damaged. I have a better description for these kids: "Lucky bastards."
  4. If you need to shave and you still collect baseball cards, you're a dope. If you're a kid, the cards are keepsakes of your idols. If you're a grown man, they're pictures of men.
  5. Ladies, leave your eyebrows alone. Here's how much men care about your eyebrows: Do you have two of them? Okay, we're done.
  6. There's no such thing as flavored water. There's a whole aisle of this crap at the supermarket, water, but without that watery taste. Sorry, but flavored water is called a soft drink. You want flavored water? Pour some scotch over ice and let it melt. That's your flavored water.
  7. Stop screwing with old people. Target is introducing a redesigned pill bottle that's square, with a bigger label. And the top is now the bottom. And by the time grandpa figures out how to open it, his ass will be in the morgue. Congratulations, Target, you just solved the Social Security crisis.
  8. The more complicated the Starbucks order, the bigger the asshole. If you walk into a Starbucks and order a "decaf grande, half-soy, half-low fat, iced vanilla, double-shot, gingerbread cappuccino, extra dry, light ice, with one Sweet-n'-Low, and one NutraSweet," ooh, you're a huge asshole.
  9. I'm not the cashier! By the time I look up from sliding my card, entering my PIN number, pressing "Enter," verifying the amount, deciding, no, I don't want cash back, and pressing "Enter" again, the kid who is supposed to be ringing me up is standing there eating my Almond Joy.
  10. Just because your tattoo has Chinese characters in it doesn't make you spiritual. It's right above the crack of your ass. And it translates to "beef with broccoli." The last time you did anything spiritual, you were praying to God you weren't pregnant. You're not spiritual. You're just high.
  11. Competitive eating isn't a sport. It's one of the seven deadly sins. ESPN recently televised the U.S. Open of Competitive Eating, because watching those athletes at the poker table was just too damned exciting. What's next, competitive farting? Oh wait. They're already doing that. It's called "The Howard Stern Show."
  12. I don't need a bigger mega M&Ms. If I'm extra hungry for M&Ms, I'll go nuts and eat two.
  13. If you're going to insist on making movies based on crappy, old television shows, then you have to give everyone in the Cineplex a remote so we can see what's playing on the other screens. Let's remember the reason something was a television show in the first place is that the idea wasn't good enough to be a movie.
  14. No more gift registries. You know, it used to be just for weddings. Now it's for babies and new homes and graduations from rehab. Picking out the stuff you want and having other people buyit for you isn't gift giving, it's the white people version of looting.
  15. And this one is long overdue: No more bathroom attendants. After I zip up, some guy is offering me a towel and a mint like I just had sex with George Michael. I can't even tell if he's supposed to be there, or just some freak with a fetish. I don't want to be on your web cam, dude. I just want to wash my hands.
  16. When I ask how old your toddler is, I don't need to hear "27 months." "He's two" will do just fine. He's not a cheese. And I didn't really care in the first place.
  17. If you ever hope to be a credible adult and want a job that pays better than minimum wage, then for God's sake don't pierce or tattoo every available piece of flesh. If so, then plan your future around saying, "Do you want fries with that?"