[13910] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

No subject found in mail header

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 10 17:47:49 1999

Date: Mon, 8 Nov 1999 12:18:04 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942092284-v9-i1306@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 8 Nov 1999     Volume: 9 Number: 1306

Today's topics:
    Re: localtime object y2k compliant? <gellyfish@gellyfish.com>
    Re: localtime object y2k compliant? <ralph@ee.net>
    Re: localtime object y2k compliant? <flavell@a5.ph.gla.ac.uk>
    Re: localtime object y2k compliant? <gellyfish@gellyfish.com>
    Re: localtime object y2k compliant? <camerond@mail.uca.edu>
    Re: localtime object y2k compliant? <finsol@ts.co.nz>
    Re: localtime object y2k compliant? <bivey@teamdev.com>
    Re: localtime object y2k compliant? <aqumsieh@matrox.com>
    Re: localtime object y2k compliant? <aqumsieh@matrox.com>
    Re: localtime object y2k compliant? <cassell@mail.cor.epa.gov>
    Re: localtime object y2k compliant? <cassell@mail.cor.epa.gov>
    Re: localtime object y2k compliant? <cassell@mail.cor.epa.gov>
    Re: localtime object y2k compliant? (Alan Curry)
    Re: localtime object y2k compliant? <gellyfish@gellyfish.com>
    Re: localtime object y2k compliant? <gellyfish@gellyfish.com>
    Re: localtime object y2k compliant? <gellyfish@gellyfish.com>
    Re: localtime object y2k compliant? (Abigail)
    Re: localtime object y2k compliant? <gellyfish@gellyfish.com>
    Re: localtime object y2k compliant? (Kragen Sitaker)
    Re: localtime object y2k compliant? (Kragen Sitaker)
    Re: localtime object y2k compliant? mkruse@netexpress.net
    Re: localtime object y2k compliant? (David H. Adler)
    Re: localtime object y2k compliant? (Kragen Sitaker)
    Re: localtime object y2k compliant? mkruse@netexpress.net
    Re: localtime object y2k compliant? (Chris Torek)
    Re: localtime object y2k compliant? (Bart Lateur)
    Re: localtime object y2k compliant? (Bart Lateur)
    Re: localtime object y2k compliant? (Mark W. Schumann)
    Re: localtime object y2k compliant? <ralph@ee.net>
    Re: localtime object y2k compliant? (Randal L. Schwartz)
    Re: localtime object y2k compliant? (Craig Berry)
    Re: localtime object y2k compliant? mkruse@netexpress.net
    Re: localtime object y2k compliant? (Kragen Sitaker)
    Re: localtime object y2k compliant? (Sam Holden)
    Re: localtime object y2k compliant? <wyzelli@yahoo.com>
    Re: localtime object y2k compliant? (David H. Adler)
    Re: localtime object y2k compliant? <bivey@teamdev.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 5 Nov 1999 14:30:20 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <3822e9fc_2@newsread3.dircon.co.uk>

In comp.lang.perl.misc Abigail <abigail@delanet.com> wrote:
> David Cassell (cassell@mail.cor.epa.gov) wrote on MMCCLVI September
> MCMXCIII in <URL:news:38221D17.3C3A409F@mail.cor.epa.gov>:
> $$ 
> $$ Actually, her article listing some 300 non-compliant webpages
> $$ may be of interest to some members of this newsgroup.
> 
> 
> Hmm, yeah, perhaps. I'm not really impressed by seeing the same error
> appear multiple times, because of slight variations in the URL.
> 
> Does one really have to list
> 
>     http://cgi.dol.ru:$port/readme/textclock.html
> 
> for 4 different values of $port?
> 

Actually if one was to closely examine those three hundred files I would
bet that they would boil down to somewhere just under ten programs  in
reality ...


/J\
-- 
"Tony Blair. Make it so" - Patrick Stewart


------------------------------

Date: Fri, 05 Nov 1999 10:18:24 -0500
From: Ralph Daugherty <ralph@ee.net>
Subject: Re: localtime object y2k compliant?
Message-Id: <3822F540.A09F9C3C@ee.net>

Abigail wrote:
> 
> This is nice too: <from Jocelyn Amon's non-compliant webpages list>
> 
>    Y2K COUNTDOWN PROGRAM. Therefore the programmer must have been year
>    2000 aware and no excuses then for hardcoding 19!
> 
> I don't know about the planet Jocelyn lives on, but all the time I'm
> counting down to the year 2000, the current year starts with 19....


   This is the ultimate programmer denialists's post...

 Ralph


------------------------------

Date: Fri, 5 Nov 1999 14:54:37 +0000
From: "Alan J. Flavell" <flavell@a5.ph.gla.ac.uk>
Subject: Re: localtime object y2k compliant?
Message-Id: <Pine.OSF.4.20.9911051448260.15235-100000@a5.ph.gla.ac.uk>

On 5 Nov 1999, Jonathan Stowe wrote:

quoting an article that hasn't shown up here...

> In comp.lang.perl.misc Abigail <abigail@delanet.com> wrote:

> > Hmm, yeah, perhaps. I'm not really impressed by seeing the same error
> > appear multiple times, because of slight variations in the URL.
> > 
> > Does one really have to list
> > 
> >     http://cgi.dol.ru:$port/readme/textclock.html
> > 
> > for 4 different values of $port?

FWIW, this seems to be a technique used on Russian servers for
delivering the same content in different character codings
("charsets") without doing content-negotiation (how many browsers send
accept-charset headers indicating their relative preferences for
Cyrillic codings anyway?).

I would give you a pointer to the appropriate Russian Apache web
page where it's explained... but it would be off-topic for either
of these groups, I guess.

best regards



------------------------------

Date: 5 Nov 1999 16:21:44 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <38230418_2@newsread3.dircon.co.uk>

In comp.lang.perl.misc Ralph Daugherty <ralph@ee.net> wrote:
> Abigail wrote:
>> 
>> This is nice too: <from Jocelyn Amon's non-compliant webpages list>
>> 
>>    Y2K COUNTDOWN PROGRAM. Therefore the programmer must have been year
>>    2000 aware and no excuses then for hardcoding 19!
>> 
>> I don't know about the planet Jocelyn lives on, but all the time I'm
>> counting down to the year 2000, the current year starts with 19....
> 
> 
>    This is the ultimate programmer denialists's post...

'programmer denialist' ?

It appears that the millenium nutter culture has developed its own argot ...

/J\
-- 
"I thought homogenous culture was a kind of yogurt used to alleviate
thrush" - Ben Elton


------------------------------

Date: Fri, 05 Nov 1999 11:01:31 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: localtime object y2k compliant?
Message-Id: <38230D6B.F3EEC43A@mail.uca.edu>

(Actually, I'm replying to Jocelyn's post, but it has not shown up on
the newsserver we use, and may never, if past experience is any guide -
I still have to read replies to Abigail's posts to even know that she is
still with us)

> Jocelyn Amon wrote:
> > Cameron Dorey wrote:
> > "Let's see, you sent this somewhere over an hour ago... I'm going to give
> > you an experiment to see if localtime is YMM-compliant (the teaching
> > gurus call this "active learning"). You have a nice small script there.
> > Set your computer's clock to, say, Feb 27, 2002. Run the script. Did it
> > work? That experiment took, oh, 45 seconds? Next time, please try
> > something like this before you waste an hour of your time, which I
> > assume is valuable."
> >
> > When will you 'experts' and know-it-alls get it. No amount of
> > patronising put-downs, abuse or be-littling of others is going to change
> > a thing.

Where did I put Ken down, abuse, or belittle him? (Perhaps the tone was
a little dry) I suggested to him a way to find the answer he wanted
quickly, and absolutely, which I suggested would save _his_ valuable
time. If you think that calling someone's time valuable is a put-down,
then I don't understand the term. The only guess that I made is that he
either did not think of doing the experiment or that he thought it would
be difficult/time-consuming to write a test script, and I pointed out
that the one he already had was perfect for his purposes.

> >  Programmers use logic.  This programmer has applied logic to
> > the situation and he, logically, assumes that adding 1900 to the year
> > value will not give him the correct 4 digit year value after 1999. Seems
> > very logical to me!  So maybe he should have run a test to see.  But
> > that is a failing of many programmers - don't run tests, jump to
> > conclusions or let users find the bugs.

I don't think that is a good characteristic of "many programmers," and I
would bet that it is a chartacteristic of only a small minority. I don't
know how many replies to questions I have seen in the Perl forums here
and the Win32Perl mailing lists which start off with "Have you tried
this? What did it do?" but it is a bunch. Besides, I don't think that
"logic" was applied here, but a quick leap of faith (or non-faith)
without thinking it through. Sorry, Ken, but that's the way I saw it. If
the rules say add 1900 to the localtime year value will give you the
correct 4-digit year, then why would someone assume it will not without
trying it? That is not logical to me, but then, I am not a "programmer."

> > You can't change programmer thinking but ranting on about 'shoulds'! The
> > many queries to this newsgroup re localtime is proof of this.  Localtime
> > usage is ill-conceived and will be the cause of a lot of Y2K failures
> > regardless of all the 'shoulds' you very clever Perl people 'in the
> > know' like to repeat ad-infinitum.  Just give the guy the right answer
> > or leave it to someone else to respond reasonably.

I didn't rant on about "shoulds," I never used the word anywhere. I just
taught him a technique which hopefully he will find useful in the
future, perhaps on another problem. I think this was a very resonable
response, applicable in the general, as well as in the specific.

"Give a man a fish; you have fed him for today. Teach a man to fish; and
you have fed him for a lifetime" - Chinese proverb.

That's what I do, I'm a teacher. I experiment because I'm a scientist. I
happen to believe these two things are useful.

[remainder of redundant, ad hominem, and/or irrelevant stuff snipped, I
got tired]

Cameron

-- 
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu


------------------------------

Date: Fri, 05 Nov 1999 18:35:04 GMT
From: Jocelyn Amon <finsol@ts.co.nz>
Subject: Re: localtime object y2k compliant?
Message-Id: <7vv80o$26v$1@nnrp1.deja.com>

In article <01bf2714$c32e8be0$3527e1ce@bill.jump.net>,
  "William" <bivey@teamdev.com> wrote:
<SNIP>
> The only question is, since the return values for localtime
> are not self evident, the programmer in question must have at
> least glanced at the documentation to use it at all, so how
> could he miss this bit? How clever do you have to be to read
> a simple paragraph or two? (Methinks being Y2K compliant is
> the least problem in this case.)-Wm
>
>
It is not uncommon for programmers to learn from looking at existing
code - correct?  So, why would they need to query localtime usage when
they see it already used in code and they can see quite clearly how the
year value is extracted?  Why would they have any reason to think they
would need to refer to the manual?  Maybe programmers 'should' learn
from the manual but my guess is that the vast majority learn by example
- not by referring to the manual every time they need to code something
just slightly unfamiliar. That is the real world of programming.  Where
do you work - in an ivory tower?

Jocelyn Amon
--
http://www.ts.co.nz/~finsol/


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: 5 Nov 1999 19:33:12 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <01bf27c4$d794f500$3527e1ce@bill.jump.net>

Jocelyn Amon <finsol@ts.co.nz> wrote in article
<7vv80o$26v$1@nnrp1.deja.com>...
> In article <01bf2714$c32e8be0$3527e1ce@bill.jump.net>,
> It is not uncommon for programmers to learn from looking at existing
> code - correct? So, why would they need to query localtime usage when
> they see it already used in code and they can see quite clearly how the
> year value is extracted?  Why would they have any reason to think they
> would need to refer to the manual?

I might agree with you except that the original poster was
obviously troubled by what he saw. Is it logical - your word -
to suspect something might be broken and then not look up the
suspect function in the documentation? (In this case, the
poster didn't say he actually had Perl - only a book - so
he may not have had access to the docs, but that's beside
the general point.)

I'd also point out that the example he was learning from was
correct. 

> Maybe programmers 'should' learn from the manual but my guess
> is that the vast majority learn by example - not by referring
> to the manual every time they need to code something just slightly
>unfamiliar. That is the real world of programming.

How can you use the word "guess" in one sentence, then state in
the next that what you "guessed" is a fact. Which is it? A
guess or a fact?

All of the programmers I've ever worked with use the manual
if they have any question, especially if they are dealing
with something unfamiliar. Most of them probably spend
several hundred dollars a year, minimum, on supplemental
manuals, as well. This is especially true when they were
just starting out in something unfamiliar. (Try learning
C++ purely from example.)

Of course, that's only anecdotal, so I won't claim it's a
fact that's true of all programmers, or even a vast
majority.


>Where do you work - in an ivory tower?

No, but I can see one from here... -Wm



------------------------------

Date: Fri, 5 Nov 1999 14:27:28 -0500 
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <x3yeme4spr5.fsf@tigre.matrox.com>


Jocelyn Amon <finsol@ts.co.nz> writes:

> If anyone would like to read further on the Y2K and Perl problem, check
> out the booby-trap code article at URL:
> http://www.ts.co.nz/~finsol/y2k_articles.htm

I have read some of your posts before, and I suspect this article is
really a very long version of them, so I won't bother. But what amazes
me is your enthusiam. I wonder whether you are doing this for the
benefit of the world, or do you have some personal gain in stake.

To me, and everyone else except you apparently, it seems that the
implications of the Y2K bugs in the code you found are not that
serious. A wrong date (19100) would simply appear on some of the
websites, which will (hopefully) cause the owners of those pages to
investigate, and eventually fix the problem. 

I am 100% sure that, with all the hype surrounding Y2K, any
respectable company has already hired someone to fix any Y2K bugs in
their code, and any remaining bugs are simply insignificant.

So, the summary of my post, is that "Why do you bother? And what do
you think is the damage that the code you found will inflict on the
world when the year 2000 rolls over?"

--Ala



------------------------------

Date: Fri, 5 Nov 1999 14:40:30 -0500 
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <x3ybt98sp5f.fsf@tigre.matrox.com>


David Cassell <cassell@mail.cor.epa.gov> writes:
> Jocelyn Amon wrote:
> > You can't change programmer thinking but ranting on about 'shoulds'! The
> > many queries to this newsgroup re localtime is proof of this.  Localtime
> > usage is ill-conceived and will be the cause of a lot of Y2K failures
> 
> It will only be the cause of Y2K failures on websites where
> people have snitched cargo-cult code or whipped up ugly kludges
> without bothering to read the docs first.  

There's a subtle point here. *Someone* must have written the buggy
code. This same someone must have known that localtime(), in list
context, returns the year as its sixth element. To know that, that
someone must have read *something* in the docs.

A perfect example of selective attention.

Perhaps if the docs employ some marketing strategies that help direct
the reader's attention to the most important (ie. all) pieces of the
docs, life will be a much better place.

Freudianly yours,
--Ala



------------------------------

Date: Fri, 05 Nov 1999 13:39:56 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: localtime object y2k compliant?
Message-Id: <38234EAC.1247D9B2@mail.cor.epa.gov>

Abigail wrote:
> 
> David Cassell (cassell@mail.cor.epa.gov) wrote on MMCCLVI September
> MCMXCIII in <URL:news:38221D17.3C3A409F@mail.cor.epa.gov>:
> $$
> $$ Actually, her article listing some 300 non-compliant webpages
> $$ may be of interest to some members of this newsgroup.
> 
> Hmm, yeah, perhaps. I'm not really impressed by seeing the same error
> appear multiple times, because of slight variations in the URL.
[snip]

I liked seeing the same stupid error over and over, like some
awful cancer metastatizing throughout the web.

> This is nice too:
> 
>    Y2K COUNTDOWN PROGRAM. Therefore the programmer must have been year
>    2000 aware and no excuses then for hardcoding 19!
> 
> I don't know about the planet Jocelyn lives on, but all the time I'm
> counting down to the year 2000, the current year starts with 19....

My fave is Jocelyn bashing Matt Kruse (*NOT* Matt Wright) for this:

    $year =~ s/19(..)/$1/;

Where Kruse has the year and is just trimming down to 2 digits.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Fri, 05 Nov 1999 13:41:50 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: localtime object y2k compliant?
Message-Id: <38234F1E.D178E398@mail.cor.epa.gov>

Jonathan Stowe wrote:
[snip]
> Actually if one was to closely examine those three hundred files I would
> bet that they would boil down to somewhere just under ten programs  in
> reality ...

Well, not ten programs, but less than ten different forms of
screwup [Perl programs only].  There were some nifty dumb-
Javascript snippets which Jocelyn Amon identified as giving
*two* different wrong answers, depending on the JScript version.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Fri, 05 Nov 1999 13:44:19 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: localtime object y2k compliant?
Message-Id: <38234FB3.9B66DBE4@mail.cor.epa.gov>

Ala Qumsieh wrote:
> 
> David Cassell <cassell@mail.cor.epa.gov> writes:
> > Jocelyn Amon wrote:
> > > You can't change programmer thinking but ranting on about 'shoulds'! The
> > > many queries to this newsgroup re localtime is proof of this.  Localtime
> > > usage is ill-conceived and will be the cause of a lot of Y2K failures
> >
> > It will only be the cause of Y2K failures on websites where
> > people have snitched cargo-cult code or whipped up ugly kludges
> > without bothering to read the docs first.
> 
> There's a subtle point here. *Someone* must have written the buggy
> code. This same someone must have known that localtime(), in list
> context, returns the year as its sixth element. To know that, that
> someone must have read *something* in the docs.
[snip]

Actually, I think the situation is worse (from my POV anyway).
My suspicion is that most of these errors were made by people
who had *no* idea what localtime() did, but just did something
with some code they found elsewhere.  Only they started with
bad code, and then they did something stupid with it.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Fri, 05 Nov 1999 21:57:07 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: localtime object y2k compliant?
Message-Id: <ToIU3.31964$23.1673458@typ11.nn.bcandid.com>

In article <x3yeme4spr5.fsf@tigre.matrox.com>,
Ala Qumsieh  <aqumsieh@matrox.com> wrote:
>So, the summary of my post, is that "Why do you bother? And what do
>you think is the damage that the code you found will inflict on the
>world when the year 2000 rolls over?"

You can't go wrong spreading Y2K hysteria. If things go horribly wrong, you
were right and everyone will know it! If the world doesn't end, you get to
take credit because your scary talk is what motivated the programmers to get
off their lazy overpaid butts and do the work. You're a hero either way!
-- 
Alan Curry    |Declaration of   | _../\. ./\.._     ____.    ____.
pacman@cqc.com|bigotries (should| [    | |    ]    /    _>  /    _>
--------------+save some time): |  \__/   \__/     \___:    \___:
 Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman


------------------------------

Date: 5 Nov 1999 20:57:19 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <7vvgbf$8j3$1@gellyfish.btinternet.com>

In comp.lang.perl.misc Jocelyn Amon <finsol@ts.co.nz> wrote:
> In article <01bf2714$c32e8be0$3527e1ce@bill.jump.net>,
>   "William" <bivey@teamdev.com> wrote:
> <SNIP>
>> The only question is, since the return values for localtime
>> are not self evident, the programmer in question must have at
>> least glanced at the documentation to use it at all, so how
>> could he miss this bit? How clever do you have to be to read
>> a simple paragraph or two? (Methinks being Y2K compliant is
>> the least problem in this case.)-Wm
>>
>>
> It is not uncommon for programmers to learn from looking at existing
> code - correct?  

I dont know Jocelyn - you seem to be the one that knows everything 
about programming you tell us.

>                  So, why would they need to query localtime usage when
> they see it already used in code and they can see quite clearly how the
> year value is extracted?  

Where exactly did they find this code that they have copied ?

>                           Why would they have any reason to think they
> would need to refer to the manual?  

Perhaps because they have a query about the way that some function they
are using behaves.

>                                     Maybe programmers 'should' learn
> from the manual but my guess is that the vast majority learn by example

Your 'guess' ... fine but what example ? 

> - not by referring to the manual every time they need to code something
> just slightly unfamiliar. 

You are entirely incorrect about this. Entirely, utterly incorrect - you 
obviously have never been a programmer.

>                            That is the real world of programming.  Where
> do you work - in an ivory tower?
> 

That appears to be not so far from where you work.  The majority of the
people you seem to be taking issue with are professional programmers, *you*
appear to have no clue about the real world ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: 6 Nov 1999 12:49:56 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <80185k$ac6$1@gellyfish.btinternet.com>

In comp.lang.perl.misc David Cassell <cassell@mail.cor.epa.gov> wrote:
> 
> My fave is Jocelyn bashing Matt Kruse (*NOT* Matt Wright) for this:
> 
>     $year =~ s/19(..)/$1/;
> 
> Where Kruse has the year and is just trimming down to 2 digits.
> 

Of course one doesnt know the context of this: it may for all I know be
a script that indexes episodes of the Monkees and thus the century can
be guaranteed.  Of course that would be more simply written as: 

  $year = $year % 100 ;


no '19' in there to upset the millenium nutters.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: 6 Nov 1999 13:16:46 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <8019nu$acc$1@gellyfish.btinternet.com>

On Fri, 05 Nov 1999 13:44:19 -0800 David Cassell wrote:
> Ala Qumsieh wrote:
>> 
>> David Cassell <cassell@mail.cor.epa.gov> writes:
>> > Jocelyn Amon wrote:
>> > > You can't change programmer thinking but ranting on about 'shoulds'! The
>> > > many queries to this newsgroup re localtime is proof of this.  Localtime
>> > > usage is ill-conceived and will be the cause of a lot of Y2K failures
>> >
>> > It will only be the cause of Y2K failures on websites where
>> > people have snitched cargo-cult code or whipped up ugly kludges
>> > without bothering to read the docs first.
>> 
>> There's a subtle point here. *Someone* must have written the buggy
>> code. This same someone must have known that localtime(), in list
>> context, returns the year as its sixth element. To know that, that
>> someone must have read *something* in the docs.
> [snip]
> 
> Actually, I think the situation is worse (from my POV anyway).
> My suspicion is that most of these errors were made by people
> who had *no* idea what localtime() did, but just did something
> with some code they found elsewhere.  Only they started with
> bad code, and then they did something stupid with it.
> 

But I think that Ala's point was that if *someone* hadnt read the 
documentation in the first place somewhere back in the primordial soup
that spawned the likes of Matt's Script Archive then they wouldnt have
known that (localtime)[5] gave the year at all - they might have just
carried on using `date` instead.  Actually there could be another slant
on this - or even more than one indeed:  the Pink Camel and thus the
Perl 4 documentation were less than explicit about this - referring the
reader to the documentation for 'struct tm' , the majority of the really
bad script kiddie stuff does exhibit the signs of being written for
Perl 4, so the original author(s) of the ancestor code may not have
had direct access to the documentation for the 'C' localtime and made
the fatal assumption that (localtime)[5] was $year % 100 rather than
$year - 1900.  This need only have happened once and in one program at a
key point in time for the diffusion process to kick in and for the code
that embodies this error to have been cut and pasted into the scripts of
a thousand 'web developers'.  

A second possiblity is that this belief developed through observation -
without any external evidence and with the lack of intellectual rigour that
distinguishes the script kiddie it might be inferred from  merely observing
the output of localtime (and bearing in mind that prior to Perl 5 it
didnt do the context magic it does now) what the return values were 
*without reference to any documentation whatsoever* - this does presuppose
that the proto script kiddie knew about localtime in the first place but
it would be possible to imagine that the name of the function was passed
on through the 'folk knowledge' without the accompanying detail.

/J\

-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: 6 Nov 1999 10:25:55 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: localtime object y2k compliant?
Message-Id: <slrn828lrg.2i1.abigail@alexandra.delanet.com>

Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCCLVIII September
MCMXCIII in <URL:news:80185k$ac6$1@gellyfish.btinternet.com>:
$$ In comp.lang.perl.misc David Cassell <cassell@mail.cor.epa.gov> wrote:
$$ > 
$$ > My fave is Jocelyn bashing Matt Kruse (*NOT* Matt Wright) for this:
$$ > 
$$ >     $year =~ s/19(..)/$1/;
$$ > 
$$ > Where Kruse has the year and is just trimming down to 2 digits.
$$ > 
$$ 
$$ Of course one doesnt know the context of this: it may for all I know be
$$ a script that indexes episodes of the Monkees and thus the century can
$$ be guaranteed.  Of course that would be more simply written as: 
$$ 
$$   $year = $year % 100 ;
$$ 
$$ 
$$ no '19' in there to upset the millenium nutters.


Ah, but the $year =~ s/19(..)/$1/; leaves you with a 2 character
string, while $year = $year % 100 leaves with a, possible 1-digit,
number.

And maybe it was interfacing with some system that uses 2 digit years
for years < 2000, and 4 digit years afterwards.

Of course $year =~ s/19(..)/$1/; will give weird results in just over
9900 years. A real y11.9k error. But 99 centuries should be enought to
put a ^ in.


Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: 6 Nov 1999 18:55:15 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <801tij$bb5$1@gellyfish.btinternet.com>

In comp.lang.perl.misc Abigail <abigail@delanet.com> wrote:
> Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCCLVIII September
> MCMXCIII in <URL:news:80185k$ac6$1@gellyfish.btinternet.com>:
> $$ In comp.lang.perl.misc David Cassell <cassell@mail.cor.epa.gov> wrote:
> $$ > 
> $$ > My fave is Jocelyn bashing Matt Kruse (*NOT* Matt Wright) for this:
> $$ > 
> $$ >     $year =~ s/19(..)/$1/;
> $$ > 
> $$ > Where Kruse has the year and is just trimming down to 2 digits.
> $$ > 
> $$ 
> $$ Of course one doesnt know the context of this: it may for all I know be
> $$ a script that indexes episodes of the Monkees and thus the century can
> $$ be guaranteed.  Of course that would be more simply written as: 
> $$ 
> $$   $year = $year % 100 ;
> $$ 
> $$ 
> $$ no '19' in there to upset the millenium nutters.
> 
> 
> Ah, but the $year =~ s/19(..)/$1/; leaves you with a 2 character
> string, while $year = $year % 100 leaves with a, possible 1-digit,
> number.
> 

$year = sprintf("%.02d", $year % 100);

then ;-}

> And maybe it was interfacing with some system that uses 2 digit years
> for years < 2000, and 4 digit years afterwards.
>

Yer, there is always that.
 
> Of course $year =~ s/19(..)/$1/; will give weird results in just over
> 9900 years. A real y11.9k error. But 99 centuries should be enought to
> put a ^ in.
> 

Guess its time to persuade Jocelyn to invest in some cryogenics.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: Sat, 06 Nov 1999 22:41:24 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: localtime object y2k compliant?
Message-Id: <o82V3.48925$23.1865665@typ11.nn.bcandid.com>

In article <3822F540.A09F9C3C@ee.net>, Ralph Daugherty  <ralph@ee.net> wrote:
>Abigail wrote:
>> 
>> This is nice too: <from Jocelyn Amon's non-compliant webpages list>
>> 
>>    Y2K COUNTDOWN PROGRAM. Therefore the programmer must have been year
>>    2000 aware and no excuses then for hardcoding 19!
>> 
>> I don't know about the planet Jocelyn lives on, but all the time I'm
>> counting down to the year 2000, the current year starts with 19....
>
>   This is the ultimate programmer denialists's post...

Can you elaborate on what you mean?  Where can I join the Programmer
Denialists?

And can you explain exactly what the use of having a Y2K countdown
program that properly handles post-Y2K current dates is?
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


------------------------------

Date: Sat, 06 Nov 1999 22:43:51 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: localtime object y2k compliant?
Message-Id: <Ha2V3.48928$23.1866009@typ11.nn.bcandid.com>

In article <80185k$ac6$1@gellyfish.btinternet.com>,
Jonathan Stowe  <gellyfish@gellyfish.com> wrote:
>Of course one doesnt know the context of this: it may for all I know be
>a script that indexes episodes of the Monkees and thus the century can
>be guaranteed.  Of course that would be more simply written as: 
>
>  $year = $year % 100 ;
>
>no '19' in there to upset the millenium nutters.

Trimming it down to two digits should be enough to upset them.

BTW, I was reading Scott McMahan's book (_Automating Windows with
Perl_) and was stunned to learn that he didn't know what % was.  (It's
not that I gathered this; he actually *said* it in the book.  After
Randal suggested that using % would improve one of his scripts.)

Maybe the /19(..)/ guy didn't understand % either.  You'd think he'd
use ..(..) at least though.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


------------------------------

Date: Sat, 06 Nov 1999 23:57:27 GMT
From: mkruse@netexpress.net
Subject: Re: localtime object y2k compliant?
Message-Id: <802f96$72m$1@nnrp1.deja.com>

In article <38234EAC.1247D9B2@mail.cor.epa.gov>,
  David Cassell <cassell@mail.cor.epa.gov> wrote:
> Abigail wrote:
> >
> > David Cassell (cassell@mail.cor.epa.gov) wrote on MMCCLVI September
> > MCMXCIII in <URL:news:38221D17.3C3A409F@mail.cor.epa.gov>:
> > $$
> > $$ Actually, her article listing some 300 non-compliant webpages
> > $$ may be of interest to some members of this newsgroup.
> >
> > Hmm, yeah, perhaps. I'm not really impressed by seeing the same
error
> > appear multiple times, because of slight variations in the URL.
> [snip]
>
> I liked seeing the same stupid error over and over, like some
> awful cancer metastatizing throughout the web.
>
> > This is nice too:
> >
> >    Y2K COUNTDOWN PROGRAM. Therefore the programmer must have been
year
> >    2000 aware and no excuses then for hardcoding 19!
> >
> > I don't know about the planet Jocelyn lives on, but all the time I'm
> > counting down to the year 2000, the current year starts with 19....
>
> My fave is Jocelyn bashing Matt Kruse (*NOT* Matt Wright) for this:
>
>     $year =~ s/19(..)/$1/;
>
> Where Kruse has the year and is just trimming down to 2 digits.
>
> David
> --
> David Cassell, OAO                     cassell@mail.cor.epa.gov
> Senior computing specialist
> mathematical statistician
>

--
Matt Kruse
mkruse@netexpress.net
http://mkruse.netexpress.net/


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: 7 Nov 1999 01:57:50 GMT
From: dha@panix7.panix.com (David H. Adler)
Subject: Re: localtime object y2k compliant?
Message-Id: <slrn829n4u.68f.dha@panix7.panix.com>

In article <80185k$ac6$1@gellyfish.btinternet.com>, Jonathan Stowe wrote:
>
>Of course one doesnt know the context of this: it may for all I know be
>a script that indexes episodes of the Monkees and thus the century can
>be guaranteed.

Oh?  How do you know that new episodes of The Monkees will not be
produced in the next century?  Of course, were it to feature new
actors, it might be argued that that would not *really* be The
Monkees, but that's an issue of a more philosophical nature...  :-)

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
We honestly don't want to see another technicolored cow.
	- the #macintosh faq


------------------------------

Date: Sun, 07 Nov 1999 02:02:36 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: localtime object y2k compliant?
Message-Id: <055V3.49750$23.1894227@typ11.nn.bcandid.com>

In article <802f96$72m$1@nnrp1.deja.com>,  <mkruse@netexpress.net> wrote:
>In article <38234EAC.1247D9B2@mail.cor.epa.gov>,
>  David Cassell <cassell@mail.cor.epa.gov> wrote:
>> My fave is Jocelyn bashing Matt Kruse (*NOT* Matt Wright) for this:
>>
>>     $year =~ s/19(..)/$1/;
>>
>> Where Kruse has the year and is just trimming down to 2 digits.
>>
>
>--
>Matt Kruse
>mkruse@netexpress.net
>http://mkruse.netexpress.net/

Did you intend to comment on why you wrote it that way?  I'm curious.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


------------------------------

Date: Sun, 07 Nov 1999 04:01:07 GMT
From: mkruse@netexpress.net
Subject: Re: localtime object y2k compliant?
Message-Id: <802ti2$g9i$1@nnrp1.deja.com>

In article <38234EAC.1247D9B2@mail.cor.epa.gov>,
  David Cassell <cassell@mail.cor.epa.gov> wrote:
> My fave is Jocelyn bashing Matt Kruse (*NOT* Matt Wright) for this:
>     $year =~ s/19(..)/$1/;
> Where Kruse has the year and is just trimming down to 2 digits.

Oops. Previous message didn't get sent right (I'm not at home :)

I think Jocelyn is doing me an injustice, here, and possibly others.
She is ignoring the context of the results she is showing everyone.

The example she gives from me is something I wrote back in 1995, when I
first began using Perl. It's poor programming. Not something I would
like associated with my name.

I make it VERY clear on my web site that the collection that this
script comes from is old and no longer supported. The scripts may
contain bad programming examples. I only keep them on my site because
there was still a deman for them after I initially removed them
completely.

Take a look at the first two lines of the script she refers to:

# NOTE: This was one of my first scripts.  There are some ugly
# things in here.  Please forgive me :)

Looks like she just did a simple search and didn't pay attention to any
disclaimers or warnings people may have had on their site. Very
unfortunate.

Take a look at my current calendar script:
http://www.mattkruse.com/scripts/calendar/

It doesn't suffer from any Y2K problems, it handles leap years
correctly, and it is a fine example of perl programming, IMO.

I find it unfortunate that my name would be associated with a stupid
programming mistake like shown above, when I clearly state for all to
see that the script is NOT supported nor do I consider it a good
example script to learn from or use. It's there just in case anyone
still wants it.

Hope that clears my name a bit :)

--
Matt Kruse
mkruse@netexpress.net
http://mkruse.netexpress.net/


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: 6 Nov 1999 22:50:20 -0800
From: torek@elf.bsdi.com (Chris Torek)
Subject: Re: localtime object y2k compliant?
Message-Id: <8037fc$o3m$1@elf.bsdi.com>

In article <802ti2$g9i$1@nnrp1.deja.com> <mkruse@netexpress.net> wrote:
>I think Jocelyn is doing me an injustice, here, and possibly others.
>She is ignoring the context of the results she is showing everyone.
>
>The example she gives from me is something I wrote back in 1995, when I
>first began using Perl. It's poor programming. Not something I would
>like associated with my name.
>
>I make it VERY clear on my web site that the collection that this
>script comes from is old and no longer supported. The scripts may
>contain bad programming examples. I only keep them on my site because
>there was still a deman for them after I initially removed them
>completely.

This sort of misunderstanding, by the way, leads some people to
put a comment *on the same line* when illustrating incorrect
code, versus correct code.  For instance:

	/* this is an example of misuse of "tm_year" in C */
	time_t now;
	struct tm *tm;

	if (time(&now) == (time_t)-1)
		panic("time()");
	tm = localtime(&now);
	printf("%d/%d/%d\n", tm->tm_mon+1, tm->tm_mday, tm->tm_year);/*WRONG*/

This helps ensure that even if someone snips the offending line 
out of its context, it retains the note that says "this is wrong".

>Take a look at the first two lines of the script she refers to:
>
># NOTE: This was one of my first scripts.  There are some ugly
># things in here.  Please forgive me :)
>
>Looks like she just did a simple search and didn't pay attention to any
>disclaimers or warnings people may have had on their site. Very
>unfortunate.

You might want to go back and annotate each "ugly" line as to exactly
why it is ugly (in your copious spare time, perhaps? :-) ).
-- 
In-Real-Life: Chris Torek, Berkeley Software Design Inc
El Cerrito, CA	Domain:	torek@bsdi.com	+1 510 234 3167
http://claw.bsdi.com/torek/  (not always up)	I report spam to abuse@.


------------------------------

Date: Sun, 07 Nov 1999 11:36:43 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: localtime object y2k compliant?
Message-Id: <3827559d.2103572@news.skynet.be>

Cameron Dorey wrote:

>I suggested to him a way to find the answer he wanted
>quickly, and absolutely, which I suggested would save _his_ valuable
>time.

A simple test never gives *absolute* results. For example, a simple test
with the current date would seem to prove that the year in localtime()
returns the last two digits of the year. Actually you can never do
enough tests to prove anything conclusively. The first test you no
longer bother to do any more, might have contradicted your claim.

-- 
	Bart.


------------------------------

Date: Sun, 07 Nov 1999 11:36:45 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: localtime object y2k compliant?
Message-Id: <382858a8.2882573@news.skynet.be>

Larry Rosler wrote:

>> aw, come on larry, intel/hp will have merced (or itanium) out by then?
>> and surely you will be around for 38 more years!
>
>But why would I want to still be doing this stuff?

Because you're hooked? Just like the rest of us?

-- 
	Bart.


------------------------------

Date: 7 Nov 1999 10:08:47 -0500
From: catfood@apk.net (Mark W. Schumann)
Subject: Re: localtime object y2k compliant?
Message-Id: <8044lv$e4@junior.apk.net>

In article <01bf27c4$d794f500$3527e1ce@bill.jump.net>,
William <bivey@teamdev.com> wrote:
>All of the programmers I've ever worked with use the manual
>if they have any question, especially if they are dealing
>with something unfamiliar.

I know many who do not.

For some reason these are the same programmers whose programs
never seem to work quite right, and whose projects are never
quite finished.



------------------------------

Date: Sun, 07 Nov 1999 11:08:31 -0500
From: Ralph Daugherty <ralph@ee.net>
Subject: Re: localtime object y2k compliant?
Message-Id: <3825A3FF.FA138303@ee.net>

mkruse@netexpress.net wrote:
> 
> In article <38234EAC.1247D9B2@mail.cor.epa.gov>,
>   David Cassell <cassell@mail.cor.epa.gov> wrote:
> > My fave is Jocelyn bashing Matt Kruse (*NOT* Matt Wright) for this:
> >     $year =~ s/19(..)/$1/;
> > Where Kruse has the year and is just trimming down to 2 digits.
> <snip>
> I think Jocelyn is doing me an injustice, here, and possibly others.
> She is ignoring the context of the results she is showing everyone.
> 
> The example she gives from me is something I wrote back in 1995, when I
> first began using Perl. It's poor programming. Not something I would
> like associated with my name.
> 
> I make it VERY clear on my web site that the collection that this
> script comes from is old and no longer supported. The scripts may
> contain bad programming examples. I only keep them on my site because
> there was still a deman for them after I initially removed them
> completely.
> 
> Take a look at the first two lines of the script she refers to:
> 
> # NOTE: This was one of my first scripts.  There are some ugly
> # things in here.  Please forgive me :)
> 
> Looks like she just did a simple search and didn't pay attention to any
> disclaimers or warnings people may have had on their site. Very
> unfortunate.
> 
> Take a look at my current calendar script:
> http://www.mattkruse.com/scripts/calendar/
> 
> It doesn't suffer from any Y2K problems, it handles leap years
> correctly, and it is a fine example of perl programming, IMO.
> 
> I find it unfortunate that my name would be associated with a stupid
> programming mistake like shown above, when I clearly state for all to
> see that the script is NOT supported nor do I consider it a good
> example script to learn from or use. It's there just in case anyone
> still wants it.
> 
> Hope that clears my name a bit :)
> 
> --
> Matt Kruse
> mkruse@netexpress.net
> http://mkruse.netexpress.net/


   This is a very good point, Matt.  I have exchanged a few e-mails with
Jocelyn over the last couple of years.  She described in her initial posting
of this incident the search criteria she used one day to find these 300 hits,
and she obviously did not examine the context within which her finds were
located.  She never should have listed your code.

   Clearly Perl and Perl programmers are in great shape re: Y2K, if nothing
else due to the system nature of the code versus business database
processing.  However, I saw in the hits that many came from .edu pages which
is scary if they're from the institution, understandable if they're from
students.  I think that a bit more followup with these hits would have
prevented Jocelyn from tarring a group with the broad brush undeservedly.  I
also think, however, that she didn't get anywhere trying to converse on the
issue and get the understanding of the potential problems out there she was
seeking, and dropped this load to start some kind of dialogue, however
uncivil.

   She should have looked at the context of the hits and refrained from
including you in this list, Matt.  A search doesn't see the warnings that even
a rookie would see visiting that section of code.

 Regards,
 Ralph


------------------------------

Date: 07 Nov 1999 09:04:57 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: localtime object y2k compliant?
Message-Id: <m1aeoqjkqu.fsf@halfdome.holdit.com>

>>>>> "Kragen" == Kragen Sitaker <kragen@dnaco.net> writes:

Kragen> BTW, I was reading Scott McMahan's book (_Automating Windows with
Kragen> Perl_) and was stunned to learn that he didn't know what % was.  (It's
Kragen> not that I gathered this; he actually *said* it in the book.  After
Kragen> Randal suggested that using % would improve one of his scripts.)

Wow... Scott even put my comments in there, and *still* didn't use it?
I can't comment on that, since his publisher was too stingy to even
send me a final draft (nudge nudge :-).

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: Sun, 07 Nov 1999 17:40:16 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: localtime object y2k compliant?
Message-Id: <s2bec0re2cl83@corp.supernews.com>

mkruse@netexpress.net wrote:
: Take a look at my current calendar script:
: http://www.mattkruse.com/scripts/calendar/
: 
: It doesn't suffer from any Y2K problems, it handles leap years
: correctly, and it is a fine example of perl programming, IMO.

Well...

No -w, no -T, no 'use strict', hand-rolled CGI processing rather than
CGI.pm, and oddities like

	foreach $key (1700,1800,1900,2100,2200,2300,2500,2600,2700) {
		if ((($perp_year == $key) && ($perp_mon > 2))
		  || ($perp_year > $key)) {
			$perp_days -= 1;
		}
	}

rather than determining the "mod 100, not mod 400" rule algorithmically.
Why code a y2.9k problem when you can avoid it so easily? :)

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


------------------------------

Date: Sun, 07 Nov 1999 22:29:30 GMT
From: mkruse@netexpress.net
Subject: Re: localtime object y2k compliant?
Message-Id: <804ug7$q2n$1@nnrp1.deja.com>

In article <s2bec0re2cl83@corp.supernews.com>,
  cberry@cinenet.net (Craig Berry) wrote:
> mkruse@netexpress.net wrote:
> : Take a look at my current calendar script:
> : http://www.mattkruse.com/scripts/calendar/
> No -w, no -T, no 'use strict',

I'm considering adding these as I get more time to work on the script.
Unfortunately, some of these things cause problems with the script as I
currently have it written, dealing with plenty of eval() statements,
user-defineable templates, etc.

> hand-rolled CGI processing rather than CGI.pm

I do not use CGI.pm because I don't like it. It's big, it's ugly (IMO),
and bloated. For my purposes, I'd much rather do things my way. Plus,
you'll notice that my code doesn't rely on *any* external modules or
include files. I do this so it's 100% portable to any OS and any
configuration. Even though CGI.pm is pretty 'standard' these days, it's
not always available. Using it causes more problems than it's worth for
me when writing a script that is designed to be "plug and play".

> and oddities like
> 	foreach $key (1700,1800,1900,2100,2200,2300,2500,2600,2700) {
> Why code a y2.9k problem when you can avoid it so easily? :)

Yeah, this is somewhat messy, I admit ;) But I got that snippit from an
existing calendar app that was used by a co-worker. This script began
as a modification of his ultra-simple calendar, and the date logic
stayed with it. You'll happy to note that this entire date logic is
gone from my current working version :)

--
Matt Kruse
mkruse@netexpress.net
http://mkruse.netexpress.net/


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Sun, 07 Nov 1999 23:44:04 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: localtime object y2k compliant?
Message-Id: <89oV3.54785$23.2047035@typ11.nn.bcandid.com>

In article <804ug7$q2n$1@nnrp1.deja.com>,  <mkruse@netexpress.net> wrote:
>In article <s2bec0re2cl83@corp.supernews.com>,
>  cberry@cinenet.net (Craig Berry) wrote:
>> hand-rolled CGI processing rather than CGI.pm
>
>I do not use CGI.pm because I don't like it. It's big, it's ugly (IMO),
>and bloated. For my purposes, I'd much rather do things my way. Plus,
>you'll notice that my code doesn't rely on *any* external modules or
>include files. I do this so it's 100% portable to any OS and any
>configuration. Even though CGI.pm is pretty 'standard' these days, it's
>not always available. Using it causes more problems than it's worth for
>me when writing a script that is designed to be "plug and play".

IMHO there is nothing wrong with this -- as long as you know enough to
roll your own *correctly*, which means handling requests without
Content-Length, correctly handling request types you don't recognize,
etc.

I don't find CGI.pm particularly ugly, myself, but it is undeniably
big.  In many cases, compiling CGI.pm takes longer than the rest of the
transaction, including starting Perl, opening the HTTP connection,
etc.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


------------------------------

Date: 8 Nov 1999 00:12:58 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: localtime object y2k compliant?
Message-Id: <slrn82c5cj.ng5.sholden@pgrad.cs.usyd.edu.au>

On Sun, 07 Nov 1999 22:29:30 GMT, mkruse@netexpress.net wrote:
>In article <s2bec0re2cl83@corp.supernews.com>,
>  cberry@cinenet.net (Craig Berry) wrote:
>> mkruse@netexpress.net wrote:
>> : Take a look at my current calendar script:
>> : http://www.mattkruse.com/scripts/calendar/
>> No -w, no -T, no 'use strict',
>
>I'm considering adding these as I get more time to work on the script.
>Unfortunately, some of these things cause problems with the script as I
>currently have it written, dealing with plenty of eval() statements,
>user-defineable templates, etc.
>
>> hand-rolled CGI processing rather than CGI.pm
>
>I do not use CGI.pm because I don't like it. It's big, it's ugly (IMO),
>and bloated. For my purposes, I'd much rather do things my way. Plus,
>you'll notice that my code doesn't rely on *any* external modules or
>include files. I do this so it's 100% portable to any OS and any
>configuration. Even though CGI.pm is pretty 'standard' these days, it's
>not always available. Using it causes more problems than it's worth for
>me when writing a script that is designed to be "plug and play".

Can you name an OS which can run a webserver and run perl but not run
the CGI module. Of course a 'modern' (for old values of modern ;) perl
is required.



------------------------------

Date: Mon, 8 Nov 1999 10:42:56 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <tspV3.96$aq3.14243@vic.nntp.telstra.net>

Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:80185k$ac6$1@gellyfish.btinternet.com...
> In comp.lang.perl.misc David Cassell <cassell@mail.cor.epa.gov> wrote:
> Of course one doesnt know the context of this: it may for all I know be
> a script that indexes episodes of the Monkees and thus the century can
> be guaranteed.  Of course that would be more simply written as:

Are you trying to imply that the Monkees are not Y2K compliant?  What about
music groups and songs?  Will my Elvis records cease to work after Y2K?

>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>

Wyzelli
Cheek wrapped firmly around tongue!




------------------------------

Date: 8 Nov 1999 05:37:37 GMT
From: dha@panix7.panix.com (David H. Adler)
Subject: Re: localtime object y2k compliant?
Message-Id: <slrn82cod1.r2o.dha@panix7.panix.com>

In article <804ug7$q2n$1@nnrp1.deja.com>, mkruse@netexpress.net wrote:
>In article <s2bec0re2cl83@corp.supernews.com>,
>  cberry@cinenet.net (Craig Berry) wrote:

> Even though CGI.pm is pretty 'standard' these days, it's not always
> available.

Well, that depends on how old you like to have the perl you're
running.  It's been part of the standard distribution for... well, I'm
not actually sure, but for quite a while.  :-)

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
He was from the planet Blobnar.
	- Jon Orwant


------------------------------

Date: 8 Nov 1999 18:40:46 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: localtime object y2k compliant?
Message-Id: <01bf2a19$04ec3080$3527e1ce@bill.jump.net>

Kragen Sitaker <kragen@dnaco.net> wrote in article
<o82V3.48925$23.1865665@typ11.nn.bcandid.com>...
> Can you elaborate on what you mean?  Where can I join the Programmer
> Denialists?

Just keep repeating: "Programmers aren't real. They do not
exist. Therefore, I need not fear them..." -Wm

"It is by caffeine alone I set my mind in motion..."



------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 1306
**************************************


home help back first fref pref prev next nref lref last post