Chronic Dabbler

My focus varies randomly between current events, fatherhood, navel-gazing, programming, research, and technology.

November 24, 2009

I kicked caffeine

I made a momentous - for me at least - decision about 6 weeks ago: I kicked caffeine. There was no trick to it. I just examined my caffeine intake from a purely numbers oriented perspective.

After another sleepless night and a period of extreme irritability, I wondered if I needed to cut back on the caffeine. In the back of my mind, I'd always known my caffeine habit wasn't healthy - but just how unhealthy was it?

I read up on the effects of excessive caffeine. Insomnia? Check. Nervousness? Check. Restlessness? Check. Irritability? Check. Anxiety? Check.

The Mayo webpage says 200-300mg/day of caffeine is safe. I've seen estimates as high as 600mg. Here was my daily intake about 2 months ago:

  • Pot of coffee in the morning (64oz).
  • 3-4 large (16oz) cups of Starbucks equivalent coffee throughout the day.
  • 1-2 20oz Diet Cokes.
Using this database as a reference.

Drink
Caffeine (mg/Oz)
Daily intake (Oz)
Total (mg/day)
Brewed Coffee
13.5
64
864
Starbucks
20.6
48-64
988.8-1318.4
Diet Coke
3.75
20-40
75-150
Total:
1927.8-2332.4

Even at the low end, my daily intake was 3x the amount of caffeine - at the high end of the healthy range - considered safe.

The shock alone was enough to induce me to quit. I don't want to kick off before my children grow up.

The next day, I cut back to 1 large (16oz) cup of coffee. Then 1 medium cup (12oz) of coffee. Then a small cup of coffee (which I had never ordered until that moment).

And then nothing.

It took about a day for the withdrawal symptoms to hit me: fever, fatigue, headache, crankiness, and nausea. I got the works. After a few days of feeling miserable, suddenly I felt fine.

So what have the benefits been? I sleep very well now - I even have normal dreams - as opposed to the nightmares I had before. I am better able to focus my energies, which makes me more productive. I am less irritable with people. I don't get extremely nervous or anxious. In short, all those symptoms that induced me to examine my caffeine intake have all but disappeared.

I still love the taste and smell of coffee, and I drink decaf a couple times during the day. This has about 16mg of caffeine. So, I'm not completely caffeine free, but when compared to 2332.4mg, this is an insignificant amount.

November 02, 2009

Not Many People Use Google Voice

Why aren't many people using Google Voice?  Probably because until about a week ago, you couldn't use your own phone number.  That was the limiting factor for me until last week, when I switched my voice mail provider to Google Voice

I've found the best feature to be the email notification of a new voicemail, which allows me to quickly glance at my browser (usually with gmail open) and see that I have a new voicemail waiting without breaking with my current task to pick up my phone, dial, and listen to the message. 

The transcriptions have been pretty spotty, but that doesn't surprise me in the least - most people use cell phones these days and recognizing unconstrained speech over a phone line with limited badwidth and a spotty connection is very hard.  Still, the messages are generally accurate enough that I can determine whether or not a response is needed immediately, or if I can delay until later.

If the transcription is too poor to understand the content of the message, then a Gmail labs feature (Settings->Labs->Google Voice player in mail) allows me to simply click play from the email - taking away the step of navigating to the Google Voice homepage.

So far, I've liked the ability to check my voicemail without removing my hands from the keyboard.  This also helps reduce the number of inboxes in my GTD system.

September 23, 2009

Fun with translation

非死不可 is a transliteration of "Facebook" in Chinese.

It also means "Doomed to die."

Language is fun.

March 06, 2009

Twitter Search?

I think the current meme that Twitter will kill Google started with this article Google next victim of creative destruction. Now, I'm seeing all sorts of articles in my news feeds about Twitter vs Google.

It's overblown. Borthwick's article focused on twitter's real-time search capabilities, and the fact that Google doesn't have an equivalent - this is an accurate assessment. But Google does better on things people don't necessarily tweet about. As an experiment, I decided to see which search engine could give me better results for my research topic. Compare the search results I get for "chinese tone assessment for call":

Twitter Search Results

Google Scholar Search Results

Google Search Results

As of now, Twitter search has nothing. Google Scholar, on the other hand, has 46,600 results. Regular Google search has about 2,170,000. Which one is more useful for my research purposes?

That's not to say that Twitter search is useless, I just think it occupies a complementary space relative to Google. There are certain information needs that Twitter doesn't fulfill that Google does. And vice-versa.

One way this could change is if I start tweeting my research activities, and other researchers tweet their research, and so and so forth. This would be interesting to try for a bit.

February 12, 2009

Python Strangeness Resolved

Yesterday, I posted about what seemed to be a Python inconsistency. Basically, we were puzzled as to why Python would allow:

l = [1, 2, 3]
t = (4, 5, 6)
l += (4,)

but would generate an error with:
l = [1, 2, 3]
t = (4, 5, 6)
l = l + (4,)

One of the former TAs for 6.00 pointed out that there are two parts to consider. The first is that we shouldn't assume __add__ (implements +) and __iadd__ (implements +=) have the same semantics. __iadd__ is supposed to actually modify the object in place. __add__ doesn't have that stipulation.

Python has a fall back behavior where if it can't find __iadd__ implemented for a particular object, then it will try to use __add__, however, for lists __iadd__ is overridden so that it functions like extend().

The second point to consider is in the following bit of code:
l = [1,2,3]
t = (4,5,6)
l = l + t

The expression l + t should evaluate to a value. What should the type be? tuple or list? It's ambiguous. Whereas:
l = [1,2,3]
t = (4,5,6)
l += t

In l += t, __iadd__ knows that it's modifying a list in place, so it can take appropriate action with a tuple argument. __iadd__ for tuples isn't implemented because tuples are immutable.

Dilemma resolved.

February 11, 2009

Python Strangeness

I'm one of the teaching assistants (TA) for 6.00 this semester.  Another TA sent this to our mailing list:

This is just for your amusement. I came across an interesting quirk of python.

First the normal stuff:
>>> [1,2,3] + [4]
[1,2,3,4]
>>> (1,2,3) + (4,)
(1,2,3,4)
>>> (1,2,3) + [4]
Traceback (most recent call last):
 File "", line 1, in 
  (1,2,3) + [4]
TypeError: can only concatenate tuple (not "list") to tuple

>>> [1,2,3] + (4,)
Traceback (most recent call last):
 File "", line 1, in 
  [1,2,3] + (4,)
TypeError: can only concatenate list (not "tuple") to list

>>> l = [1,2,3]
>>> l + (4,)
Traceback (most recent call last):
 File "", line 1, in 
  l + (4,)
TypeError: can only concatenate list (not "tuple") to list

So far so good, but now:
>>> l += (4,)
>>> l
[1, 2, 3, 4]

But it's not symmetric:
>>> l = (1,2,3)
>>> l += [4]
Traceback (most recent call last):
 File "", line 1, in 
  l += [4]
TypeError: can only concatenate tuple (not "list") to tuple

Which is to say, list's __iadd__ function is polymorphic to tuples, but
tuple's isn't to lists, and list's __add__ isn't either. Odd and a little
ugly, but yeah. Anyone know whether this is a bug or a feature?

February 02, 2009

Things I learned during my first 6 weeks of fatherhood

Cordelia Zorana turns 6 weeks old tomorrow, which is not some special number other than it's a number greater than 5 that is a multiple of 1, 2, and 3. It's also the first perfect number (h/t Ian). Natalija and I lucked out in many respects. Cordelia is perfectly healthy, not-too-fussy, and is already sleeping through the night - assuming, that is, she goes to sleep at the end of the evening.

That said, babies have no user manual, and this fact makes for some amusing learning experiences, mainly because they involve bodily fluids and solids.

  1. Babies use lots of diapers. They are amazing if only for the sheer volume of poop and pee they produce relative to their body size.
  2. There are few biological functions more awe-inspiring than a "meconium explosion."
  3. Never turn your back on an undiapered baby. They will use this opportunity to finish draining their bladder.
  4. A bath towel swaddling a baby waiting for a bath is not a substitute for a diaper. Avoid wearing nice clothes.
  5. Never turn your back on an undiapered baby. They will use this opportunity to finish emptying their bowel.
  6. You will be peed on.
  7. You will be pooped on.
  8. You will be puked on.
  9. The set of 6,7,8 is a power set. That is you may be peed on, you may be peed and pooped on, you may be peed and puked on, you may get the trifecta, etc.
  10. Nine times out of 10, the diaper will be wet when you stick a finger in to check. That 1 time out of 10 will teach you to peer down the backside first.
  11. Drool is part of the game. All those old t-shirts you failed to get rid of now have a new purpose.
  12. Baby heads are floppy. Fortunately, they're also bouncy, but don't press your luck.
  13. Mirrors fascinate the hell out of babies.