Saturday, March 28, 2009

The Fast 50% diet

Here are the main features of the diet:
  • Eat whatever you normally do
  • Save time and money
  • No exercise necessary
  • Super simple--no thinking required!
So what is it? Well, there are 2 parts. The first part is the "50%" part:

Eat half of what you normally would.

This means that you have to estimate what you would normally eat and only eat half of that. So if you go to a place that has ridiculously large portions, you might eat only 1/4 of the meal, because normally you would eat half.

You save money because food goes twice as far. You save money because you can eat the other half as leftovers. You save time because it doesn't take long to eat half as much!

So can you eat chocolate all day? Sure. If you normally eat 20 pieces of chocolate for dessert, just eat 10. As long as you do exactly what you normally would but eat only half, you guarantee that you'll be taking in only 50% of your usual calories. That should be enough of a reduction to get anyone down into the weight-losing mode.

You might think that dieting like this would leave you feeling hungry all the time. Normally, that would probably be the case, and that is why you need part 2, the "Fast" part:

Fast once a month to reset your appetite.

Years ago I noticed that fasting had an unexpected effect: right after fasting I would feel full sooner than normal. You'd think you'd be famished after breaking a fast, but if you eat slowly you'll notice that you get that full feeling much sooner than normal. Respect that feeling and stop after 50%.

For me, about 24 hours taking in only water or juice works. The point of the fast is not to skip calories, but to reset your appetite. As a practical matter I find it easiest to fast on a day when I'm doing light chores or shopping--something that keeps me active but is not strenuous.

Historically, fasting is associated with spirituality. And I think it helps your body and mind to get back into balance. As someone who loves eat, fasting helps me to keep food in the proper perspective.

Sunday, March 22, 2009

Me vs. The Environment


Most decisions involve a tradeoff between two factors that are in opposition. Saving money vs. saving time. Inexpensiveness vs. quality. Doing some quickly vs. doing something correctly.

The solution always involves knowing how important one factor is compared to the other. This differs from person to person and changes over one's lifetime. For example, kids choose saving money over saving time, but adults will hire help when time is scarce and money is plentiful.

So why is this reasoning rarely applied to environmentalism? In most cases there is a tradeoff of time/money/pleasure for saving the environment. Saving water vs. clean hotel towels. Reducing carbon footprint vs. international vacations. Recycling vs. saving time.* The list is endless. These issues are rarely presented as tradeoffs. Why not?

Environmentalism shouldn't be dogma. It should explain the benefits and the costs of working to preserve the environment, so that each person can make an informed decision.

* Of course it is possible to do things more efficiently so that personal loss of time/money/pleasure in negligible. But after you've squeezed all the wasteful inefficiency out, you eventually have to face a choice between personal time/money/pleasure and further perserving environment.

Thursday, March 19, 2009

Upload local Thunderbird email to Gmail

I had almost 30,000 old emails in Thunderbird dating back to 1996. Now that I've been completely converted to The Way Of Gmail, I want all my mail there. I figured it would be a piece of cake seeing as how Thunderbird was the geek email client of choice and that mbox is a very standard mailbox format. Wow, was I wrong. Here's what I tried:

1. imapsync. Only does imap-to-imap transfers.

2. Ryan Grove's ruby script. Doesn't work for Thunderbird mailboxes. I asked, and the response was "This script can’t read Thunderbird mailboxes. It should be possible to write a script that can read them (I believe Thunderbird uses an Mbox-like format), but I don’t plan to do it." He launched "Larch" in the last couple of days which does imap-to-imap transfers; seems like that could be very useful oneday.

3. Scott Yang's python script. Works for maildir mailbox format, not Thunderbird. I asked, and the response was "I do not know whether it works with Thunderbird mailboxes, however I do not think it would be too hard coding a solution for it. Working on Windows might take a bit of effort. Basically it’s not tested :)"

4. Google Email Uploader. Only works with Google Apps Gmail accounts, i.e. not normal foo@gmail.com accounts.

5. Google Email Uploader + foo@bar.com + forwarding. I happen to own my own domain--let's call it bar.com and a Google Apps site for that domain. That means I can have people send mail to me at foo@bar.com and it goes to my Google Apps Gmail account. I only use the Google Apps account to forward my mail to my normal gmail account foo@gmail.com. So I simply used Google Email Uploaded to push the mail to foo@bar.com and from there it got forwarded to my normal gmail account. WRONG. Forwarding caused the dates to get set to the current day, not the original day.

6. Manual IMAP push. At this point I got a little discouraged and decided to do things manually: setup gmail to provide IMAP access, then drag and drop my emails up to gmail in Thunderbird. This turns out to work, but it is Painful if you have a lot of emails. The transfers often fail, so you have to do them in small groups. Even worse, there seems to be a rate limit on uploading so eventually gmail will lock you out of IMAP for a period of time!

7. Google Email Uploader + foo@bar.com + pop3. This actually worked. What I did was instead of using forwarding, I enabled pop access on foo@bar.com. Then in foo@gmail.com I added foo@bar.com to the "Get mail from other accounts". SUCCESS. A couple of points:

- I don't think you need to buy your own domain to use Google Apps which is necessary to use Google Email Uploader. If that is true, this is a no cost solution. If someone can verify this and post a comment it would be great.
- Some of my emails get munged together. I'm not sure who is at fault: Google Email Uploader, foo@bar.com or foo@gmail.com.


Tuesday, March 10, 2009

Transitioning from Perl to Python

I'm excited.  I'm taking a Python class tomorrow.  At the same time, I'm a little loathe to give be cheating on my long time girlfriend Perl.  Things will be different, but hopefully better in the long run.

One thing I'm hooked on is Perl's regular expressions.  Nick Craig-Wood explains that regular expressions in Python are more clunky but...
Having made the transition from perl to python a couple of years ago, I find myself using regexpes much less. In perl everything looks like it needs a regexp, but python has a much richer set of string methods, eg .startswith, .endswith, good subscripting and the nice "in" operator for strings.
So hopefully things will be ok.

Tuesday, March 3, 2009

Thinking in another language #2

Almost every language teacher will say that "translating" is the wrong way to go about learning a foreign language. By that I mean thinking "I eat ice cream" and then translating word by word into another language.
My personal experience says we always translate*. When you are first learning, you translate word by word. As you progress, you translate phrase by phrase, sentence by sentence, and eventually whole ideas at a time. And I find that the "chunk-size" of your translation varys depending on how familiar you are with the subject matter. If I read technical or formal documents in my target language, I find myself translating much more than if I'm gossiping about people--an area where I have lots of experience :-)
* Ok, maybe not kids, but that is another discussion.

Thinking in another language #1

What does it mean to "think in another language"?  Is it an accurate measure of fluency in a foreign language?  Here is Foreign Language Doctor's opinion, and I think it makes sense.