<?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: 5 Tips to Keep Your Code Clean</title>
	<atom:link href="http://gulati.info/2009/11/clean-your-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://gulati.info/2009/11/clean-your-php/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 19 Jul 2010 23:15:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Austin</title>
		<link>http://gulati.info/2009/11/clean-your-php/comment-page-1/#comment-521</link>
		<dc:creator>Austin</dc:creator>
		<pubDate>Thu, 24 Dec 2009 01:34:02 +0000</pubDate>
		<guid isPermaLink="false">http://gulati.info/?p=1519#comment-521</guid>
		<description>@Tech-Freak Exactly! Thanks for your comment and I&#039;m glad that you like the post!</description>
		<content:encoded><![CDATA[<p>@Tech-Freak Exactly! Thanks for your comment and I&#8217;m glad that you like the post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tech-Freak Stuff</title>
		<link>http://gulati.info/2009/11/clean-your-php/comment-page-1/#comment-520</link>
		<dc:creator>Tech-Freak Stuff</dc:creator>
		<pubDate>Wed, 23 Dec 2009 10:07:26 +0000</pubDate>
		<guid isPermaLink="false">http://gulati.info/?p=1519#comment-520</guid>
		<description>Commenting in between the code and having Blank spaces make it easy to refine the code in future and also to understand what it actually does. Thanks for your tips!</description>
		<content:encoded><![CDATA[<p>Commenting in between the code and having Blank spaces make it easy to refine the code in future and also to understand what it actually does. Thanks for your tips!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Austin</title>
		<link>http://gulati.info/2009/11/clean-your-php/comment-page-1/#comment-252</link>
		<dc:creator>Austin</dc:creator>
		<pubDate>Fri, 20 Nov 2009 00:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://gulati.info/?p=1519#comment-252</guid>
		<description>@deerawan

Thanks for the comment! I&#039;m glad that you enjoy my post.</description>
		<content:encoded><![CDATA[<p>@deerawan</p>
<p>Thanks for the comment! I&#8217;m glad that you enjoy my post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deerawan</title>
		<link>http://gulati.info/2009/11/clean-your-php/comment-page-1/#comment-246</link>
		<dc:creator>deerawan</dc:creator>
		<pubDate>Thu, 19 Nov 2009 07:40:39 +0000</pubDate>
		<guid isPermaLink="false">http://gulati.info/?p=1519#comment-246</guid>
		<description>nice tips Austin...I&#039;ll try that</description>
		<content:encoded><![CDATA[<p>nice tips Austin&#8230;I&#8217;ll try that</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Austin</title>
		<link>http://gulati.info/2009/11/clean-your-php/comment-page-1/#comment-238</link>
		<dc:creator>Austin</dc:creator>
		<pubDate>Wed, 18 Nov 2009 19:57:55 +0000</pubDate>
		<guid isPermaLink="false">http://gulati.info/?p=1519#comment-238</guid>
		<description>@anon and Chris

I don&#039;t put line breaks between every line. If I had more code, it would look something like this:

[php]&lt;?php

	if( $someCondition == true ) {

		doSomething();

		if( $otherCondition == true ) {

			doSomethingElse( $someVariable );
			doSomething( $someVariable );

		} else {

			doSomethingElse( $otherVariable );
			doSomething( $someVariable );

		}

	}

?&gt;[/php]

I use the line breaks to break things up and make it easier to see where blocks of code in the conditional statement start and end.

I can see what you guys are saying about having too much whitespace, though. When I made that example I wasn&#039;t really thinking. I&#039;m going to update it to display what I think more accurately.

I was trying to convince programmers that don&#039;t use whitespace to use whitespace, not programmers that do use whitespace to use more of it. I use many line breaks on my personal projects since it find that it works best for me, but if I was working on a project with others I would obvious opt to use whatever other members of the group choose to use.

I&#039;ll update my examples and put an explanation thanking you guys. Thanks for your comments!

@dk

I&#039;ll check that out too!</description>
		<content:encoded><![CDATA[<p>@anon and Chris</p>
<p>I don&#8217;t put line breaks between every line. If I had more code, it would look something like this:</p>
<pre class="brush: php;">&lt;?php

	if( $someCondition == true ) {

		doSomething();

		if( $otherCondition == true ) {

			doSomethingElse( $someVariable );
			doSomething( $someVariable );

		} else {

			doSomethingElse( $otherVariable );
			doSomething( $someVariable );

		}

	}

?&gt;</pre>
<p>I use the line breaks to break things up and make it easier to see where blocks of code in the conditional statement start and end.</p>
<p>I can see what you guys are saying about having too much whitespace, though. When I made that example I wasn&#8217;t really thinking. I&#8217;m going to update it to display what I think more accurately.</p>
<p>I was trying to convince programmers that don&#8217;t use whitespace to use whitespace, not programmers that do use whitespace to use more of it. I use many line breaks on my personal projects since it find that it works best for me, but if I was working on a project with others I would obvious opt to use whatever other members of the group choose to use.</p>
<p>I&#8217;ll update my examples and put an explanation thanking you guys. Thanks for your comments!</p>
<p>@dk</p>
<p>I&#8217;ll check that out too!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dk</title>
		<link>http://gulati.info/2009/11/clean-your-php/comment-page-1/#comment-237</link>
		<dc:creator>dk</dc:creator>
		<pubDate>Wed, 18 Nov 2009 19:09:08 +0000</pubDate>
		<guid isPermaLink="false">http://gulati.info/?p=1519#comment-237</guid>
		<description>Also try &#039;Code Complete&#039; Second Edition.</description>
		<content:encoded><![CDATA[<p>Also try &#8216;Code Complete&#8217; Second Edition.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://gulati.info/2009/11/clean-your-php/comment-page-1/#comment-233</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 18 Nov 2009 16:02:58 +0000</pubDate>
		<guid isPermaLink="false">http://gulati.info/?p=1519#comment-233</guid>
		<description>2-5 sound good.

But, to be honest, I find your whitespace example pretty horrific. The first example is easier to read, not the second. A blank line indicates a break on concepts, like the breaks between two paragraphs in a book. Adding extraneous blank lines like that just makes it seem like nothing is a complete thought in the code. It feels fractured. What do you do between &quot;chunks&quot; of code, put 3 or 4 blank lines?

And, if you&#039;re a brace on EOL kind of guy, why have a blank line afterwards? The main point I&#039;ve ever heard for EOL braces is saving space. I&#039;m a brace on the next line guy for because I find the visual brace matchup helpful, but I understand the EOL guy&#039;s point about saving space. It might not match how my brain parses the text on screen, but I get why they like EOL braces. Your style is the worst of both worlds: no space is saved AND branches don&#039;t match up.</description>
		<content:encoded><![CDATA[<p>2-5 sound good.</p>
<p>But, to be honest, I find your whitespace example pretty horrific. The first example is easier to read, not the second. A blank line indicates a break on concepts, like the breaks between two paragraphs in a book. Adding extraneous blank lines like that just makes it seem like nothing is a complete thought in the code. It feels fractured. What do you do between &#8220;chunks&#8221; of code, put 3 or 4 blank lines?</p>
<p>And, if you&#8217;re a brace on EOL kind of guy, why have a blank line afterwards? The main point I&#8217;ve ever heard for EOL braces is saving space. I&#8217;m a brace on the next line guy for because I find the visual brace matchup helpful, but I understand the EOL guy&#8217;s point about saving space. It might not match how my brain parses the text on screen, but I get why they like EOL braces. Your style is the worst of both worlds: no space is saved AND branches don&#8217;t match up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anon</title>
		<link>http://gulati.info/2009/11/clean-your-php/comment-page-1/#comment-231</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Wed, 18 Nov 2009 14:18:17 +0000</pubDate>
		<guid isPermaLink="false">http://gulati.info/?p=1519#comment-231</guid>
		<description>#2 has way too much white space.

You can use it to break up if blocks, but doing using it for every other line is just too much. There&#039;s no sense of coherency in the code.</description>
		<content:encoded><![CDATA[<p>#2 has way too much white space.</p>
<p>You can use it to break up if blocks, but doing using it for every other line is just too much. There&#8217;s no sense of coherency in the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veera</title>
		<link>http://gulati.info/2009/11/clean-your-php/comment-page-1/#comment-227</link>
		<dc:creator>Veera</dc:creator>
		<pubDate>Wed, 18 Nov 2009 10:54:15 +0000</pubDate>
		<guid isPermaLink="false">http://gulati.info/?p=1519#comment-227</guid>
		<description>one thumb rule I follow is : &quot;if you have to scroll the page to see the entire of your function, the your function needs to be refactored&quot; - this helps me to keep my code clean as much as possible.</description>
		<content:encoded><![CDATA[<p>one thumb rule I follow is : &#8220;if you have to scroll the page to see the entire of your function, the your function needs to be refactored&#8221; &#8211; this helps me to keep my code clean as much as possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Austin</title>
		<link>http://gulati.info/2009/11/clean-your-php/comment-page-1/#comment-220</link>
		<dc:creator>Austin</dc:creator>
		<pubDate>Wed, 18 Nov 2009 01:57:31 +0000</pubDate>
		<guid isPermaLink="false">http://gulati.info/?p=1519#comment-220</guid>
		<description>@AllanC

Thanks for the suggestion! I&#039;ll check it out.

@Kaiser

That is true. Not all languages have strict standards, though. This was focused on PHP which pretty much let&#039;s you do what you want.</description>
		<content:encoded><![CDATA[<p>@AllanC</p>
<p>Thanks for the suggestion! I&#8217;ll check it out.</p>
<p>@Kaiser</p>
<p>That is true. Not all languages have strict standards, though. This was focused on PHP which pretty much let&#8217;s you do what you want.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
