Tuesday, January 17, 2012

A Day In The Life Of...

Here's an interesting way of thinking about life and perhaps putting it in perspective.  This may be motivational or demotivational to you; I'm not sure.

So let us say that you will live to 80 years old, which is reasonable in America.  Assume that your life was compressed into a single day.  Here is what it would look like.


Hour Age
6am - 7am 0 - 5 years old You just wake up. You're still a bit groggy, and are getting used to your surroundings.
7am - 9am 6 - 15 years old You are up and exploring the world around you. Going through some trials and having some fun.
9am - 11am 16 - 25 years old You venture outside, go to some parties, and hang out with your friends
11am - noon 26 - 30 years old You first arrive at work, and try to prove that you belong to be there
noon - 7pm 31 - 65 years old Your most productive hours at your job, and the time you really establish your place.
7pm - 8pm 66 - 70 years old You start to leave and retire for the evening
8pm - 10pm 71 - 80 years old This is your time to do as you please. Have a few drinks before bed, and enjoy yourself.
At 24 years old, It's only around 10:50 am for me; I have a long day ahead of me and must get to work!

Friday, January 6, 2012

Craftsmanship

Since finishing my classes 2 semesters ago, most of my graduate school time has been split between writing papers and writing code.  I must say I enjoy writing code more, but the papers have their purposes.

I have spent a good deal of time learning about how professionals write "good" code.  I put that word in quotes because good isn't an objective measure, and is different for each project.

But I have come to see a beauty in the algorithms, libraries, protocols, and such.  When I see a well designed project on github, or learn about how a large company uses version control to automatically distribute releases, or delve into the intricacies of the efficient and stable ZFS filesystem, I can't help but see the beauty in the system.

All the pieces have been so well designed, meant to perfectly fit together.  The internal structure of the gas tank doesn't need to be visible to the engine, and the internal structure of the engine doesn't need to be visible to the driver.  But when a car aficionado opens the hood of a well designed piece of machinery, he sees how beautifully designed every single piece has been, carefully fit together with its neighbor.

Then you take a step back, and realize that many of the pieces are actually used in other models.  So you take another step back and see the beauty of the manufacturing process efficiency.  Each piece has been designed minimize the ugly overhead of redesigning things for each new model, although this is sometimes necessary.  I saw a commercial for a new Lexus car, in which they touted making a fuel optimizer system which can input any type of fuel, "even ones that haven't been invented yet."  A simple improvement to a base system (such as a  nut or bolt) can have a ripple effect of betterment for far reaching systems.

I am no car aficionado, but that's the type of beauty I see in a piece of software.  And that's the type of craftsmanship I strive for in my own projects, research or otherwise.

Thursday, January 5, 2012

Food Cost Basis

My good friends Joe and Clair, with whom I spend New Years Eve 2011, have decided that I need to write more blog posts, and even went so far as to suggest that it should be my new years resolution.  So this is my first one of 2012.

As I think about the price of groceries, and food in general, I intuitively would look at the "$ / pound" label in the supermarket as my normalized basis for how much things actually cost.  But that doesn't consider the nutritional content, as well as the amount of sustenance (calories) you actually get for that $.

Let's consider Kraft's 4% Cottage Cheese.  Shoprite had this for $1.89 / container this week.  The nutritional information lists 120 calories per 1/6 container.  That comes to 720 calories / $1.89 or 380 calories / $.  If you were on a 2000 calorie diet per day, it would cost you $5.25 to eat only cottage cheese that day.

If we look at a Subway Spicy Italian Sub, the footlong sub costs $5, and contains 960 calories.  So that would cost you $10.40 per day, or 192 calories per $.

Just for fun, let's consider vodka.  A handle is 1.5 liter, and contains 50 oz.  In 80 proof vodka, 1 fluid oz is 64 calories.  This means that vodka gives you 162 calories per dollar.

So this is just me ranbling on about random costs of food, and a list of some others I calculated can be found here, sorted by Calories / $.  Turns out rice is the cheapest; who would have guessed.  Also I completely ignored nutritional value in all of this analysis.  I should really consider macronutrient composition of various foods and how much nutrition you get per dollar, not just how much energy.  Maybe another time.