<?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: v0.8 Release &#8211; Improving the Coding Style for the OnScroll Patch</title>
	<atom:link href="http://blog.sidkalra.com/2009/03/v08-release-improving-the-coding-style-for-the-onscroll-patch/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sidkalra.com/2009/03/v08-release-improving-the-coding-style-for-the-onscroll-patch/</link>
	<description></description>
	<lastBuildDate>Sun, 03 Jul 2011 03:10:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Ted Mielczarek</title>
		<link>http://blog.sidkalra.com/2009/03/v08-release-improving-the-coding-style-for-the-onscroll-patch/#comment-95</link>
		<dc:creator>Ted Mielczarek</dc:creator>
		<pubDate>Thu, 23 Apr 2009 13:07:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sidkalra.com/?p=440#comment-95</guid>
		<description>The coding convention here is &quot;what Ted does&quot;. ;-) I&#039;m not sure why I do things that way, it&#039;s just the style I&#039;ve fallen into. I like having function braces on their own lines, as I think named top-level functions are important. In general I&#039;m not terribly picky, as long as we&#039;re consistent within a file.</description>
		<content:encoded><![CDATA[<p>The coding convention here is &#8220;what Ted does&#8221;. <img src='http://blog.sidkalra.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  I&#8217;m not sure why I do things that way, it&#8217;s just the style I&#8217;ve fallen into. I like having function braces on their own lines, as I think named top-level functions are important. In general I&#8217;m not terribly picky, as long as we&#8217;re consistent within a file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Wood (Callek)</title>
		<link>http://blog.sidkalra.com/2009/03/v08-release-improving-the-coding-style-for-the-onscroll-patch/#comment-94</link>
		<dc:creator>Justin Wood (Callek)</dc:creator>
		<pubDate>Sun, 29 Mar 2009 23:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sidkalra.com/?p=440#comment-94</guid>
		<description>for the &#124;var&#124; inside the if&#039;s etc. I&#039;d actually recommend putting var at the start of the function and leave the values undefined until needed.

The point is that var is scoped to the whole function, and as such that once you define it, the entire function (not just that block) can use it.

Alternatively use &#124;let&#124; at the highest scope you need to (in this case, probably the for loop)</description>
		<content:encoded><![CDATA[<p>for the |var| inside the if&#8217;s etc. I&#8217;d actually recommend putting var at the start of the function and leave the values undefined until needed.</p>
<p>The point is that var is scoped to the whole function, and as such that once you define it, the entire function (not just that block) can use it.</p>
<p>Alternatively use |let| at the highest scope you need to (in this case, probably the for loop)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sid</title>
		<link>http://blog.sidkalra.com/2009/03/v08-release-improving-the-coding-style-for-the-onscroll-patch/#comment-93</link>
		<dc:creator>Sid</dc:creator>
		<pubDate>Sat, 28 Mar 2009 16:42:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sidkalra.com/?p=440#comment-93</guid>
		<description>Hi Gordon,

Until recently I was putting the curly braces on a new line whenever I was writing new code. However, I&#039;ve noticed that not many projects follow this style. They prefer to put the curly braces on the same line. I&#039;ve always found it easier to read the code if the braces are on a new line so I don&#039;t understand why most people prefer to the other convention (braces on the same line).

As for line breaks, I&#039;m with you. I don&#039;t like to bunch everything up together. I prefer gaps, which increases readability, at least for me.</description>
		<content:encoded><![CDATA[<p>Hi Gordon,</p>
<p>Until recently I was putting the curly braces on a new line whenever I was writing new code. However, I&#8217;ve noticed that not many projects follow this style. They prefer to put the curly braces on the same line. I&#8217;ve always found it easier to read the code if the braces are on a new line so I don&#8217;t understand why most people prefer to the other convention (braces on the same line).</p>
<p>As for line breaks, I&#8217;m with you. I don&#8217;t like to bunch everything up together. I prefer gaps, which increases readability, at least for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gordon P. Hemsley</title>
		<link>http://blog.sidkalra.com/2009/03/v08-release-improving-the-coding-style-for-the-onscroll-patch/#comment-92</link>
		<dc:creator>Gordon P. Hemsley</dc:creator>
		<pubDate>Sat, 28 Mar 2009 16:20:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sidkalra.com/?p=440#comment-92</guid>
		<description>When I&#039;m coding in PHP, I use curly braces on their own line, because it makes it easy to see where blocks begin and end. When I hack on Bespin nowadays (in JavaScript), I always have trouble figuring out where the blocks begin, because they keep the curly braces in the same line as other code. This also causes frustration when having to copy, move, or delete a certain block of code, because you can&#039;t just select certain lines—you have to select certain parts of the beginning and/or end lines.

As for spaces, I prefer no space between function names and opening parentheses, but spaces between parentheses and arguments. The same goes for other parentheses—spaces on the inside side of them. As for line breaks, I&#039;m a lot freer with them than the Bespin code seems to be. I like to separate things logically so it&#039;s not all bunched together.

(And, yes, I&#039;m aware you&#039;re not talking about Bespin. It&#039;s just the only difference in coding styles that I can relate to recently.)</description>
		<content:encoded><![CDATA[<p>When I&#8217;m coding in PHP, I use curly braces on their own line, because it makes it easy to see where blocks begin and end. When I hack on Bespin nowadays (in JavaScript), I always have trouble figuring out where the blocks begin, because they keep the curly braces in the same line as other code. This also causes frustration when having to copy, move, or delete a certain block of code, because you can&#8217;t just select certain lines—you have to select certain parts of the beginning and/or end lines.</p>
<p>As for spaces, I prefer no space between function names and opening parentheses, but spaces between parentheses and arguments. The same goes for other parentheses—spaces on the inside side of them. As for line breaks, I&#8217;m a lot freer with them than the Bespin code seems to be. I like to separate things logically so it&#8217;s not all bunched together.</p>
<p>(And, yes, I&#8217;m aware you&#8217;re not talking about Bespin. It&#8217;s just the only difference in coding styles that I can relate to recently.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

