From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev-return-5227-arch-gentoo-dev=gentoo.org@gentoo.org>
Received: (qmail 23208 invoked by uid 1002); 3 Aug 2003 18:09:05 -0000
Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm
Precedence: bulk
List-Post: <mailto:gentoo-dev@gentoo.org>
List-Help: <mailto:gentoo-dev-help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev-unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-dev-subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@gentoo.org
Received: (qmail 19839 invoked from network); 3 Aug 2003 18:09:05 -0000
From: Stuart Herbert <stuart@gentoo.org>
Reply-To: stuart@gentoo.org
To: azarah@gentoo.org
Date: Sun, 3 Aug 2003 19:07:02 +0100
User-Agent: KMail/1.5.3
Cc: vapier@gentoo.org,
 Gentoo-Dev <gentoo-dev@gentoo.org>
References: <200308022229.12533.vapier@gentoo.org> <200308031555.15888.stuart@gentoo.org> <1059923916.8312.16.camel@nosferatu.lan>
In-Reply-To: <1059923916.8312.16.camel@nosferatu.lan>
MIME-Version: 1.0
Content-Type: multipart/signed;
  protocol="application/pgp-signature";
  micalg=pgp-sha1;
  boundary="Boundary-02=_G9UL/MLO1ap5WOm";
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <200308031907.02960.stuart@gentoo.org>
Subject: Re: [gentoo-dev] Some 'proper coding' notes for ebuilds
X-Archives-Salt: b7400247-809a-4f9a-ac6c-d008ebb4af25
X-Archives-Hash: 67cddaa0917cf0cf554af09211f5ed20

--Boundary-02=_G9UL/MLO1ap5WOm
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Description: signed data
Content-Disposition: inline

'lo Martin,

On Sunday 03 August 2003 4:18 pm, Martin Schlemmer wrote:
> On Sun, 2003-08-03 at 16:55, Stuart Herbert wrote:
> > On Sunday 03 August 2003 3:34 am, Mike Frysinger wrote:
> > > (2) do not use spaces for indenting ... tabs are the standard
> >
> > Then the standard is broken, and needs updating.
>
> Reasoning ?

Because, in any non-trivial piece of code, indents can end up being a mixtu=
re=20
of tabs and spaces, rather than just tabs.  When this happens, and you use =
a=20
different tab size to the author, the indented code suddenly becomes a tad=
=20
unreadable.

This page puts it a bit better (and stronger ;-) than I can:

	http://www.jwz.org/doc/tabs-vs-spaces.html

Additionally ...

There's no value in insisting on a particular indenting scheme.  A good cod=
ing=20
standards document is a collection of technical review points to reduce the=
=20
number of defects that make it into a source control system.  If a proposed=
=20
standard has no effect on the defect rate, it doesn't belong in the coding=
=20
standards document.  Period.

(Stuff like epatch over patch technically belongs in the design standards=20
document - but it's common for design and coding standards to be combined=20
into a single document out of ignorance).

And, seeing as there's no formal peer review of code committed to CVS anywa=
y,=20
<strong emphasis>you have no mechanism to enforce the entireity of any=20
proposed standard</emphasis>.  Pitch the standard at stuff that actually=20
makes a difference (like epatch over patch).

If you really want to enforce an indentation standard, run CVS checkins=20
through indent or something.  Automate the mother.  That's how many=20
commercial organisations manage that type of problem.

Sorry, I've been handling these issues for too many years in the day job. =
=20
I'll take my SCM hat off now ;-)

Stu
=2D-=20
Stuart Herbert                                              stuart@gentoo.o=
rg
Gentoo Developer                                       http://www.gentoo.or=
g/
Beta packages for download            http://dev.gentoo.org/~stuart/package=
s/

GnuGP key id# F9AFC57C available from http://pgp.mit.edu
Key fingerprint =3D 31FB 50D4 1F88 E227 F319  C549 0C2F 80BA F9AF C57C
=2D-

--Boundary-02=_G9UL/MLO1ap5WOm
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQA/LU9GDC+AuvmvxXwRAqmvAJ0Wv9uJfI89wusp344gnQaaPpAn/wCgpOE9
HK2vL1Pb3JPHxNVfD5ARr+U=
=Etuq
-----END PGP SIGNATURE-----

--Boundary-02=_G9UL/MLO1ap5WOm--