Josh (the blog)

I’ve delivered simple, clear and easy-to-use services for 20 years, for startups, scaleups and government. I write about the nerdy bits here.


@joahua

Timetable, for the next 6 weeks

Just because these things are useful to have around on occasion, my timetable for the next six weeks at school is posted below — subject to change and all that.

Timetable, Week 1
Period Monday Tuesday Wednesday Thursday Friday
Subject to change at any time. Applicable until Friday, 3rd December, 2004.
Period 1 Modern (52)
Period 2 English (45) Business (92) English (45)
Period 3 Business (92) Business (92) English (45) Modern (52)
Period 4 English Ext. 1 (59) ITF (49)
Period 5 English Ext. 1 (59) ITF (49) English (45) Modern (101) Business (92)
After school ITSS (49) English Ext. 2 (45) ITSS (49)
Timetable, Week 2
Period Monday Tuesday Wednesday Thursday Friday
Subject to change at any time. Applicable until Friday, 3rd December, 2004.
Period 1 Business (92) Modern (101) Modern (52)
Period 2 English (45) Business (92)
Period 3 English (45) Modern (101)
Period 4 ITF (49) English Ext. 1 (59) English (45) Modern (52) Business (92)
Period 5 ITF (49) English Ext. 1 (59)
After school ITSS (49) English Ext. 2 (45) ITSS (49)

Editing is highly probable at this stage, if only for reasons of formatting.

The Indentation Problem

I’ve posted a question along the lines of what follows below (indeed, some is copied verbatim) to the WSG mailing list, so apologies if you’ve seen this already.

Basically, there’s text which requires indentation in order to be true to the original form in which it was written, or simply for the purpose of legibility. The example I’ve used to demonstrate this is the first stanza of Lewis Carroll’s The Hunting of the Snark (a poem).

You can use CSS to indent text with padding and whatever else, but that’s a pain if you have a sitewide CSS file, and the text to be indented isn’t usually sitting in any defining container (be that a div element, or whatever else)


Example 1:

“Just the place for a Snark!” the Bellman cried, As he landed his crew with care; Supporting each man on the top of the tide By a finger entwined in his hair.

may be marked up as a single paragraph (as it corresponds to a single stanza of a poem — in this case, the first stanza of Louis Carroll’s “The Hunting of the Snark”, just for a random example.) as follows:

<p>“Just the place for a Snark!” the Bellman cried,<br /> As he landed his crew with care;<br /> Supporting each man on the top of the tide<br /> By a finger entwined in his hair.</p>

As line break tags “
” are self-closing elements, I don’t think it is possible to style with them (e.g. to indent the relevant lines) — and, even if it were, it would be an ugly solution (assuming I’m even thinking along the right lines, and that it would work at all):


Example 2:

<p>“Just the place for a Snark!” the Bellman cried,<br class=”indent” /> As he landed his crew with care;<br /> Supporting each man on the top of the tide<br class=”indent” /> By a finger entwined in his hair.</p>

Assuming the style would apply to the following, and not preceding, line. This example is untested, and would most likely not work at all. I’m just thinking out loud.

One potential solution (albeit a hideous and bloated one) is simply to use repeated non-breaking space characters:


Example 3:

<p>“Just the place for a Snark!” the Bellman cried,<br />    As he landed his crew with care;<br /> Supporting each man on the top of the tide<br />    By a finger entwined in his hair.</p>

but that, of course, probably isn’t the most desirable solution.

In terms of light markup (but of dubious semantic appropriateness), I’ve seen definition lists employed to this end quite effectively:


Example 4:

<dl> <dd>“Just the place for a Snark!” the Bellman cried, <dl> <dd>As he landed his crew with care;</dd> </dl> </dd> <dd>Supporting each man on the top of the tide <dl> <dd>By a finger entwined in his hair.</dd> </dl> </dd> </dl>

This renders without any problems in visual user agents without styling required, and is apparently valid XHTML — but it seems dubious to me. It appears structurally better, at least to me (my eyes follow the markup flow more easily than the other examples above), but that doesn’t deal with the issue of semantics.

Neerav recommended the use of blockquote elements to markup indentation, which I think is about as semantically correct as using definition lists, and said as much in another email:

In the HTML4 recommendation (http://www.w3.org/TR/REC-html40/struct/text.html#h-9.2.2), the semantic meaning of blockquote and q is defined as being for quotations. That’s okay — for the purpose of the example I used, at least. If I were to reproduce the whole 8 fits of the poem, then it ceases to be a quotation, and begins to be a work in its own right…

…[this website] demonstrates the use of a blockquote element, with styling appropriate to the purpose (or at least, my understanding of the purpose of the element at the time I developed the CSS file). Imagine if I were to attempt to apply that to the example below… [Lewis Carroll’s poem] …I’d have a mess.

Admittedly, if I defined a class for blockquotes in my CSS file, and specified this class for relevant blockquote elements, then I could achieve my purpose visually — but I’m still stuck out in a semantic hole.

So far, we’ve got a whole bunch of solutions, none of which are really any better than the others. I was nearly resigned to the fact that there were no semantically-correct ways in which to mark indented poetry up! Now is as good a time as any to remark that this is (in the case of most poetry) purely presentational, and I’m being pedantic in looking for a solution. Having said that, this is twice in two days now I’ve wanted to be able to indent content on this website properly, and haven’t been able to.

Mordechai Peller shares his thoughts on the issue, providing significant insight into the problem at hand, and ultimately a working solution. His response is reproduced in part as follows:

Joshua Street wrote:

Is it okay to use definition lists like this at all?

I wouldn’t say a dl is totally out out place here, as there is quite a
bit of flexibility in where a dl is proper, but I think here it is a bit
of a stretch. But were you to use it, it should be done like thus:

<dl> <dt>“Just the…</dt> <dd>As he…</dd> <dt>Supporting…</dt> <dd>By a….</dd> </dl>

Or, better still, does someone have another solution which I’ve missed completely?
With XHTML2 ans CSS3 this would be much easier. XHTML2 has the <l> tag,
though I suppose a <span> can sit in its stead. The lack of CSS3, where
you could select each (2n) lines (I forget the exact syntax), or even
full implementation of CSS2, is more of a problem. Since you need to
work with what’s available, how’s about:

<p class=”stanza”> <span class=”lineA”>“Just the…</span> <span class=”lineB”>As he…</span> <span class=”lineA”>Supporting…</span> <span class=”lineB”>By a….</span> </p>

or:

<p class=”stanza”> “Just the… <span class=”lineB”>As he…</span> Supporting… <span class=”lineB”>By a….</span> </p>

or:

<p class=”stanza”> <span>“Just the… <span>As he…</span></span> <span>Supporting… <span>By a….</span></span> </p>

or:

<div class=”stanza”> <p> “Just the… <span>As he…</span> </p> <p> Supporting… <span>By a….</span> </p> </div>

or even:

<p class=”stanza”> <span>“Just the…<br /> As he…</span> <span>Supporting…<br /> By a….</span> </p>

with:

p { padding-left : 2em; } span { text-indent : -2em; display : block; }

This is one of the few places where a <br /> is semantic.

I’m sure there are more possibilities, but this is what I came up with.

As you can see, he had more than a handful of suggestions, which were quite workable. I’ve got significant issues with most of them, though, because all but the last solution (marked in red) would not render correctly as unstyled content. This ceases (at that point) to be a purely presentational issue — the markup simply doesn’t reflect the line (foot structure, meter, etc.) as composed by the poet. And, at this point it is necessary to point out that accessibility isn’t just about non-sighted users — it’s also about graceful failure in browsers which don’t support every feature the developer may desire. This means Internet Explorer, it means Netscape 4, it means screen readers and it means users who choose to browse with either stylesheets or images disabled, for whatever reason.

The only reason consecutive span tags as in the example would function is because of the CSS information which specifies display: block;. As soon as you disable styles, your content begins to be displayed inline (as span tags will behave by default), and the structure of the poem (or whatever other text) disappears.

With the last example, the line break tag preserves standard formatting without requiring any degree of styling. The indentation disappears, but that doesn’t leave us in any worse a situation than when we began.

So, there we go. A semantic solution! Go forth and use it, or something. I’ll be working it into my style sheets here at some point, and using it as required.

Pirates, and other movie-related things

Whilst this SMH article is discussing something completely different, I was interested (perhaps saddened?) to learn that there is a sequel to Pirates of the Caribbean in the works. That sucks!

What is it with the movie industry and milking successful movies these days? Of course, I’d go and see the sequel, but that doesn’t mean they’d be able to make it anywhere near as good as the first!

Hyde Park.The only exception to this rule, of course, are films which are never intended to stand alone, drawing from a rich (or not so rich) background of film material in order to create parody. That’s okay. Again, sequels are still bad, but following up a concept isn’t. I saw Shaun of the Dead last night with Tori and Ben, and it has to be one of the funnier movies I’ve seen for some time now — especially given the ever-so-slightly twisted genre employed.

After the movie, we went drifting around the city for another two hours or so, visiting the most excellent “Sydney Life” exhibition in Hyde Park, as part of Sydney’s “Art and About” event this year. There’s a series of canvases strung up along the main pathway in Hyde Park North (today is the last day it’s up), with prints which are about 4 meters wide. My favorite was either “The True House” or a piece inspired by A Midsummer Night’s Dream, “Midsummer Eve“. Tori stood staring at “Mark” for ages, so I guess that’d be her favorite, and Ben seemed to have an affinity for “Heath Training” , although I may be wrong.

If you’re around the city this afternoon, and they haven’t taken them down yet, go take a look: it’s worth it.

Imprisoned.

A short story, in which an imaginative journey occurs. Yeah, it’s moderately poor, but I wrote it in about 40 minutes (as though it were an exam), so there we go. My excuses end. The story begins here.

Imprisoned.

Imprisoned.
The grey walls surround me. A shaft of light falls – at this moment – towards the door of my cell, the beam emanating from a narrow hole in the ceiling.
I sit against the door, in this ray of warmth which pierces the cold concrete surrounds, and begin to drift towards sleep; the first for days.

A field.
My son is running, in the golden expanse. He chases after the dog, yelling as it barks. I smile, and lean back into my chair on the verandah. Turning left, I see my wife sleeping peacefully.

Awake.
Cold has returned, the sun has taken its gift of warmth. I move to the bed and sit – the wall does not change, yet I continue to stare at it, as though it may do so at any moment.
Hours later, my eyes close. Screaming pierces the cell.

Home.
It is dinner. My wife and child sit at the table, near a fireplace. I hear the rain outside, beating against the windows hidden behind curtains. I leave the room to fetch a drink – the house is cold, apart from that room, and so I close the door behind me as I leave.

Awake.
My screaming has stopped. I don’t understand why it began. The wall is still the same.

Home.
Water flows into the first glass, into the second. The flow shudders as I fill the third, but runs still. It is dark in the kitchen by now – illuminated only by light of the storm beating outside. I did not bother with the light as I entered, and do not consider it as I leave the room.

Still.
I observe the wall still, tracing the imperfections of the slab over with my eyes. The lines blur, fading to be imperceptible against the endless grey expanse of the cell. Again, dreams come.

Home.
Carrying drinks, I leave the kitchen, walking in the cold expanse between rooms. My feet sound against the storm, softly on carpet.
The door. I swing it open, anticipating warmth, light, noise. Cold, dark, still.

Open.
My dream stops. I am awake again, my eyes open, my body upright (as it was when I slept). The room is no longer so dark – a diffuse light fills it from outside. Morning has come. Seeing nothing else, I close my eyes again, opening them to the dream.

Doorway.
I stand at the entrance to the room, as though it were a sheer precipice. The fire has been extinguished, curtains blown open by the wind coming through gaping windows. Wind tears around the room, displacing objects.
My wife and the boy cannot be seen.

Light.
Again, I awake. The sun creeps towards the point at which light enters my cell directly – its azimuth, for me. Not quite. Sleep comes upon me once more.

Entry.
I enter the room. Placing glasses upon the table, I walk around the room. Both seats, empty. The fireplace bears not even embers – it is cold, the charred wood as dry and ashes undisturbed as though it were the end of a long summer.
Frantic, I yell from the window. A noise from behind me. I turn, to observe nothing but two of the glasses fallen, blown horizontal by the wind.

Their water runs red.

Windows slam and lock fast behind me, and as I turn, they harden, darken, becoming opaque before my eyes.

Once more, I turn. My cell forms before me.

Cell.
The beam has arrived – I feel it, now attuned to the room and its changes. My eyes open – the wall which once had borne the entrance has changed.

I walk through the now-empty space, to observe the sun glowing golden against a field.

Leaping from the verandah, I chase my son, shouting, running, across the golden expanse.

Clemenceau amuses me.

Despite being struck by the freedom of expression permitted in America when he visited it in the 1860s, Clemenceau was later recorded as saying this of America:

America is the only nation in history which miraculously has gone directly from barbarism to degeneration without the usual interval of civilization.

Amusing, but hardly consistent.