Friday, April 28, 2006

MentalWealth 0.94 Update

Last week I updated my wiki theme MentalWealth to support version MoinMoin 1.5. I now have a new version that adds some style support that I had missed before, namely for the .strike class and the TableOfContents macro. I also have a good number of tweaks to make skinning the theme easier.

Foremost among the changes is a refactoring of the screen.css code out into base.css, which contains all the basic classes, and a series of skin-*.css stylesheets which represent different colour skins. So now it's easy to change what colour you'd like the interface to be: simply uncomment the skin you want used.

I've also simplified the classes in base.css and rejigged some of the appearance. Changes you might notice include a slightly smaller typeface, the fact that the sidebar margins now better match the other panels, and alterations to the h5 and h6 headings to make them distinct.

I have no further plans to change this theme, unless I get bug reports or a solution to the issue I outline in the readme file.

As usual, MentalWealth is available at the MoinMoin ThemeMarket.

See the most recent article on this topic.
Wednesday, April 26, 2006

Resources For List Styling

Following on my article Styling A Sitemap I thought it might be helpful to present the list of references I came up with while doing my research.

These first two should be your primary source of information.

CSS Design: Taming Lists from A List Apart covers a gamut of styling techniques.

Listamatic contains dozens of examples of styled lists.

Further examples of styling lists for site maps or folder trees can be found here:

Wednesday, April 26, 2006

Styling A Sitemap

I was recently thinking about sitemaps, since it so happens I have to design several for different sites I'm working on. In many cases a plain-old list (POL) works just fine as is, so long as each level of indentation is styled distinctly. But in other situations you want something just a little bit fancier, some graphics to jazz it up. I thought that this time it would be nice to use CSS on a plain-old list (POL), so that the markup would degrade nicely on problem systems. Here's a step-by-step tutorial explaining what I came up with.

Introduction


First I went looking for existing solutions. Alexander Sperl has a very nice tutorial, in which he shows how to make graphics that can be used on various list-style-image tags. Different levels of the sitemap tree are marked up with different classes, each one corresponding to a specific image.

There is one big problem with this method, namely that many different graphics (and corresponding list styles) are needed. His code handles 3 levels and requires 8 different images. His discussion of level four items is short: "that's something you can figure out for yourself." No wonder he doesn't want to tackle it; his method is not scalable. I want one that is.

There are three major parts to this exercise. We need to build the graphics files, design our stylesheets, and code the markup.

Our Goal


Let's take a closer look at the problem. Below is a screen capture of a typical nested list such as one might find in a sitemap. If you mouse over it you see the graphical version I want to build. Our objective in this will be to keep the underlying markup as close as possible to the original.




Inspection of the problem shows that the tree is made up of only four separate graphic elements. To see this for yourself, mouse over the graphic above, but this time press and hold the mouse button. I have marked the different graphical components vertically in the first section as 1, 2, 3, 4. Rather than build all possible combinations of graphics for as many levels of indentation as we may need, we'll just use these four graphics directly. And since one of them is empty we won't even bother with a graphic file for that. See? Simple!

The horizontal set of boxes shows how we need three sequential graphics for a third-level indent. The red boxes are margins we'll remember to add.

Basic HTML


Here follows the POL layout for the sitemap. I have indented freely so the structure is more obvious.
<p><b>Post-Punk And All That</b> [album version]</p>
<ul>
<li>Manchester
<ul>
<li>Magazine
<ul>
<li>Spiral Scratch</li>
<li>Real Life</li>
<li>Secondhand Daylight</li>
<li>The Correct Use of Soap</li>
</ul>
</li>
<li>Buzzcocks
<ul>
<li>Time's Up</li>
<li>Another Music in A Different Kitchen</li>
<li>Love Bites</li>
<li>A Different Kind Of Tension</li>
</ul>
</li>
<li>Joy Division
<ul>
<li>Unknown Pleasures</li>
<li>Closer</li>
<li>Still</li>
</ul>
</li>
</ul>
</li>
<li>Liverpool
<ul>
<li>OMD
<ul>
<li>OMD</li>
<li>Organisation</li>
</ul>
</li>
<li>Echo & the Bunnymen
<ul>
<li>Crocodiles</li>
<li>Heaven Up Here</li>
<li>Porcupine</li>
</ul>
</li>
</ul>
</li>
</ul>

Let's start the process of converting this simple code. To begin we will put a span classed as "sitemap" around this HTML, so that other CSS classes can be assigned relative to that. This prevents what we are doing here from affecting other parts of our markup. It also makes it easy to turn our effect on and off -- simply remove the outlying span.

Our CSS


We need to turn off the usual list formatting. This is a common first step in any list styling exercise. Thus the stylesheet begins with the following.
.sitemap ul, .sitemap li {
list-style-type: none;
margin: 0;
padding: 0;
}

In order to be able to freely use our three line graphics in any combination we need, I'm going to assign each one to a span element. Then, those spans can be used in place of the images themselves, giving us more flexibility in styling and better degradation.
.sitemap span.vert {background-image: url(map_vert.gif);}
.sitemap span.last {background-image: url(map_last.gif);}
.sitemap span.midd {background-image: url(map_midd.gif);}

The last part of the CSS works on each of those three spans, plus a fourth for that phantom blank element I referred to earlier. We style them to be the same height and width as the graphics themselves, and then add a margin to the left to ensure a nice offset. Since this is a typographic feature, I use ems, though the truth is this method is going to break down at other font sizes, since it would need graphics of different sizes as well. (That's also true of the original method.)

We need to ensure the background elements don't repeat. In order to get the spans acting as graphic segments we set them to display as blocks. Finally, we float them to the left so that each does not start a new line. Here's the finished CSS.
.sitemap span.none, .sitemap span.vert, .sitemap span.last, .sitemap span.midd {
width: 24px;
height: 18px;
margin-left: 1em;
background: transparent 0px 0px no-repeat;
display: block;
float: left;
}

For those wondering, I have kept the names of the graphics and the styles the same length (eg: "midd" instead of "mid") because this way the HTML code lines up better. No other reason!

Building Blocks


These four styles now act as graphical building blocks that we can drop into our HTML where we need them. The code looks quite verbose, but it's regular and hence a piece of cake to generate in the typical scenario of dynamic code. More importantly, it does not add any other structural information to the nested lists. Here's the complete HTML.
<span class="sitemap">
<p><b>Post-Punk And All That</b> [dub mix]</p>
<ul>
<li><span class="midd"></span>Manchester
<ul>
<li><span class="vert"></span><span class="midd"></span>Magazine
<ul>
<li><span class="vert"></span><span class="vert"></span><span class="midd"></span>Spiral Scratch</li>
<li><span class="vert"></span><span class="vert"></span><span class="midd"></span>Real Life</li>
<li><span class="vert"></span><span class="vert"></span><span class="midd"></span>Secondhand Daylight</li>
<li><span class="vert"></span><span class="vert"></span><span class="last"></span>The Correct Use of Soap</li>
</ul>
</li>
<li><span class="vert"></span><span class="midd"></span>Buzzcocks
<ul>
<li><span class="vert"></span><span class="vert"></span><span class="midd"></span>Time's Up</li>
<li><span class="vert"></span><span class="vert"></span><span class="midd"></span>Another Music in A Different Kitchen</li>
<li><span class="vert"></span><span class="vert"></span><span class="midd"></span>Love Bites</li>
<li><span class="vert"></span><span class="vert"></span><span class="last"></span>A Different Kind Of Tension</li>
</ul>
</li>
<li><span class="vert"></span><span class="last"></span>Joy Division
<ul>
<li><span class="vert"></span><span class="none"></span><span class="midd"></span>Unknown Pleasures</li>
<li><span class="vert"></span><span class="none"></span><span class="midd"></span>Closer</li>
<li><span class="vert"></span><span class="none"></span><span class="last"></span>Still</li>
</ul>
</li>
</ul>
</li>
<li><span class="last"></span>Liverpool
<ul>
<li><span class="none"></span><span class="midd"></span>OMD
<ul>
<li><span class="none"></span><span class="vert"></span><span class="midd"></span>OMD</li>
<li><span class="none"></span><span class="vert"></span><span class="last"></span>Organisation</li>
</ul>
</li>
<li><span class="none"></span><span class="last"></span>Echo & the Bunnymen
<ul>
<li><span class="none"></span><span class="none"></span><span class="midd"></span>Crocodiles</li>
<li><span class="none"></span><span class="none"></span><span class="midd"></span>Heaven Up Here</li>
<li><span class="none"></span><span class="none"></span><span class="last"></span>Porcupine</li>
</ul>
</li>
</ul>
</li>
</ul>
</span>

Conclusions


What's the score? Sperl styled 9 different areas and used 8 graphics to support a maximum of 3 nested levels. We've styled 4 spans and have used 3 (simpler) graphics to support an arbitrary number of levels. Furthermore, though I don't explore the options here, we have more flexibility in how to put together the graphics to form different types of maps. Finally, if we take away the outer span everything collapses back to the original look.

On the downside, this method does require additional spans in your code.

I am happy with that, but would love to hear from anyone who has further optimisations.

Resources


A sample file with all of the code is available for download as sitemap.html.

You will also need the graphics files. Save them to the same folder as the HTML via the usual right-click thingie.

vertical map graphic middle branch map graphic last branch map graphic
Tuesday, April 25, 2006

Fundraiser For Impact Theatre

fundraiser
Impact Theatre is having a fundraising concert this Thursday 27 April 2006 at the city's best venue, Dolan's Upstairs, a lovely room with a club atmosphere, it's own bar and patio, and a great sound system.

The line-up is a veritable "who's who" of the Limerick music scene: Brad Pitt Light Orchestra, local heroes The Fewer The Better (in an acoustic set), the fresh guitar pedal antics of Windings and the very sensitive
Vertigo Smyth. Plus that popular artist you've come to love and depend on: "surprise guest". Start time is 8pm, and with that many acts on the bill you'll want to be somewhat less than tardy.

Proceeds go towards keeping Impact Theatre alive, so even if you cannot make it, buy a ticket anyway! Impact is Limerick's independent theatre company, performing modern and contemporary works from writers including Pinter, Edward Albee, Daniel Fo, Arthur Miller and Neil LaBute. They regularly sell out their shows, but since the venue only supports 35 bodies, this is not enough to keep them afloat financially.

Their next production is Ray Bradbury's Fahrenheit 451. "Book" your tickets now, because this is sure to be one "hot" show. (Ouch! These puns burn!)
Tuesday, April 25, 2006

Three Ways To Show You Care

Like one of my reviews? Found a cool new band or a favourite film thanks to one of my recommendations? Saved yourself some time after implementing one of my programming tricks? Please show you care about the Theatre of Noise by donating to PayPal, purchasing from Amazon through one of my links, adding a link to your site, or mentioning me on a newsgroup or forum.

Donate to PayPal


I am looking into ways of generating income. I'm not a fan of advertising, instead prefering methods that rely on the goodwill of my readers. I also don't want any heavy-handed system that gets in the way of the aesthetics of a page. With these criteria in mind I have decided on two initial ventures.

The first is the PayPal donation button in the sidebar. Now you can quickly, easily and securely show your appreciation with cold hard cash! Not that I expect to make much money from a venture such as this. I've written the last 130 articles out of personal interest; I imagine I'll write the next 130 for the same reason. But if I can find some means of compensation for the time spent, I'll be able to give priority to The Theatre of Noise over other competing priorities.

Make Your Purchases Via My Amazon Links


I have started linking to Amazon as an affiliate. If you live in a large city in North America you might have good retail choices. But if you live in Europe or a rural area you are likely relying upon Amazon for timely deliveries of books, DVDs, CDs... most everything. They almost always have a discounted price that is better than other reputable sellers. Ordering from them is without hassle and delivery is so quick it makes my head spin. (I received my last order of three books within five days from England to Ireland... and those days included a weekend.)

When you see an Amazon link in my articles, it will take you directly to a title I am specifically recommending. Every purchase you make will then earn me a trickle of income. It's important to note that every purchase you make in that session does the same, not just the purchase of the recommendation.

If you want to be particularly friendly, think "Theatre of Noise" each time you plan to make an Amazon purchase. Click on the Amazon buttons in the sidebar and make your order as you normally would, but with the extra warm glow that comes from helping me to my first small royalty cheque.

Link To Me


A third way you can support The Theatre of Noise is to link to this site from yours, thus spreading the word that I have something special on offer here. You can also mention me on a newsgroup or forum, when appropriate. No spamming please!

If you can't do any of the above I nonetheless hope you continue to enjoy the site. I hope to introduce further incentives once I've got my head around the current changes.
Monday, April 24, 2006

Véronique

double life
Do you ever get a strange disembodied feeling, as though you were looking down upon yourself from outside your body, from outside the world, from outside history? Do you ever feel that your lives and those of the people around you are entwined on some metaphysical level? Do you ever get a strange yearning for some other life, never quite seen, always just out of reach?

A second person asks: Do you have any interest in seeing one of the most beautifully poetic and enigmatic experiences in film? A film that could be only film, that could not have been created in any other medium. A film that may change the way you look at the world around you?

If so, today is your lucky day. Because on 24 April 2006 La Double vie de Véronique (in Polish: Podwójne zycie Weroniki) is finally issued on DVD. All of you who loved the stunning Trois couleurs films now have a fourth colour in which to revel.

I will not tell you anything about the plot here. Don't go anywhere else to read about it either, just let it unfold before you. There is no puzzle to it, though all is mystery. There is no resolution, because we are not in control of resolution, and when resolution comes we will no longer care.

life doubled
This English release on DVD follows the French MK2 pressing (being also PAL format and Region 2 encoded). It has two discs, the second of which contains three documentaries totalling 100 minutes plus three Kieslowski shorts ("Factory", "Hospital", "Railway Station") at over 50 minutes and even a short film by Kazimierz Karabusz, one of Kieslowski's film teachers. This is excellent value and I for one cannot wait to see such rich "extras".

Support this site by buying the discounted package from Amazon here: amazon.co.uk


If you do not have a PAL-compatible playback system, this might be a good time to buy one! I'll have a couple more articles in the near future to encourage you further.
Friday, April 21, 2006

MentalWealth Theme Released For MoinMoin

We're in love with beauty...
I have finally updated my MoinMoin theme for version 1.5 of that software. For those who don't know, MoinMoin is an advanced, easy to use, and popular wiki server implemented in Python. A wiki is a collaborative web environment that allows anyone to contribute. The most popular wiki website would have to be wikipedia.

I have retired the popular MentalHealth theme to make way for MentalWealth. The name change is to signify the new version compatibility, but also because I've switched to a left-side menu bar. Having it on the right is just too prone to style and rendering problems.

There are some nice new tweaks and the missing header issue is remedied. The documentation has been expanded and stylesheets cleaned up even further. Of course it is free and available under the GPL. Hope you like it and keep the comments coming!

MentalWealth is available at the MoinMoin ThemeMarket

See the most recent article on this topic..
Friday, April 21, 2006

From MySpace To Fireface To My Face

four faces
Read on to discover what Bae Yong-jun, Gandhi, John Lennon and Uma Thurman have in common. Plus, a cool article on Pokémon, a site that will recommend books based on reading habits, and more web miscellanea.

I was made aware of the narcissistic swamp known as MySpace when a number of friends and local bands got pages there. For those who don't know, MySpace is a community site full of people trying to be cool. The impression one gets of the under-twenty crowd is not very flattering. The site itself is ugly as sin.

A bunch of smart kids are striving to present an alternative image by forming the Random Shapes Network. Their mission "is to change the way adults view teens on the web." They are doing this by offering focused blog content, like the very real Raining Noodles. Normally I hate confessionals, but if anyone has a right to them it's a teenager.

Rhizomes is a cultural studies journal. That means it contains articles on just about anything. You might guess that I enjoy it, based on the Deleuze & Guattari quote at the top of my sidebar. And you'd be right. Check out the paper "Gotta Catch 'em All": Capitalism, the War Machine, and the Pokémon Trainer which puts a different spin on cuddly Japanese anime monsters.

Wondering what you should read next? Turns out there's a site that will tell you. I tested it with Steve Erickson's Days Between Stations and it spat out Vineland by Thomas Pynchon. Not bad. (Though if you haven't read Erickson you should forget all other textual activities until you remedy the situation.)

Fans of RME audio hardware may be reading this blog, since I have posted on them before. I'd like to bring to your attention the new Fireface 400, a device with two mic inputs and loads of other connections, designed to the company's usual exacting standards. This is overkill for someone who just wants to get sound in and out of a computer, but great for those who care about quality but don't need lots of channels.

And now for the question which opened this article. It turns out that what Bae Yong-jun, Gandhi, John Lennon and Uma Thurman have in common is... me! A new site applies face recognition algorithms to a photo you upload in order to determine which celebrity you most resemble. The company uses this technology to provide a service for people looking for relatives. But my guess is the celebrity hunt will prove most popular.

The demo (registration required) requires that you upload one photo at a time and seems fooled by eyeglasses. How else to explain the result on trying a second photo, when I matched Erica Durance, a Canadian actress who played Lois Lane in Smallville? That photo also got me hits with Robert Downey Jr. (I have had people say this), Eddie Murphy and Chester Bennington (vocalist for Linkin Park).

My suggestion: try a photo of your pet for hours of fun!
Wednesday, April 19, 2006

The Re-Appearance Of The Quiet Men

Systems Of Romance

You're sure to know Ultravox, the band without the exclamation mark: Midge Ure, "Vienna", new romanticism, "eighties music" (is that phrase ever welcome?) But Ultravox! is unlikely to be so well known. With the bang, this band was a very different beast. And now their trilogy of albums are to be re-issued. I greet their return from obscurity with this pocket review.

Ultravox! In Review


The debut album Ultravox! (1977) owes a little too much to Bowie and Roxy Music to be taken seriously. Perhaps this was not helped by calling in Brian Eno to produce. Despite the coat-tails, this album paints a dark and hedonistic picture of London in the seventies that updates its antecedents with a taste of a cool new vision to come. John Foxx never could sing and his theatrics are sometimes embarrassing, but he sure could declaim with the best of them. On "My Sex" and "I Want to Be a Machine" his futurist(ic) visions marry perfectly with the sounds of a rock band not afraid to go out on a sonic limb. The next two albums explore the opposite poles defined by this debut with vigour and determination.

Ha! Ha! Ha! (1977) is broken and jagged, full of crazed apocalyptic rock like "Fear in the Western World", which ends with the sound of society tearing itself in twain. This cuts to drifting piano, is one of the most startling and beautiful juxtapositions you will ever hear. "Distant Smile" luxuriates in Enoesque ambience for half its length. But then vocals so out of tune they hurt usher in a guitar riff from some pompous stadium-rock band. Foxx urges on guitarist Stevie Sheers in a moment of complete rockist excess.

It's back and forth from rock to Krautrock all the way through the record. "The Man Who Dies Everyday" sees tip-tap drums emulating a drum machine, while an octave synth pattern forms the template for someone called Gary Numan who would soon burst onto the scene. (With an early song entitled "Everyday I Die", even.) It also defines the jumping off point for post-Foxx Ultravox: cool European robot disco.

Billy Currie cannot go unmentioned. His processed electric violin contributes significantly to the sonic appeal of Ultravox! The howls, wails and sleek glides holds the top end of the spectrum, the place filled by Moog or Prophet sweeps in the less original synth-rock bands that would soon come pouring out of Britain.

I particularly enjoy "Artificial Life", which is the spawn of some mad Diamond Dog. It's a back-water back-street back-beat blues for the year two-thousand. Now that we're in the next century all of this might sound quaint, but the raw energy prevents any such still nostalgic centre from developing. The ferocious fiddle-sawing that climaxes the song leads into a halting, pounding beat and a downward spiral from an ear-piercing oscillator before, suddenly, it's over.
This whirlpool's got such seductive furniture
It's so pleasant getting drowned
So we drink and sink and talk and stalk
With interchangeable enemies and friends
Trying on each other's skins
While we're dying to be born again
-- "Artificial Life"

This album never quite jells into a whole, and that is its power. The arty lyrics are in counterpoint to their raw delivery. Electro and rock work to deny the centre, spinning it out in two directions at once. Cool Teutonic ambience and romantic inner city visions complement each other but do not form a single aesthetic. Ha! Ha! Ha! is all peripheries, never more so than on the ultimate track. "Hiroshima Mon Amour" is less an homage to Resnais than it is a recognition of Bowie and Eno's explorations on the second sides of "Heroes" and "Low". Bubbly drum preset No. 3 is soon joined by languid sax. "Riding intercity trains, wearing European grey" intones Foxx. It seems the new Europeans are here, and unfashionably early too.

Echoes Of Pleasure

And so it's on to the culmination of this group's career, Systems of Romance (1978) 1. The opening track "Slow Motion" makes clear the change in approach from Ha! Ha! Ha!. A slow, considered, harmonically rich and full sound complements a lush arrangement of bass synth, violin and guitar. Part of this is down to the new guitarist, Robin Simon, he of swirling textures. And part is due to replacing rock producer Steve Lillywhite with Euro master Conny Plank.

Even John Foxx is chilled out -- still possessed, but in a different way. Before he was being shaken and cut by demons from the outside, scared by dwellers of dark amphetamine alleys. Now he's under the hypnotic spell of a blue otherworld, unable to shake himself awake. His slow traces through the songs are taken in someone else's clothes, to vague locations, for undefined reasons. He's dislocated, dis-timed. "I'll let the scenery dissolve into some other life," he states, and everywhere he is not himself or any self at all.

But he certainly has a way with syllables, wedded to a delivery that considers each phoneme like a rounded tablet in need of ingestion.
I like to glide in the long green light
of a July afternoon
sliding down a vague conversation
-- "I Can't Stay Long"

There are many wonderful tracks, from the stately "Maximum Acceleration" to "Quiet Men", made in the mold of "The Man Who Dies Everyday" and soon to be mined for everything it was worth on the first post-Foxx album Vienna.

I'm not sure who has the patience for this sort of cool ennui in this day and age. Maybe those who go to the Tate Modern and come out in love with Albers and Moholy-Nagy. But unlike the student following those masters of the plastic arts created, this album stands alone as a direction not taken, a masterpiece which created its own sort of dead end. It disappeared through some dimensional crack into a vine-enshrouded church and never reappeared. 2

Completing the Scene


Pondering the imminent re-issues I will here list the non-album tracks that could be included to form a complete collection.

The debut album was followed by the single "Young Savage", a live version of "Slip Away" on the b-side. That's only two extra tracks for the re-issue of Ultravox! unless we are lucky and see additional songs released from the vaults.

On the other hand there are many possibilities for Ha! Ha! Ha! These start with "Quirks" and "Modern Love" from the single that came with early copies of the vinyl album. There's a different version of "Hiroshima Mon Amour" from the b-side of the "ROckwrok" single and four live tracks from the Retro EP: "The Wild, the Beautiful and the Damned", "My Sex", "The Man Who Dies Every Day", and "Young Savage". Since these are from different gigs I predict a couple will find their way to the first CD to even things up a bit.

This leaves but two tracks for Systems of Romance, the 12" single version of "Quiet Men" and its b-side "Cross Fade", which has already appeared on Japanese versions of the CD and at least one compilation.

There is less chance that the Peel Session from 21 November 1977 ("My Sex", "Artificial Life", "Young Savage) will be included. But that would make the collection complete. 3

1 Typographically the "!" was dropped for this incarnation of the band, though thematically it is still there.

2 Though John Foxx tried with his album The Garden, even drafting in Robin Simon and titling a track "Systems of Romance". Mention must also be made of Urban Verbs, who captured some of the same unsettled sound and in a notable homage titled a track "Acceleration".

3 Thanks to Chris Keep for notifying me of the re-issues.

Wednesday, April 19, 2006

Songtitleisms

Matt West has noticed that in rare cases the display of an an iPod, showing as it does three lines in the form song title / artist / album title, will spew out some poetic combinations. He challenges readers to come up with examples. Below I have not one or two but eighteen such. I also claim the three million bonus points for the haiku form I have posted to his article.

Provide your own punctuation to make sense of the following:

drifting / breathless / blue moon

new age / chrome / red exposure

smoke / can / flow motion

city in progress / broadcast / the noise made by people

dreams never end / new order / movement

careful / television / adventure

crawl away / lambchop / thriller

get out of that rain / he said / take care

sly / massive attack / protection

looks that kill / thomas leer / contradictions

love is all / the rapture / echoes

hybrid / siouxsie and the banshees / kaleidoscope

three nicotine cigarettes / static / flavour has no name

funny funny me / altered images / pinky blue

filled / area / between purple and pink

it's better this way / the associates / sulk

jealous / algebra suicide / swoon

tv / wire / behind the curtain
Monday, April 10, 2006

Tab Versus Spaces

There are several famous holy wars in the history of computing. There's emacs versus vi, Mac versus PC, and tab versus spaces. These are commonly referred to as "religious issues", meaning that they are a matter of belief only. Now, the first I couldn't care less about, since I use neither text editor and preferences for keyboard mappings seem a relic of the days when dinosaurs walked the punch-card strewn floors of computing. Mac versus PC is an easy one too: use a Mac if you like spending more money for other people to make up your mind for you, otherwise use a PC. (Actually, Macs are becoming PCs1 so what's the difference?)

But on the tab versus spaces issue I must take a stand and make a few declarations. First, the common wisdom, as espoused most emblematically by Jamie Zawinski, is dead wrong. And second, it is not a religious issue at all, because there is a correct answer.

This relates to Python in a very direct way. Python is unique among programming languages in mandating indentation as part of the language syntax: every code block must be indented.

Some slack-brains take one look at this and run away screaming "Whitespace as syntax! Whitespace as syntax! Garrrrrrr!" But anyone who actually uses Python for longer than .3 seconds realises that this rule simply enforces what any good programmer already practices. This correct indentation becomes a guide to the compiler, so curly braces and other excess syntactic cruft are not needed. It's a neat, simple solution that results in code of greater readability -- a real win-win scenario as managers say on television. (And possibly elsewhere. I wouldn't know; I avoid managers2.)

But back to the issue at hand. First, why is tab versus spaces not a trivial issue? I suppose that for any given programmer it is, but if you work on a team you must come to some sort of agreement or be constantly converting back and forth. This is possibly time-consuming, possibly error-prone, and possibly not even that easy depending on your tools. So it's best avoided by agreeing on a standard.

Before going any further we should acknowledge the most important article on the subject and read jwz's "Tabs versus Spaces: An Eternal Holy War."

Jamie breaks the issue down into three parts. He notes that hitting the tab key does different things on different systems, but as you can configure this behaviour it's not the main problem at hand. Furthermore, encountering a tab character in a file is the same: you can do what you wish to do.

The third part of the issue (actually it's his #1) must then be the real problem: people care about how many columns a tab/indent represents. He calls this a "religious war" because he has misidentified the problem. His solution is to have tabs expand to spaces before writing a file to disk, so tabs never exist in interchanged files.

This assumes one will never have to open a file containing spaces and intuit what tabs are supposed to be there, or how the spaces should be interpreted. Perhaps jwz never has bugs or has to re-edit his code. Or perhaps he's used to write-only languages like C++ and Perl where the least of your problems are relating to tabs because you are already committed to spending inordinate amounts of your precious life wading through code trying to find the crucial lines that actually do something.

Then he spends the second half of the rant talking about specific settings in arcane software.

Where did jwz go wrong?

First, his three points are not separable, at least not in the way he would like. Discussing the tab key he says "this is an editor user interface issue" in order to dismiss the problem. Editors treat tabs here as "indent to a column position", there as "add so many spaces", and in a third case as a single character of value "ASCII 9". So, according to jwz, it's not an important part of the problem.

But how is this different from the point he says is the most important, that when reading and writing code, people "care about how many screen columns by which the code tends to indent when a new scope (or sexpr, or whatever) opens"? (Strangulated syntax in original.)

Answer: it is not different. There are not three points; there are two.

A tab has both syntax, a representation, and semantics, a meaning.

With this plain and simple approach it is dead obvious that using spaces to represent tabs at the level of encoding is inherently wrong because we are throwing away meaning. A tab no longer has its own representation but is instead subsumed into how we represent spaces.

An example illustrates the problem. If you save all tabs as two spaces and the next person who opens the file instead wants to see tabs as indenting to a given column position, how are they going to do that? First they'll have to assume that all two-space sequences are tabs, and then they can interpret those tabs. But the assumption is dangerous and wrong. Everywhere that two spaces do not in fact represent a tab there will be an error of interpretation. Meaning will have been lost.

Spaces cannot represent tabs as encoding. They can in a display, but that is the choice of the viewer at the instant and not something to be persisted eternally in the file.

Preserving tab characters allows them to mean something different to each user. This makes no assumptions about the capabilities of the tools used. It does not require everyone to use the same editor with certain macros playing to automatically convert, or any such nonsense.

Furthermore tabs have the following advantages:
* one key to hit instead of up to 8 3
* not open to error when 7 or 6 spaces are hit instead of 8
* makes diffing files easier (because of previous two points)
* smallest file size

Use tabs not spaces. Why would anyone be so foolish as to suggest any different?



1 Not only do they use Intel processors and ATI video cards but also boot Windows.

2 For that matter I avoid television as well.

3 You think you won't ever have to do this because you have your tabs set to 4 characters and inserted automatically? Just wait until you look at someone else's code and all you have are spaces as guides. Sucker.

Thursday, April 06, 2006

Tactile Surface Live This Friday!

Tactile Surface

I will be appearing this Friday 7 April at 8pm with John Galvin in our second performance as Tactile Surface. We will be performing "Tectonic Plate II", an improvisation for guitar and radio.

This is part of the Mamuska night, held in Daghdha Space, the former Church of St. John's of the Cross in John's Square, Limerick. A Mamuska is an unusual evening of experimentation and creativity, incorporating film, dance, performance art, theatre, music, and more. The friendly atmosphere has always brought out the best in people, both performers and audience, and this week should be no exception.

My silence at the last two Mamuska's is now being compensated for. Not only do I have this performance and the just-announced Two Automata, but I am also DJing the night as escalation 275.

The next Mamuska is not until June, so come out, come out, one and all!
Wednesday, April 05, 2006

"Two Automata" Premiers This Friday!

two automata

Susannah Kelly's performance piece "Two Automata" premieres this Friday 7 April 2006 at the Daghdha Space, Limerick, Ireland. This is part of the ever-popular Mamuska night.

For those who are not aware, Mamuska is an open night of art performances, dance, music... what-have-you. The atmosphere is casual and eclectic. There is a cash bar and no entry fee. Start time is 8pm. Davide Terlingo is the man behind Mamuska; over a couple of years he has built it into a cultural institution in Limerick.

Susannah Kelly is an actor and singer who has been working extensively with Impact Theatre this season. "Two Automata" is a performance for voice and sound processing. I will be appearing in the second role so look forward to a rare acting turn from yours truly!
Tuesday, April 04, 2006

Domain Names Irish Style

Recently I set about getting the domain soundings.ie for the sound art curatorial group I am a member of. I figured this might take between 24 and 48 hours. Two weeks later the job is done. Let me introduce you to the bizarre, anachronistic world of Irish domain names.

To get a .com, .org, .net or similar domain name you simply find one of the hundreds of resellers, slap about $10 a year on the table, and walk away with a registered name. Hosts provide snazzy little control panels so you can redirect HTTP traffic or email to some other location. Thus it doesn't matter much where you actually host your website relative to the name servers, though common wisdom has it that it's best to keep them apart. Reason being that if you have them together at one host, that company may not be too rushed to update the nameservers should you ever take your web hosting business elsewhere.

So I went looking for Irish domain name registrars, using the list at the IEDR. There are only 20 companies listed who currently manage more than 500 domains, and some of those don't have any easy-to-find info on their sites. Of the rest it quickly became apparent that only a few had anything less than stratospheric prices; the rest apparently catered to large stupid firms.

€50 seemed the lower limit of prices, but reading the small print this rarely included web redirection (necessary) or VAT (annoying). Eventually I narrowed the list to one provider, WebHost, who provided what I needed for €49 + VAT.

Though I can get six or more .com domains for this price, it does seems to be the prevailing rate for .ie. So I got out my credit card, fill out the required forms and waited. For a week. In this time I saw no requests for information, no confirmation of my order, no receipt, nothing. After a couple of inquiries and a direct threat to withdraw my business, I hear from a representative and after much back and forth we get things sorted.

Having read the Registration Policy I was well aware of what was required to get a domain name, but still find it funny beyond all belief.

Individuals are not allowed to register a name of their own choosing. The Irish authority will assign them a name based on their initials and two numbers. Yes, I am sure people all over the country are lining up for a chance to register rp96.ie or what-have-you. And for this you still need to provide proof of who you are, by way of a passport or birth certificate. I guess they don't want just anyone registering rp96.ie, it has to be someone who is legally entitled to it. Sheesh!

But wait, there's more. In fact ten more categories of legal applicants each with their formalities. Soundings got to apply as "Category 9: Unincorporated Association Name". For this I had to fax the authorities a letter on official letterhead.

Fax.

On letterhead.

A reminder: this is 2006. OK, that straight, we can continue.

No, sorry, I can't go on. It's all too strange. Let me say again: to register an internet domain name I had to send a facsimile of a letterhead. I may as well send up smoke signals in Limerick and have them read in Dublin. Instead I got to install the Windows fax components and get them to work correctly. That was two hours of my life I'll never get back.

But as a side benefit I got to discover who the least happy person in the world is: the author of the Windows fax page cover sheet editor. Because he's likely still cursing whoever decided it was necessary to write an entire application and invent all new file formats for something any basic word processor already does.

But anyway.

I sent the fax, it was received, I got a domain name. Then I went to the WebHost control panel to set up domain redirection. I am sure you know what comes next.

WebHost has no online control panel. Domain redirection requests and the like must be made via email. This despite the fact that their page, referred to above, says not once but four times that they have an "online control panel". That's even more often than I have typed the phrase "online control panel" in this article.

To quote:

"All of the above domain name registration fees include the following:
* URL & E-Mail forwarding via our online control panel.
* Advanced DNS host configuration via our online control panel.
* Change your whois contact information via our online control panel.
* Modify the DNS nameservers for your domain name via our online control panel."


So what can we learn from this?

1. Ireland is a backwater island with a tech level not exceeding Eritrea.

2. If anyone asks you to register for them an Irish domain name, take the money, buy them three stateless names instead, pocket the remainder of the cash, and then tell them how much time you've saved them.

Via a facsimile.
Saturday, April 01, 2006

New Python Logo Revealed


A new Python logo (pictured at left) has been approved by the PSF, following the heated debate that broke out on comp.lang.python after the new Python home page design was revealed. Many people disliked the interim logo, claiming it looked like two copulating tadpoles, not at all the sort of image a programming language named after a comedy troupe should promulgate.

A spokesperson for the PSF said "We realise our mistake in attempting a design that might be symbolic, subtle, or otherwise obscure. We want instead to present a direct image of the Python language, something which people can identify with. Python is for everybody and the logo should be too."

So apparently they've gone back to a snake, something immediately recognisable, and included a second image to play off the catch-phrase "batteries included".

"We did not feel that the logo needed any text, as it's obvious that what we have here is a Python. All of us know that this represents the Python language. Those who don't will either soon find out or make their way to Ruby or some other non-snake language."

I wondered if it was not significant that the shape formed by the intersection of the snake head and battery was a distinct cross. But when asked the spokesperson replied "There's really nothing I can say about that. Are you a member of the PSF? No? Sorry, I can't talk to you any further about our inner rites. No comment."