I, too, had forgotton why I had firmly moved into the anti-tab / pro-space division until last week.

I was given the task to maintain a piece of software. As any good software engineer would do I kept to the original conventions of this software; as much as I don't like tab-indented code I continued to use tab indents to maximise maintainability of this particular piece of code and to minimise the diffs when checking in changes.

Unfortunately I got my editor to tabify my section of the code (as I use space indent by default). The trouble with that is that it converted a string of 8 spaces "        " into "\t". Lucky for me we had automated tests that flushed this problem out!

To protect myself against this kind of thing I've kinda resolved personally to encode spaces in strings as "\x20".

But don't be fooled.. tabifying code is horribly inconsistent and prone to much danger. It's bad.


In reply to Re^2: Tabs vs Spaces lets give this a go by monarch
in thread Tabs vs Spaces lets give this a go by EvanCarroll

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.