in reply to Re: Tabs vs Spaces lets give this a go
in thread Tabs vs Spaces lets give this a go

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.