Monday, November 15, 2010

BMI is Bullshit! (BMI of pro athletes)

I was cruising reddit today and saw a comment where a redditor was a bit disappointed that according to his BMI, he was (just barely) classified as "overweight". For those who don't know, BMI stands for Body Mass Index and is a stupid formula that divides your weight by your height squared.
BMI MIGHT have some value when determining the health of a very large population, but for an individual it is totally useless and probably dangerous! To make my point, I replied to the comment that most professional athletes would be considered OBESE according to their BMI. That got me thinking about what a pro athlete's BMI would actually be. Luckily for me, heights and weights of athletes are readily available on their rosters, so I went to work!
I studied the Detroit teams, because they have a team in every major sport and it's my home town!
BMI defines the following categories:
  • Underweight = Under 18.5
  • Normal weight = 18.5–24.9
  • Overweight = 25–29.9
  • Obesity = 30 or greater
Overall, there are 115 pro athletes on Detroit rosters. Their total average BMI is 28.3! Yep... the average Detroit pro athlete is overweight and approaching obese!
The number of athletes by category is:
  • Underweight: 0 (0.0%)
  • Normal: 24 (20.9%)
  • Overweight: 64 (55.7%)
  • Obese: 27 (23.5%)
The Lions had the highest BMI with an average of 31.2 (Obese) and 49.1% of their team falling in the obese category. Only one player was "normal" (cornerback Chris Houston at 5'11, 178 with a BMI of 24.8) and quarterback Matt Stafford snuck in JUST under obese at 6'2, 232 with a BMI of 29.8. Here's a photo of what an almost-obese person looks like.
Next fattest were the Red Wings at 27.2 (overweight), then the Tigers at 27.0 (overweight) and finally the Pistons got into the normal range just under the wire at 24.6.
At any rate, unless you think that 80% of pro athletes are overweight and need to lose weight, then it's probably time to realize that BMI is total bullshit!
Of course the REASON it's bullshit is that it doesn't take into account musculature, fitness, strength, endurance or any other reasonable measure of health or fitness.
For the same reasons, I think weight is a terrible measure of fitness! Screw the scale.
If you want a better measure of fitness, may I suggest:
  • Mile time
  • Burpees in 20 minutes
  • The mirror (not so easily measurable)
Seriously. Run a mile or do burpees for 20 minutes and see if you can improve THAT number. If you can improve one of those two by 20% the mirror test will improve considerably! Don't obsess over the scale... it just leads to yo-yo dieting and a slowed metabolism. Obsess over your burpees in 20 minutes score and you'll get fit!

Monday, May 17, 2010

Netgear XAV101 Powerline Networking - Syncing or adding a device

I just wrestled with adding a 3rd Netgear XAV101 powerline networking device to my network. The main problem is that the documenation is blatantly wrong. To press the security or factory reset buttons, you do NOT hold them down. You just click them once. I kept getting stuck in the stage with two green lights on (first and third) implying the device was not paired correctly.
The steps I followed to get everything working with a custom private key:
  1. Go to each unit in your network and click the "factory reset" button once.
  2. Once everything is reset go to device #1 and press the "security" button once, then go to device #2 and press the security button once.
  3. Wait two minutes. (I think you have to pair 2 devices before you can add a third)
  4. To add the 3rd (or 4th or 5th) device. Click the "factory reset" button (why not?) and wait a few seconds.
  5. Press the security button on device #3, then press the security button on device #2. That should pair #3 to the first two.
The Netgear documentation says you need to hold these buttons down for two or 10 seconds. When we did that, it seemed to make sure that nothing happened whatsoever!

Thursday, January 21, 2010

TempGetStateItemExclusive3 called repeatedly - SQL Server requests timing out from ASP.NET

UPDATE 1/28/10: Ok, so the solution I provide below, isn't actually the fix. The SQL Agent being off was actually a side-effect of restarting the SQL Server. Turning it back on certainly helped things, but we still have seen this blocking issue since this fix was in. I currently have a question into stack overflow about this.

I just spent the last couple days trying to track down an issue with SQL performance where there seemed to be a blocking or hanging issue causing SQL requests to timeout. Doing a profiler trace, I found a stored procedure called TempGetStateItemExclusive3 (TempGetStateItemExclusive in older versions) getting called over and over seemingly grinding the server to a halt.
It turns out, the issue was with the ASP.NET Session State stored in SQL Server. Lots of internet searches didn't turn up much. There is an old bug in .NET 1.0 that had to do with serialization of objects. I also found a promising looking hot fix that seems to address this exact issue (but it wasn't our solution).
Our problem ended up being that the ASPStateTempSessions table (stored in either tempdb or ASPState) was growing out of control because no old sessions were ever deleted. Looking up session data then became uber-slow causing ASP.NET to timeout waiting for the session (at which point it tries again, amplifying the problem). You can check how many active session rows you have by doing a simple query like this:
select COUNT(*) from ASPStateTempSessions
The cause for this out of control growth was that our SQL Server Agent was turned of for some reason, so old sessions were never cleaned up.
The fix was to turn the SQL Server Agent back on and make sure the ASPState_Job_DeleteExpiredSessions job is running. We also had to turn on the "SQL Server Agent (MSSQLSERVER)" in the Services section of Windows and make sure the Startup Type is automatic. Our session count is now hovering around 1500 (but I suspect this number would vary vastly based on traffic, the important thing is to make sure it doesn't grow out of control).
Hopefully this helps someone out there, or at least gives you some ideas for ways to track down the problem!