What has you here today?    work history (html) about me tajik bookmarks
AUGUST, 2003 → ← OCTOBER, 2003

19th of September, 2003 POST·MERIDIEM 08:41

In case anyone was wondering how much of a black art imake is ?

http://​marc.​theaimsgroup.​com/​?l=xfree86-devel&m=106399654420130&w=2

“BTW, how are things like host vs target imake binaries handled when cross-compiling?” — David Dawes, President of The XFree86 Project, and their Imake guru.

Last comment from Aidan Kehoe on the 3rd of March at 16:57
Making a comment on an ancient entry, to see what happens ...

[No older comments for this entry.]

17th of September, 2003 ANTE·MERIDIEM 10:25

Okay, in a loosely typed language like PHP or, God forbid, Perl, consider the following snippet;
if ($instanceOfSillyClass->getFlag() == true) { ...

Now, what’s wrong with this? Well, okay, presumably getFlag(), given its name, is going to return something that will make sense in the context of an if  statement test. Let’s go check ... it does, so that comparison with “== true” is redundant. Given our language is interpreted (most loosely typed ones are, today) there’s going to be some—really miniscule—extra amount of time and space needed to parse it, so that’s bad. Not bad to the extent that anyone reading the code will care, though, so it’s okay.

The thing is, there is more to it than that. If someone who does this for a living reads code that is at first sight redundant, that person will ask themselves why that code was written, is there is more to it than what is seen here. And the only reasonable motivation for putting that check there is if getFlag() can return something that would be interpreted as success by an if statement, but that wouldn’t “==” successfully against true. That is, something like:
...
return (count($this->someMemberArray) ? count($this->someMemberArray) :
($otherMember ? false : true));

But getFlag() doesn’t. Okay, right, this looks like a stylistic quirk of our writer. But how will she write the code if she is  using a function that does behave like our second snippet? We can’t be sure, but the first snippet would remain a valid approach, so we have to consider this as likely. So, when our reader sees the “== true”, there is never any certainty of the behaviour of the function result being compared. Not a huge issue, you would imagine. But, there are already enough stupid things that can go wrong when you’re writing code that adding something else decreases our quality of life and tilts the reader’s opinion of you towards the “net benefit to my existence: negative” side of things. So don’t do that, please.

Also, and on an almost unrelated note, - -$kudos to the otherwise cool Larry Wall for removing the option of single-statement blocks for if  {} and for  {} in Perl, just as editors were available that knew enough about the languages to hand that they pointed out cockups in this area early. Thus predestinating people from certain C schools to syntax cock-ups every time they do a short-term venture into the world of non-context-free-grammar and crazy object-orientation syntax.

10th of September, 2003 POST·MERIDIEM 05:58

Oh, and I got feedback published by a real magazine! http://​www.​spectator.​co.​uk/​article.​php3?id=3483 , search for the text “Aidan.” Of course, it’s not actually getting put on paper, and it is the Spectator, which can tend towards the crazy. I should contain my enthusiasm. Anyway.

If you’re like me, and you’re accessing an XEmacs that’s connected to an X display through a TTY using gnuclient(1), (setq display-time-echo-area t) before calling (display-time) is useful; it stops trying to display the digits of the time as .XPM files, and moves the time instead down to the right-hand corner of the minibuffer as text, where it’s readable. (Projected interested audience of this paragraph; zero. Perhaps one, if I forget how to do this and have to go rummaging through the archives.)

I’m moving in with my sisters, to an apparently nice house in Glasnevin. And I might be moved, and have my deposit back, before the 20th, which would be convenient.

6th of September, 2003 POST·MERIDIEM 03:21

I’m not doing much, which is mainly why I’m not writing anything here. Plus, I ended up having to move house (so; get together one month’s deposit + one month’s rent) in the month before I burn up money in the Estados Unidas. Ech.

3rd of September, 2003 POST·MERIDIEM 02:17

André Gide’s Si le grain ne meurt  is possibly the most annoying autobiography I’ve read. The man made a useless, insensitive, snobbish child and I’m prepared to believe that he did say that suicide was “« louable » for certain people” to someone who was to kill himself a few months later. Why he felt the need to share this state of affairs with the world escapes me.

Addendum: [1] sums up my feelings on it, exactly.

[1] http://​www.​gidiana.​net/​Comptes_rendus/​Presse_SGM/​CR_Gourmont_SGM.​html su