June 2007 Archives

My daytime nightmares

|

I've been seeing (or even looking at, at times) floaters (or another site) for nearly 10 years now. My ophthalmologist keeps telling me I shouldn't worry: sometimes I don't even notice them, sometimes I notice them but I don't mind them, but sometimes I just can't stand that crap (especially when I need to code a lot in front of my PC).

The news is I now learned the English name for them, and therefore discovered that millions of people suffer of the same problem (I won't call that a disease, nevertheless it's quite annoying). so I'm a bit reassured I'm not the only one (even though at present I really can't stand those floaters...). ;-)

Dynamic HTML: The Definitive Reference, 3rd edition
Danny Goodman
O'Reilly Media, 2006
ISBN-13: 978-0-596-52740-2
US$ 59.99

Rating: 4/5 (very good)

This O'Reilly book wants to be the definitive all-in-one guide for web developers, that is to say the one single book you need to keep on you desk when creating web sites. It covers everything from XHTML to CCS to DOM to JavaScript, and is very up-to-date (a lot of Ajax and other Web 2.0 stuff is included).

Does the guide achieve its goals? I think so, and I think it does that quite well. The reference is comprehensive, especially the DOM one which spawns across more than 500 pages (on a total of nearly 1300!). For every tag, DOM element, or JavaScript function you find in the reference, various details are provided: a browser compatibility list, a brief description, a (often minimal but focused) example, and the detail of parameters/attributes/return values/whatever applicable.

Each chapter of the guide comes with an introduction which explains the concepts for which you'll find the reference. This introductory parts are, however, the less useful of the whole book: they're just a few pages long, and not enough to learn concepts properly, so you either need to know those concepts beforehand, or you'll want to grab another - more explanatory - book.

All in all this book provides a valid reference and help for the web developer, as it allows to quickly retrieve the piece of information you don't know, or you can't remember. It's big, comprehensive, useful.

Ieri ho camminato da Poffabro fino a casera Valine Alte (sul Raut): l'anno scorso, nello stesso
periodo, era chiusa per lavori, e quest'anno l'ho potuta vedere piacevolmente ristrutturata (anzi, direi ricostruita). C'รจ anche il bagno con acqua corrente: meglio di un cottage svizzero. Alcune foto:

Complimenti dunque al Parco delle Dolomiti Friulane per questa ristrutturazione. A questo punto spero che sia in programma anche quella della casera Cavalet sul gruppo Preti-Duranno che versa in pessimo stato!!!

I recently discovered an interesting site, thanks to the great members of TalkBlade forums. By clicking a button no more than once a day, you can give 0.6 bowls of food to an homeless animal which has been rescued by various associations in the USA.

This is the link to the web site. The button you want to press is the one in the middle of the page with the FUND FOOD FOR ANIMALS writing: you just can't miss it. You might also want to take at the rest of the site, which features some nice stories, an e-card service, and a store.

Perl 6: Junctions

|

I recently began playing a bit with pugs, the current implementation of Perl 6. Junctions seem to be a great feature: among other things, they allow to write much cleaner or conditionals. Here's some Perl 5 code:

#!/usr/bin/perl

for my $num (1..8) {
    if ( $num == 3 || $num == 4 || $num == 6 ) {
        print "$num is ok!\n";
    }
}

and the corresponding Perl 6:

#!/usr/bin/pugs

for 1..8 -> $num {
    if ( $num == 3|4|6 ) {
        say "$num is ok!";
    }
}

The junction can also be created from an array:

#!/usr/bin/pugs

my @mylist = <3 4 6>;

for 1..8 -> $num {
    if ( $num == any(@mylist) ) {
        say "$num is ok!";
    }
}

Ahhh, syntactic sugar... :-) And you can have some it even in Perl 5 with the (lightweight) module Perl6::Junction.