The Programmer in the Green Plaid Pants
Tab Wise, WhiteSpace Foolish

A not too serious synopsis of the UNTAB program.

UNTAB is a tabstop filter which expands all tabs in a text file to
blanks. You can use this filter to pipe tabfree output to stdout or a
file. Stripping tabs from text files is especially useful for program
source files.

You may wonder why anyone would want to do such a thing, since the use
of tabs to replace blocks of whitespace actually reduces the reported
file size of most text files. Read on.

On a Clear Page You Can Tab Forever... A tale of the darker side of tabs
and the programmers who use them.

Tabs seem to follow me everywhere, on every group project that I have
participated in, where code is typically maintained, enjoyed, and
mangled by different text editors with different tabstops and different
preferences, like indent.

If you have ever shared code with other unlike minded programmers, you
may already have been introduced to the programmer in the green plaid
pants.

At the end of the day, all good source files need to go into a
repository (like rcs) where they can be shared and stored and otherwise
put to rest. IMO they should also be cleaned and tabs removed.

Tabstops can result in every line being reported as different, or
looking quite different, just because somebody on the project uses hard
tabs and somebody else doesn't.

It is not very much fun looking for changes in code that has been
altered in these various editors, some with tabs, some without, and some
with both.

Such a dilemma can put a large strain on a repository.

It can also put a large strain on my eyes when one programmer uses
tabstops of 8 characters and another uses 2 in the same source file.

The combined effect is about as easy to look at as green plaid pants. In
the ensuing distraction, it can be quite difficult to even read the
code, let alone spot an error and fix the bug.

If you wouldn't wear plaid pants to the job interview, why would you use
hard tabs to do the job?

Always Wear White (Never Wear Green Plaid Pants)

My solution is to not use hard tabs, and to strip tabs from sources that
have tabs in them. Hence the creation of the Untab filter.

After code has become tab-infested it must be cleansed.

Although I confess in days gone by to being guilty of the unrestrained
use of these annoying creatures, I have long since tried to live a tab
free life. But one can't avoid tabs.

Odds are that these will indeed also someday mutilate your program or
the code of someone you program with, and creep into every whitespace
where they can fit.

And having rendered the code unreadable and unmaintainable, (if it ever
truly was) you may need a suitable ally in the use of this program, to
cleanse away the tab monsters and put the whitespace back where it
belongs.

If your tabstops are less than 8 you are probably nesting too deep, but
if your tabstops are more than 2 your variable names are probably too
short.

And If the Tab Fits Lose It!

Bill Buckels
1996
