Path: utzoo!mnetor!tmsoft!torsqnt!hybrid!scifi!bywater!uunet!saxony!dgil From: dgil@pa.reuter.COM (Dave Gillett) Newsgroups: comp.lang.c Subject: Re: need "yy-ddd-hh:mm:ss ==> (time_t) clock" converter Message-ID: <790@saxony.pa.reuter.COM> Date: 25 Feb 91 09:26:48 GMT References: <368@bria> <6586@gssc.UUCP> <2323@stsci.EDU> <1991Feb18.133937.28469@fivegl.co.nz> Distribution: comp Organization: Reuter:file Inc (A Reuter Company) Palo Alto, CA Lines: 19 In <1991Feb18.133937.28469@fivegl.co.nz> hugh@fivegl.co.nz (Hugh Grierson) writes: >Maintainability???? How often *do* you have to change the number >of days in a month????? (Sept 1752 notwithstanding) >Readability? A one-line comment... Sorry. If I'm trying to find a defect in the program's date-handling, I can verify by eye the {31, 28, ... } form. Even with a comment, it may take several moments to understand what the {31, 59, ... } form is trying to do -- especially if I didn't write this piece of code (which happens, you know). And it will take several minutes to verify that these magic numbers are in fact calculated correctly, a waste of both the author's and the maintainer's time and effort. If your algorithm, for efficiency's sake, really must use the numbers in this form, then the table should be built by the machine at run time, and the numbers in the source should be the familiar ones that anyone can easily verify. Dave