selberg.org Home Home

Archive for January, 2007
1/27/07
7:51 pm
Upgraded to WordPress 2.1

I upgraded to WordPress 2.1. While not a terribly exciting ordeal for most, I want to comment on what I see is the inherent brokenness of the WordPress Upgrade Process.

Here’s the non-detailed fast version, in five easy steps:

  1. Backup files and database. What, you mean you don’t have some script running that automatically backs up everything nightly?
  2. Deactivate all plugins. Gah. If this is a standard thing, how about a Deactivate All switch somewhere, eh Matt?
  3. Overwrite Files. And since this is a 2.0.x -> 2.1 upgrade, delete magic old files. You know which ones, right?
  4. Run the upgrade script
  5. Reactivate plugins one by one. Again, gah.

OK… the sucky part is really Steps 2, 3, and 5, especially 3 — overwrite and delete files. This is lame. Here’s what I did to make it less lame:

  1. Move all the version-specific files into a version directory, e.g. wordpress2.0.3/ or wordpress2.1.
  2. Create a special symlink called wordpress_version that links to the appropriate directory
  3. Create symlinks in the top-level dir to the appropriate file in wordpress_version
  4. Create symlinks in the version directories back up to wp-config.php.

For example, here’s a brief excerpt of my directory structure for this blog:


selberg.org/
		wp.config.php
		index.php@ -> wordpress_version/index.php
		wordpress_version@ -> wordpress2.1
		wordpress2.0.3/
			index.php
			wp-config.php@ -> ../wp-config.php
		wordpress2.1/
			index.php
			wp-config.php@ -> ../wp-config.php 

As far as when WordPress introduces files, you have to create new links. When you need to delete files, they appear easily via ls as a broken link. And even if I forget to delete a link, the file is effectively gone. We’ll see how this works. And maybe I’ll get inspired to try and fix how plugins work in the next upgrade.

Hat tip to Raging Liberal for the scoop on fixing Postie, the plugin I use to post mail to the blog. Turns out e-mail really is the best way to write a blog entry IMHO.

Update: Forgot to link to wp-cron.php, which appears to have caused WordPress to launch a DOS against itself… oops.

1/27/07
7:26 pm
Cracking Masterlocks…

Remember those 2-4 Masterlock combination locks you have in your tool chest / junk drawer that have been there since high school? Well, I needed to get a lock in order to secure a locker in our new building at work. Of course, the paper that had the combinations is long gone. Luckily, those Masterlocks provide all the security you’d expect for the $20 or so they run for. Yup, easily cracked with plenty of references online to do it — for example, the Masterlock Crack page hosted on Angelfire. Gotta love it.

1/27/07
3:50 am
Induction - necessary for diet success?

The 20/20 Lifestyles Program puts people on a diet (and by this I do mean a temporary change in eating) for a couple reasons to help them lose weight. This is also similar to the Atkins / South Beach Diet’s induction period.

The diet, roughly, is the following:

  1. 5 meal-replacement shakes, 12oz cooked lean meat. Shake & slab!
  2. Add Veggies
  3. Add Milk & Yogurt
  4. Add Cheese
  5. Add Fruit
  6. Add Beans
  7. Add (whole wheat) bread
  8. Add high-glycemic fruits (such as bananas)

Note that after adding something, the meal replacement shakes and some of the meat goes away, so calories are kept the same. The meal replacement shakes are supposed to be some specially formulated shake designed for the 20/20 program. They’re effectively just protein shakes as near as I can see.

The idea behind the diet is that there may be certain foods, or certain types of foods, that cause a given person to feel hungry or gain weight. By trimming down the diet to these shakes and bits of meat and then slowly adding food back in, the idea is to isolate and identify those foods to determine where they fit into normal eating. Personally, I suspect it has a number of other effects:

  • By removing all normal meals, it forces the person on the program to recreate the types of meals they eat — ideally in a healthier fashion.
  • By creating a radically different diet, the person on it is much more likely to keep to it versus eating normally.
  • By radically changing the diet, you don’t give the body a chance to adjust to simply eating less of the same stuff.

The third point is probably the most unsubstantiated, but I think the most important, at least for me. Weight loss is a radical change for the body… and thus lots of eating plus lots of dietary change is necessary for the body to change, versus simply adapt.

Unlike Atkins, the 20/20 diet isn’t zero or low carbs. Veggies are highly encouraged — and it turns out it’s hard to eat that many veggies and gain a lot of weight (although adding fatty salad dressings can add up those calories in a hurry!).

OK, there’s the diet. Next up: water!

1/21/07
3:37 pm
Diet and Weight Loss

As I come on the year anniversary of starting the 20/20 Lifestyles program at the Pro Club, I thought I’d reflect on some of the aspects of what it took to lose 70 pounds. Perhaps the biggest question I get from people is about the diet:

  • What can you eat? (or it’s evil twin: what did you have to give up?)
  • What can you drink? (or, it’s evil twin: can you still drink?)
  • How can you stand it?

First, let’s talk about what you eat and drink once you start on the 20/20 Program. I’ll refrain from calling it a diet. While a diet is supposed to mean a choice of food & drink, invariably it has come to mean a temporary choice of food and drink to reduce weight. The temporary bit is what tends to get most people — if you do something that has caused you to gain a lot of weight, then you do something to lose it, then you revert back to what you did to gain the weight… what do you think will happen?

According to the dieticians at the Pro Club, I, a 6′1″ 33-year-old male, am supposed to consume 15-1700 calories a day, so averaging 1600. Your mileage will vary, but for this discussion we’ll use this number. If you’ll recall, a pound contains 3500 calories, so I’m consuming a little under half a pound per day to keep the body running. More than that, and the intake is converted into fat. So, the question is now, what does 1600 calories look like, and how can you get through a day / week / year on that?

The program advises that people should eat 5 times a day: breakfast, snack, lunch, snack, and dinner. For example, about 300 calories for breakfast, 100 for snack, 400 for lunch, 100 for snack, and 700 for dinner. The other aspect is to consume about 40 grams of fat (yes, fat) throughout the day, especially the earlier meals. The reason being is that it’s fat that is one of the key things that makes you feel sated or full. So, what do you eat with a budget of 1500 - 1700 calories per day?

Well, for starters, remember the Food Pyramid? Here’s that famous picture you probably saw:

USDA_Food_Pyramid.gif

6-11 servings of grain;
3-5 servings a day of veggies
2-4 servings of fruit
2-3 servings of protein (meat, fish, eggs, nuts, or beans)
2-3 servings of dairy
a pinch of fats, oils, and sweets

Well, don’t do this. This makes people fat. In particular, let’s look at calories. A serving is basically 100 calories, so the above has you eat 1500 - 2600 calories per day (averaging 2000, thus the 2000-calorie average you often see on food labels). Now, it isn’t completely wrong. Veggies, fruit, dairy servings are good, and minimizing sweets (meaning refined sugar and high-fructose corn syrup) is good. The main gotchas are high grain, low protein, and no fat. First, ask any rancher what a grain-fed diet vs a grass diet does for beef. Grain-fed is super fatty, while grass-fed is lean. People aren’t cows, but turns out that grain-fed people tend to be fat. This is why diets such as South Beach and Atkins have worked so well. But it’s only part of the solution.

BTW, you can’t find the Food Pyramid anymore on the USDA’s site; they have a new one that’s all about picking a pyramid for each individual. So at least they’re recognizing things and trying to move in the right direction. Dr. Mark Dedomenico, the founder and director of the 20/20 Program, has a fair amount of evidence that he presents that also supports why a higher protein / low grain diet works well.

So what should you do? Again, 1600 calories, 40 grams of fat, high protein. Here’s what it looks like

  Day 1

Day 2

Day 3
 
Breakfast
5 Walnuts
Cereal (Puffins)
Cup slim milk
45 / 5
90 / 1
90 / 0
5 Walnuts
Cereal (Puffins)
Cup slim milk
45 / 5
90 / 1
90 / 0
5 Walnuts
Cereal (Puffins)
Cup slim milk
45 / 5
90 / 1
90 / 0
Snack
Orange
Apple
60 / 0
60 / 0
Purefit Protein Bar 260 / 7 Apple 60 / 0
Lunch
Salad w/ Chicken
Cup slim milk
350 / 8
90 / 0
Chicken Breast, 6oz
Bread stick
Cup slim milk
300 / 6
200 / 4
90 / 0
Hamburger 450 / 8
Snack
5 Walnuts
Low-Fat String Cheese
45 / 5
60 / 1
5 Walnuts
Apple
45 / 5
60 / 0
5 Walnuts
Orange
45 / 5
60 / 0
Dinner
NY Steak, 8oz
Salad, lt dressing
Fruit Cup
400 / 15
100 / 3
150 / 0
1 Whole Dungeness Crab
Salad, lt dressing
Dessert Cheese 
150 / 2
100 / 3
200 / 18
15pc Sashimi
Miso soup
Mango sorbet
450 / 8
85 / 3
240 / 0
Total   1540 / 38   1540 / 51   1615 / 30

This is a sample of what I’ve eaten, with some variety to show what you can do. It’s not much different than lots of other meal plans; the main thing you’ll notice is that there’s very little bread. Turns out that a hamburger bun is 200 calories right there. Rice is another one… 15pc sushi is about 900 calories, while 15pc sashimi is 450 — that’s 450 calories in the rice alone! Yow!

Next up: induction, or how to get your body to start to lose the weight!

 

1/13/07
11:35 pm
Why I blog…

Sorry, haven’t been blogging for a bit. Holidays have been rather busy!

Anyway, I’ve been taking some time to think about the direction for this experiment I call a blog. When I started it about two years ago, I did so mostly to experience what blogging was about. I wasn’t clear what I wanted to blog about, but often in life it’s about discovering the why that’s the interesting endeavor.

One thing I’ve discovered is that disjoint categories makes for a difficult blog to read. Some folks have commented that it’s not clear if my blog is about search, cycling, or my random ramblings. And while I’m sure there are a few people out there that have a 90% overlap with my interests, turns out most don’t share the same criteria — thus the search folks get bothered by lots of cycling stuff, and the cycling folk get random search stuff. Thus I’ve made a few sub-feeds for category-specific feeds that will hopefully make things easier on those readers.

Another thing I’ve discovered is the very awkward line in terms of blogging about your industry. When you go through grad school, you’re taught to think critically about nearly everything. It’s not so much a hard habit to break, but rather it’s difficult to catch yourself when you’re being overly critical. Furthermore, critical discussion usually involves controversy, which implies differing, usually opposing, points of view. It’s often not clear whether those discussions should take place within the confines of a company, or in a public forum. And it’s not clear that even if those discussions should be public, whether random bloggers should be the ones having that discussion!

So, what will the coming year bring? Unclear… but again, it’s never so much the ending as the journey. I hope you’ll enjoy joining me on this one!