iGetIt! Music

Online music education courseware for non-musicians who want to learn how to write their own rock songs.

My Photo
Name: Jim Plamondon
Location: Austin, Texas, United States

This blog documents the development of JIMS iGetIt! Music System (JIMS). JIMS' goal is to help you Understand Music in 24 Hours™, if you are (a) a non-musician (b) who wants to learn how to write your own rock songs. Requiring no instrument other than your own computer, and without using traditional notation, JIMS is being designed to deliver a deep understanding of tonal structure...in just 24 hours.

Saturday, February 6, 2010

Languages, Frameworks, and Idioms

I've recently realized that I'm not "re-learning how to do computer programming," as I had intended. I'm just learning
- new languages (ActionScript, [M]XML),
- a new framework (Flex),
- new development tools (Eclipse), and
- their relevant idioms.

The data structures, algorithms, and fundamental abstractions are all pretty much the same as they were 17 years ago. There are a few new concepts, but basically, it's old wine in new bottles.

It could be, that a more recently-experienced programmer would look at my code and ask "why aren't you using glorpization here?" -- and the answer would be, I haven't  a clue what glorpization is, because its use became widespread during my programming hiatus, so I never encountered it before.

One example of this, I suspect, is iterators. The use of iterators for traversing collections had only recently come into vogue went I left programming in the early 1990's. So when I returned to programming, using Adobe's Flex, I tended to traverse its ArrayCollections using indexing (that is, "for i=0 to foo.length") rather than iterators, whether implicit ("for each element in foo") or explicit ("cursor = foo.getCursor; result = cursor.findAny(key)...").

Another thing I missed was the introduction of associative arrays as an underlying mechanism of dynamic programming. "Static typing be damned -- just slam another property on that instance!" This was anathema, back then. Now, you can hardly turn around without bumping into associative arrays. XML appears to one big nested associative array. Flex depends on them.

It's quite odd to see a practice that was formerly considered to be a hanging offense -- "Egad! Self-modifying code! Run away, run away!" --  find its way into the core of modern programming.

I am still finding XML to be impenetrable. It's so simple that I can't understand it, because its (assumed) simplicity is shrouded in impenetrable layers of complexity.

My current confusion on the topic reminds me very much of how confused I was when I was first learning object-oriented programming (OOP). Everyone kept describing OOP in anthropomorphic/magical terms that clouded the issue. They'd say "message passing" when what they really meant was a function call. They'd say "overriding a method" when what they meant was a function call.  Only after I discovered C++'s vtables did OOP become clear to me.  At its heart, OOP was just a little bit of compiler (and runtime) code that maintained tables of pointers to functions.  It was simple. Why did everyone insist on hiding this simplicity with layers of complexity?

I'm pretty sure that XML is the same -- a very simple idea layered in complex crap.

For example, my online music education lessons rely heavily on the use of the computer keyboard as a musical input device.  I am quite aware that much of the world does not use the English language's "standard" QWERTY keyboard layout, using other layouts like QWERTZ, AZERTY, etc. instead.  I would like to write my code such that I can add new layouts without recompiling all of my lessons.

I've got all of the relevant data structures working just fine in my code, as in-line ArrayCollections of Key objects (which define a name, code, and physical position for each key) -- but I can't figure out how to implement them in XML. It ought to be brain-dead simple.  It probably IS brain-dead simple.  But I just wasted an entire day on this issue without making any progress whatsoever, as far as I can tell.  Too many layers of complexity around XML's simple core.

So, screw it. For now, I will continue to keep XML in the "too hard" file, along with fly fishing, calculus, preparing beef Wellington, and serialism.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home