lesscode.org


Archive for July, 2005

Visual Fred?  1

Cat.: Python, Ruby, Perl
17. July 2005

I’d like to advise everyone attending OSCON with an interest in dynamic languages to not miss Sam Ruby’s pie-thon Update:

OSCON 2004 was the home of the pie-thon challenge, which pitted Parrot against CPython on a test of speed using a bechmark that Guido van Rossum designed. This presentation provides an update–not only on performance, but also on language compatibility, as well as an outlook on the potentials for inter-language interop that can be acheived by a common language runtime for dynamic languages.

I was lucky enough to chat with Sam about this a bit and the little I got out of him was intriguing. The blurb doesn’t go into a lot of detail but one of things he’ll be talking about is compatibility between dynamic languages at the runtime level. Here’s a sneak peek:

<rubys>    There is a big difference between Python and
           Perl. Ruby might be someplace in between.
<rtomayko> that's interesting. I've been seeing reports of 
           the same thing from the CLR and JVM crowds
<rubys>    my favorite example: what does 
           """ print  '1' + '2'; """ do?
<rtomayko> ahh
<rtomayko> and so the strong/weak thing is down at that level?
<rubys>    it is not just that.  "+" is a function in Perl.  It 
           accepts two arguments which have types.  It coerces them 
           to numeric values, and adds them.
<rtomayko> python = '12', perl = 3, ruby = '12' (i think)
<rubys>    "+" is a synonym for "__add__" in Python.  It merely is 
           the name of a method.  What it does is up to the first 
           argument.
<rtomayko> right, I see. and so all of these languages will have 
           to shift a bit.
<rubys>    shifting all the language a bit is what .net did.  And 
           you end up with "Visual Fred" (look it up)

Visual Fred was the name proposed for Visual Basic.NET by MVPs who quickly realized that VB.NET had nothing to do with VB due to the syntactic and semantic changes forced on the language by the common runtime.

The Ying and the Yang  2

Cat.: Theory
17. July 2005

My time has been split between Rails/Django research and reading Andy Smith’s excellent Why Frameworks Suck essay/rant over and over. I can’t really explain that.

Rails and Django Compared  21

Cat.: Then they laugh at you..., Rails v. Django
17. July 2005

Once Django is launched-launched, I’ll be comparing various aspects of it with Ruby on Rails. I plan on diving deep into the two frameworks so instead of one large post, I’m going to make this a running series.

While I’m primarily a Python coder, I’ve been dabbling with Ruby for about a year and have a couple of apps under my belt with Rails. They are admittedly simple apps but what isn’t with Rails? I’ve also logged 70-80 hours against a Python clone of Rails’ excellent implementation of Active Record, which put me pretty deep into the internals of that piece.

I am not a Python zealot. And, to be honest, I’m floating between the two languages as my primary. What I’m trying to say is that my interest is in exploring these two frameworks objectively and extending my understanding of each, not advocating one over the other. I will include personal thoughts on design and may favor one or the other at this level but I will not be concluding the series with a recommendation for either because, frankly, I already know which I’d recommend at present and it has nothing to do with technical qualities (hint: it has everything to do with this).

That being said, I can recommend that if you are building systems that require the complexity of a full-stack web framework (i.e. PHP, CGI won’t cut it) and you are currently using something other than one of these two frameworks in any language (including Java and .NET) on any platform, that you move swiftly to adopt either if possible. If there is something barring you from making that switch, well, where’s your patch? Make it happen.

I realize that many in the Python community have already grown comfortable with an existing framework (or more likely, have written their own, like myself) and that’s fine as there are some competent frameworks out there. But it has become apparent that Django will be growing a large community of contributors and that’s something no current Python web framework of this kind can boast.

As I write this, there are 30 people idling in #django on irc.freenode.net on a Sunday morning, two days after the none-launch; there’s been 409 bookmarks on del.icio.us. Granted this is all very much driven by hype right now as there hasn’t been any real experience with the framework, excepting the maintainers, but the outlook for a large community to finally coalesce around a single set of tools and conventions is promising.

I also want to mention that I spent some time talking to the Django maintainers last night and they’ve convinced me that the Rails comparisons, while unavoidable, may be somewhat premature. Although Django has many of the same traits as Rails, it wasn’t built as an all out clone and may appeal to a slightly different set of requirements. Time will tell, of course, but as of right now the similarities are a huge part of what’s driving interest in Django and there’s a good reason for that - Rails got a ton right.

Still, “because it’s in Rails” is unlikely to be considered sufficient justification for Django feature requests. That’s a sure way of creating a Bride of Frankenstein framework and I’m pleased to see the maintainers have a strong sense of this. Django is likely to follow many of the same paths as Rails but that’s because they were both designed under real life circumstances with similarly excellent philosophy.

Before I wrap this up, I’d like to echo the sentiments of one Rails supporter in his comments on Django:

I hope Rails learns to play with Django and they’ll not smite each other (if not friends, don’t be enemies). The world is big enough. A combined message from different camps will be more resounding than any one camp trying to say he is the bestest - and coming off as naive or clueless.

Indeed.

(warning: stomach wrenching, KUM BAI AH, everyone-hold-hands type stuff imminent)

The Ruby, Python, Perl, and PHP communities must understand the immense opportunities that await them should they accept that they share much more in common than not and that a unified front would go a long way in tearing down the barriers that have kept these technologies out of the mainstream. The amount of positive impact these disruptive technologies could have on existing forms of business and social interaction in general are limited only by our ability to tell the story.

Feeds for the series:

Guns, Germs, and Open Source  Comments Off

Cat.: Then they fight you..., F/OSS
16. July 2005

A colleague of mine had suggested on numerous occasions that I read the book, “Guns, Germs, and Steel“, by Jared Diamond. Wherein the author explains that the rise of Western civilization was due largely to a series of lucky developments that turned out to be so disruptive when introduced into other environments that there was just no chance of their old ways surviving.

Tim O’Reilly recently pointed to a bout scheduled for this years OSCON where Byron Sebastian, CEO and Founder of SourceLabs, will go toe to toe with Bob Sutor, VP of Standards at IBM Corporation, on whether F/OSS is to the Enterprise as Guns were to the Incas.

The format is interesting with Sebastian taking the extreme position of “open source takes all” and Sutor the position of “protracted struggle between proprietary and open source enterprise software”. It’s interesting to note that they couldn’t find anyone to champion the “proprietary takes all” scenario.

I’m not able to attend this years OSCON but I’m hoping this debate makes it’s way onto IT Conversations. If anyone attending wants to live blog the debate for lesscode.org, it would be much appreciated.

Django  7

Cat.: First they ignore you.., Django
15. July 2005

I’m not sure if I blacked out again and missed a couple of days there or if I’m just not paying attention but David Hansson, of all people, pointed me to Django today and I have to say I was impressed when I got there. Django is a web framework in Python that looks to have a lot of the same traits as Rails (is it okay to say that out loud?). That is, full stack, DRY, documentation, etc. — I’m sure we’re all familiar with the ingredients at this point.

Further, it seems to have the support of Simon Willison, who is not only British but also an extremely smart and pragmatic guy whose opinion I respect a great deal (so much so that I recently invited him to post here anytime he wanted). If I remember correctly, Simon did a stint over in Lawrence, KS a few years back and whatdoyaknow, this framework fuels lawrence.com as well as chicagocrime.org, which is one of the more interesting twists on social/awareness software I’ve seen. I’m not sure if Simon had a hand in all this but I do remember him speaking highly of his colleagues in Lawrence.

I haven’t had a chance to pull anything down and take a look just yet but it’s the first thing on my list. Also, it looks like they haven’t quite launched yet so go easy on them.