Saturday, November 25, 2006

Health: After Thanksgiving, Try the "Old Wives Tale" Diet.

Well, I had hoped to hold off on this article until after the first of the year, but since it’s just past the Thanksgiving holiday, I figured now is just as good as a time as then. So, you’ve stuffed your face over Thanksgiving, and now you want to lose a little weight. Well, let me fill you in on the secret to weight lose.


This is based on my own personal experience. At the beginning of this year, I made the old New Years resolution to lose weight. Now I didn’t want this to be just the old make a resolution and forget about it. Here I was, sitting at 270 pounds, a lot more than I wanted to weigh.

I did tons of research, looked at tons of diets, and listened to a lot of non-sense. And you know what I found? All of those people are full of crap. There is no magic diet, no wonderfully easy way to lose weight in a healthy manner. I say healthy, because all off these diets have one thing in common, you cut something out. It can be carbs, fats, calories, whatever and it isn't healthy. I realized one thing that was common to all of them that I found to be a truism, cut out sugary foods, like donuts, candy, and sodas (for me, sodas were the big one). So what I put together was a combination of themes that I used for my diet. Here I am now, sitting at 220 pounds. That’s after the Thanksgiving break, after I stuffed my face, and I didn’t gain a pound.

So, what is this ingenious “diet” I put together. It’s not so much a diet as a series of guidelines I call the "Old Wives Tale" Diet. Why? As I said above, it's just like we have always been told, eat less, exercise more. Let me start with the eating portion, since it is the easiest part to discuss. First off, people are fickle. We like our tasty foods. The problem with people, especially Americans as any European who has visited this country will tell you, is that we eat entirely too much food. Our servings are insanely large. Sickeningly so. I hear this complaint from foreigners, and I look at the obesity in this country, and I can’t believe that other people haven’t figured this out as the single “biggest” cause of the problem. So, guideline 1, eat half of what is served to you. Deny that urge to finish the plate. Think of it this way, your 6-dollar McDonalds hamburger can be two meals instead of one. You then get to have McDonalds twice in a day. So take that Big Mac, and cut it in half. For me, it was doing things like ordering a single instead of a double. Over time, my appetite subsided, and I could only eat that single, then it got to only half the burger, then half the burger with no fries. YMMV.

Second, I came from a strange household where I picked up a strange eating habit of devouring my food in record time. I am not sure if it is the military lineage that my father, grandfather, and uncles have, and I picked it up there (note, the military bug skipped a generation). Or the rush to get back to the TV/PC, but I eat fast. As a result, when I ate, I was still hungry. It has been said that it takes 20 minutes for your brain to register that you are full. So guideline 2, eat slowly. If you have to chew your food 72 times (isn’t that the number they always recommend) or whatever, do it. Take 20 minutes to eat that half a burger. You might as well savor the flavor and enjoy your food while you got it.

Now, after a few months of this, came a problem. I stopped eating meals altogether. First it went down to 2 meals a day, then 1, and then every other day. I realized this was not health in the least bit. Plus, I stopped losing weight, and would either flat line or start gaining. So, after a little research, I came up with a solution. I started to supplement my meals with 2 things. First, I forced myself back into eating a breakfast. Now, I didn’t just eat any old breakfast, I turned to the Gracie Diet for help. The Gracie Diet is not a scientifically proven diet, but is a diet that has had wonderful results for the Gracie family. If you don’t know who the Gracie’s are, turn on the UFC one day; you will hear them mentioned at least once. Or just go to your local video store and rent the first few UFC’s. You will get an idea. To put it into perspective, the Gracie diet is one that this family of fighters, who have basically invented the modern sport of cage fighting and modern Brazilian Jiu-Jitsu, have lived by. Their eldest member, Helio, is over 90 years old and still goes strong. That’s a 90+ year old man that could whoop just about anyones butt. How’s that for healthy. It is a certain combination of fruits, vegetables, and other groups in a way that they have felt aids in digestion and gives them energy. Not so much what you eat, but how you combine them. So, this became my breakfast. I picked about 4 different recipes that I liked and are easy enough to make as my breakfast repertoire. These are as follows:

1: Apples and Bananas

Take 4-5 apples, core them, and juice them. Apples corers are about 1 buck at the grocery store, and most nowadays have a slice built in, so you can slice and core at the same time. Take 3-4 bananas put into a blender with the apple juice, mix and drink. The Gracie’s say you can mix ice cubes and crème cheese, but I don’t care for crème cheese. Do not use apple juice from a container, as it contains preservatives, and it loses vitamins. Even ones labeled “No preservatives”. We live in a wonderful country where fruit is already picked and delivered to the store for us. All you need to do is wash it. The Gracie’s handpicked theirs in Brazil (I doubt the ones living in the US pick their own anymore), so be thankful).

2: Bananas and Milk

Take 3-4 bananas, put into a blender, put in milk (I eyeball this, leaving the bananas whole and put enough milk to where ¾ of the bananas are covered), blend and drink. This one is my favorite since it is the quickest, easiest to clean up, and has the best taste.

3: Grape juice

Take ½ pound – 1 pound of sweet grapes. Blend; run through a strainer, and drink. This is probably the hardest one to drink. Grapes taste great individually, but they are hard to swallow like this. One of the things behind the Gracie diet though is we are too stuck on what tastes good, and need to get over it in favor of what’s healthier for us.

4: Fresh Orange Juice

Take about 4-5 oranges, juice them, strain to remove the pulp and drink. This is another one of my favorites. But I have found freshly squeezed orange juice does not taste the same as the kind you buy in the store, leading me to believe there is a lot of additives in the store bought one.

One thing to note, I eat each one of these with a multi-vitamin, every day. There are other recipes, such as carrot juice, that are good also. But, since I do most of my “on the move” eating in the afternoon and evening, this breakfast fits in perfectly. When my fiancée was away, this diet was great because I could eat two meals in this fashion, and saved a nice big dinner for her and me. Other diets say eat this type of food, or that, but as I have found, we just eat anything for dinner in smaller portions and it works out fine.

Now, as Ii mentioned before, the secret isn’t the dietary part. The secret is, as our mothers have ALWAYS told us, is exercise, exercise, exercise. My mother is smarter than the whole league of scientists, dietitians, and all these other witch doctors because this is where I have ALWAYS seen the most consistent weight lose in just about anyone I know who does it. As my mother always told me, “Get off your ass and exercise”. Diet alone will never be enough. You may see some initial loses, but you will plateau and not lose a pound more if you don’t exercise.

So what is exercise? This is another one of those guideline things. For me, exercise was any number of things:

1: At least 3 times a week

2: 20 Minutes of hard-core cardio

3: Something fun

Fun differs between people. For me, it is Kenpo Karate and Brazillian Jiu-Jitsu, coupled with bike riding, running with my Ipod, and jump roping. For my fiancée, it is dancing, tennis, and soccer. Being Latin American, she lives and breaths soccer, being that I am from the United States, I couldn’t care less. But fun is fun from certain perspectives. Point is, go out and do something you love. The most important thing is to keep yourself entertained. I use my Ipod, or I take someone with me when I workout. I love the martial arts since it’s a group activity and it helps keep me motivated.

My regiment usually consists of:

1: 10-15 minutes of stretching. Take 10-15 seconds per muscle group. Always warm up each muscle before you stretch by shaking it, or some light workout.

2: Simple stuff: 3 sets of sit ups with a medicine ball, 3 sets of push ups, and 5 minutes of Jump roping.

3: 45 mins – hour of Kenpo. I do all the forms, sets, and techniques in the Kenpo system. Although of late I haven’t been attending class so much, this still keeps the techniques and stuff fresh. Sometimes I perform on a bag when available.

3: 20 Mins of running: This I typically do on an elliptical machine to save wear and tear on the knees. I do a particular series where I run real hard for a minute straight, job for 2 mins, and repeat, up until 13 mins, where I jog for the remaining time.

4: (optional) Bag work: Here, I will do punching and kicking drills on a standup bag, or will work on ground and pound drills on a bag on the floor. I used to have a partner for this, now I don’t.

5: Extracurricular Activities: As mentioned above, I do Kenpo and Jui-Jitsu in the evenings. This is separate from my daytime workout. I also try to golf on the weekend, or ride my bicycle. The bike trip I take is a 20 mile ride to my former place of employment since it is on a nice, isolated stretch of road, and since this is Texas, our version of winter is about 60 degrees, so its always in season.

Exercise is the key ingredient here. In all the times that I have slipped off the dietary part of my weight loss program, the exercise has kept me from ballooning up. The fact of the matter is we are people, and people have things that come up. Parties, weddings, funerals, birthdays, holidays, special events of all sorts. Just because your trying to lose weight, doesn’t mean you can’t enjoy these events. I tried turning down things like cake at parties, but that just gets you funny looks. So a slice every now and then isn’t the end of the world. I didn’t die from massive coronary shock or balloon up from slipping every now and then, I just had to keep consistent with my exercise and get back on track. In this day and age, you can Tivo your favorite shows, or better yet, get them on your Ipod and watch them while your on the treadmill, that way you don’t feel the “imaginary” obligation to be at home for your favorite show. When I still worked in an office, I took my lunch hour to work out at the company gym, and ate soups for lunch. Point is, they key here is the burning of energy, that’s how you’re going to lose weight.

I don’t weight lift, at least not reguarly. For one, weight lifting grows muscle, and I am trying to get smaller. You can get toned, and work certain problem areas (backside, stomach). Consult someone who knows to find the best exercise to work those problem areas. If you’re a man, you have what I refer to as the hero complex. Brad Pitt said it best in Fight Club, so I don’t need to repeat it. You have the body that was given to you, so improve it, don’t try to have someone elses body. Which brings me to point two, most people do not weight lift correctly. I see a lot of guys at the gyms lifting ridiculous weights, which almost always casuses me to laugh. First off, most guys do the quick jerk weight lifting, which is neither health, nor beneficial. This builds what I call “paper muscles”. Proper weight lifting comes from slow, even movements with resitence on the give as well as the take. You can get a lot more from lower weight this way than from the grunt and shove method. Case in point, there was a guy Dave who worked out this way. He was a model that we knew. One day we went to go pick up a TV from his house so we could fix it. Here are two guys, me and my buddy, who did this every day. Dave helped the two of us, and the comedy ensued. The guy couldn’t carry his own weight, despite his “big model muscles”. He cried like a little girl, had to stop every few feet. It was almost like we were better off without his help. A few weeks later I saw him working out at the gym. Here he is lifting weights, using the quick jerk method for bench pressing, and using the swinging assists for arm curls. He was more focused on the numbers on the side of the weights than actually building any sort of strength or muscular endurance. Just because you lift it in the gym, doesn’t mean it will do you any good in reality. So if you lift, lift with a goal in mind. Tone, muscular endurance, and strength are not necessarily mutually inclusive. I have met butchers and auto mechanics with more “strength” than these phony muscle men, so don’t believe the hype. The reason being, these guys work against a resistence consistently, every day, using the same muscles. That’s why auto mechanics have the handshake of death.

So to summarize:

1. Eat less, exercise more

2. Eat smaller portions. Work your way down until you’re at a portion you can eat and be full. This way you eat what you like.

3. Eat slower

4. Exercise at least 3 times a week, for at least 20 minutes (I recommend an hour). Find something you like (Basketball, racquetball, soccer, tennis, martial arts, bike riding, running) and get out there and do it.

5. Have a goal in mind, and keep it reasonable. For me, it was 230 pounds by the end of the year. I have exceeded that goal. Next year, I will shoot for 200 by the end of the year.

6. It takes time, so be patient. You may not see results immediately, or you may see rapid results that taper off over time. In the first few months, I lost 30 pounds rapidly. I’ve fought real hard to lose that additional 20 pounds to where I am at today. And that given all the slip ups.

In all of this, I don't have any "scientific" evidence, any expert claims, or any other such nonsense. I have the 50 pound that I have lost, the the surprise of my doctor that my once high numbers in blood tests have dropped to exceptionally normal thresholds. I'm not here to convince you to send me money for the secret to weight lose, nor will you see me with annoying spam or pop-up messages with my ultimate secret. It is just like our parents always told us, go out and exercise, and drop that dang donut. It's a hard road to follow, so be sure you are willing to make the comitment.

Monday, November 20, 2006

BIRT: GDI Error Using the Chart Engine

After starting up BIRT and trying to do some work with the Chart Engine, I kept getting an error saying “Unable to load graphics library [GDI+ is required]”. In order to fix this, I downloaded the GDI+ SDK Redist package from Microsoft, and extracted the files into my Eclipse installation folder (the folder containing Eclipse.exe). After that, Eclipse worked like a charm.

Oracle: Generating Random Numbers

In generating a large set of test data for report development, I had needed to populate a columns data with random numbers between a given range. Fortunately, Oracle provides this in the form of its DBMS_RANDOM package.

For my case, I needed to set a foreign keys value to anything within a range of values in another table. I know that my range in this other table is 1-100, so to update my table with those values, I would run something like:

Update mytable set myfield = trunc(DBMS_RANDOM.VALUE(1, 100))

The trunc became necessary since Oracle was spitting out values with decimals.

BIRT: Getting URL Parameters to Work in Reports

A question was asked about being able to pass in values from a URL, and have it do something in the report. In order to get this to work, all you need to do is create a report parameter. So, using my previous report example here, I can send a value to the rptparamCheckBox1 parameter through the URL as a URL parameter. So if I deployed my example report linked above, to an Apache BIRT Viewer instance at, I would call it with the following URL:

Now, I can change the URL and have it show up in the report. This will also work with hidden parameters that you may want to use to affect layouts. So, if I add a Highlight, as indicated in Figure 1, I can have the text show up as red when the value of rptparamCheckBox1 is true.

Figure 1. Highlight Based on Parameter.

Sunday, November 19, 2006

BIRT: Making a Checkbox Parameter

A question came up about making a BIRT report parameter as a check box. The process is pretty simple, so let me walk through it. I will go through this from the ground up. The project I am building will not need to use any data sources since it will simply display the result of the parameter itself.

First, I open up the Eclipse IDE. I switch over to the BIRT perspective by going up to Window/Open Perspective/Report Design. I create a new BIRT project, and call it CheckBoxParameterReport. Once this project is created, I go to the Project Explorer, right mouse click, and select New Report. I call this new report CheckBoxReport.rptdesign. I create this as a Blank Report.

Once the newly created report is open in the designer, I open up the Data Explorer tab. Under this tab, I right-mouse click on the Report Parameters section, and selet Report Parameter. In the report parameter dialog, I fill in the values as outlined in Figure 1. Be sure to change the type to Boolean, otherwise the correct prompt types will not be displayed.

Figure 1. Report Parameter Dialog

Once filled in, I hit OK, drag the parameter over to the design window. I save the document, go over to the project Navigator, then right-mouse click the report design, and choose Report/Run. I then get greeted with the Parameter Dialog with my check box, once I click my value and hit OK, I get the report showing my selected value.

Figure 2.
My Dialog Box

Monday, November 13, 2006

Charity: Childs Play 2006

While I typically try not to push certain views out, I really feel that I should try to do “something” to get the word out about the Childs Play charity. You see, I feel somewhat that I should try to do more to make a push, and this particular charity pulls at my heart strings for some reason. Last year I got my gaming site to put together a pool where they sent out a little bit of cash. This year, I figured I would plug it on the here as well.

For those who aren’t in the know, Child’s Play is a charity put on by the good folks over at Penny Arcade. The philosophy behind this is that sick, hospitalized children can have less recovery effort if they are entertained, thus getting their mind slightly off their afflictions. So Child’s Play puts all of its proceeds towards toys and video games for sick children that are hospitalized. They donate ALL, that’s 100%, of the funds they raise, in addition to any charitable gifts to the hospitals participating.

Besides the charitable donations, they also currently have a series of auctions going on over at EBay, which include a number of original sketches of their artwork. Being the fan that I am, I wish I had enough to buy one of these. Not only for the memorabilia, but the thought of the money going towards a good cause.

Something about this really gets me, so I feel this is one of the most worthwhile charities I think I have ever heard of. While most take a portion for administrative costs, Child's Play puts 100% towards the children. I'll definitly be making more of a push this year to get the word out and put a contribution in myself.

Sunday, November 12, 2006

Rant: Hawking Broadband Booster Blocking Inbound Connections

Now this is very strange...

I have a Hawking HBB1 Broadband Booster in my network to help with my online gaming. I love this device, ever since I put it on my network, I "appear" to have absolutly no lag whenever I play games online through my XBox, XBox 360, or PC games.

Now here comes the problem... since I recently consolidated all my olders PC's (which, since moving into my new apartment, have been out of service) on to my server under VMWare, I cannot establish connections from outside my LAN. I troubleshot this issue to death, and determined only 2 things have changed since the last time this worked. First, the PC's were moved into VMWare. Second, the Broadband Booster was added between the Cable Modem and the Router. And wouldn't you know it, if I remove the Broadband Booster from the network, I can connect no problem.

Now this is a little strange. I've had some quirky issues with the Broadband Booster in the past. I've had choppy network connections, intermittent Open status NAT connections using XBox live, and a few other quirks. Almost all of these were corrected with either a little configuration, or a firmware update. Now the Broadband Booster is supposed to be a passive device, it does not act as a NAT device in any way, it only monitors traffic, and adjusts QoS based on what it sees.

So if that is the case, why the hell is it blocking inbound SSH traffic? I suppose in the mean time I will have to remove this little device when not in use, but thats kind of a hassle.

Wednesday, November 08, 2006

VB: Start and Stop Macro Execution with a Button Click

I recently had someone ask me if there was a way, in VB, to start and stop a series of sub routines from running. The problem with Visual Basic is the lack of any sort of easy to use multi-threading. There are a couple of solutions however, while not exactly the prettiest, will do the job. The topic of multi-threading is a very complex one, so we will keep this simple and stay outside of that realm.

The first solution is to use a Timer component as the driver for your subroutines. You can then start and stop the timer at your leisure.

The second is to have a series of flags determining the state of the subroutine runs, run the subroutines in a loop, and use a DoEvents call so the program is not in a locked state.

For example, lets say I have an Excel spreadsheet that runs a series of functions in a loop. I want to be able to start and stop that with the click of a button. I would use something like the below, where UserForm1 is my containing my buttons, CommandButton1 starts my loop, CommandButton2 will show my the status of the loop in a message box and ask me if I want to stop, and TextBox1 will show if the loop is running. The loop in the example will only increment a counter X by 1, and reset it if it gets over 6,000,000.

Option Explicit

Dim x As Long
Dim continuerun As Boolean

Private Sub CommandButton1_Click()
continuerun = True
While continuerun
x = x + 1

If x > 6000000 Then
x = 0
End If
TextBox1.Text = continuerun
End Sub

Private Sub CommandButton2_Click()
MsgBox x
continuerun = (MsgBox("Continue running loop?", vbYesNo) = vbYes)
TextBox1.Text = continuerun
End Sub

Of course, the third option, since it would be in a macro, is to keep the DoEvents call in the loop, and just go into the VBEditor and hit escape or the stop execution button.

Monday, November 06, 2006

Recreation: Playing with the Wacom Drawing Tablet

Ever since I read Mike Krahulik (Gabe of Penny Arcade) article on his inking of a Boba Fett sketch he did, I’ve been bitten by a little artistic muse, which has quickly grown to a nagging infection in my mind. Being the big fan that I am, and since I always wondered how hard it would be to do the same thing, I decided to mimic his actions. I got in touch with a friend of mine who is a local artist, and who happens to have a Wacom tablet of her own, and convinced her to let me try this myself.

The Intuos2 6x8 tablet that she has is a pretty cool little device. It is a pressure sensitive drawing tablet that hooks into a PC or Macs USB port. With a few driver installations, the thing works with Photoshop to provide artists the ability to use a more natural feeling peripheral for drawing and photo re-touching. All and all a very cool little device.

In my case, I stole “Gabes” sketch since I don’t have any artistic talent of my own, and tried my hand at inking it using the tablet. It takes a little hand-eye coordination to get the cursor to go exactly where you want, and it takes a little practice getting the pressure right to you can create variable line sizes. In my case, I had jittery hands when I was trying to draw with it (which is visible in some of the jittery lines), which I am not sure to attribute to the small desk, the tablet size, or my own physical limitations. But once I got moving with it, I was able to follow along with his YouTube video fairly well. While he claims the overall process took him about 15 minutes, it took me the better part of an hour, maybe an hour and a half. The cool thing about this as opposed to the paper method of inking is it is incredibly easy to undo once you make a mistake, which in my case was quite often.

Anyway, here are my results, please be kind:

I don’t think I will be quitting my day job anytime soon, but it was enough to satisfy my curiosity. I have a new respect for not just for the Penny Arcade guys, but for artists in general. It’s one of those things, if it was easy, every fool would do it.

Friday, November 03, 2006

Windows: Running Scheduled Tasks Manually from the Command Line

I ran into an issue on a Windows XP system where the RUN command for all Scheduled Tasks was disabled and grayed out. I needed to manually run one of my scheduled tasks, and could not do it. I am not sure if this is due to domain/local policies or registry trickery, but regardless I found a way around it. Microsoft included a neat little utility called SCHTASKS.exe under the C:\Winnt\System32 folder that will allow a user to control Scheduled Tasks from the command line. I had a task called CESL that I wanted to run, so to run that task, I ran the following command:

C:\winnt\system32\schtasks.exe /run /tn CESL

That took care of my problem.