<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Why Tabs Suck</title>
	<atom:link href="http://andrewpeters.net/2008/08/05/why-tabs-suck/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/</link>
	<description>C# &#38; .NET Development, NHaml, PowerShell Gadget, Inflector.NET...</description>
	<pubDate>Tue, 06 Jan 2009 11:18:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Doug</title>
		<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/comment-page-1/#comment-1463</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Tue, 23 Sep 2008 15:12:21 +0000</pubDate>
		<guid isPermaLink="false">http://andrewpeters.net/?p=107#comment-1463</guid>
		<description>The greatest part about tabs is that if one user prefers 2 spaces they configure their editor to turn a tab into 2 spaces, if they prefer 20 then can configure it to be 20.  So same source, different based on user *preference*.  This way you dont need to perform a user study to determine the proper indent.</description>
		<content:encoded><![CDATA[<p>The greatest part about tabs is that if one user prefers 2 spaces they configure their editor to turn a tab into 2 spaces, if they prefer 20 then can configure it to be 20.  So same source, different based on user *preference*.  This way you dont need to perform a user study to determine the proper indent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/comment-page-1/#comment-1336</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Thu, 04 Sep 2008 04:56:08 +0000</pubDate>
		<guid isPermaLink="false">http://andrewpeters.net/?p=107#comment-1336</guid>
		<description>Just as an experiment, I have started using two SPACE indent and converting TABs to SPACEs.

Seems to be going okay so far, though I'm still getting used to my code being more "squashed up".  But on the other hand, my code doesn't sprawl out to the right quite so much.  Not that I nest my control statements that much.

All in all, I am getting used to it.  But at least if I want to change back it is a relatively easy code format to revert to TABs.</description>
		<content:encoded><![CDATA[<p>Just as an experiment, I have started using two SPACE indent and converting TABs to SPACEs.</p>
<p>Seems to be going okay so far, though I&#8217;m still getting used to my code being more &#8220;squashed up&#8221;.  But on the other hand, my code doesn&#8217;t sprawl out to the right quite so much.  Not that I nest my control statements that much.</p>
<p>All in all, I am getting used to it.  But at least if I want to change back it is a relatively easy code format to revert to TABs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mat Hobbs</title>
		<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/comment-page-1/#comment-1335</link>
		<dc:creator>Mat Hobbs</dc:creator>
		<pubDate>Thu, 04 Sep 2008 04:37:53 +0000</pubDate>
		<guid isPermaLink="false">http://andrewpeters.net/?p=107#comment-1335</guid>
		<description>Hi Andrew,

I used 2-space indentation for perhaps up to 20 years but switched to tabs (can't recall the reason) for C# for the last 5 years and am preferring it.  Sure you sometimes see spaces mixed in with tabs but this was always the case the other way around too - in the past seeing tabs get mixed in with spaces -  so no gain there.

If you mandate spaces on a project you have no way of stopping someone with tab-settings turned on from adding tabs so the problem is symmetric.

Furthermore, in a typical business there are usually many different projects and each may have their own styles, with spaces you usually end up with 2-space or 4-space with developers being used to each.  With tabs it is always only one tab (nobody uses 2 tabs for an indent...) and devs can control apparent spacing to their taste.

I'd be OK with switching back to spaces one day, and I fully expect having to do that on some future project, but, despite what you say, you still end up backspacing a lot more using spaces and selecting code segments is more problematic in the general case no matter what editor you use.  I don't think you'd really be happy switching between 2-space and 4-space projects on a day-to-day basis!

Cheers,
-Mat</description>
		<content:encoded><![CDATA[<p>Hi Andrew,</p>
<p>I used 2-space indentation for perhaps up to 20 years but switched to tabs (can&#8217;t recall the reason) for C# for the last 5 years and am preferring it.  Sure you sometimes see spaces mixed in with tabs but this was always the case the other way around too - in the past seeing tabs get mixed in with spaces -  so no gain there.</p>
<p>If you mandate spaces on a project you have no way of stopping someone with tab-settings turned on from adding tabs so the problem is symmetric.</p>
<p>Furthermore, in a typical business there are usually many different projects and each may have their own styles, with spaces you usually end up with 2-space or 4-space with developers being used to each.  With tabs it is always only one tab (nobody uses 2 tabs for an indent&#8230;) and devs can control apparent spacing to their taste.</p>
<p>I&#8217;d be OK with switching back to spaces one day, and I fully expect having to do that on some future project, but, despite what you say, you still end up backspacing a lot more using spaces and selecting code segments is more problematic in the general case no matter what editor you use.  I don&#8217;t think you&#8217;d really be happy switching between 2-space and 4-space projects on a day-to-day basis!</p>
<p>Cheers,<br />
-Mat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/comment-page-1/#comment-1333</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Thu, 04 Sep 2008 02:03:13 +0000</pubDate>
		<guid isPermaLink="false">http://andrewpeters.net/?p=107#comment-1333</guid>
		<description>Hi Alec,

Thanks for your comment. I'll answer a few inline:

"If everyone on a project uses tabs consistently"

Problem is they don't (at least in my experience).

"What if they had inserted spaces as you suggest, but used an indentation level of 4"

If that project mandated 4 then I would happily use 4. Project standards trump personal preference. Don't confuse viewing the code with editing it: The code should be correctly indented even when viewed with Notepad.

"doesn’t it annoy you to have to hit multiple backspaces just to move out one level of indentation if you inadvertently tab in too far?"

Once again this is purely a tooling issue. TextMate, for example, un-indents on backspace even when not using tabs.

Cheers,

Andrew.</description>
		<content:encoded><![CDATA[<p>Hi Alec,</p>
<p>Thanks for your comment. I&#8217;ll answer a few inline:</p>
<p>&#8220;If everyone on a project uses tabs consistently&#8221;</p>
<p>Problem is they don&#8217;t (at least in my experience).</p>
<p>&#8220;What if they had inserted spaces as you suggest, but used an indentation level of 4&#8243;</p>
<p>If that project mandated 4 then I would happily use 4. Project standards trump personal preference. Don&#8217;t confuse viewing the code with editing it: The code should be correctly indented even when viewed with Notepad.</p>
<p>&#8220;doesn’t it annoy you to have to hit multiple backspaces just to move out one level of indentation if you inadvertently tab in too far?&#8221;</p>
<p>Once again this is purely a tooling issue. TextMate, for example, un-indents on backspace even when not using tabs.</p>
<p>Cheers,</p>
<p>Andrew.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alec</title>
		<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/comment-page-1/#comment-1330</link>
		<dc:creator>Alec</dc:creator>
		<pubDate>Wed, 03 Sep 2008 23:51:40 +0000</pubDate>
		<guid isPermaLink="false">http://andrewpeters.net/?p=107#comment-1330</guid>
		<description>In my view, Sam's argument trumps all the others, hands down. If everyone on a project uses tabs consistently, then each developer can view the code with their preferred level of indentation (2, 4, whatever).

I teach, so half the time I'm writing code that's projected on a screen. When I do, I use large fonts and an indentation level of 2. Since I use tabs, this code looks just dandy when I or my students work on it in an environment where the indentation level is 4 (a level I find easier to work with when fonts are normal working size vs projector size).

So...
"Insert tabs" == "individuals can choose indentation level",
"Insert spaces" == "you're stuck with the indentation level chosen by the original author"

You said it yourself, Andrew - the code example you looked at looked bad because the author had a different default indentation level than you. What if they had inserted spaces as you suggest, but used an indentation level of 4, while your preferred level was 3? Then if you wanted to add anything to the code, at the first level of indentation you'd have to hit tab-space; at the second tab-tab-space-space; at the third tab-tab-tab-tab; and so on. Personally that would drive me insane.

In my view, the "insert spaces for tabs" setting is nothing but a source of evil inconsistency in code. Does anyone really intentionally hits 4 spaces when they could hit tab? I'd bet a reasonable sum of money that your open source example is the result of two people working on the code; one of whom had their environment set to insert spaces for tabs.

One more question for those of you who prefer spaces: doesn't it annoy you to have to hit multiple backspaces just to move out one level of indentation if you inadvertently tab in too far?

  Alec.</description>
		<content:encoded><![CDATA[<p>In my view, Sam&#8217;s argument trumps all the others, hands down. If everyone on a project uses tabs consistently, then each developer can view the code with their preferred level of indentation (2, 4, whatever).</p>
<p>I teach, so half the time I&#8217;m writing code that&#8217;s projected on a screen. When I do, I use large fonts and an indentation level of 2. Since I use tabs, this code looks just dandy when I or my students work on it in an environment where the indentation level is 4 (a level I find easier to work with when fonts are normal working size vs projector size).</p>
<p>So&#8230;<br />
&#8220;Insert tabs&#8221; == &#8220;individuals can choose indentation level&#8221;,<br />
&#8220;Insert spaces&#8221; == &#8220;you&#8217;re stuck with the indentation level chosen by the original author&#8221;</p>
<p>You said it yourself, Andrew - the code example you looked at looked bad because the author had a different default indentation level than you. What if they had inserted spaces as you suggest, but used an indentation level of 4, while your preferred level was 3? Then if you wanted to add anything to the code, at the first level of indentation you&#8217;d have to hit tab-space; at the second tab-tab-space-space; at the third tab-tab-tab-tab; and so on. Personally that would drive me insane.</p>
<p>In my view, the &#8220;insert spaces for tabs&#8221; setting is nothing but a source of evil inconsistency in code. Does anyone really intentionally hits 4 spaces when they could hit tab? I&#8217;d bet a reasonable sum of money that your open source example is the result of two people working on the code; one of whom had their environment set to insert spaces for tabs.</p>
<p>One more question for those of you who prefer spaces: doesn&#8217;t it annoy you to have to hit multiple backspaces just to move out one level of indentation if you inadvertently tab in too far?</p>
<p>  Alec.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/comment-page-1/#comment-1114</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Thu, 14 Aug 2008 23:48:50 +0000</pubDate>
		<guid isPermaLink="false">http://andrewpeters.net/?p=107#comment-1114</guid>
		<description>Jake,

No worries, enjoy!

Andrew.</description>
		<content:encoded><![CDATA[<p>Jake,</p>
<p>No worries, enjoy!</p>
<p>Andrew.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Scott</title>
		<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/comment-page-1/#comment-1112</link>
		<dc:creator>Jake Scott</dc:creator>
		<pubDate>Thu, 14 Aug 2008 22:52:47 +0000</pubDate>
		<guid isPermaLink="false">http://andrewpeters.net/?p=107#comment-1112</guid>
		<description>I like using spaces in html, when you view source, or open the file  in a simple text editor it way easier to see how the document is structured. 

On a side note teaching visual studio how to auto-format your html properly is pretty simple. Just go tools &#62; options &#62; HTML &#62; Format &#62; Tag specific options &#62; Client Html tags..

Cheers for the File explorer plugin too!</description>
		<content:encoded><![CDATA[<p>I like using spaces in html, when you view source, or open the file  in a simple text editor it way easier to see how the document is structured. </p>
<p>On a side note teaching visual studio how to auto-format your html properly is pretty simple. Just go tools &gt; options &gt; HTML &gt; Format &gt; Tag specific options &gt; Client Html tags..</p>
<p>Cheers for the File explorer plugin too!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/comment-page-1/#comment-1061</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Fri, 08 Aug 2008 14:53:10 +0000</pubDate>
		<guid isPermaLink="false">http://andrewpeters.net/?p=107#comment-1061</guid>
		<description>Andrew, I see you point.  The problem as you see it is that when using tabs people can add spaces in there as well.  I never really thought about this before and checked some of my code and low and behold I had done it in some places as well.

So i get the point switch the tab key to insert spaces and know there in consistency.  The only proble with this I see is this.  If it is open source there still is no way to ensure that everyone touching the code is also inserting spaces with the tab key.  Second lets say that i am looking at a project that used spaces and for som reason that person liked large indents or small indent say 1 space.  I couldn't normalize it very easily for my liking witxhhappen to be 2 spaces.  If a tab was in there then it would look the way that any individual developer wanted  (but then you have to somehaw garentee no one slides a space in there).

In the end I have decided to go with spaces, mainly because here I was thinking "I always use tabs"  and found that wasn't true. So if I can't force myself how do I force others.  Now lets just make everyones IDE default to spaces :)</description>
		<content:encoded><![CDATA[<p>Andrew, I see you point.  The problem as you see it is that when using tabs people can add spaces in there as well.  I never really thought about this before and checked some of my code and low and behold I had done it in some places as well.</p>
<p>So i get the point switch the tab key to insert spaces and know there in consistency.  The only proble with this I see is this.  If it is open source there still is no way to ensure that everyone touching the code is also inserting spaces with the tab key.  Second lets say that i am looking at a project that used spaces and for som reason that person liked large indents or small indent say 1 space.  I couldn&#8217;t normalize it very easily for my liking witxhhappen to be 2 spaces.  If a tab was in there then it would look the way that any individual developer wanted  (but then you have to somehaw garentee no one slides a space in there).</p>
<p>In the end I have decided to go with spaces, mainly because here I was thinking &#8220;I always use tabs&#8221;  and found that wasn&#8217;t true. So if I can&#8217;t force myself how do I force others.  Now lets just make everyones IDE default to spaces :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/comment-page-1/#comment-1060</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Fri, 08 Aug 2008 13:29:46 +0000</pubDate>
		<guid isPermaLink="false">http://andrewpeters.net/?p=107#comment-1060</guid>
		<description>You will see that you have erred. Not many people are intentionally inconsistent.</description>
		<content:encoded><![CDATA[<p>You will see that you have erred. Not many people are intentionally inconsistent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://andrewpeters.net/2008/08/05/why-tabs-suck/comment-page-1/#comment-1059</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Fri, 08 Aug 2008 11:48:12 +0000</pubDate>
		<guid isPermaLink="false">http://andrewpeters.net/?p=107#comment-1059</guid>
		<description>Um, what if I insert 4 spaces sometimes and 2 spaces others?</description>
		<content:encoded><![CDATA[<p>Um, what if I insert 4 spaces sometimes and 2 spaces others?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
