Camino

Though the Macintosh version of Internet Explorer isn’t the danger that its Windows counterpart is (it’s a separate code base and it’s not part of the operating system, with all the vulnerabilities that entails), it isn’t being actively developed and is increasingly out of date. Using it isn’t computationally suicidal (as using Internet Explorer on Windows is), but it’s hardly ideal. Fortunately, OS X includes Safari, which is a much better browser, but unfortunately, not every Web site works properly with Safari. There are fewer and fewer sites that don’t, but it still happens.

For those Web sites that don’t work with Safari, I use Mozilla‘s Camino, of which a new version has just been released. There are other excellent alternative browsers available for OS X, including Opera and Mozilla’s Firefox. The choice between Opera and the Mozilla browsers is a matter of personal taste, but of the Mozilla browsers, Camino, which is OS X only, integrates into OS X more seamlessly than Firefox–almost as seamlessly as Safari, in fact. So if you’re using a Mac, you may find Camino a handy tool to have installed.

Podcasts, Podcasts, Podcasts

Meg asks:

Is there some sort of memo that goes around telling everyone else who the cool indie/alt/edgy bands are? Why am I not on the mailing list?

Since I can’t seem to post a comment on her Weblog at the moment, I thought I’d answer her question here. I don’t know about a memo, but there are a couple of podcasts that do just that, and you can subscribe to them in iTunes or any of a number of other podcasting clients. There’s the CBC Radio 3 podcast, based on which I’ve puchased at least a half dozen albums in the last couple of months, and, of course, there’s the Radio Clash podcast.

And speaking of podcasts, I was listening to the latest episode of the BBC World Service Documentary Archive podcast, a return to Sarajevo ten years after the siege of the city, on the subway on the way to work this morning, and it was all I could do not to cry. On a couple of occasions, I’ve stood on the subway laughing at something that only I can hear on my iPod, and that probably looks strange enough, but crying at something that only I can hear might be a little too strange. Or maybe no one would notice.

Four earlier episodes of that same podcast, “The Soul Within Islam,” chronicled a British Muslim’s travels around the fringes of the Muslim world (to Malaysia, Morocco, Turkey, and so on) in search of clues to the future of Islam. It’s a fascinating piece of reporting, but I find it very amusing that in his travels in search of the soul of Islam, he manages to find and interview not one but two Islamic supermodels in two different countries who’ve since given up modelling and now wear the veil. After speaking to the first one in Malaysia, did he really need to speak to the other in Turkey to flesh out the supermodel perspective on the future of Islam?

Coming and Going

At the end of last week, the In Our Time podcast returned from its late summer hiatus. This is one of my favorite podcasts. Whatever subject it addresses (past episodes have covered everything from the KT Boundary to Chrisopher Marlowe), it’s hard to imagine learning any more about that topic in forty-five minutes. Last week’s episode on magnetism was no exception.

And last night, Donna Summer posted the last episode of the Advanced D & D podcast before going on hiatus for a few months, and it kicks ass. If you’re into breakcore, folk-rock, death metal, dirty 70’s disco, and raw satanism, be sure to check it out.

Sarah

Sarah from Newcastle (originally Edinburgh) used to write a Weblog called “Not You, The Other One,” which is sadly defunct. It was one of the first Weblogs outside of the Salon Weblog universe that I read. I don’t remember how I first found it, but I was immediately fascinated by it. There were a couple of interruptions when she went away to do volunteer work in first the British and then the Greek wilderness, but I kept following. I couldn’t say why I found the site so compelling–we have very little in common (though my mother’s family is from her part of the world), and she didn’t really write about anything grand or universal. It was, I suppose, the simple humanity that she so effectively communicated that kept me reading her.

Earlier this year, Sarah stopped updating her Weblog and deleted (or lost) its archives, which was disappointing. Instead, she’s been posting her pictures on Flickr (she even added me as one of her contacts), and I find them, like her Weblog, very engaging, especially her pictures of Northumbria. But yesterday, she posted her finest picture yet, a self-portrait in a suit that, like pretty much everything else about her, I find enthralling for no reason I can put my finger on. Can anyone help me out on this?

I’m Morgan and I’ll Be Your Moderator

I got my first comment here today (thanks Karen), and discovered that, in order to control comment spam, I have to approve comments as they’re posted. I had no idea. So if you post a comment and it doesn’t show up right away, please be patient. I’ll approve it as soon as I become aware of it and can remember my password.

Writing Maintainable Code, Episode 1

Context:

This is in a medium-sized EJB-based application that uses bean managed persistence. An interface is defined to perform a set of searches of a certain type, with different implementing classes being used at runtime depending on what’s being searched for and what criteria are being used. Among the interface’s methods is one the returns a SQL sub-query based on a given collection of values. One implementation of that method is discussed here. The developer was awaiting help from the database group and never got back to this method to implement it. That didn’t cause any trouble at initial deployment, because this particular implementation wasn’t used by any of the code that could be called from the application’s client, though given that the decision as to what implementation will be used is made at runtime, that’s not apparent from the code.

Wrong:

    public String composeSqlStatement(Collection ruleValues) {
        //:TODO:
        //Talk to the DBAs and get help...
        return null;
    }

Result:

A few years after initial deployment, this application was to be significantly revised to reflect substantial changes in the business it supported, and the revision was to be done by an entirely new team of developers. In seeking to test new functionality, one of the developers wrote a unit test that, through the search interface, called the method above. However, since that method was only returning a piece of a larger SQL statement, the method calling it didn’t throw the NullPointerException that you’d expect with a method that’s meant to return a value returns null instead. When the resulting SQL statement was finally executed by another method elsewhere in the application code, an exception was thrown indicating that the SQL statement was invalid. Given that the SQL statement was more than a dozen lines long, it took some time to determine that the null, which appeared in the statement as an ordinary string (with a value of “null”), was causing the problem. And given that it was being called through an interface with more than a dozen implementing classes, it took more time to determine which method was returning the null. In all, it took more than one full day of developer time to resolve this.

Better:

    public String composeSqlStatement(Collection ruleValues) {
        //:TODO:
        //Talk to the DBAs and get help...
        throw new UnsupportedOperationException("composeSqlStatement()  " +
            "method not implemented in class TypeASearchDAO");
    }

Had the initial developer written the method to throw an exception if it was ever called, the problem would have been discovered the first time the method was called by the unit test. The cause of the problem and the appropriate solution would have been immediately apparent.

Writing Maintainable Code, An Ongoing Series

Much of the software development that I do is the maintenance of existing code (as opposed to writing new applications from scratch). Having done this for a number of years now, I’ve begun to see things that can be done during initial development to make code easier for subsequent developers to maintain years later (or more precisely, I’ve seen all of the things that are done to make code more difficult to maintain). Usually these techniques come down to following the coding techniques described in any good computer science text (careful design, proper encapsulation, following valid naming conventions, adequately commenting code, etc.).

It seems that most developers who write new applications tend not to end up maintaining code, so they tend not to see first hand the consequences of decisions made in the name of expediency. I don’t mean to say that they’re necessarily being sloppy or lazy. The code I’m talking about works fine at deployment–the results of these decisions aren’t bugs. But they can make subsequent maintenance more difficult and error-prone. So for such developers, I offer this ongoing irregular series of examples of why–even though it doesn’t make a difference in the current functioning of your application–you should make the extra effort to follow good design and coding techniques. I’m also hoping to document my experiences as background to inform the design and development discussions I participate in. In those discussion, I often find myself arguing against hacks that seem harmless, but that I suspect will cause problems later. I hope that with enough examples, I’ll be in a better position to make my case clearly and convincingly.

WordPress Rocks

I’ve spent time on and off over the long weekend playing with WordPress, of which this Weblog is the result. (I don’t know that I have all that much to say, but I’ve missed the software side of Weblogging.) So far, I’m very impressed.

Even though it’s a server-side tool that you have to set up for yourself (unlike, say, Blogger), WordPress really does take only five minutes to install, just as they claim. Of course, it requires a bit more background knowledge than something like Radio UserLand, but that little bit of extra background knowledge is rewarded with a far more elegant, transparent, effective, and standards-compliant publishing tool. It includes everything you need for comments, trackbacks, site search, and Weblog rolls (no more HaloScan, Google, or Blogrolling), and it throws in all sorts of little extras like XFN. And it seems as though it can be used painlessly by relative novices while still giving experts all of the power and control they could want.

WordPress seems to have pretty healthy community support, which means (among other things) that there are many themes available. I’ve mutilated Mike Little‘s Journalized Winter theme for this Weblog, for which I thank him.

This has really been fun in a playing-with-blocks sort of way. Let’s see if I can come up with anything else to say so that I can keep playing.