... created almost entirely by a bunch of volunteers

By the late 1980s, the world had many competing vendor-proprietary networking models plus two competing standardized networking models.  So what happened?  TCP/IP won in the end.  Proprietary protocols are still in use today in many networks, but much less so than in the 1980s and 1990s.  The OSI model, whose development suffered in part because of a slower formal standardization process as compared with TCP/IP, never succeeded in the marketplace.  And TCP/IP, the networking model created almost entirely by a bunch of volunteers, has become the most prolific set of data networking protocols ever.

I read this over the weekend in my Cisco networking book (last paragraph on page 21 of the CCENT book).  And it stopped me dead in my tracks.  The timeliness with OpenSim's 2nd birthday was just striking, and made me even more convinced that we are working on the future Apache of 3D applications.

Happy Birthday OpenSim.  You are a really tallented 2 year old already, I can't even imagine what you'll do at 4.

Thoughts on a new Era of Service

I, along with much of this country, even this world, was moved by Obama's acceptance speech yesterday.  Two things really make me hopeful about this new administration.  First, that expert opinions will be listened to.  Many highly technical fields, including much of Science and Security, were completely run out of town in the last administration.  Secondly, that you don't need to pass a loyalty test to get within 1000 feet of the president.  Rick Warren believes differently than President Obama on many fronts, many wanted him thrown out of the inaguration because of it.  But now we have a President that likes to have people around him with different points of view, to challenge his assumptions, and makes sure he's seen all sides of an issue.  How refreshing is that.

And, throughout all of this, I am really impressed by this call to a new age of service.  This has been a consistant message for the last many months, and it personally inspired me.  Being a software guy, I have a skill that is massively needed by non profits.  The tech team of non profits, if they even have one, is usually one or two fresh college graduates, with a massive turn over rate.  It is a set of skills they don't know how to hire, manage, or use, and one they can't afford to contract.  The net result is that most non profits don't really manage to leverage all these wonderful resources out there.  In the tide of this new age of service, I started thinking about what I could do to help on this front for our farm.  I offered my skills over break, and things are starting to kick off now.  Over the next few months I'm sure I'll have some new experiences to post up here about the whole process.

If you are a Tech person, I highly encourage you to look out there at non profits or causes you are interested in, and step up.  Become their webmaster, or spend a few hours a month helping them on some tech front.  You have a set of skills they desperately need, and even a modest investment of your time and resources can do amazing things in helping out those organizations reach their goals.

Ruby Snippet - Tagging mp3 files

For the npr shows that don't podcast, I use icecream to save them off for my own time shifting. The files end up with names like "car_talk_2008_01_17.mp3". Until recently, that was good enough, but the new Sandisk players that both my wife and I have only function on tags, not on filenames. Last night I wrote this small ruby script to fix that:

What's going on should be pretty clear, but I'll highlight a few things.  First we are iterating over ARGV, so this takes a list of files on the command line.  DateTime has a parser, which is actually pretty good.  Anything that looks like a standard date can be converted back to one.

Ruby methods always return object instances, which let you do things like

where you split on white space, capitalize the components in the array, and join it back into a string.

And to wrap it all up, we've got a great Mp3Info library as a gem. Wondering where the save call is? Well that's one of the wonderful things about ruby do blocks, the save is implicit when we end the block as mp3 goes out of scope. No need to make sure you clean up those resources or sync manually, because by doing the action in the do block all the setup / teardown is handled by the system. I used to be confused about do blocks, now I love them for this very reason.

Open Office 3 Trick of the Day - setting timings on many animations at once

First off, animations actually seem to work in Open Office 3.  Not like in Open Office 2 where they seemed to just randomly fire, or not, depending on sunspots.  Secondly, if you have, say, 27 pieces of text that you want to show up in sequence, all with a 1 second delay from the last one, you don't actually have to set them all individually (like it seems you would need to do).

Click on the first animation, scroll down the list of animations, shift click on the last one.  While still holding down the shift key, double click on the last one.  A single dialog shows up that lets you set the animation firing characteristics.  That is actually changing it for all 27 of them.  It's hard to believe this is how they meant that feature to be accessed, because it's so obtuse, and you would only find it if you randomly like to click things like I apparently do.  Honestly, I expect I'll be back reading this blog post as there is no way I'm going to remember this totally bizarre interface in a few weeks.

However it works, so no matter how random it is, I'm happy. 

What have you changed your mind about?

New Year's resolutions are broken by Feb, and New Year's predictions always seem to be a lot of chest beating.  However this year's edge question made me stop and think.  What have you changed your mind about?  It's a much more interesting year end round up, as it requires admitting you were wrong about things in the past.

So here is my list of what I changed my mind about in 2008, please throw on your own comments, or put up your own posts and send me a link.

  • Facebook has no value.  I really did think this for a long time, then a couple of high school friends found me on it, and I realized how it really helps keep together groups that have long since seperated for time and space reasons.  Writing letters is still dead, but some new form of that is popping back up in facebook.
  • Non fiction books aren't interesting, and the cliff notes give you everything you need.  After the number of times that I'd heard about disruptive technologies
    I didn't think I needed to actually read Innovator's Dilemma, then I
    did, while visiting Nick in WV, and realized how wrong I was about that.  A lot of what was really interesting and useful in the book never turned up in the chatter and buzz words I'd heard out of people in reference to the book.  After that I proceeded to read: The World is Flat, Blink, Here Comes Everybody, and The Big Switch.  Every one of them had some very interesting insights that I'd not gotten in the elevator pitches... insights that helped reshape how I think about certain parts of the world.
  • Java.  I really used to hate Java, then in 2008 I spent 2 semesters writing JavaME code for cell phone applications.  Java looked nearly elegant in that environment.  This got me even more positive about the Android platform, and hoping Sprint gets their Android phone out soon.

One step deployment of rails applications with git and passenger

I developed this pattern with mercurial, and have recently adapted it to work with git

Assumed

  • You want your production application to be deployed at /data/site/myrailssite on your remote system
  • You are running passenger for your rails applications (if you aren't you should really take a look)

Setting up the production target

First, create a rails user on your production system.  This lets your rails app run under a different id than you, or your webserver.  Privilege isolation is a good thing.

Next, mkdir /data/site/myrailssite and chown rails /data/site/myrailssite.

Next, su - rails, and cd /data/site/myrailssite && git init

Next, chmod 755 .git/hooks/post-receive

And finally add the following lines to .git/hooks/post-receive.

export RAILS_ENV=production

DIR=pwd | sed s/.git$//

cd $DIR && git --git-dir=$DIR/.git --work-tree=$DIR reset --hard && rake db:migrate && touch tmp/restart.txt

Setting your source repo to push to production

On your source repository git remote add production ssh://rails@yourhostname/data/site/myrailssite.

Then, finally git push production master, and you are off.  On any future change the push to production will roll the git tree to the newest revision on master, kick off the migrations, and trigger a passenger restart.  This is a really handy pattern for making life really easy for deployment, and I'm rolling this through all my project sites as I slowly convert them from mercurial to git.