Wednesday, December 31, 2008

Power equipment is not always suitable

File this under "Note to self: consider using the shovel to find the paper under the snow instead of the snowblower"

Monday, December 29, 2008

Thanks and Gratitude

My family and I wish to extend our thanks and gratitude to our families and our community; the residents of our town.

At the end of October, the well-funded start up with which I was situated shed over 1/3 of its staff. Normally this type of event would be challenging in and of itself, however given that I funded the start up of my own company in 2005, the current poor economic conditions and the recent, rapid increase in living costs, this loss of income for our one-income family was particularly unnerving. My wife and I started planning for situations and circumstances that I would never have predicted only a few years ago and we prepared ourselves for a very modest and rather disappointing winter holiday season.

However, as we began the process of reining in expenses, a largess that we had not ever expected has been given to us that has made our holidays the most profound we have experienced. A multiplicity of support and generosity has been given to us in the form of gifts from our family (my nieces and nephews asked that their holiday gifts be given to our family), school lunches and assistance with our energy expenses, gifts provided to four of our five children from the elementary and middle school, and even an anonymous donation (yes! a check from an anonymous donor was delivered to us) that has enabled us to provide our children with a warm and intimate holiday celebration. We feel that this holiday season has been the most meaningful we have experienced and we owe a tremendous amount to our friends, neighbors and community.

Therefore, we wish to say "Thank you." Thank you to our families and friends; thank you to our neighbors; thank you to our community for all that you have done to help my family.

The generosity we received has also had another effect. Inspired by the spirit of giving, my eleven year old daughter decided to donate her hair to the Locks of Love program. So, she cut off a braid about 12" long and packaged it up. As pretty as she was with long hair, I think she's even prettier with short. Of course, I may be biased.

Wednesday, December 17, 2008

Humor for Programming Geeks

I have been viewing and reading these and would like to share them; they make me laugh a lot.

RailsEnvy.com Commercials. These are a series of spoof ads that take off from the Apple Mac/PC schtick.

If programming languages were religions... from the Aegisub blog walks us through a number of programming languages and assigns them to religions. This works on oh so many levels.

The inspiration for "If programming languages were religions..." was the "If programming languages were cars..." blog post. I love the first lisp entry. Oh, and PHP, that made me howl.

Go ahead, look for your favorite languages there.

Monday, December 08, 2008

Replacing ActiveRecord with DataMapper in Ruby on Rails

This is for the technically minded as it deals with replacing ORMs in a Ruby on Rails application.

I recently had an opportunity to do a little presentation and I chose to talk about replacing the ActiveRecord ORM (Object Relational Mapper) with DataMapper in a Ruby on Rails application. DataMapper was incredibly fast at returning records. For a single table look up, it took 0.0150% of the time that ActiveRecord took to return all 10,000 records. Holy Toledo!

Here, check this out. This is a series of benchmark runs between two nearly identical applications. They both have the exact structure, number of pages, etc. and same number of pages. But, one application is using ActiveRecord and the other is using DataMapper.

10,000 Records recalled with ActiveRecord









usersystemtotalreal
#1 1.050000 0.040000 1.090000 ( 1.227590)
#1 1.050000 0.020000 1.070000 ( 1.222924)
#1 1.080000 0.020000 1.100000 ( 1.250905)
#1 1.100000 0.030000 1.130000 ( 1.288719)
#1 0.860000 0.020000 0.880000 ( 1.724392)

Average: 1.342906

10,000 Records recalled with DataMapper









usersystemtotalreal
#1 0.000000 0.000000 0.000000 ( 0.000198)
#1 0.000000 0.000000 0.000000 ( 0.000196)
#1 0.000000 0.000000 0.000000 ( 0.000204)
#1 0.000000 0.000000 0.000000 ( 0.000205)
#1 0.000000 0.000000 0.000000 ( 0.000202)

Average: 0.000201

Datamapper requires 0.0150% as much time as ActiveRecord

One cool thing about doing this presentation is that when I started encountering problems with working on Rails in XP (although I know it is possible for the most part), I decided to create a Linux installation. My first thought was to repartion my hard drive and install Linux there. But, I'm using an older machine and was afraid of data loss (fortunately, I use an online backup solution for recoverability, but there is still all that work to do). Therefore, I ended up creating a persistable Ubuntu 8.10 installation on a 2 GB Flash Drive. That will have to be a topic for another post.

The presentation is available on SlideShare for your viewing pleasure. I walk through the steps in the presentation after a very quick overview of ActiveRecord and DataMapper. The source is available on github.

Please use the SlideShare posting and the github source for your resources. I used the DataMapper web site, of course, as a primary reference. I also used
François Beausoleil's blog, How to Use DataMapper From Rails, Including Migrations and Tests, to get started.

Monday, December 01, 2008

The Dumbification of the American People

One of my favorite made-up German phrases is "Der Verdummheit der Amerikanishebevoelkerung", which I translate as given in the title.  Seeing as my wife, a native German speaker, hasn't corrected me, I may have actually gotten this right.  However, this may not apply only to Americans and you can decide for yourself if this shoe fits.

In my neighborhood today we had an accident.  A house on Winthrop Street that had caught fire and burned on July 4th (we saw it as we came back from watching fireworks) was being demolished.  An excavator was ripping the house apart systematically.  My beloved wife saw the work in progress as she walked the dog and commented to me that the operator was driving the machine all over the rubble pile and the machine looked very unsteady as it teetered and tottered atop the pile.

Sure enough, the machine tipped backwards.  But that's not why Americans are dumb.  No, what has me all riled up is the way the accident was portrayed in the media.  I had the opportunity to walk by the accident before the excavator was righted.  It had landed on the roofs of the house next door and its garage.  I remarked to another neighbor that this certainly demonstrated the strength of our houses for the damage was minimal.  The roof upon which the bucket rested was not caved in, it didn't even look as though the roof was penetrated, just a little crushed.  The garage roof fared worse, but didn't look like it would take a roofer more than half a day to repair.

So, with a large exavator boom and bucket resting on the house, relatively minor damage was done, in my opinion. 

Oh, but the media.  "Demolition vehicle crushes occupied house" decries the Stoneham Sun. "Crushes"?  Oh, please.  The neighbor "barely managed to escape" claimed the broadcast on New England News.  Oh, seriously; she watched the darn thing slowly topple over and refused to leave her home for hours because she was fine.  (In all fairness, WBZTV was more balanced in its coverage, identifing simply that the excavator crashed into the house.)  

However, most of the images provided by the news organizations were from behind the exavactor.  These images mask the fact that the garage is a stand alone structure and the excavator landed on the roof of the den, which is a one story extension.  The images used make it look like fully half of the two story house was utterly crushed.  It was such an obvious manipulation that one of my children said, "They're [the news channel] is making it look like a total disaster!  It was nothing like that!"  



My point is that the hyping of the accident (which was pretty stupid from my outside perspective; but then again, I've never driven an excavator) creates a false impression.  One could easily conclude that the driver was grossly negligent, that the elderly resident was in serious danger, that Stoneham has huge oversight issues, that the damaged home is unusable.

And here is why I find that so reprehensible and alarming.  If our media organizations can turn such a small non-event into something that attempts to approach epic proportions, when where do they go with the important news?  By filling the American people up with exaggerated fluff, there is no room for serious news, serious matters and serious discussions.

In Jason Calacanis' essay, "The 120% Solution", Jason claims, 

... On average, we’ve:

  1. Spent well over 20% more than we should have on the price of homes.
  2. Built homes that are well over 20% larger than they need to be.
  3. Purchased 20% more consumer electronics than we needed. (In my case, 300%).
  4. Extended home ownership rates 20% beyond where they should be (to the mid-to-high risk credit folks).
  5. Gotten 20% fatter than we should be.

I would like to add that I think we have paid attention to only 20% of what we should have.  And being fed a diet of sensationalism is the root cause.