Saturday, February 23, 2013

The Standing Sloth

I returned to work after Thanksgiving last year, sat down at my desk and felt... absolutely gross. There was stuffing in my veins, broccoli cheese casserole in my gut and I could feel my flesh slowly molding around my office chair. The previous summer the Internets were all the rage about the famous infographic detailing how "Sitting is Killing You," and sites such as Lifehacker were consistently running stories of people constructing their own standing desks. I decided enough was enough and decided to try the standing desk thing.

The desk I was using at the time was huge, solid and immobile - a single and secured wooden boat in a 10' by 6' L-shape. There was no freaking way I could elevate it to standing height. At first I thought I would just build something roughly hewn from 2x4's but instead I noticed a blocky, simple accent table at Target. Worst case I thought I could saw off the legs to height.

In addition I had found an older storage ottoman sitting in my garage with a half-broken lid. It was quite nearly the same height as the two accent tables, so I thought I might see if it was of any use as well.

I placed both tables and the ottoman side-by-side on top of the desk. To my surprise the tables were the perfect height for a keyboard, mouse, monitor and a laptop riser. My arms were bent at a 90 degree angle, the top of my monitors were at eye level and I could shift my weight around to avoid locking my knees. For the first two weeks I alternated between sitting and standing... but soon I was standing 6 hours a day.

Here we are, over a year later. The only alteration I have made has been a comfort floor mat to stand on, and then only because I moved to a cement floor. I must admit that people mocked me for a good while... people kept coming into my office asking "what are you doing? Do you really stand all day? Really? REALLY?" And yes, co-workers sitting adjacent to me were treated to being eye-level with my butt all day.

People eventually got accustomed to me standing and even became interested in converting to a standing desk as well. A nice side effect is that it is easier to have conversations with people who walk over... no longer do I have to stare up their nose while someone asks questions from above. I lost (and kept off) ten pounds, which is nice. No more lower back problems either, which may have less to do with standing and more to do with me sitting like an crooked monkey.

Not bad for around $100, half of which was a nice standing mat. All I needed was busted furniture from home, tables made for a college dorm room and a laptop stand.

Thursday, February 21, 2013

Re-Examining Development Platforms

I've been granted an opportunity for perspective lately. I've done my best to steer away from .NET development up until recently - not because I had any particular gripes, but the technology platform just never seemed to be a great fit. C# as a language is pretty great... delegates, tail closure and nullable references are a welcome respite. VisualStudio isn't bad. If you judge IDEs by how many times they make you swear in a given workday, I'd say my four-letter word tally is comparable to that of me using Eclipse. In fact, once my development environment was up and running I thought I might grow to enjoy .NET development.

And then I started to use the foundation classes. First off... I'll acknowledge that no platform has ever been able to get dates and times "right." This is ever more apparent with .NET... who for some inexplicable reason have no real sense of this "epoch" thing that EVERY OTHER PLATFORM USES. Milliseconds since year zero are expressed as... integers? On top of that, time span arithmetic is only accurate when math is done using "ticks," which themselves are not really accurate to 1/10000 of a millisecond. I didn't go for the caesium clock upgrade in my current laptop.

Java developers often complain that anonymous classes are inelegant or verbose within Java. C# has abandoned anonymous classes in lieu of their delegate-based event handling system. However, C# developers exposed to anonymous inner classes actually seem to like them. A common gripe actually turns out to be a nifty feature when you're talking about event handling. The C#/.NET event handling mechanism isn't that fantastic... it's largely just a loose convention for using delegates. No extras or nice GoF listener patterns provided like a PropertyChangeListener.

Zooming out from design patterns and looking at .NET from an enterprise integration pattern perspective, the .NET platform is definitely at a major disadvantage when compared to JVM-based platforms. I've already covered the state of .NET integration frameworks but to recap: it's still nearly five years behind. My time with EasyNetQ has been great, but I still find myself wishing I could use Apache Camel to construct bigger things using common EIP components.

Despite the current rant, I've been fairly complacent with my new development platform. What really stirred things back up for me was when I cracked open the JMeter-Rabbit-AMQP plugin so that I could do RPC-based load testing of EasyNetQ services. Being a JMeter extension, JMeter-Rabbit-AMQP was a Java app that required me to fire up NetBeans once again and do some Java hacking. Once I did... damn. Until I made that sudden switch back I didn't see the huge gap that existed between .NET and Java development. While C# has some advantage over the Java language, the JVM platform is still leaps ahead.

Once you begin talking about instrumentation the gap grows even wider. I have grown accustomed to the fantastic introspection and profiling offered by Java Management Extensions and VisualVM; by contrast Microsoft's laughable implementation of Performance Counters has caused me more problems than it has solved. If it works (and it often doesn't due to permissions issues or outright registry corruption) there is no instrumentation that allows for live modification of managed objects or details on garbage collection. The actual .NET API to create and maintain performance counters is actually not bad, but the Performance Counter UI is so clunky and ill-conceived that it is often difficult to make use of it.

In the end... it doesn't matter. You do the best you can with the tenured development stack because ultimately it's not about the underlying technology - it's about the squishy, business-logicy brain inside of it. Keeping that squishy brain... err... braining is the most important thing.