Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Curious compiler warning Date: Fri, 13 Jan 2012 01:31:51 +0000 (UTC) Organization: UK Free Software Network Lines: 53 Message-ID: References: <9n64rgF40bU1@mid.individual.net> <1igsg7d3eggiptf23g9vd0flv19ghqs83d@4ax.com> NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1326418311 15694 84.45.235.129 (13 Jan 2012 01:31:51 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Fri, 13 Jan 2012 01:31:51 +0000 (UTC) User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11293 On Thu, 12 Jan 2012 16:11:43 -0800, Patricia Shanahan wrote: > Martin Gregorie wrote: >> On Wed, 11 Jan 2012 18:18:57 -0800, Gene Wirchenko wrote: >> >>> Oh, my. Bad style. That is bad, isn't it? I am wearing a dark >>> grey sweater and medium brown pants. Is anyone's compiler concerned >>> about my style? >>> >> IMO the only egregiously bad style is not sticking to the style used by >> the original programmer when you're amending the program. In my book >> this is an invariant rule, no matter how obnoxious the original style >> is because doing anything else is sure-fire way to make even very ugly >> code much worse. >> >> >> > I agree. In a few cases, I've kept a shadow copy of some code that was > formatted with reasonable indentation etc. for reading, but still made > my changes in the original code, warts and all. > Very bad style (COBOL example - sorry) - all data names took the form XXnn where, for instance MT01 was the name of the first record in the first file declared and it went on MT02, MT03, MT04... through the fields in that record and continued in this fashion through all the fields in all the record definitions in 3 or 4 files. Same for cards (from CD01), printers (from LP01) and through working storage (WS01.....) - Procedure division was similar: all paragraph names were of the form GDnnnnn, were not in numeric sequence, and no sections were used. ...and this was a 5000 line program! The same clowns had developed an entire accounting package this way, except for a few programs which were written in equally obnoxious assembler. That means assembler with almost no comments or labels and an obsession with using register-register operations and relative jumps in preference to named storage locations and jumps to labels. To make matters worse, one of our idiot managers had bought the blasted package without appraising either the code or the (almost non-existent) documentation. The third axiom of programming being "If a program is useful, it must be modified", guess who got lumbered with that.... -- martin@ | Martin Gregorie gregorie. | Essex, UK org |