Contact Info

(for those who care)

Instant Gratification   

Sun, 24 Jul 2005

Denver Agile Conference

So work has sent me to the “Agile 2005” conference which is taking place in Denver.

Due to some confusion about registration dates, times, and online registration of things (pre-registering turned out to be not that great), some ~mixups~ on what sessions each person in our group were scheduled for. Thursday I think had the most full sessions, don’t know what exactly that means, but here’s the ones I was able to sign up for:

Even though some of them weren’t “first choices”, I still think I’ve managed to get a good smattering of information. I’m especially looking forward to seeing how other people are using FIT. If you haven’t had a chance to review the FIT source code and you work with Java, please do so. I guess it’s Ward Cunningham who originally came up with the FIT framework, but the entire thing is just so elegant. “Parse” objects that contain pointers to other “Parse” objects, a refreshing lack of getters and setters, incredibly dynamic ~typeless~, or automatic type conversion between HTML strings and expected native / interpreted types on method calls, and finally, the lisp-like “more” pointers to refer to subsequent tables, etc.

As a quck aside on the lispy-ness of the FIT code, I haven’t spent a lot of time with Lisp-proper. One of my favorite “strange” languages taught in college was ML (or Moscow ML). Everything that templates and dynamically typed languages do, ML does 10-times better, and is functional as well. Lisp was a language I could never “get my head around” as a pure functional tool (the way it was taught for a 1-2 week section of a college class). Maybe great for algorithms, but when you needed to open a file, store some data somewhere, maybe prompt the user for some input from a menu… Having self-taught with Basic, Pascal, and C prior to college, I just didn’t have enough exposure to it to un-hard-wire my way of thinking and switch over to a functional manner.

Anyway, I’ve been keeping up with a lot of the AJAX stuff lately, gaining a lot of respect for Javascript as a language that is much better than people first realized (classeless objects, prototypes, interceptors, lightweight syntax, etc, etc), and it’s been fascinating to see what “smart people” using Javascript have come up with, and how they compare Javascript to Lisp. (see, FIT -> Java -> Lisp -> ML -> Lisp -> Javascript -> Java -> I really do have a point! :^)

What caught my attention about “The little Javascripter” was the way he described Lisp lists using arrays in Javascript:

(quote (a b c))[‘a’, [‘b’, [‘c’]]]

My procedural brain immediately said “That’s dumb, you should be using an array, like [‘a’, ‘b’, ‘c’], besides, it’s much quicker and more memory efficeint” … but then seeing how Mr. Cunningham utilized Parses containing Parses in FIT, and accessing subsequent cells of the table as “this.more” rather than “this.globalRef.table[currentXPos][currentYPos + 1]” was enlightening.

Consider the following (I’m not going to bother compiling or testing this, so don’t get excited… it’s probably closest to python, but for now, just play along):

Procedural (using an array that’s indexed by counters):

ar = [1, 2, 3, 4, 5]

currentMax = ar[0] function max( currentMax, ar ): for x = 0 to size( ar ): if ar[x] > currentMax: currentMax = ar[x] return currentMax

Functional (using a list that supports “head = li[0]”, “tail = li[1]”):

li = [1, [2, [3, [4, [5]]]]]

currentMax = li[0] function max( currentMax, li ): if li[0] > currentMax: return max( li[0], li[1] ) else: return max( currentMax, li[1] )

…I’m specifically not going to make any claims about easier, faster, shorter, etc. But I just wanted to point out the difference between “array processing”, and “list processing”. What’s interesting to me about the list processing method is that:

Anyway, that’s enough noodling for me now, got to check out, change hotels, and get to the conference.

Updated 2005-08-28 to fix formatting.

11:31 CST | category / entries
permanent link | comments?

Like what you just read? Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.

Thanks for Visiting!