Re: comment/reflection upon code style guidelines

Markus Dolze <[email protected]>
Newsgroups gmane.comp.sysutils.lcdproc
Message-ID <[email protected]>
Hello

On 08.08.2011 11:38, Liselore Vermeulen wrote:
> L.S.
>
> <replace with polite and clever greeting to all />
>
> I'm having a remark to the "code guidelines"
> the combination of these lines:
> - tabulation to 8 characters

Yes, a tab is 8 characters.

> - lines truncated on 80 chars

You *should* stick to that because this is still the default size of a
console. It is not really required on X where editor and terminal
windows show more on the screen, but using diff on the console is a pain
with more than 80 columns.

Actually if too much wrapping occurs I enforce 100 columns when running
indent. But still 80 is preferred.

> has as consequence - in my opinion/experience -
>  - to use "short" variable names , instead of "clearlyDescribing" ones..
>  - search for exotic constructions (or even worse: goto's) to reduce level of indentation.

Deeply nested levels of indention show that splitting complex tasks into
simpler ones was not done carefully. The deeply nested loops of the
language parser in client and core e.g. could really be easier to
understand.

BTW: I currently prefer forward goto's for clean error handling. They
are not that bad if properly used.

> Since indent is used anyway... do these code guidelines still hold ?

Yes. And my indent is configured to enforce these.

> Friendly serial greetings,
> L.V.
> _______________________________________________
> LCDproc mailing list
> [email protected]
> http://lists.omnipotent.net/mailman/listinfo/lcdproc
>

Regards,
Markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.