Sunday, January 25, 2015

Finding enough hours in the day

Let me proselytize for a moment.

For as long as I've had a job, I've been frustrated and intrigued by the conundrum that I work eight hours of the day, I sleep another eight (give or take), yet do not seem to have much time for anything else. That's only sixteen hours out a twenty-four hour day. What gives?! My commute is a ten minute bike-ride, so that can hardly be responsible.

Unrelated sidenote: But "what about progvember?", you ask. Well, it was very educational, although nothing came of my project beyond a REPL-loop which could perform basic arithmetic.

Oh, and C++11/14 is awesome and I love it to bits.
One of the obvious culprits, it seems, is that sleep is fuzzy. You do not instantly go from doing something meaningful to being asleep, and you do not instantly wake up to be productive. Winding down, and winding back up again, takes its fair time. There doesn't seem to be much you can do about this, at least nothing that yields a significant amount of additional time.

Below is a rough sketch of a "normal" weekday in my life:

Snooze... snooze... snooze... I don't want to wake up yet...
Getting ready for work.
Buying dinner and going home
Dinner and housework
Projects OR exercise OR dicking around on the Internet because I'm too tired to do anything meaningful
Winding down. TV, books, general chillaxation.
So... where the hell does the time go? An obvious time-thief is as already mentioned the rather long winding down-period. It's frustrating, but I've determined I need this in order to get to sleep, as doing more productive things that close to the end of my day would interfere.

Sleeping also takes a lot of time, but again I can't really reduce that without cognitive impairment. 7h30m is about as low as I can go. I've tried 7h, but then that had me crashing on the weekends.

Not listed, but very significant is a third problem: The blocks of time in which I can be productive are small and discontinuous. Most things worth doing have a significant wind-up period, ensuring that try as you might, very little productive can be accomplished in these stray pockets of free time.

A couple of years ago, I stumbled onto the solution to this problem. Since very few other people were actually in the office this warm and clammy summer month, I was stuck with some pointless busywork. Bored out of my mind, and itching for some challenge in my life, I decided if I was going to be unproductive at work, I might as well go to work in the evening, when I wasn't as productive anyway. To illustrate what I mean, consider this "day":

Wake up
Time for projects, cooking breakfast/lunch, savoring the morning, exercise, what have you.
Getting ready for work.
Buying dinner and going home
Dinner and noisy housework. Pro-tip: Your neighbors will hate you if you vacuum at 04:30 in the morning.
Winding down

The day has not sprouted more hours, but it certainly feels that way. Because the free time is in a four hour continuous block, and because spending that time doing something exciting is not going to negatively effect your sleep (which is 12+ hours away), the time can be invested much more effectively.

An unexpected result was that my Stick It to "The Man"-attitude was completely unnecessary. My productivity at work increased every bit as much as my productivity at home! This is in part because the new sleeping hours allowed me to come into work with my brain already fully active, rather than having to spend over an hour trying to wake up. There have been mornings where I got more done before 10 o'clock than I'd usually accomplish by noon.

Another curious effect is that I didn't snooze the way I used to. Although I could hypothetically snooze for hours upon hours, I usually flew out of bed ready to get cracking on whatever project I was working on. On the 08-00 sleep schedule, the snooze buffer in the beginning is also a sort of crumple-zone in case I had a bad night's sleep, ensuring I can still make it to work at a reasonable time. That's obviously no longer necessary on 04-21.

There are of course drawbacks as well. Hitting the hay at 9 o'clock does tend to limit your options to meet other people than coworkers. It's also a bit of a pain to get back to 04-21 if you've for some reason had to change to 08-00. Finally, you need to plan your food purchases more than you're probably used to, as the window of time where grocery stores are open, you're awake, and you're not at work is greatly diminished.

Ever since I had this epiphany, I've switched back and forth between the ways of sleeping every couple of months. Each has distinct advantages and drawbacks, depending on what you wish to accomplish.

Saturday, November 1, 2014

Progvember 2014 hype

I'm doing progvember this year. The point is to make something out of vinter, an interpreted toy programming language I've been working on recently. Lately I've been bad about completing my projects, so hopefully this will help. Vinter started as a way to partly get re-acquainted with C++, which I haven't used lately, and partly because I found this really interesting approach to language parsing by tree manipulation a couple of years ago I've been itching to make use of.

I don't have a public source repository up yet, but I hope to have one soon. Meanwhile it's all git on my local workstation. I started a twitter account for keeping track of my changes. If I've gotten the HTML right, it ought to show up below :-)

Thursday, October 30, 2014

Links from a week in bed

This post is just a short link dump.

I've been home sick with some never-ending flu for the last week. Adding cabin fever to the actual fever, I got a bit stir crazy and decided to look for some interesting "homework" to offer some mental gymnastics to take the edge off shuffling between the bed and the TV couch day in and day out.

So here's a curated list of links that kept me busy.


I decided to pick up C++11, since my grasp of the new standard is all too superficial. Especially what is promised in the title, that is rvalue references, std::move, and std::forward. I consulted google, but the answers I received were so contradictory I decided to ask the C++ google+ group instead. The replies received were of much higher quality:

Anyway, the links were so good I decided I should share them with the world. They made a world of difference. I highly recommend them to anyone with the same general sense of bewilderment I used to have.


Sticking to c++, I've recently decided CxxTest to be my new favorite testing framework for the language. Its code generation based approach is by far the least painless way of implementing unit tests in the language I've encountered.  This was before i got sick, but it makes the list anyway, as it's on my mental radar :-)


From a former classmate's feed on facebook, I discovered this webgl-based fluid simulator. What's possible in web browsers has really changed in the last couple of years. Heck, It wasn't even that long ago that simple javascript-based snowflakes boggled the mind.