Slashdot Mirror


User: darkspell

darkspell's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Re:19100?? on Y2K Rollover - Post Your Experiences Here! · · Score: 2
    A couple weeks ago I corrected quite a few of these Perl "localtime()" bugs. Grabbing localtime (or gmtime) in a scalar context works OK, but when you dump the results into an array, the year comes up as an integer = thisyear - 1900.

    Plenty of Perl programmers abused the language's ability to treat integers and strings as the same and just did $year = '19' . $year. Wrong! Correct fix is $year += 1900.

    Even the mighty Lincoln Stein, author of the venerable CGI.pm, was susceptible. Old versions of CGI.pm simply used the raw year (i.e., 100 on 1/1/2000) in setting a cookie expire time. But Lincoln, bless him, caught the error way in advance of Y2K and corrected it a couple of releases ago. He employed the correct fix: $year += 1900.

  2. Re:It's all legacy code... on Zona Research Does Programming Language Poll · · Score: 1
    The poll's driven by legacy code, sure. That's a lagging indicator. If they want a leading indicator, look at programming language book sales.

    The fact is, C/C++ is used quite a bit in large corporations. VB is a very accessible, easy to learn language and that's why you see it so much in corporate America. But I work for a quite large Internet ecommerce site, and Java has exploded in use here in the last 4 months. Most of our legacy code is C/C++ and Perl, but almost all new development is in Java. We may eventually rewrite the C/Perl stuff, or we may just use it till it dies.