<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tom Dalling &#187; Coding Tips</title>
	<atom:link href="http://www.tomdalling.com/category/coding-tips/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tomdalling.com</link>
	<description>Thoughts of a software developer</description>
	<lastBuildDate>Mon, 19 Jul 2010 04:32:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Coding Tip: Replace Complicated Conditions With Boolean Variables</title>
		<link>http://www.tomdalling.com/coding-tips/coding-tip-replace-complicated-conditions-with-boolean-variables</link>
		<comments>http://www.tomdalling.com/coding-tips/coding-tip-replace-complicated-conditions-with-boolean-variables#comments</comments>
		<pubDate>Sat, 03 Oct 2009 09:02:27 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/?p=196</guid>
		<description><![CDATA[Consider the following if statement: if&#40;dragOperation != NSDragOperationCopy &#38;&#38; NSPointInRect&#40;currentMouseLocation, self.bounds&#41;&#41;&#123; //do something &#125; Even though you may have worked out what the condition represents, it probably took you a little longer than it should. It&#8217;s complicated, making it time consuming to read, and prone to bugs upon modification. Thankfully, there is an easy remedy: [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/coding-tips/coding-tip-replace-complicated-conditions-with-boolean-variables/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coding Tip: Use The Ternary Conditional Operator</title>
		<link>http://www.tomdalling.com/coding-tips/coding-tip-use-the-ternary-conditional-operator</link>
		<comments>http://www.tomdalling.com/coding-tips/coding-tip-use-the-ternary-conditional-operator#comments</comments>
		<pubDate>Wed, 09 Sep 2009 06:01:24 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/?p=152</guid>
		<description><![CDATA[The ternary conditional operator (?:) can be used as a short-hand version of an if statement. It is a feature of many languages. For example, this code: int height; if&#40;isTall&#41; height = 50; else height = 10; can be better written as: int height = isTall ? 50 : 10; The ?: operator is good [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/coding-tips/coding-tip-use-the-ternary-conditional-operator/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coding Tip: Don&#8217;t Mix Abstraction Levels</title>
		<link>http://www.tomdalling.com/coding-tips/coding-tip-dont-mix-abstraction-levels</link>
		<comments>http://www.tomdalling.com/coding-tips/coding-tip-dont-mix-abstraction-levels#comments</comments>
		<pubDate>Sun, 05 Jul 2009 05:57:08 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/?p=81</guid>
		<description><![CDATA[Can you tell what is wrong with the abstraction in this class interface? @interface EmployeeList -&#40;void&#41; addObject:&#40;Employee*&#41;anEmployee; -&#40;void&#41; removeObject:&#40;Employee*&#41;anEmployee; -&#40;NSUInteger&#41; numberOfEmployees; @end Here is the answer: &#8220;addObject&#8221; and &#8220;removeObject&#8221; should be named &#8220;addEmployee&#8221; and &#8220;removeEmployee&#8221; Why? Because EmployeeList is at a higher level of abstraction than a generic list class. addObject and removeObject are at [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/coding-tips/coding-tip-dont-mix-abstraction-levels/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coding Tip: Have A Single Exit Point</title>
		<link>http://www.tomdalling.com/coding-tips/coding-tip-have-a-single-exit-point</link>
		<comments>http://www.tomdalling.com/coding-tips/coding-tip-have-a-single-exit-point#comments</comments>
		<pubDate>Tue, 30 Jun 2009 10:19:30 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/?p=75</guid>
		<description><![CDATA[Having one exit point (return) from a function is a good thing. Here is an example of a single exit point: int MyArray::indexOfElement&#40;int elementToFind&#41;&#123; int foundIndex = ELEMENT_NOT_FOUND; &#160; for&#40;int i = 0; i &#60; m_numberOfElements; ++i&#41;&#123; if&#40;this-&#62;elementAtIndex&#40;i&#41; == elementToFind&#41;&#123; foundIndex = i; break; &#125; &#125; &#160; return foundIndex; &#125; Having multiple exit points can [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/coding-tips/coding-tip-have-a-single-exit-point/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
