[comp.lang.c] A style outlook

jerbil@nntp-server.caltech.edu (Joseph R. Beckenbach) (10/29/90)

In re:
	v = (a[i-1][j-1] + a[i][j-1] + a[i-1][j+i] + a[i-1][j] + a[i][j] +
		 a[i-1][j+1] + a[i-1][j+1] + a[i][j-1] + a[i-1][j+1])/9;

[ Aside: should be?
  mesh_avg = ( a[i-1][j-1] + a[i  ][j-1] + a[i+1][j-1] +
               a[i-1][j  ] + a[i  ][j  ] + a[i+1][j  ] +
               a[i-1][j+1] + a[i  ][j+1] + a[i+1][j+1]   ) / 9;
]

rtm@christmas.UUCP (Richard Minner) writes:

>My question is why is so little of the code I've seen `neat' in
>appearance?  I have this anal tendency to line things up as
>much as possible, and otherwise neaten the code.  To me, it makes
>similarities and differences stand out so much better.  Sometimes
>I'll even try a few different layouts and pick the one that seems
>clearest (sick, I know).  I've even spotted errors in foreign code
>after realigning it to get a better look.

	I wish I had a project onto which I could hire people with your
attitude.  Perhaps a reason that sloppy and obscure code appears on the net
is that it's a good forum for first efforts -- but the code reflects that.
Another would be that the professionals are making money elsewhere and
the results haven't trickled back yet in terms of knowledge gained about
maintainable-code expertise.


	A person who understands that code is meant for the human reader,
not the computer, is on the way to acquiring a professional attitude in
regards to software. 

	Back off the soapbox steps the professional-wannabe
		Joseph Beckenbach