It’s an often-brought-up problem among Flash developers that the DataGrid component’s sorting behavior leaves something to be desired. To wit, it tends to sort lexicographically and only lexicographically, which means that sorting on a numeric column produces something rather other than you’d intended – i.e., 1, 10, 100, 11, … ,19, 2, 20, etc.

I’ve seen a few different solutions proposed for this, but without going into the details of their various shortcomings, I think I’ve done most of them one better. [code lang=”actionscript”] private function useNumericSort(columns:Array, dg:DataGrid) { dg.addEventListener(“headerRelease”, function (evt:Object) { var dataGrid =; var data = dataGrid.dataProvider; var column = evt.columnIndex; var columnName = dataGrid.columnNames[column]; var direction = evt.sortDirection.toUpperCase(); var sortOptions = 0; var useNumeric:Boolean = false; for (var index in columns) { if (columns[index] == column) { useNumeric = true; break; } } if (useNumeric) { data.sort(function(recordA, recordB) { var a:Number = Number(recordA[columnName]); var b:Number = Number(recordB[columnName]); if (isNaN(a)) { a = 0; } if (isNaN(b)) { b = 0; } return (direction == ‘DESC’) ? (b-a) : (a-b); }, sortOptions); } else { sortOptions |= (direction == ‘DESC’) ? 2 : 0; sortOptions |= 1; // case-insentitive data.sortOn(columnName, sortOptions); } }); } [/code]

Call this with an array of column numbers and a reference to the DataGrid to apply it to. For example, for a DataGrid called order_dg having numer values in columns 0, 3, 4, call it thusly: [code lang=”actionscript”] useNumericSort([0,3,4], order_dg); [/code] Naturally, there may be some modifications for your particular needs…

*update: Found some apparent typos in this function and fixed them. Apologies to anyone who tried to use it as it appeared originally.

I meant to write a little something about it when it happened a couple weeks ago, but it sort of got lost.  Anyway, Cedar Falls-based band The Beat Strings got a mention in Entertainment Weekly’s “download this” sidebar, where readers were invited to download one of their songs from EW’s web site.  I don’t know who XOXO Records has doing promotion, but they probably deserve a raise.

The Beat Strings are really a pretty darn good band.  I’ve seen them a couple times and recall really enjoying them.  Among its members are a couple of good acquaintances/friends of mine: Cody Brown, and Steve Wilson, who I played in No Consensus with some years back, who in more recent years has been playing in another fine outfit A Is Jump, and who I believe to be a really talented cat who deserves much success.

Best wishes to The Beat Strings in their continued journeys through the music business.  The rest of y’all, check them out.

Finally, someone with a little more credibility and exposure than myself attempts to explain some of what I’ve been trying to tell people about intelligent design, in this article from today’s issue of my local paper, the Waterloo-Cedar Falls Courier. (In the interest of fairness, here’s another perspective on the subject that I rather liked.) Unfortunately, it seems they went a little light on quotes from the professor who is supposed to be the suibject f the article, to make more room for quotes from others of the same old lines against ID that we’ve already heard time and again. I suspect Dr. Gonzales had several more interesting things to say in his interview that we didn’t get the chance to read.

Taken as the possibility that the intricate workings of nature and the universe bear the hallmarks of being the product of an intelligent organizing force, as they appear to many to do, ID is essentially a scientific hypotheses. Exploration of this hypotheses would likely marshal resources of scientific intellect from the fields of not only biology, chemistry, and physics, but also from psychology and artificial intelligence, and such a line of inquiry may now have access to technological resouces without which key angles of research may have been unfeasable in the past. It’s also a field of scientific inquiry that by necessity strikes at the very nature of intelligence and creativity. For those reasons, I think it’s worthwhile as science.

What I think is screwing it up for everybody is more of the same religious and anti-religious zealots that have been scewing up lots of good things for everybody for a long time. Religious zealots being far too quick to jump at any mention from the scientific community of the possibility of intelligent forces at work in nature as scientific legitemization of the whole body of their particular brand of religious dogma, and anti-religious zealots being equally quick to confuse that same acknowledgement with the whole of religious dogma itself. And a high degree of misunderstanding and misrepresentation of science itself on both sides, such that you’d think most of these people must have grown up attending American schools during the past few decades or something. Oh yeah…

There’s also the continuing presentation the debate as a simplistic ID vs. Evolution dichotomy.. I was under the impression that ID was never intended to be a direct refutation of the whole of evolution theory, but merely a new theory worth looking into. Sure, it does strongly suggest an alternative to evolution, but I don’t think it takes a whole lot of imagination to think of ways that evolution and ID might coexist and even be compatible – but then, imagination is another thing that seems to be lacking among many of those in our society who shout loudest. Besides, evolution has become a bit of a dogma itself and could probably use some questioning – what are the anti-ID crowd so afraid of? If evolution is such a solid theory, it ought to be able to stand up on its own merits against the consideration of competing theories without need for forcible suppression, right?  In fact, would not evolution, assuming it doesn’t crumble before a particular line of criticism, emerge stronger for the reconsideration?  I was of the impression that continual review and re-examination of theories and alternative theories is what keeps science strong.  If that is so, then I submit that the protests do evolution theory no favors.

Anyway, I think asking or stating simply whether ID is or isn’t science misses the mark. What makes something science is not what is studies, but rather how it is studied. Debating over whether something is science is about as much use as debating whether something is art. Science is not so much a subject or a set of subjects, as it is a process by which we may endeavor to learn about almost any subject. And even being refuted or unpopular in the scientific community doesn’t make something not science, any more than we would now say that Goldman’s Causal Theory Of Knowing, being “no longer defended,” therefore no longer qualifies as being philosophy.

Thus I think that any impulse that seeks to limit what questions science ought to explore (laying aside issues of science being used in destructive or unethical ways, which I think are more a question of the application of knowledge that is the product of science, than of science iteself), and therefore the movement to remove the very question of intelligent design from the realm of science, is in my opinion wrongheaded.

But then, what could I possibly know? I’m just a public-school-educated undergrad who works a software gig.

Now and again a stray memory of something interesting I ran across in my past will pop into my head, and send me a’Googling. Often times, it’s something obscure and I come up empty and wondering if maybe the thing actually extists, or is a product of my meandering imagination, or simply too inaccurately recalled to be found again. Occasionally, however, a second attempt, or a bit more persistence, will turn up just the odd bit of trivia I was looking for. Those times, I want to share it, and maybe attract some new interest to it. Today that thing is the CEEMAC graphics programming language and its highly passed-around demo, Fire Organ.

Two old 5.25” floppy discs among the hundreds in my closet bear these names, but it’s been some time since I’ve tried to see if either of them will still boot on any of the old Apple II machines I still have around. If CEEMAC was ever implemented for any other platform than the Apple II series and its compatibles, I’m not aware of it. What I do remember is as a youngster being quite impressed with these collections of beautiful patterns of moving, changing curves and shapes. When the phenomenon called a “screen saver” first began to appear in my environment with similar moving patterns, I remember at first thinking that CEEMAC had hit the big time. I also remember once or twice stumbling upon the key command that would drop either program into a text-editor environment giving the source code for the particular piece being viewed, and being highly intrigued, but never quite getting around to learning how to make my own CEEMAC “scores.”

Anyway, I now find that someone else out there remembers CEEMAC and has put up a tribute on the web. Old-school Apple II geeks and anyone else who derives pleasure from near-forgotten gems from personal computing’s past ought to give it a look.

Via a completely off-topic post in the forum over at The Daily WTF comes this nifty link: TIOBE’s TPCI - The Programming Community Index, ranking the popularity of programming languages. Java is still going strong at the top, despite a perceived backlash. But I have to ask myself, what’s with the sudden jumps in the rankings of Visual FoxPro and ColdFusion? The statistics seem a bit suspect there – certainly I’d not been aware of any major boom in those languages. The language I’m currently making my living in, ActionScript, comes in way down at 28th, while I’m pleased to see that “Lisp/Scheme” is approaching “mainstream language” status with an A– rating and a ranking of 14th, up three positions from a year ago. I suspect this may be in part due to their lumping Lisp/Scheme dialects together as one entry, however, whereas C and C++ are kept separate, as are other languages that are highly similar and/or closely related. I suppose it’s hard to say sometimes where to draw the line between certain languages, or even to define what a programming language really is. I notice no mention of JScript, so I wonder if it is considered equivalent to JavaScript – both of them are ECMAScript-derived, but then again so is ActionScript. Anyway, had they made separate entries for Scheme and Common Lisp, I suspect neither of them would have as high a showing individually as does their composite entry. Interesting information nonetheless.

Last weekend, it hit me that the age of several of the CD-Rs I had burned of Ragman stuff might be approaching the upper end of their lifespan. See, when I first started the project of cataloging and organizing the myriad 4-track cassette home recordings made in the geographical and social vicinity of Joe Riehle's mom's house between '94 and present day, but especially up to about 2000, I figured CD-Rs lasted pretty much forever, or at least long enough, and would be the best medium to store the completed mixes on since there was no way I would have enough hard drive space for all of it. I had accumulated a pretty impressive box of CD-R's as of a couple weeks ago when I noticed that one particular disc, containing so-called "unreleased oddities" by No Consensus, was showing signs of deterioration, and when I attempted to play certain tracks such as the little-known gem "Space-Age Plastic Collar (The Annoying Song)" I found they were corrupted. Furthermore, other CD-Rs I had burned over the years but had not cared for as well were actually beginning to peel -- the top layer, and its underside where the bits are actually burned on, was flaking off.

That was when I realized that the ongoing nature of the Ragman project, due of course in some part to the rather intermittent attention I have been able to give it, was approaching the lifespan of the CD-R medium and many of the discs burned earlier on may soon be meeting a similar fate. How ironic that the original cassette tapes have held up through so many years of sitting around but the supposedly newer, better technology hasn't.

So I began a new project -- ripping dozens of audio CD-Rs back to my hard drive. I still don't have near the hard drive space to store it all, despite now having a 160Gb Seagate as my main drive (dual-boot Win2K/Debian) in addition to the same 45Gb IBM Deskstar I had when I started (make all the "Deathstar" jokes you want, it's never given me the slightest bit of trouble!) But I figure I can rip CDs until I fill up the DeskStar (which I have now done once), then painstakingly go through and listen to each track and note down any that didn't turn out, gather up each "album" that I have in its entirety or can piece together (in some cases, from multiple copies if necessary), move each to a folder on my main drive, and convert them from 16-bit .WAV to a format more forgiving of hard drive space and download bandwidth. Then after typing up track lists and liner notes and tracking down scans of cover art where applicable, the Ragman Archives should finally start making their way to this very website -- probably as some part of the wiki.

I could use some input, however, as to what format would be best to use. The obvious first-impulse answer is .MP3, being so widely supported and having been around for so long. But I'm strongly considering .M4A, the format used by iTunes by default, which I have reason to believe offers superior sound quality in similar-or-smaller file sizes and seems to be pretty widely supported as well. And then of course, I could make an open-source statement and go with .OGG, which sounds good from a technical standpoint but I don't know what, if any, portable players support it, or for that matter, how many intererested parties really care if any do. And there's also FLAC to think about, which has excellent sound quality but rather large file size. Anyway, I should probably pick just one since I don't think I can spare the hosting space to provide more than one format.

I invite input, comments, recommendations, of what you out there would like -- that is, if there are still any of you stopping by here. Joe? Pete?

I'm an Audi TT!

You’re not the fastest, nor the most nimble, but you’re cute and you have style. You’re not intensely competitive, but when you pass by, everyone turns to look.

Take the Which Sports Car Are You? quiz.

Last night I had a dream that I was writing the most brilliant blog post ever. Of course, when I woke up, I had no recollection what it was about. But it served to remind me that this thing is here, and that after the time I spent setting it up I had ought to put it to good use.

Anyway, I thought it would be interesting to write about student loan consolidation. My old blog probably had some rants on the subject. Overall, I recommend it. It’s a whole lot easier (and probably cheaper payments-wise) to have all your student loans in one place rather than receiving multiple bills.

What irks me, however, is the tactics that student loan consolidation outfits are resorting to to get your business. Like on the level of prescription drug spammers and junk mail factories. Apparently, as soon as word gets out that you have some student loans, some sort of network of mailing lists is put into play that is picked up on by dozens of rabid hungry consolidation lenders, all with similar, official-sounding names like “National Student Funding Foundation” that are intentionally chosen to sound like some sort of reputable nonprofit or government agency, in the manner of the fake organizations set up by PR companies who try to pass off bogus “research” as authoritative. These consolidation companies then spring into action sending you mailing after mailing, all of which are carefully made up to be similarly official-looking, purporting to have important information or announcements about your student loans that require your immediate attention. “Please contact us regarding your student loans.” But they’re basically ads.

It gets worse if you actually choose to consolidate with one, or just already have multiple loans through different agencies and lenders, because the names all sound so similar and official, and often one company’s loans are serviced or otherwise handled through another company with one of those names, or there is some business relationship between companies with different names that you don’t know about and nobody bothered to tell you. For instance, after I applied for a consolidation with Student Funding Services, I started getting mail from American Education Services. Taking it for more ads from yet another consolidation company trying to attract my business, I didn’t bother paying much attention to them. But then it turned out that they were in fact, documents I needed to fill out and information I needed, because AES “services” loans for SFS or some such thing. Meanwhile you’re still getting these cleverly disguised ads from different places. And, check this out, my SFS/AES loans show up on my credit report under acronym names that are neither “SFS” nor “AES.” I think there’s ACS and then there’s a duplicate report of the same account that lists it as something like “PSC/ACS.”

Plus you get their telemarketers. I actually went with Student Funding Services because I got one of these unsolicited phone solicitations and the guy on the other end, a one Jon Sullivan, actually didn’t treat me like an idiot, didn’t come off like he was trying to put one over on me, wasn’t pushy, and took the time to examine my somewhat complicated array of loans and give me detailed, intelligent answers to my numerous questions. I was so surprised to be not having my intelligence insulted, let alone that the company had actually bothered to hire someone who could actually speak English (something that seems to be too much to ask from many of these companies), that they had my business on the spot.

Anyway, that was way back in July and the consolidation isn’t quite complete even now. I’ve been getting impatient. I’m trying to buy a house and the mortgage company is breathing down my neck about the page and a half of different student loan accounts that are still yet to be tied up in a neat little bundle, demanding that I secure 12-month deferments from each and every one of them and provide them with papers to prove it. And I’m still getting tons of clever mailings and pushy phone calls from different consolidation places. Keeping the ads sorted out from mail that legitemately pertains to my real student loans is enough to drive a person batshit crazy.

I have some notes up on my wiki from things I’ve been reading about the Common Lisp programming language. I became intrigued by it last summer when the new edition of Practical Common Lisp was about to come out, and went to read the book’s web version. I found the language a bit big and daunting; I always seem to do better learning a small language or small subset of a language and understanding its theory before moving on to the big language, like when I tried to pick up C++ and found there was just too much to try to keep in my head, but had an easier time with plain ol’ C and got the impression that it would be much preferable to learn the ++ on top of it. Similarly my interest in Common Lisp was renewed upon learning Scheme in Dr. Wallingford’s Programming Languages course at UNI last semester. After typing (define stuff (lambda (stuff) stuff) a few times, the few chapters of Practical Common Lisp I’d managed to get through popped into my head and I had the magical epiphany that CL’s (defun may be just a syntactic abstraction of that idiom, and furthermore, was probably implemented as a macro. Turned out I was on the right track.

Anyway, I’m trying to get going in earnest on a research project in network analysis that I need in order to graduate. Once someone with a bit of modern-day CS background starts learning a little bit about the theory, I gather that the natural thing that springs into one’s head is that it’s practically a textbook case for applying Object Orientation. It did for me. So I decided to have a look into the Common Lisp Object System, or CLOS.

Anyway, I ran across this really cool tutorial. The CLOS is interesting, a bit different, but I think I like it. One key difference from the OO I’d learned in school by way of Java, however, was that the methods of an object don’t conceptually “live inside” the object. This idea struck me as kind of un-OO at first, since I had thought that kind of encapsulation was really at the heart of Object Orientation. Then, near the end of the tutorial, came a section titled “In OO languages the functionality lives in the object” which began with this rather shocking statement:

This preposterous claim is the product of a diseased imagination. However many OO systems feel obliged to try and enforce it. Try to avoid having to program in one of these.

As for that last sentence, I bid ye good luck with that in the context of one’s career. As it turns out however, the way that a CLOS method works – whatever object you want it to act on must be passed as an argument – resolves an old annoyance of mine with the syntax of Java style OO. Those of you who used Java a couple years back probably remember having to compare strings (and other objects, no doubt) this way: MyString.equals(otherString). I guess it’s okay once you’re used to it but it takes the conceptual operation of comparison and forces it to “operate within” one object according to an “argument” that is the other object. This seems to hurt the proper perception of commutability of the equality operation in an annoying way. And it probably drives people with a mathematcs background crazy that you can’t just use the equals sign to compare complex numbers.

This has implications for a project in networks too. Say you want to find out the shortest distance-in-links between two nodes. The algorithm, an old graph theory staple, conceptually should be an operation on the nodes themselves – with nodes passing the same query on to their neighboring nodes – and the operation itself is a commutative relationship between two objects of the same type in which both nodes are on the same footing (neither is subordinate to the other). If the method “lives on” one node at a time, which node should you ask? Should it matter which node is the actor and which is the argument? Of course not. Plus you’ll likely end up having to test the method from both ends to make sure it works the same way.

All right, now also has a wiki. It isn’t exactly “integrated” in any functional way with this page just yet but it’ll come in handy, for myself at the very least. I’m pretty sure it’s open for use by anyone who stops by, since that is, after all, the nature of a wiki. It’s intended as a collaborative repository of information, knowledge, and writing, not as some kind of message board type thing. Hm, maybe I should put one of those up too. If the site starts getting some regular visitors who demand one, I may just do that. For now, there are two not-so-cohesive sides to this blog/home page and a presently mostly-empty wiki.