From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public From: "Rick Smith" Subject: Re: Software landmines (loops) Date: 1998/09/08 Message-ID: #1/1 X-Deja-AN: 389240817 References: <902934874.2099.0.nnrp-10.c246a717@news.demon.co.uk> <6r1glm$bvh$1@nnrp1.dejanews.com> <6r9f8h$jtm$1@nnrp1.dejanews.com> <6renh8$ga7$1@nnrp1.dejanews.com> <6rf59b$2ud$1@nnrp1.dejanews.com> <6rfra4$rul$1@nnrp1.dejanews.com> <35DBDD24.D003404D@calfp.co.uk> <6sbuod$fra$1@hirame.wwa.com> <35f51e53.48044143@ <904556531.666222@miso.it.uq.edu.au> <6sf87j$47n$1@hirame.wwa.com> <6sh6ic$o8p$1@nnrp1.dejanews.com> <6shhcq$lid$1@hirame.wwa.com> <6sk59r$8e6$1@nnrp1.dejanews.com> <6ske0c$16k$1@hirame.wwa.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 X-Trace: news1.atlantic.net 905306951 207.30.140.112 (Tue, 08 Sep 1998 22:09:11 EDT) NNTP-Posting-Date: Tue, 08 Sep 1998 22:09:11 EDT Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-08T00:00:00+00:00 List-Id: Giovanni 8 wrote in message ... >> Rick Smith wrote: >> The benefits of windowing should be clear. >> >> 1. No user should be required to enter more data than is >> necessary. If the correct 4 digit year can be determined >> by the last two digits, do not ask for more than these >> 2 digits. > >Yes, but how big is that "if"? A computer is a tool that should make jobs easier for users. Yet, I have seen too many cases where the developer uses fixed, inflexible formatting to ease *their* job of validating and processing the data; rather than making reasonable assumptions about data content to make it easier for the user to enter data. Fixed, inflexible formatting would require the entry of a year, for date of hire, even if the turn over for the organization is 90 per cent. This means that, with respect to date of hire, at least, 90 per cent of the time, the year is not required. If it has any semblence to a date, I will try to process it as such; but it is still your responsibility to determine if I have properly recognized the date you intended. >> 2. Given the choice between windowing and reformating >> persistent data, choose windowing. Reformating existing >> data could break other parts of the system. > >I disagree. The other parts of the system are already broken; >you've just been skating on thin ice. Repair them. Repair >your date formats. It doesn't really take all that long one >once you bite the bullet, and go on with life secure in knowing >that that problem will never ever catch up with you again. Disagree. There are, at least, three classes of programs, with respect to how they use the date. 1. Processes the date and must be corrected. 2. Passes the date without significant processing (e.g., printing the date in reports). 3. Uses a structure which contains a date but does not use the date, itself (e..g, uses employee master which has hire date). Changing the format of the date means that programs of types 2 and 3 must be changed even though they are not broken. >> Finally, for new systems or when reformating persistent data >> choose to store the data with 4 digit years or replace a >> calendar date format with a standard date format. > >Hmmm. Which "standard"? M$'s standard? The one that only >recently has been changed to handle dates after 1999-12-31? >There's an ISO standard (1685?) that at least allows a >reaonable format. Depends upon language, platform, etc. Just make certain that a standard exists. ISO appears fine in most cases; including the transport of data among systems. The COBOL standard integer date could be used within COBOL. However, C's time_t should never be stored in persistent data nor passed to other systems (from a discussion in < news:comp.std.c >). ------------------------------- Rick Smith e-mail: < ricksmith@aiservices.com >