<?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>dPompa &#187; Code</title>
	<atom:link href="http://www.dpompa.com/blog/category/code/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dpompa.com/blog</link>
	<description>dPompa Blog</description>
	<lastBuildDate>Mon, 22 Mar 2010 16:00:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Computing Weighted Random</title>
		<link>http://www.dpompa.com/blog/code/weighted-random</link>
		<comments>http://www.dpompa.com/blog/code/weighted-random#comments</comments>
		<pubDate>Mon, 22 Mar 2010 16:00:55 +0000</pubDate>
		<dc:creator>Ofri Wolfus</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.dpompa.com/blog/?p=136</guid>
		<description><![CDATA[Today I stumbled on a nice problem in a project I&#8217;m working on. I have an array with objects where each object has a weight. I then need to pick an object randomly while considering the weights (i.e heavier objects will get picked more often). If you think about this problem a bit you&#8217;ll definitely [...]]]></description>
		<wfw:commentRss>http://www.dpompa.com/blog/code/weighted-random/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t you just love Xcode?</title>
		<link>http://www.dpompa.com/blog/code/dont-you-just-love-xcode</link>
		<comments>http://www.dpompa.com/blog/code/dont-you-just-love-xcode#comments</comments>
		<pubDate>Fri, 19 Mar 2010 08:52:32 +0000</pubDate>
		<dc:creator>Ofri Wolfus</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.dpompa.com/blog/?p=123</guid>
		<description><![CDATA[So was trying to debug my app in the simulator when I got one of these cryptic &#8220;Error 14389654: The debugger can&#8217;t launch the simulator&#8221; messages. Obviously the simulator was already running. Fine, let&#8217;s quit the simulator and Xcode, and relaunch them. But then when I hit Command+Q in Xcode I got this frightening error:

Don&#8217;t [...]]]></description>
		<wfw:commentRss>http://www.dpompa.com/blog/code/dont-you-just-love-xcode/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Working with Git</title>
		<link>http://www.dpompa.com/blog/dpompa/working-with-git</link>
		<comments>http://www.dpompa.com/blog/dpompa/working-with-git#comments</comments>
		<pubDate>Wed, 17 Mar 2010 15:22:31 +0000</pubDate>
		<dc:creator>Ofri Wolfus</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[dPompa]]></category>

		<guid isPermaLink="false">http://www.dpompa.com/blog/?p=111</guid>
		<description><![CDATA[I&#8217;ve been researching Git for some time now and started using it full time. I decided to give Git a try after having a lot of pain with SVN. The experience until now has been absolutely amazing!
At it&#8217;s core, Git aims to track content rather than files. This simple concept turned out to be amazing [...]]]></description>
		<wfw:commentRss>http://www.dpompa.com/blog/dpompa/working-with-git/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memory Warnings (aka: EXC_BAD_ACCESS)</title>
		<link>http://www.dpompa.com/blog/dpompa/memory-warnings-aka-exc_bad_access</link>
		<comments>http://www.dpompa.com/blog/dpompa/memory-warnings-aka-exc_bad_access#comments</comments>
		<pubDate>Sun, 14 Mar 2010 07:32:43 +0000</pubDate>
		<dc:creator>Ofri Wolfus</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[dPompa]]></category>

		<guid isPermaLink="false">http://www.dpompa.com/blog/?p=89</guid>
		<description><![CDATA[As an iPhone developer you have to handle low memory situations gracefully and clear as much memory as you can. These can often lead to unexpected crashes if your memory management has a bug somewhere. If you wish to catch these easily then do the following:

Go to your executable settings in Xcode and set the [...]]]></description>
		<wfw:commentRss>http://www.dpompa.com/blog/dpompa/memory-warnings-aka-exc_bad_access/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blurred drawing with quartz</title>
		<link>http://www.dpompa.com/blog/code/blurred-drawing-with-quartz</link>
		<comments>http://www.dpompa.com/blog/code/blurred-drawing-with-quartz#comments</comments>
		<pubDate>Tue, 22 Sep 2009 18:57:51 +0000</pubDate>
		<dc:creator>Ofri Wolfus</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.dpompa.com/blog/?p=38</guid>
		<description><![CDATA[Update: When writing this I wasn&#8217;t aware of CGRectIntegral() which is by far a better choice (as QC explains in the comments).
If you ever did extensive drawing with quartz, or any dynamic UI placement on the iPhone, you probably stumbled on this as well. I first saw it when drawing the oval shapes that show [...]]]></description>
		<wfw:commentRss>http://www.dpompa.com/blog/code/blurred-drawing-with-quartz/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Drawing a round rect with Quartz</title>
		<link>http://www.dpompa.com/blog/code/drawing-a-round-rect-with-quartz</link>
		<comments>http://www.dpompa.com/blog/code/drawing-a-round-rect-with-quartz#comments</comments>
		<pubDate>Mon, 17 Aug 2009 07:59:11 +0000</pubDate>
		<dc:creator>Ofri Wolfus</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://www.dpompa.com/blog/?p=22</guid>
		<description><![CDATA[Update: Fixed a bug when drawing at origin different from 0,0.
If you&#8217;re doing Quartz drawing code, you probably need or will need to draw a rect with round corners. Doing it for so many times, I just came up with this simple routine which will hopefully make your life easier:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
void DPContextAddRoundRect&#40;CGContextRef context, CGRect rect, CGFloat [...]]]></description>
		<wfw:commentRss>http://www.dpompa.com/blog/code/drawing-a-round-rect-with-quartz/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
