Categorized | News

Tabs vs Spaces

Posted on 19 May 2004 by Demian Turner

Surely there can be no doubt regarding the superiority of spaces over tabs in any serious coding project ;-)

If you’re stuck on windows, however, and you don’t have perl installed it’s a bit of a hassle to remove the tabs from other peoples’ contributed code.  That is, until you’ve been introduced to  the Find And Replace Text command line utility (available on windows and linux).

Aside from burdening us with a rather unfortunate acronym,  this software replaces all tabs with spaces in a great one-liner:

C:/htdocs/my_project>fart -r -C * t “    ”

This will recursively blast through your project and rip out all tab offenses.

Bookmark and Share

2 Comments For This Post

  1. foob Says:

    My page mentions all of the issues: tabs vs. spaces

  2. cyberrodent Says:

    Whenever someone starts an argument with “surly there can be no doubt…” I know they are full of something.

    Got any objective reasons to state spaces are better than tabs?

    With tabs, if you like 4 and I like 8, we can each configure our editor to show us the file the way we like it. With spaces, we have to fight it out till you realize that I am right ;-)

Leave a Reply

Advertise Here
Advertise Here

Subscribe by email

Enter your email address:

Delivered by FeedBurner

Categories

Books

Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists

Affiliates

PHPkitchen recommends you also check out the following sites :

Accounting for Small Businesses

FreeAgent sign-up