Women in Technology

Hear us Roar

  Transforming iCal Calendars with Java
Subject:   buglet. Java 1.3.x? Awk.
Date:   2003-05-22 02:32:41
From:   leeharveyosmond
[1] "This code is presented as an example. Do not use it on data for which you don't have a copy. It hasn't been widely tested."

Yes. In my experience you shouldn't rely on the order of any of the items in a BEGIN:... END:... container. So the regexen could so easily fail.

[2] Some of us using Java for useful work on MacOSX are doing it with WebObjects -- which isn't certified for 1.4.x . And java.util.Pattern etc were introduced in 1.4 . There are alternative regex Java classes available though.

[3] The cautions against perl are in my opinion well-advised. Of course, one could instead write a 'sh' script to invoke 'awk' instead of 'perl'. Remember 'awk'? A regex-enabled scripting language, learnable from the single man page, and very comprehensible to someone familiar with C or Java, with scripts potentially way more readable than those for perl. If there's a down side, it's the lack of modern extended regular expressions. But I'm routinely turning all sorts of random textual data culled from webpages into iCal files, using 'awk'.

But for all that -- cool article. It's very difficult to produce short example programs that both illustrate something useful and do real work.