From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 22 Jan 2001 11:20:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 22 Jan 2001 11:20:21 -0500 Received: from srv01s4.cas.org ([134.243.50.9]:62649 "EHLO srv01.cas.org") by vger.kernel.org with ESMTP id ; Mon, 22 Jan 2001 11:20:11 -0500 From: Mike Harrold Message-Id: <200101221619.LAA11557@mah21awu.cas.org> Subject: Re: [OT?] Coding Style To: jearle@nortelnetworks.com (Jonathan Earle) Date: Mon, 22 Jan 2001 11:19:53 -0500 (EST) Cc: linux-kernel@vger.kernel.org ('Linux Kernel List') In-Reply-To: <28560036253BD41191A10000F8BCBD116BDCC5@zcard00g.ca.nortel.com> from "Jonathan Earle" at Jan 22, 2001 11:04:50 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > > > -----Original Message----- > > From: profmakx.fmp [mailto:profmakx.fmp@gmx.de] > > > > So, every good programmer > > should know where to put comments. And it is unnecessary to > > put comments to > > explain what code does. One should see this as stated in the > > CodingStyle doc. > > Ok, there are points where a comment is good, but for example > > at university > > we are to comment on every single line of code ... > > WRONG!!! > > Not documenting your code is not a sign of good coding, but rather shows > arrogance, laziness and contempt for "those who would dare tamper with your > code after you've written it". Document and comment your code thoroughly. > Do it as you go along. I was also taught to comment nearly every line - as > part of the coding style used by a large, international company I worked for > several years ago. It brings the logic of the programmer into focus and > makes code maintenance a whole lot easier. It also helps one to remember > the logic of your own code when you revisit it a year or more hence. > There is an old programmer's rule. "Documentation? Too bad. If the code was damned hard to write, it should be damned hard to understand." :) /Mike - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/