koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] standardizing tab size in the Koha source code


From: Ambrose LI <address@hidden> via forwarder
Subject: [Koha-devel] standardizing tab size in the Koha source code
Date: Wed Feb 5 00:00:09 2003

Hi,

sorry for bringing up such a "trivial" thing as the correct tab
size in source code.

It seems that originally the source uses 4-character indents
but 8-character tabs, but it seems that later source uses
4-character tabs. People don't seem to realize this, and as a
result some files (e.g., returns.pl) have ended up in a messy
state where some tabs are 4-character but some 8-character, so
the source looks wrong no matter whether I set the tab size to
4 or 8 characters.

Would someone second me in setting a standard tab size? So that
all tabs would either mean 4 or 8 spaces. (Personally, I like
8-character tabs more, since the code will look right when I
"less" (or even "cat") it in an xterm.)

My rationale of standardizing the tab size are the following:

1. When the tab size is inconsistent, the code is difficult to
   read. There are a couple of bugs that I feel are very likely
   to be the result of having a difficulty in reading the code
   (in particular inconsistent indentation); i.e., IMHO, an
   inconsistent tab size is detrimental to our goal of making
   Koha stable.

2. Sometimes, to debug a problem you need to reformat the source
   to a consistent indentation. If the apparently-inconsistent
   indentation is actually consistent when a different tab size
   is used, effort is wasted and useless check-ins result.

3. It is a nuisance to constantly switch tab sizes editing
   different files (unless one use emacs, but the Koha source
   is not set up with emacs Local variables).

4. When the tab size is inconsistent, the code looks uglier than
   it really is.  Someone (I forgot which developer) mentioned
   something to the effect that Koha code looks sort of ugly.
   I think ugly code would turn off people who wants to join
   the programming effort.

I hope I haven't offended anyone; I just wish to avoid having
different files having different tab sizes, or, worse, the same
file having different tab sizes in different places.

Best regards,



-- 
Ambrose LI Cheuk-Wing  <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]