Tuesday, January 7, 2014

Walking Desk

I'm always looking for new ways to work.  I have never hidden my opinion that the cube farm is the worst of all possible worlds, lacking the productivity of the war room/pit, and lacking the privacy and clarity of mind of the office.  And cube farms almost never offer the whiteboard capability of either of those.

But my criticisms do not end with the workspace.  It's widely noted that a sedentary lifestyle, lived by most tech and knowledge workers, is devastating to health in the workplace.  (Check out Get Up and Code for some more motivation than I can muster.) So many developers and other cube-dwellers do nothing but sit for 8 hours a day, using barely-if-at-all ergonomic equipment, most of the time with crappy posture.

So anything that gets a knowledge worker up and out of their seat is a good thing in my book.  I love the idea of walking meetings, and I've often had many productive business conversations while walking on the office walking trail.  Companies that have walking trails should promote their positive use more and encourage people to do their business in a very healthy way.

So it should come as no surprise that I have been following the trend in the tech culture of hacking your workspace to include those sit-balls, standing desks, and even treadmill desks.  Stand while typing? Walk while typing? Walk while coding?  Is this uber-productive and healthy, or multi-tasking gone mad?

Hanselman suggests in one of my favorite presentations of all time that one way to make more hours in the day is to do things while exercising.  Netflix + treadmill FTW, for example.  So it sure makes sense that those of us that work at computers all day should be able to make some use of a standing or treadmill desk.

Walking and standing desks are not really even that novel by now.  This experiment has been tried and written about.  Over and over and over again, to be sure.  I wouldn't call the concept mainstream, by any means, but it's not really new.

For example, I talked to someone at the office that wanted to try a standing desk as maybe being a little easier on the back.  I think that's a reasonable request to make, but the individual I spoke to offered that they didn't want to stick out and be the lone person with one-off or weird equipment.  It's a little sad to me that someone I know is afraid to ask for something that will physically help them because the culture doesn't encourage them to find the best way to work for them.

So score another one for remote work.  In your home office, you have the freedom to set it up the way you want.  I recently talked to a company whose entire tech staff all had some form of walking desk, and they all worked from a home office.  They suggested that I at least give it a try.

Sounds good.  I like to try things.

I have a treadmill that has pretty solid arms on it for support, so I thought I could probably fashion a temporary desk to try it out.  I happened to have an 8 ft scrap plank that was just the width of these arms, and some old scrap 2x4 for stabilization.  Here's what I came up with...

The Buildout

It starts with the bare treadmill.  You can see the arms that I'm going to place the plank on.

The invisible man went for a walk.  Naked.  In my shoes!

Nothing more than a strip of plywood cut to length with a couple 2x4s deck-screwed onto it.  The 2x4s sit just outside the rails so that the whole thing won't move left to right.

A very simple construction.
I placed the support over the beams.  It fit perfectly.  Here it is with the laptop sitting on it.  Trouble is, those bars are around waist level.  That means that my arms would be almost fully extended to type.  It was not comfortable to either look at the laptop or type.

The Invisible Man is now hanging out at the treadmill desk.  Still naked, that perv!
So we dreamed up a little top extension.  A platform on the platform, as it were.  This was made from the rest of the sheet of plywood from the platform itself and a couple scraps of 3/4" particle board we had remaining from one of our prior years' Halloween projects.

Here, Gamble helps me put together a top extension to the platform.
And once we put it in place, we saw a couple things.  One, the height was perfect.  Two, the support sides for the top extension hit the front handrest/heart rate sensors (I never use these, so I don't mind covering them).  I was going to have to notch those out.

Much better, but not perfect.
I build a lot of stupid little things around my house out of plywood and 2x4, when a rough construction will fit the bill, but I really don't like the look of unfinished wood.  I also don't have a lot of patience for stain, and don't like the cleanup of painting, but spray paint, spray paint I can do.  I took out a can of leftover black, and Gamble and I painted the pieces.
Then we waited for the paint to dry.  It took forever, like watching paint dry.  Then we screwed the top to the bottom, and put it up on the treadmill:

Here you can see the finished piece.  It's at the perfect height, and you can see the angle I cut the back of the top extension to fit.  Note also, the Invisible Man has finished his workout.
Here's the final product.  When not using a laptop, you can still see the stats fine, and it's only a bit of a reach to hit the numbers.  With a laptop, however, you can see precisely nothing.  That's kinda good, because as anyone who uses a treadmill can tell you, sometimes it's more motivating if you forget how far you've gone (see throw yourself at the treadmill and miss).

Sweet.  The finished product.  The paint is dry to the touch, but looks wet around the edges still.  
The Verdict

I can't give you a full verdict just yet, since I only used it for a couple days before heading to Codemash. Once I had this built, I got on the treadmill.  What I can say is that starting out, it's hard to get used to.  The first thing I tried to do was read articles on my feedreader, and I found that the side to side motion of my head and body made it a little tough to concentrate on the screen.

I also didn't really know what speed to start at.  Some people that use a walking desk recommend 2 mph, so that's where I started.  I usually warm up at a walking pace of 3 mph and go from there, but given that this is meant for long periods of time, I figure I'll go slow.  My treadmill doesn't really like speeds slower than 2 mph, so this seemed like a good place to start.

After 20 minutes, though, I found that sensation had gone away enough to try typing.  I opened up Webmatrix and pulled open the source to www.kevinpdavis.com, I pulled down a NuGet package and included it in a sample page, just to get the feel of coding.  It's a little distracting, and I didn't feel that I was super quick.  It felt like each thing I did took extra time, but maybe that was just self conscious.

After I got down, I felt a little sore in my back and hips.  It's been a while since I've been on regular exercise, so this isn't a huge surprise, but definitely unwelcome (that said, this is why I'm looking at using a treadmill desk, after all).

So this morning, I tried again.  I've written this entire article while standing, and it's been relatively comfortable the whole time.  I got right up to speed and started typing right away, and haven't really felt weird about it (well, maybe a couple times, but only for a minute or so).  It's been roughly an hour, however, and I'm starting to get tight in the hips and back, so it's probably time to stop for now, right at the hour mark.

Another Attempt
For us coders, a big question is whether it's possible to get into the zone while walking.  Can you concentrate on a difficult problem, using whatever tools you like, while walking.  I very much wanted to figure it out, so I made another attempt, this time with some work I needed to get done.

And it turns out yes, it's totally possible to code.  You eventually just kinda forget you're walking.  Until you get tired, or you get a little thirsty (the shelf is big and sturdy enough, however, to handle a beverage on it, but remembering to keep hydrated isn't obvious).

One thing I did notice is that after I got off, I had sea legs, where it was almost weird to not be walking.  I'd heard similar things from people who use walking desks, so it didn't surprise me that much.

If you have any feedback, recommendations, or experiences, I'd love to hear about them in the comments or on twitter @kevinpdavis.

Monday, January 6, 2014

Developing in Fits and Starts

In biology, the punctuated equilibrium theory suggests that evolution happens rapidly, followed by long periods of stagnation.  Organisms change and speciate, and come to an equilibrium for a very long time.

Today, coding made me think that development is a punctuated equilibrium, too.

I was working in a fairly large codebase with some deep dark corners.  Nothing far off what we all do; nothing special at all.  I was having trouble getting all the details into my meatspace, but was managing to get things done, code was progressing.

And then I hit a wall of "what the what?"

Happens to me from time to time, when a little detail will stymie me for five minutes, ten minutes, a half hour. Where you twist your head sideways to look at the code and wonder what the heck the code is doing.

I ran into a few of these today.  I figured them all out, but they each shut me down for longer than I would want to admit to anyone:

  • Where the heck is that css parameter getting set?  I can see it in the browser's "inspect element", but I can't see where it's coming from in the code.  Not in the HTML, certainly, and not in the CSS.  Oh, there it is, right there in the TypeScript file!
  • Why the heck is this object serializing to JSON differently than to string?  Does the ServiceStack.Text call the ToString() method under the scenes when serializing objects?  Is the "override ToString" code section here followed by ToJson() example a typo, or is that how it is supposed to work (My legacy object has a ToString() and a ToJson() method on it, and the service stack uses the latter.  Makes sense.
  • Where is the bug in my KnockoutJs code?  I'm sure I've forgotten a set of parenthesis somewhere, but I can't for the life of me find it.  Oh there's the little bugger.  Oh yeah, when I want to do a visible check against an observable property, I can check it directly, but when negating, I have to invoke it as a function.  A known property of the library, but darnit if I don't forget that sometimes.

Coding along happily, then boom, stuck in the mud.  Trudge, trudge, trudge, finally get out and get back in the rhythm, then bam, back in the mud.

Is my solution evolving?  Is that why developing happens in fits and starts?