Saturday, August 05, 2006

Ruby Cookbook, Joel, Google, LISP, Stu, Scripting

[long linky post...] I've reading/trying out the Ruby Cookbook this week. It's pretty amazing, and keeps getting in the way of the boring parts of my life, like the rest of my todo list. 850+ pages of cool stuff. Just the list of things you can do on the "Offical Unofficial Site" should give you a good idea of what it is capable of...

My KML Builder script keeps getting better and better- I am feeling confident enough now to build a GML script...okay, not that good yet. For the unitiated, Builder is a cool library that lets you write XML like this:

x.date {
x.year "2006"
x.month "01"
x.day "01"
}

which makes:

<date>
<year>2006</year>
<month>01</month>
<day>01</day>
</date>

The guy who wrote Builder, Jim W., it got the idea from Groovy, the Java scripting language, which has something quite similar. Fortunately not patented... Anyway, while the above example is really simple, just having it in idiomatic Ruby makes a lot of other cool things possible.

Speaking of things possible, Joel S. just wrote an interesting article which has pointed out some of the cool features of JavaScript (and ActionScript!), amongst other languages that treat Functions as Real Things. It's kind of like function pointers, but more flexible.

One of the upshots of this that Joel points out is that this kind of knowledge is required to understand things like Google's MapReduce (nothing to do with Cartography, btw)- which is why he is dismayed that Java is the instructional programming language of choice at the university level. Hey Joel- at least it's not PASCAL and Modula-2, not that I don't have a soft spot for TurboPascal. I know we can't all go to MIT and learn LISP, but maybe we should, now that this is available... I am thinking about recommending this to every developer in my company, am I nuts?

On that note, as Stu Halloway pointed out in a Ruby class that I scheduled for my company and my clients this week- Ruby is getting close to meeting Paul Graham's ideal programming language that has all of the nine ideas of LISP. By the way, Stu is an amazing instructor. If there is something that he knows about that you want to know about, I would make all efforts to get him to teach it to you. His knowledge of subjects is quite deep- and he brings all of that depth to the surface.

So, what does it all mean? We are approaching VB for the Web- Dabble DB is hot stuff, as is Rails, of course. We are are figuring out the basic operations of the current technology wave. It is getting to the point where the code that you actually need to write is potentially expressed in the language of the business- aka Domain Specific Languages, DSLs. Was the Arc/Info command line a DSL for GIS?

I spent all of this time trying learn "the right way to do things", which was about formalism and complexity, and now I am back to striving towards simplicity and writing things in scripting languages. The subtitle of the Ruby Cookbok? Recipes for Object-Oriented Scripting. My life is getting easier. Is it getting so easy that I am going to be redundant? This is how not to get outsourced- learn about what the mission you support is really trying to do- this technology stuff is going to be in the box soon! (hahahaha)

It's also about marketing yourself. I don't have much of a brand yet. Anyone want to write a book on Google Earth with me?

0 comments: