Blog moved. Please update links. 3
I’ve moved web hosts and decided it was time to relaunch my blog as well as rechristen it ’Full Fathom Five’. It was also a good opportunity to smoke some of that red coloured crack (a.k.a. Ruby) by way of Typo.
Please update your feed links. The old feeds will stay valid for some time but will not reflect new posts.
New feeds can be found at:
Sincere thanks to Neale at Metawerx for 2 years of excellent customer service hosting my Java-based blog. Thanks also to Simon Brown for Pebble, my faithful blog web application for the last year or so.
"We did not expect our users to use non-latin characters" 3
I have a personal policy of poisoning the coffee of any developer in my team or in my general vicinity who utters this sentiment. I wish the tech lead(s) of a certain leading non-mainstream social networking site did too.
From their customer support department:
We are aware of the problems which you mentioned in your e-mail. However, unfortunately, we are currently not supporting non-latin characters on our website I am afraid.
This is simply because when **** was first designed, we did not expect our users to use non-latin characters. That is why there are not enough spaces in [Profile] section.
We are currently planning to translate **** into Japanese, as the first non-European language, and it hopefully will go live later this year.
Adding some level of i18n support to an application from the ground up just makes sense - even if you have no plans to localise anytime soon your customers are loathe to de-localise their names or their sentiments (ie anglicise) that they wish to store in your application.
One bag of ratsack is in the post.
Note to Apple #1 : Most PC owners have never purchased a USB keyboard 2
Apple on the Mac Mini: “Bring your own monitor, keyboard and mouse (or buy new ones)”. What’s not so easy to find on http://www.apple.com/uk/macmini/ is that PS2 mice and keyboards are as useful to the Mac Mini as an Atari 2600 joystick.
I hazard a guess that most PC owners have never purchased a USB keyboard. A casual glance at our office computer graveyard seems to confirm this : all but one of the 45 keyboards were PS2-based (and the exception was from an old iMac anyway).
Apple: if you don’t want to dissapoint your customers as soon as they switch their Mini on then please include a PS2 to USB converter. Surely they can’t be as expensive as the DVI to VGA converter you supply?
Congratulating Jules and Richard on the birth of their daughter! 1
Photos from Barcelona
The true cost of exceptions
Appledrama: I want my Mac (don't care what I have to do)* 3
So I decided to make the big leap into the Apple world. Actually, it turned out to be more like a sideways wobble.
Suffering from the Apple halo effect, I was quite happy to throw down £1100 for a nice new 12” Powerbook at the online Apple store. On their site, they state it’s ready to ship in 24hrs. With the 3-7 days of delivery time that should have meant I received my new baby at most a week after purchasing.
So I key in my credit card details and click submit faster than I’d accept a blow job from my gym instructor (Sammy, are you reading?) The first confirmation email I recieved gave a shipping date 48 business hours later (but I could have forgiven them that for just that).
And then came the 4 days of Applean silence.
After a rather shirty call to the Apple control centre and some fluffy appeasment by a call center operator with exactly the same information to hand as I had on my account screen at apple.com I was assured it would be ready to ship the next day.
Well, if “it” meant “disappointing news” and “ship” mean “send via SMTP” then exactly that happened – I received an email announcing that there had been “unprecedented demand” for my product, that the were “shipping as fast as possible” and were now likely to ship on or before the 11th April (9 days after I ordered it not including delivery time).
All of this I can forgive (I’m quite a forgiving kind of guy) except for one slight detail – Apple are still advising their potential customers by way of http://www.apple.com/uk/thestore that the 12” PowerBook Superdrive ships in 24hrs. This is patently not true so Apple are, by way of incompetence or intent, misrepresenting their shipping times. Since Apple haven’t yet taken my money I imagine none of this is illegal but as a Mac newbie this is clearly a very bad opening to what I expected would be a thrilling and empowering (if costly) relationship.
Anyway, once I get my Mac-fix I’m sure my mouthy opinions will quickly retreat back into Cupertino crack haze.
* Regarding the title, any self-respecting UK or Antipodean child of the eighties should remember Bananarama and their brilliantly plastic pop hit “I wan’t you back (don’t care what I have to do)”
Lexing headache: Hex Floats and Doubles in Java 5 1
My brain’s well and truely fried after a night of wrestling with Checkstyle’s java.g to make it happily recognise hex floats and decimals. See what I have to deal with:
NUM_INT
{boolean isDecimal=false; Token t=null;}
: '.' {_ttype = DOT;}
(
(('0'..'9')+ (EXPONENT)? (f1:FLOAT_SUFFIX {t=f1;})?
{
if (t != null && t.getText().toUpperCase().indexOf('F')>=0) {
_ttype = NUM_FLOAT;
}
else {
_ttype = NUM_DOUBLE; // assume double
}
})
|
// JDK 1.5 token for variable length arguments
(".." {_ttype = ELLIPSIS;})
)?
| ( '0' {isDecimal = true;} // special case for just '0'
( ('x'|'X')
( // hex
// the 'e'|'E' and float suffix stuff look
// like hex digits, hence the (...)+ doesn't
// know when to stop: ambig. ANTLR resolves
// it correctly by matching immediately. It
// is therefor ok to hush warning.
options {
warnWhenFollowAmbig=false;
}
: HEX_DIGIT
)+
| //float or double with leading zero
(('0'..'9')+ ('.'|EXPONENT|FLOAT_SUFFIX)) => ('0'..'9')+
| ('0'..'7')+ // octal
)?
| ('1'..'9') ('0'..'9')* {isDecimal=true;} // non-zero decimal
)
( ('l'|'L') { _ttype = NUM_LONG; }
// only check to see if it's a float if looks like decimal so far
| {isDecimal}?
( '.' ('0'..'9')* (EXPONENT)? (f2:FLOAT_SUFFIX {t=f2;})?
| EXPONENT (f3:FLOAT_SUFFIX {t=f3;})?
| f4:FLOAT_SUFFIX {t=f4;}
)
{
if (t != null && t.getText().toUpperCase() .indexOf('F') >= 0) {
_ttype = NUM_FLOAT;
}
else {
_ttype = NUM_DOUBLE; // assume double
}
}
)?
;
Gack! This is at once a lexer rule that may return a NUM_FLOAT, NUM_DOUBLE, NUM_INT, NUM_LONG, DOT or ELIPSIS token. The most trouble I’m having modifying this is making sure 0x.1P+127f is accepted as a float while 0x is not (0x is no longer necessarily followed by one or more HEX_DIGIT).
I’ll sleep on this one, I think. Cheers to David Flanagan for indirectly alerting me to this Java 5 language feature.
Linguistic freakshow: The Rising Australian Intonation and Other Oddities
Firstly I have to flag my absolute irritation with the Rising Australian Intonation (RAI). It’s like “California Valley Girl meets Little Aussie Battler”. It turns on its head the traditional UK rules of pronunciation where a rising intonation at the end of a sentence makes a question out of a statement – for RAI the rising intonation has no purpose yet suffers no existential crisis (at least for the speaker). To my mind though, RAI speech patterns sound a lot like the speaker is somehow seeking aproval or seems uncertain in the deliver of what they say – as if all they say is tentative and requires approval of the listener.
Many US speakers, particularly Californians, also speak with a permanent rising intonation so I’m hazarding a guess that it’s development is not unconnected with the greater traction US media has had in Australian popular culture over the last two decades. This is the price we pay for a decade of Friends re-runs, I guess. It’s also amusing to note that many British have detected a nascent RAI in their youngsters; with Neighbours and Home and Away blamed as the phonological communion wafer in that instance.
While we’re on the topic of Californian influences, another thing that annoys me, like, is like, when people like, say like ‘like’, like totally all the time. It’s a tired and hackneyed conversational filler, it takes about 30 points off your perceived IQ and it’s readily infecting Australia’s young. Australians: just give it up – it’s not native and it just makes you sound rubbish.
Another bizare pattern of Australian speech is the strange, contradictory, construction “Yeah, no, ....” or “No, yeah, ....” in response to a question. This pattern is not just restricted to the Vicky Pollards of our great continent, it’s perpetrated by all sorts. The first word can normally be considered social lubricant, the second normally addresses the question itself. When there is no question being responded to then its anyone’s guess the speaker’s disposition to the topic at hand.
There are many more attractions in this linguistic freakshow but I’ll save those for a later rant.