Archive for March, 2007

Problems relying on network time

Posted in Technology, Transhumanism, Travel on March 10th, 2007 by leodirac – Be the first to comment

Tomorrow morning at 7:00 AM I’m flying to Mexico to enjoy spring break.  And tonight, according to congress, Daylight Savings Time begins, which means the clocks should move ahead an hour.  The real question is if the computers which are running the clocks are going to listen to congress or not.

Normally I preach that network time is so much more reliable than manual, independent clocks that drift.  But today is totally different.  I’m trying to figure out what alarm I can set to wake up in time to get to the airport.

I can’t trust my "smart" cell phone.  No way that thing’s gonna get the time change right.  It’ll probably start spewing smoke at 2am tonight, based on its crappy behavior at the last DST switch.

I can’t trust the alarm in my Sonos, which usually wakes me up to KUOW.

I spent a while racking my brain to figure out which of my alarm systems was actually disconnected from the net.  It took me a while to remember, but my good old clock radio is disconnected.  As we approach the singularity and the world slowly wakes up, this problem is just going to get more pronounced.  Which is why we need to move to central configuration for things like this that can be changed by policy.

My advice: don’t trust any reminders coming from devices running on network time for the next 3 weeks.  If punctuality matters to you, double check everything against your wrist watch.  Unless you got one that runs windows.  (Sucker.)

Ignite Video on Geeks & Hippies

Posted in Humor, Seattle, Transhuman Morality, Transhumanism, Uploading on March 10th, 2007 by leodirac – Be the first to comment

The nice folks at Ignite posted videos for the rest of our talks from the second Ignite night, including my presentation on Why only Geeks and Hippies can save the world.  Watching it, I see that it’s a lot rougher than I remember.  The text as I intended to deliver it is available here, which might be a bit more coherent.  Anyway, here’s the video:

 

Enjoy!

Problems Scaling Ruby to Complex Systems

Posted in Personal Growth, Ruby on Rails, Software Engineering on March 4th, 2007 by leodirac – 7 Comments

I’m pretty annoyed with Ruby right now.  At least I feel that way.  Looking a little deeper I realize the source of the annoyance is, like usual, my own shortcomings.  My friends and I embarked on a software project a while back.  I helped talked the group into using Ruby on Rails as the framework over choices like Java or .net because I was excited about it.  Many had reservations.  Today I’m annoyed at myself for not listening to them more.

The biggest problem with an uncompiled language is that there’s no compiler to tell you when you’ve screwed something up.  The incredible power and flexibility you get from Ruby’s loose dynamic typing and mixin inheritance style means that the IDE and compiler really have no idea what’s valid when you type it.  Compare this to Eclipse for Java or Visual Studio for .net where once you type ‘objectname-dot’ there’s a list of valid methods you can call and what kinds of parameters they take.  If you get it wrong, there’s a red squiggly underline saying something is wrong before you’re on to the next line of code. 

Yesterday 3 reasonably good software engineers took a solid 3 hours to figure out that we were passing the wrong class of argument into a method.  The problem was exacerbated by the behind-the-scenes magic that Rails does to try to make your life easier.  We were passing a Tmail object into ActionMailer.receive, which might seem to make sense since the receive method that everybody who uses ActionMailer writes expects a Tmail object as an input.  But we had forgotten that you’re not supposed to call this method.  In fact ActionMailer makes it impossible to directly call the method we wrote.  Instead you’re forced to call the class method, which we had forgotten expects a string as input that it parses into a Tmail object for you.  And like usual, the error message is useless.  Bad error messages are the single biggest flaw with Ruby on Rails IMHO.  (Maybe just the easiest to fix compared to the other problems.)  This was particularly frustrating because we spent an entire day tracking down something that any strongly typed language would have caught instantly.

For a long time, I’ve argued that people should use the highest level programming language they can afford to.  A huge advantage of pointerless languages is that you can’t make pointer mistakes.  It’s simply not possible to write that kind of bug in the higher level language.  Coding therefore become faster and more reliable than in a lower-level language.  The only cost is run-time performance, and if you’re writing server code as most of us do these days, then scalability is generally not limited by performance.  I had assumed that this analogy would continue from managed-code languages up to the hottest new scripting language that seems like it’s flexibility might fulfill OO’s promise of code re-use.  Today I’ve changed my mind.  Ruby is not a higher level language than C# or Java. 

Conceivably, a really good IDE could make up for a lot of this.  But due to the run-time binding in Ruby it would never be perfect.  When selecting a development system, generally I think the language itself is really unimportant compared to the quality of the tools and libraries available.  OO languages are generally about the same.  But IDE’s matter so much.  And libraries determine how much you have to write yourself vs. using what others have done before you.

A friend asked me if I was writing this as a warning or a cry for help.  It’s both.  It’s a warning about the scalability limits of Ruby.  Many people intuitively suspect that Ruby on Rails won’t scale well, but they confuse the different types of scalability.  The most common complaint about Ruby is that its runtime performance is too slow to scale well.  As Cal Henderson’s wonderful book on website scalability points out, raw performance does not matter if you can add more servers, which you can with RoR.  But as I learned yesterday, Ruby on Rails does not scale well in terms of complexity.  A friend once aptly pointed out that 43 things was the largest site anybody had managed to build in RoR to date.  The current state of tools and libraries and aspects of the language itself make it extremely difficult to write and maintain large complex projects with many developers.

It’s also a cry for help, but not for our particular project.  You’ll see it soon enough.  It’s a request that if you’re working on Ruby or Rails, please invest in the tools and the robustness of the libraries.  The error messages in Rails are total crap, as I’ve mentioned a couple times before.  And the IDE’s really need to improve if the framework is going to see major use beyond hobbyists.