[thelist] Coding standards....
Barney Carroll
barney at textmatters.com
Thu Dec 7 09:32:29 CST 2006
Chris Ditty wrote:
> Can a few of you share your coding standards?
Comments are great...
As far as syntax conventions go I actually prefer people to use whatever
they prefer... It allows me to track down culprits when my scripts mess
up! Through no agreement or anything, we have me assigning variables etc
with no word separation: thisisavar whereas the two other people likely
to touch code in my office respectively use camel-case and hyphenation:
thisIsAVar; this-is-a-var. Generally it's good to have people working
comfortably and naturally with their own code whilst understanding
others'. Obviously when you have lots more people you're not in
immediate contact with dealing with your stuff, a higher level of
standardisation becomes very attractive.
The way you suggest CSS is amusing in that you don't seem to consider it
absolutely mandatory and without credible alternative. Hehehe.
With all code I think document separation and layout is incredibly
important. Semantic variables (ie they say what they do and they are
what they is), separate documents for separate purposes (typography.css,
layout.css...), nice amounts of white space between code snippets,
dividers between groups, etc.
The most important advice I can give regarding impersonal shared
authoring is in the use of Subversion [http://subversion.tigris.org/]
(which is absolutely indispensable, and the future of everything etc.)
in combination with Trac [http://trac.edgewall.org/]. Having a timeline
of how files evolved, why and where ammendments were made etc allows you
to know the mind and working methods of people you need never even speak to.
When I'm dealing with complex code, I find these things imperative even
as an individual.
Regards,
Barney
--
Barney Carroll
Text Matters
Information design: we help explain things using
language | design | systems | process improvement
_______________________________________________________
phone +44 (0)118 918 2382 email barney at textmatters.com
web http://www.textmatters.com
More information about the thelist
mailing list