A r t i c l e s
Navigation

Note: This Wiki is
outdated, personal views
may have changed.
L505 A.I. bot is dead
long live THX 1138

M a i n P a g e

D i r e c t o r y

large 8 space indentation looks stupid


procedure test;
        begin
                writeln('test');
                for i:= 1 to 3 do
                        begin
                                writeln('this is retarded');
                        end;
        end;

begin
        test('I suppose the program goes here');
end;.


{
        for i = 1 to test
                { 
                        if y = 4 
                        {
                                if y = 5


                }

There is so much whitespace, that your eyes lose focus. I can put up with 3 space or 4 space or 2 space indentation, but please. When scanning through source code I want to scan up and down the source file.. I don't want my eyes wiggling around like a penis that is deciding between becoming hard or soft.

I guess Linus Torvalds has those kind of eyes. That's probably because C uses such silly syntax that 8 space indentation actually helps the brain damaged language look better at times.


Linus wrote:
"I did indeed write that.

Tabs are 8 characters in the kernel coding style.

And yes, I also wrote the other quote:

> 
> Now, some people will claim that having 8-character indentations makes
> the code move too far to the right, and makes it hard to read on a
> 80-character terminal screen.  The answer to that is that if you need
> more than 3 levels of indentation, you're screwed anyway, and should fix
> your program.

and I think that's in many ways even more important than the 8-character 
tab, because deep indentation is unreadable even if you *can* fit it on a 
single line.

In the kernel, we try to split functions up, and perhaps use inline 
functions etc, and really really avoid deep indentation."
Linus, is an idiot. When someone is an idiot, it has to be pointed out, whether or not the idiot is also a genius in other aspects of life.

If these tabs protect you from doing deep nests, then you could simply use a 40 column marker with 2 or 4 space indentation. Therefore, it is a 100 percent emotional problem here with Linus. He doesn't use logic, he uses his 'tab emotion'. He's hardcoded it into his brain that tabs are good because he started using tabs and decided to stick with them.

If you have to use TABS to prevent yourself from doing deep nests, then there is a problem with the PROGRAMMER. One should easily be able to spot out deep nests in code with 2 space or 4 space indents... in fact it should be easy to spot out deep nests when less indentation is used: ugly and crammed packed code on the screen is clearly visible.

Deep nests can be spotted no matter what tab space is used. If one needs TABS to force themselves to do refactoring of nests, then there is a serious problem with the programmer. The programmer is using TRAINING WHEELS and it can be argued that using 8 space tabs is a form of tricycle programming (not old enough to ride bike). Why Linus does not use a "static strong typing language" too so he can be trained to structure code properly? After all, if the C Programmer is using weak types, in C there is no way to tell whether the code is weak or not. Hmmm. Might we add some training wheels?

With an 80 char width marker and 2 or 4 space indents, along with some common sense (removing deep nests), one reaps the benefits of not having stupid ugly looking whitespace in the code wiggling the eyes all over the place like a penis, and they reap the benefits of having more screen space for other stuff such as command line windows, terminals, compiler messages, etc. It's called screen space real estate and general programming common sense, which apparently Linus doesn't have. i.e. one could resize their window to 40 column width if it is so important not to deep nest.

int somefunction
{
        stuff("why is the whitespace")
        for .... {
                if x = something... {
                        stuff("all over the screen")
                }
        }
        to_linus("you could just use a 40 column marker");
        to_linus("and four space indentation");
        to_linus("if you must use training wheels to help you");
        to_linus("therefore it is a straw man argument");
        to_linus("...in fact why not a 20 column marker?");
}
Try making your eyes jump from the FOR word all the way over to "all over the screen". This causes my eyes to be strained and it makes code hard to scan through, and eyes go mad. This isn't just my opinion either.. the latest statistics are showing more and more people are moving away from these silly huge tab indentations.. such as the Ruby language folks using only two space indentation.

Okay, so that isn't as bad as this:

int somefunction
        {
                stuff("why is the whitespace")
                for .... {
                        stuff("all over the screen")
                        for {
                                stuff("all over");
                        }
                }
                stuff("all over")
        }
C programmers argue that Pascal is too verbose.. but the irony is that the white space used in some C code is MORE WHITESPACE VERBOSE! The amount of useless code (i.e. whitespace that doesn't do anything) in files increases, just as the amount of useless code increases as the RESERVED WORD verbosity increases in Pascal.

My theory is that messier languages like C++/C can get away with larger indentations since the indentation clean it up the piles of shit with more whitespace. Ramming a whole bunch of obfuscated code and symbols together isn't a good idea, so the C/C++ programmers tend to put more white space in their code. Make sense? A pile of brown shit looks better if you spread it out with some white chocolate mixed in. Of course I say this tongue in cheek, spitting saliva on my computer laughing, and visualizing Linus getting bitten by a mean and angry penguin.

Hey, if 8 spaces are good, why not 12... hell, why not 16! Why not 32! More whitespace is better. Not.

You can't See Tabs

Tabs look like spaces.. so if there is a 8 space indentation in there using real spaces and also another 8 space indentation using a tab, you can't tell! Problem time.

(unless you have some special text editor that shows all your tabs with a special indicator character.. but this would obfuscate source code and create more confusion, and each developer would need an editor with this capability, etc.)

Tabs are nearly as bad as hidden null characters in a text file. You cannot see them, you can however make some random guesses that they are there. If there really is a 7 or 8 space indentation with real spaces, you can't fix the file and place a tab there, because you don't know it is there (unless you take effort to check each file carefully with your arrow key, or you turn on your editor's visible tab feature, which is ugly and wastes developer time)! So using the lowest common denominator, spaces, saves the day. Sticking to using the lowest common denominator is important.

The Lowest Common Denominator

Yes, the lowest common denominator is spaces. If there are spaces in a file, then there are spaces.. just spaces, and spaces! No problems. If there are spaces, and tabs, and dog poo, and cake, then you're screwed.

You can't try and argue: 'but if everyone used tabs correctly, if they just, if they would just follow the rules, and if, but, if and, if, if, if'.

People don't follow the rules and many times spaces accidentally get mixed in with tabs due to human error or human nature. Especially on open source projects.

If anything, open source projects should always use the lowest common denominator.. since multiple people are editing the files! And since open source projects are typically managed/coded by a bunch of monkeys on typewriters who have no clue as to what they are doing, the lowest common denominator should be used. The monkeys should have their tab key disabled.

You can't use tabs as the lowest common denominator because you still have to use spaces between commas, dots, plus and minus signs, etc.

No ifs, buts, or ands. No 8 space tabs.

About
Note: This Wiki is outdated, personal views may have changed.

This wiki contains info on life, health, humans, nature, programming, database, fads, paradigms, poems, principles, theories.

Articles may contain statements which some may find helpful and encouraging, or even discouraging.

Beware, I believe in the Grand Justice system.
_ _ _