Some tricks for better sleep

As recently as six months ago, which was the better part of a year after moving to Manhattan, I clung on to the silly idea that I wanted to try and have a regular sleep schedule. I knew I was hopelessly bad at it, like everybody else, but "some day" I would find the will power and the discipline, I told myself, and then I would be well rested and happy for ever after. At some point the switch flipped in my head, and I accepted the obvious — a regular sleep schedule is simply incompatible with the demands of modern urban and professional life.

As a result I started to look for other ways to improve my sleep hygiene. Turns out there's a lot one can do. Here's my current set of tricks.

  • Avoid blue light at night: f.lux, orange goggles an hour before sleep.

  • Now that it's winter, bright white light in the day time.

  • Melatonin (because gwern says so).

  • No work or TV in the bed area.

  • Always sleep with earplugs and an eye mask. In fact, I always keep earplugs and an eye mask on me, so that if I feel the need to nap on a flight or a train ride, I can at least make it more effective.

  • No caffeine in the evenings. Week-long breaks from caffeine when work permits it, to re-build caffeine tolerance.

  • No TV shows right before bed, because those generate adrenaline. Comedy has been the only exception for me.

The cumulative result of these has been that I can get by with somewhat less sleep, and perhaps more importantly, I can go to bed as early or late as I want, as my schedule permits, and still fall asleep right away. Perhaps for the first time ever, I feel good about how I manage my sleep.

Previous writing on somewhat related topics: Productivity and performance hacks, The calculus of caffeine consumption.

Adjustable standing desks wobble like an old drunk on a bridge in an earthquake during a hurricane

After improvising standing desks for years at home, at work, and in hotels all over the country, I finally got myself a legit electric sit/stand desk at Princeton. Sadly, it's been a disappointment.

The problem is that since it has only two legs, it's wobbly. When I type, my monitor shakes enough to be jarring and distracting. I've tried touching the keys more softly, but it doesn't help. It happens even when the platform is lowered, but it's especially acute when it's raised.

At first I thought the particular model I bought must be faulty, but I can't imagine a two-legged desk not having this issue. Also, here's someone else complaining about the same problem with a completely different setup.

This is mainly a PSA for others who might be considering buying an adjustable standing desk. Somehow all the glowing articles I read failed to mention this dealbreaker. If you have any suggestions for hacking together a solution, I'm all ears.

Edit. About half an hour after my post, the person who runs Beyond the Office Door (from where I bought the desk) emailed saying I shouldn't be having this problem and to give him a call. That was a pleasant surprise. It's pretty cool what the Internet is doing to customer service. I'll update again once I have a chance to call.

Where are all the funny ladies?

Over the years I've watched a lot of stand-up comedy online. I can't help but notice that there aren't many women doing it, and the ones that do, well, frankly, kinda suck.

One problem is the limited topic selection. On ChickComedy [1], for instance, the majority of monologues seem to be about relationships. But here's a bigger problem: to be funny you have to do the work of writing jokes rather than just go on stage and talk about your life in a humorous or exaggerated way. The latter might work when you're telling your besties about your day over dinner, but for stand-up the bar is higher since you're talking to strangers who don't care about your life. While there are unfunny male comics and unfunny female comics, it seems to me that women fail more often at meeting the basic requirement of coming up with good material.

The best comedians are two steps ahead: not only are their bits fabricated (even if inspired by something that happened), they expect their audience to be aware of and comfortable with this fact. For example, Louis CK once went, "So I was in a bar the other night. [Pause]. Doesn't matter where, cuz I'm lying. [Roar of laughter.]"

To be sure, there are several women whose standup I've enjoyed watching tremendously — Ellen, Sarah Silverman, and Chelsea Handler come to mind — but they always seem to go on to bigger things. Where are the female George Carlins and Russell Peterses?

I suspect there are evolutionary and/or cultural reasons why we laugh more at jokes told by men than women, so it's definitely going to be an uphill battle. But I don't think it explains the level of discrepancy that exists. Any theories?

[I realize it's easy to be an armchair critic, especially of things you've never tried doing yourself. That said, I'm spending more money on stand-up these days, and if this post leads to suggestions of funny women I wasn't aware of, and I pay to go see them, that will have been a constructive outcome.]

[1] ChickComedy on Youtube. Warning: autoplay.

Slightly dazzled: Impressions of a Foo Camp first-timer

Last week on Google+ I wrote:
Foo Camp: best f*ing conference I've been to in my life.
In this post I’d like to elaborate on that statement.

The first thing that hits you when you walk into Foo as a first-timer is that even though you haven’t met most of the people, many, perhaps the majority of the names are familiar. You look at the badges and go, “oh wow, it’s [person who did cool thing X]” about 20 times in the first five minutes. Some of these people are well known in their respective communities, some are well known more broadly in tech, and a few can’t walk around on college campuses without being mobbed by adoring fans. No, really.

But if that were all there was to it, it would be nothing more than a schmoozefest. But you soon realize there’s a lot more.

A glimpse of a post-credential world.

Initially it struck me as odd that there were no affiliations listed on the name badges. But it didn’t take long to realize the true significance. Your credentials and affiliations count for little or nothing here; you’re not defined by who you are, but by what you’ve done. This works because everyone here has done something cool that you can immediately see the value of, even if you haven’t already heard of it. It felt liberating not to be put in a box — something that happens frequently in academia (“oh, so you’re a security person?”) — and to lose the tendency to put others in a box.

The value of filtering.

Foo is an invite-only conference. In addition to the doing-cool-things filter, there seem to be others in play. One of them seems to be “interestingness”, which I won’t try to define; it gives a certain character to the crowd. And whether or not it’s because of an explicit filter, sexism was noticeably absent from the event, something that all tech-related conferences can learn from. (But I'm a dude; anyone care to corroborate or refute?)

Where are the immigrants?

Tech in the US is a field with a heavy immigrant representation, and so is entrepreneurship in Silicon Valley. I would have expected the demographics at Foo to roughly mirror this, but I was surprised. I met maybe one or two other Asian immigrants (although there were a small handful from Europe/the UK/Australia and other countries). I have my guesses for why this is the case, but I just want to bring it up as something to think about.


I’ve written before about the sexing up of hackerdom. While I had a negative tone in that post, I got to appreciate the awesomeness of it at Foo. The quality of speakers at the Ignite session was amazing and the atmosphere was electric. Overall, the majority of Foo participants have great social skills and story-telling skills, and I suspect many of them could walk into a random party and be the center of it.

Is it worthwhile as an academic?

Needless to say, this was way outside my normal academic ambit. I’ve heard academics say in the past that they couldn’t see the point of it. But I think that’s an unfortunately narrow view, and you shouldn’t expect this to be like an academic conference. It’s pretty close to the antithesis of one. I didn’t come away with much in the way of actionable ideas; the group was too unfocused for that to happen. I suspect SciFoo might be different. (On the other hand, if you’re a hacker looking to build things, I’m sure Foo works well to find ideas and collaborators).

Instead I was inspired and learnt a lot about a diverse range of topics, and that alone was worth it. It’s also a good way to get a feel for what the future is going to be like in a few years. And given that this community is so different from academia, it made me constantly notice things that we could be doing differently as academics. Obviously, not all of the differences are pertinent, but a few are.

On that note, I led a session debating the value of academic research with three very smart people, Anthony Goldbloom, Pete Warden and Hadley Wickham. We ended up agreeing a lot — Hadley and I are both practically-minded academics, and Anthony and Pete are research-minded entrepreneurs. We heard a lot of great perspectives from the others in the session as well.

Observations from Chicago

A couple of weeks ago I was in Chicago as a tourist. It was my first time in the city. The usual caveats about my "observations" posts applies — I spent all of 48 hours there, and probably don't know what I'm talking about.

Somehow, during this trip I got into my city groove again. That involves, among other things, talking to strangers. A lot. Whenever I do this, incredibly weird things happen — like walking into a random bar in Ukrainian village and finding that the first person I talk to is someone I apparently went to middle school with back in India.

Anyway, without further ado:


Driving seems to be the easiest way to get around anywhere except downtown, and possibly even downtown. I think the opinions I heard about driving being a nightmare are greatly exaggerated. Parking is apparently expensive, but whatever.

The metro is quite decent as well. Overall I think the transportation options are great.

There were far fewer cyclists than I would have expected. I suspect this is because of the weather, especially the wind.

There is cellular coverage in the Subway! Why is it different from New York?


The city is quite segregated, way more than New York. It's amazing how the demographic on the Metro changes from all-black to almost-all-white within a couple of stops.

East Village has a lot of character. For example, there's a Mexican dude selling vegetables all day out of the back of a truck at the corner of Paulina and Chicago. Nice of the cops not to shut him down.

Hyde Park (where Obama lived), is a Black neighborhood that's not poor. I'm still trying to develop an intuition for such neighborhoods. For example, it's impressive that they stay segregated despite the apparent absence of economic stratification. Impressively bad, that is.

I failed to get the supposed snooty vibe from Lincoln Park. Maybe I didn't spend enough time there, or maybe I'm snooty myself.

Colleges and universities

There was a surprisingly large number of colleges/universities in the areas I visited. In some places, one in every block, or so it seemed. And there was a student center (housing + recreational facilities) that is shared by four universities. 

The University of Chicago is... unique, both the architecture and the atmosphere. My first thought was that it looked exactly like Hogwarts. Definitely worth a visit.

I hung out at DePaul for a while, and the vibe was interesting. The kids seemed excited to be there, just in the course of a normal day. Later I looked it up and found that it has often ranked #1 in student satisfaction.


I talked to a Chicago native and was blown away by how thick the accent is. I had no idea. I guess we hear very diluted Midwestern accents in the rest of the country.

I took a chance on the Lincoln Park zoo, even though it was on the standard list of tourist activities. It was actually quite nice.

There was a secret service vehicle stationed outside Obama's house — where he still spends his holidays — but otherwise everything is normal. There is an elementary school directly across the street from his house, and children were playing on the street. When those kids grow up, they will probably have amazing memories of playing right outside the gate of the President's house as five-year olds.

This spammer is a Magnificent Bastard

I've watched with fascination as spam has grown more sophisticated over the years. This email I received earlier today is among the best I've seen:
Hello Arvind,

Are you the person responsible for adding web content to the following page: 33bits.org

I am one of a small group that recently began a comprehensive online project focused on educating interested people about computer science. The website started as something small and has since grown to include thorough resources on things like the PERL language, human-computer interaction, computer animation, and even the evolution of computer science as it intersects and changes musical technology. Most of all we aimed to make the project accessible and have seen it put to good use so far.

I'd love to share the resource with you -- would you be interested in checking it out, perhaps offering feedback, and exploring the domain? It would be such a pleasure to hear from you!

Olivia Leonardi

As we look ahead into the next century, leaders will be those who empower others.
Bill Gates
There are so many things to admire here — figuring out my name and email address from my blog (although that's very common these days), the fluent prose (by spam standards, of course), the touch of verisimilitude via the quote, and most of all, the reasonably good customization of topics mentioned to the topic my blog covers.

It would be very impressive if this operation were fully automated, but I suspect there is some human involvement here, simply because that's probably cheaper.

I get enough spam because of my blog that it's obvious at a glance that it's spam, but I bet it's good enough to fool a lot of people. It would work even better if they added a check to make sure they don't send more than one to the same author. Here's another one I got; you can see the impressive degree of customization:
Hi Arvind,

I am curious if you are the person responsible for adding content to the following page: 33bits.org/2009/12/02/the-entropy-of-a-dna-profile

If not, feel free to forward me on to the correct person! I came across your page during my research for a project for which I am contributor. It is a research project that examines how biology has evolved from being a scientific study into a practice that has the power to affect global change for the better. The recently completed resource offers articles with an insightful look for anyone considering or currently in the biology field.

I would love to send over more details about this project and partner with you, let me know!

Thanks for your time. I look forward to working with you!

We are what we repeatedly do. Excellence, therefore, is not an act but a habit. - Aristotle
I wonder what's the play here — to get people to contribute articles to a spam site? Or just link to them? Either way, as much as I hate spammers, I can't help but wish this one good luck :-)

Comments on Google+

Exercise and Diet Update

In the last year or so I've done very little weight training because of intermittent health problems, because of the amount of time that a gym routine eats up, and plain old excuse-making. As a result, I'm about 25% behind where I used to be on most exercises. I'm hoping that most of this is attributable to loss of neuromuscular adaptation than loss of muscle.

I'm back to a regular routine now, mostly because I bought a set of weights at home. It's only 110 pounds total, but surprisingly I'm able to train most muscle groups effectively by varying form or substituting different exercises that target the same muscle groups (lunges for squats, etc.). I'll probably find it inadequate once I regain strength, but some extra plates should fix that. The only exercise that this set is useless for is deadlifts — the bar just isn't strong enough to load adequately. So I'm going to try to hit the gym once every two weeks or so, just for deadlifts.

The reason that the new regimen is working well is that lifting at home seems to require far less time than at the gym, for various reasons. I wish I'd known this earlier. I also hadn't realized how cheap these weights are — $75 on Amazon with free shipping. I don't know why physical stores even exist any more.

Diet-wise, the main change is that I've switched to brown rice. It helps me avoid food comas and blood glucose swings. It's totally worth it. I'm also eating less meat when I'm not weight training.

My daily pills now include Vitamin C and Coenzyme Q10, in addition to multivitamin and Omega-3. I've dropped green tea.

Holler if you'd like anything explained further.

Comments on Google+

When Half My Brain Woke Up

Over the years, I've had occasion to describe in this journal my experiences with various brain warts including sleep paralysis, medication-induced amnesia, and bizarre dream states that occur during sleep phase transition. Tonight I can add to that list perhaps the strangest experience of them all, something that happened barely a couple of hours ago. It appears to have been confusional arousal — waking up in a stupor — of extreme severity.

The backdrop for this episode is that I'm jetlagged from international travel, and have had unusual sleep hours during the last few days. Irregular sleep appears to increase the likelihood of most parasomnias including confusional arousals.

Anyway, I feel asleep at my desk while watching TV1 at around 10:30pm, and awoke about half an hour later. I use the word 'awoke' lightly. Very lightly.

I was dimly conscious, but most of my brain wasn't working. In particular, I had no idea who or where I was. You might wonder if I was scared. Funnily enough, I didn't have nearly enough cognitive function at this point to be scared, or to know that anything was wrong. You'll see in a moment.

I could perceive shapes and objects around me, but these held no meaning — I didn't know what I was seeing. The first improvement over this extreme stupor came after a few minutes, when I was able to tell if I was looking at one side of the room versus the other. Most higher brain functions remained elusive.

The big moment came when I realized I was a person.

This was the highlight of the entire experience. It turns out that you can be conscious — just barely — without your sense of self. I would have guessed otherwise, and I feel very fortunate to have experienced it. It is obviously impossible to fully describe in words, but without your sense of self you have bits and pieces of awareness floating by, without everything crystallizing into a coherent worldview centered on one entity, yourself. I'm sure it's entirely superfluous to remark that the experience is like nothing else.

The onset of self was most definitely sudden and not gradual. It was amazing, to the extent that anything can be amazing when you're in a bloody stupor.

Although I was aware that I was a person, I still had no clue who or where I was. But things seemed to happen faster after this point, which I suspect is an illusion due to my remembering more from this period. The big change was that I was actually able to direct my thoughts, rather than passively drifting through an ooze of semi-awareness. Naturally, I decided to utilize what cognitive powers I had toward determining my identity.

After some more time passed, I had made no progress on the who-the-fuck-am-I question, but I realized that I was in an apartment. I didn't know I was sitting, primarily because I wasn't yet sufficiently aware of my own body. Meanwhile, as I tried to recall who else lived in the apartment, my best guess was that I had a wife and a newborn, but I wasn't sure. (This turned out to be an accurate description of the main male character in the TV show I was watching when I got knocked out, which must be why I got that impression.)

Over the next few minutes, as my cognitive abilities continued to improve, I determined I was sitting at my desk and remembered that I lived alone. This made me realize in an abstract way that my situation was scary, but I wasn't able to feel scared in the usual, visceral sense of the word.

But the worst was over, and the final step was being able to recall my name, what I did for a living, and so forth. I then breathed a sigh of relief and slowly stood up to contemplate what had just happened and what to do next. Incidentally, as with most such episodes, I had a poor perception of time, but retrospectively it likely lasted less than ten minutes.

It gets boring from here, so the short version is that I made sure my brain function had returned to normal, called my neighbor over until I was sure I was out of danger, talked to a nurse on a 24/7 hotline who told me it might be TIA (mini-stroke) even though the symptoms I reported were nothing like it, and finally Googled my symptoms to conclude it was most likely a harmless parasomnia.

1When I say TV I mean Hulu on my laptop. Is that pretty much understood these days or does it need a footnote?

Comments on Google+

Observations from LA

It is impossible not to notice how hostile the city is to walking, and to me this was the characteristic that stood out more than any other. Even in the historic downtown district, the streets are depressingly wide and automobile-focused. 

In particular, the sprawl completely ruins Chinatown, which has a decent share of shopping but is totally missing the vibe. There were way fewer people around than I expected and both tourists and locals seemed apathetic or depressed about being there.

I need to figure out a better way to find a hotel next time. The cheap ones all seemed to be in bad neighborhoods, so I picked one that was moderately priced and had good ratings on Yelp, although some of the reviews described the amenities as "basic." That turned out to be a gross   understatement — "Spartan" would have been closer to the truth. It also had an insane system of not double but quintuple parking.

Santa Monica and Pasadena seem to be very good choices for places to watch pretty people walk by. And the houses in Beverly hills are pretty much how one would imagine them to be.

I had a disagreement with a friend about the fashionability of UCLA students. She said she was impressed; I was rather disappointed and felt they didn't even seem to be making an effort, especially considering the proximity to Hollywood. Other opinions welcome!

Finally, I believe that the story of human progress and civilization — past, present and future — is basically the story of increasing human population density. In this view, the success of megacities is crucial to the continued progress of our species. This is something I'm very interested in. 

Spending time in LA was therefore an interesting opportunity to reflect philosophically. The city (and the Greater Los Angeles Area in general) is an interesting and important data point. It's obviously not an ideal layout, but there's a lot to learn from it. Looking down from the Griffith Park Observatory at dusk upon a million flickering city lights that looked like a giant, pulsating brain was a particularly poignant moment.

Mandatory disclaimer: this is all based on a single weekend. Major cluelessness should be expected.

A cheap and simple standing desk setup for easy sit/stand alternation

Now that it's widely acknowledged that sitting will kill you and standing desks have officially become cool, those of us who got on the standing train a few years ago are feeling smugly superior ;-) Once you start doing it you tend to accumulate tips, tricks, and hacks to make standing work better, and I'd like to share some of mine to welcome newcomers into the fold.

My primary hangup in switching to a standing desk was the difficulty of standing all day. Several of my friends who tried it ended up abandoning it for the same reason. But here's the thing — standing all day is as bad for your health as sitting all day, so you shouldn't be trying to do that in the first place. What you need instead is a desk that allows you to easily alternate between standing and sitting.

The two main solutions I've seen are adjustable desks and high chairs. Both of these have problems. Adjusting a hand-cranked desk is frustrating and time-consuming, whereas electric ones are bloody expensive. High chairs are awkward and uncomfortable; you lose the other ergonomic benefits of good office chairs.

The most effective sit-stand solution I've found is also the simplest and possibly the cheapest: put a coffee table on top of your regular desk. Use two monitors (or a laptop and an external monitor), one underneath and one atop the coffee table. When you need to switch between sitting and standing, simply switch monitors.

Click to embiggen. Contents of whiteboards blurred to protect world-domination plans.

Problem solved. You're welcome.

Other points of possible interest:
  • I spend about two-thirds of my time in front of the computer standing and one-third sitting.
  • When sitting I simply use the laptop keyboard instead of having to move things up and down.
  • Unexpected side benefits: I burn more calories, and I'm much more likely to write down whiteboard-worthy thoughts. (As a researcher, whiteboards are important to my productivity.)
  • The incredibly thin keyboard in the picture is the Logitech Wireless Solar Keyboard. I recommend it!

Comments on Google+