swaits.com

tabs, spaces, and retarded programmers

Posted by Stephen Waits Mon, 03 Jul 2006 19:31:57 GMT

Wow, I ran across Elastic tabstops - the solution to the tabs-versus-spaces issue (via reddit) today. This is actually unbelievable to me.

It made me realize, again, that people are retarded. Like many of you, I experience this realization every day of my life.

The solution to this problem has always been simple. Use both tabs and spaces. Tabs control indentation, spaces control alignment. It’s easy, doesn’t slow your coding down a bit, and will render perfectly in every editor in the world.

I’ve been doing this for a decade+ myself, and have trained, or at least attempted to train many others in such elegance. For more detail, take a look at where I described this in detail several years ago in this Usenet post.

Posted in  | 6 comments | no trackbacks

Comments

  1. Author can't be blank said about 5 hours later:
    Doesn't work I'm afraid. - copy this into a monospaced editor...

    if.(true).{........//.comment
    [TAB]doFunction()..//.comment
    }..................//.comment

    if.(true).{........//.comment
    [BIGGERTAB]doFunction()..//.comment
    }..................//.comment
  2. Stephen Waits said about 20 hours later:
    Oh, but it does. Granted, not in the ONE case you've shown; however, I've been doing it for long enought that I know it works just fine. And it solves the "I want to view this with [2,3,4,8] space tabs" religious hell.
  3. http://elevate.wordpress.com said 7 days later:
    I like your solution, I will use this in my future coding. Previously I had been using 4 spaces for indentation and spaces for alignment.
  4. Stephen Waits said 7 days later:
    Great to hear. You'll be happy you did it. Writing pretty code is satisfying, especially knowing it will be pretty for everyone.
  5. anon said 9 days later:
    The first reply is quite correct -this doen't always work. I like your response: "Granted, not in the ONE case you've shown" This ONE case (amongst others) is actually solved by the elastic tabstops idea that you're trying to rubbish so much. So, who's the retard here?
  6. Stephen Waits said 9 days later:
    This ONE case has actually never happened to me in all of my years. Hey, if you like "elastic tabstops", go use them. Don't worry that 99% of people will have no idea what they are, and no support for them in their browser. You also shouldn't worry that the "solution" to this "problem" is *much* simpler than "elastic tabstops". Go on.. don't worry about it.

Trackbacks

Use the following link to trackback from your own site:
http://swaits.com/articles/trackback/291

(leave url/email »)

   Preview comment