<?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>Radamanthus Batnag &#187; Programming</title>
	<atom:link href="http://rad.batnag.org/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://rad.batnag.org</link>
	<description>Random thoughts on web and indie game development.</description>
	<lastBuildDate>Mon, 23 Aug 2010 16:52:37 +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>Corona SDK</title>
		<link>http://rad.batnag.org/2010/06/corona-sdk/</link>
		<comments>http://rad.batnag.org/2010/06/corona-sdk/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 12:24:59 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[corona]]></category>
		<category><![CDATA[lua]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=90</guid>
		<description><![CDATA[I think Corona is a great kit for writing games in general, especially arcade games and board games.]]></description>
			<content:encoded><![CDATA[<p>It seems I can develop some games much, much faster with the <a href="http://anscamobile.com/corona/" onclick="pageTracker._trackPageview('/outgoing/anscamobile.com/corona/?referer=');">Corona SDK</a>. It will cost me $99, and it&#8217;s not as macho as mastering Objective-C, but I think I&#8217;ll end up saving hundreds of hours with this kit.</p>
<p>I think Corona is a great kit for writing games in general, especially arcade games and board games. There&#8217;s no built-in support yet for tiled maps, and it looks like <a href="http://www.cocos2d-iphone.org/" onclick="pageTracker._trackPageview('/outgoing/www.cocos2d-iphone.org/?referer=');">Cocos2D</a> will have that built-in first. But even with that disadvantage, developing on Lua is so much more productive than developing on Objective-C that I&#8217;ll still come out ahead.</p>
<p>Some apps aren&#8217;t a good fit, though:</p>
<ul>
<li>those that extensively use the CocoaTouch UI controls. In Corona, you have to create your own buttons, text fields, etc. There&#8217;s the ui library, but it only covers a few controls.</li>
<li>those that access APIs that aren&#8217;t wrapped yet by Corona. For example, access to the address book seems to be missing.</li>
</ul>
<p>There&#8217;s the worry that Corona SDK will violate section <a href="http://rad.batnag.org/2010/05/iphone-sdk-tos-3-3-1-one-month-later/">3.3.1</a>. Folks from Corona gave some reassuring <a href="http://blog.anscamobile.com/2010/04/lua-the-lingua-franca-of-iphone-games/" onclick="pageTracker._trackPageview('/outgoing/blog.anscamobile.com/2010/04/lua-the-lingua-franca-of-iphone-games/?referer=');">messages</a>, but of course, with Apple, you can&#8217;t have absolute uncertainty. My take is that even if Apple gives Corona the boot, Corona will become Android-only, and Corona SDK is worth $99 even as an Android</p>
<p>I&#8217;m taking the $99 plunge. If nothing else, I think Lua will give me a refreshing break from my day-to-day Ruby and Javascript coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2010/06/corona-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>work.sh</title>
		<link>http://rad.batnag.org/2010/06/work-sh/</link>
		<comments>http://rad.batnag.org/2010/06/work-sh/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 17:24:34 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=86</guid>
		<description><![CDATA[Ideally, there's a one-click work button, a sideproject1 button, a sideproject2 button, etc. Press the right button and your Mac will be transformed into a mode optimized for the work to be done: run the needed apps, close unneeded apps, start your favorite music, change the desktop background, etc.

I have decided to learn AppleScript to build those magic buttons. Here's what I've come up with so far.]]></description>
			<content:encoded><![CDATA[<p>From a cold boot, to start working on one of my Rails projects, I need to do the following:</p>
<ul>
<ol/> open Terminal, then Start MySQL or PostgreSQL</p>
<ol/> in a separate Terminal tab: cd Documents/projects/
<projectname> ; mate .</p>
<ol/> (if applicable) in a separate Terminal tab: Start Solr or Ferret</p>
<ol/> Start Firefox</p>
<ol/> Start Evernote
</ul>
<p>That&#8217;s a lot of keystrokes and mouse actions. No wonder I end up playing games most of the time, because Age of Empires III takes just one click.</p>
<p>I can configure MySQL and PostgreSQL to run on startup, but that&#8217;s wasteful. That&#8217;ll slow down the machine&#8217;s startup time, and sometimes I use just MySQL, on other projects I use PostgreSQL, and on other projects I use neither but instead use MongoDB. And that will just take away one step in this 5-step process to get from cold bootup to work bliss.</p>
<p>Ideally, there&#8217;s a one-click work button, a sideproject1 button, a sideproject2 button, etc. Press the right button and the Mac will be transformed into a mode optimized for the work to be done: run the needed apps, close unneeded apps, play music from the &#8220;work playlist&#8221;, change the desktop background, etc.</p>
<p>I have decided to learn AppleScript to build those magic buttons. Here&#8217;s what I&#8217;ve come up with so far:</p>
<div class="code">
<code></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
</pre></td><td class="code"><pre class="applescript" style="font-family:monospace;">#!<span style="color: #000000;">/</span>bin<span style="color: #000000;">/</span>sh
&nbsp;
# <span style="color: #ff0033; font-weight: bold;">From</span>: http:<span style="color: #000000;">//</span>stackoverflow.com<span style="color: #000000;">/</span>questions<span style="color: #000000;">/</span><span style="color: #000000;">1589114</span><span style="color: #000000;">/</span>opening<span style="color: #000000;">-</span>a<span style="color: #000000;">-</span>new<span style="color: #000000;">-</span>terminal<span style="color: #000000;">-</span>tab<span style="color: #000000;">-</span>in<span style="color: #000000;">-</span>osxsnow<span style="color: #000000;">-</span>leopard<span style="color: #000000;">-</span>with<span style="color: #000000;">-</span>the<span style="color: #000000;">-</span>opening<span style="color: #000000;">-</span>terminal<span style="color: #000000;">-</span>windows<span style="color: #000000;">/</span><span style="color: #000000;">1590818</span>#<span style="color: #000000;">1590818</span>
# <span style="color: #000000;">&#40;</span>See answer <span style="color: #0066ff;">by</span> i0n that says <span style="color: #009900;">&quot;courtesy of Dan Benjamin&quot;</span> http:<span style="color: #000000;">//</span>twitter.com<span style="color: #000000;">/</span>danbenjamin<span style="color: #000000;">&#41;</span>
&nbsp;
# Sets up <span style="color: #ff0033; font-weight: bold;">my</span> Infinitely terminal windows
&nbsp;
# 1. <span style="color: #0066ff;">Run</span> MongoDB
# 2. <span style="color: #0066ff;">Run</span> redis <span style="color: #ff0033; font-weight: bold;">in</span> a <span style="color: #0066ff;">new</span> terminal <span style="color: #0066ff;">tab</span>
# 3. cd <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033;">the</span> project
# 4. <span style="color: #0066ff;">Launch</span> Evernote
# 5. <span style="color: #0066ff;">Launch</span> Firefox
# 6. <span style="color: #0066ff;">Launch</span> GitX
&nbsp;
&nbsp;
# 1. <span style="color: #0066ff;">Run</span> MongoDB <span style="color: #ff0033; font-weight: bold;">in</span> a <span style="color: #0066ff;">new</span> terminal
<span style="color: #000000;">/</span>usr<span style="color: #000000;">/</span>bin<span style="color: #000000;">/</span>osascript <span style="color: #000000;">&lt;&lt;</span>mongo
<span style="color: #0066ff;">activate</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Terminal&quot;</span>
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;System Events&quot;</span>
	keystroke <span style="color: #009900;">&quot;t&quot;</span> using <span style="color: #000000;">&#123;</span>command down<span style="color: #000000;">&#125;</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Terminal&quot;</span>
	<span style="color: #ff0033; font-weight: bold;">repeat</span> <span style="color: #ff0033; font-weight: bold;">with</span> win <span style="color: #ff0033; font-weight: bold;">in</span> windows
		<span style="color: #ff0033; font-weight: bold;">try</span>
			<span style="color: #ff0033; font-weight: bold;">if</span> <span style="color: #ff0033; font-weight: bold;">get</span> frontmost <span style="color: #ff0033; font-weight: bold;">of</span> win <span style="color: #ff0033; font-weight: bold;">is</span> <span style="color: #0066ff;">true</span> <span style="color: #ff0033; font-weight: bold;">then</span>
				do <span style="color: #ff0033; font-weight: bold;">script</span> <span style="color: #009900;">&quot;cd ~; ./mongo.sh&quot;</span> <span style="color: #ff0033; font-weight: bold;">in</span> <span style="color: #000000;">&#40;</span>selected <span style="color: #0066ff;">tab</span> <span style="color: #ff0033; font-weight: bold;">of</span> win<span style="color: #000000;">&#41;</span>
			<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">if</span>
		<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">try</span>
	<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">repeat</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
mongo
&nbsp;
# 2. <span style="color: #0066ff;">Run</span> redis <span style="color: #ff0033; font-weight: bold;">in</span> a <span style="color: #0066ff;">new</span> terminal
<span style="color: #000000;">/</span>usr<span style="color: #000000;">/</span>bin<span style="color: #000000;">/</span>osascript <span style="color: #000000;">&lt;&lt;</span>redis
<span style="color: #0066ff;">activate</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Terminal&quot;</span>
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;System Events&quot;</span>
	keystroke <span style="color: #009900;">&quot;t&quot;</span> using <span style="color: #000000;">&#123;</span>command down<span style="color: #000000;">&#125;</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Terminal&quot;</span>
	<span style="color: #ff0033; font-weight: bold;">repeat</span> <span style="color: #ff0033; font-weight: bold;">with</span> win <span style="color: #ff0033; font-weight: bold;">in</span> windows
		<span style="color: #ff0033; font-weight: bold;">try</span>
			<span style="color: #ff0033; font-weight: bold;">if</span> <span style="color: #ff0033; font-weight: bold;">get</span> frontmost <span style="color: #ff0033; font-weight: bold;">of</span> win <span style="color: #ff0033; font-weight: bold;">is</span> <span style="color: #0066ff;">true</span> <span style="color: #ff0033; font-weight: bold;">then</span>
				do <span style="color: #ff0033; font-weight: bold;">script</span> <span style="color: #009900;">&quot;cd ~; ./redis.sh&quot;</span> <span style="color: #ff0033; font-weight: bold;">in</span> <span style="color: #000000;">&#40;</span>selected <span style="color: #0066ff;">tab</span> <span style="color: #ff0033; font-weight: bold;">of</span> win<span style="color: #000000;">&#41;</span>
			<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">if</span>
		<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">try</span>
	<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">repeat</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
redis
&nbsp;
# 3. cd <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033;">the</span> workers project
<span style="color: #000000;">/</span>usr<span style="color: #000000;">/</span>bin<span style="color: #000000;">/</span>osascript <span style="color: #000000;">&lt;&lt;</span>workers
<span style="color: #0066ff;">activate</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Terminal&quot;</span>
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;System Events&quot;</span>
	keystroke <span style="color: #009900;">&quot;t&quot;</span> using <span style="color: #000000;">&#123;</span>command down<span style="color: #000000;">&#125;</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Terminal&quot;</span>
	<span style="color: #ff0033; font-weight: bold;">repeat</span> <span style="color: #ff0033; font-weight: bold;">with</span> win <span style="color: #ff0033; font-weight: bold;">in</span> windows
		<span style="color: #ff0033; font-weight: bold;">try</span>
			<span style="color: #ff0033; font-weight: bold;">if</span> <span style="color: #ff0033; font-weight: bold;">get</span> frontmost <span style="color: #ff0033; font-weight: bold;">of</span> win <span style="color: #ff0033; font-weight: bold;">is</span> <span style="color: #0066ff;">true</span> <span style="color: #ff0033; font-weight: bold;">then</span>
				do <span style="color: #ff0033; font-weight: bold;">script</span> <span style="color: #009900;">&quot;cd ~/Documents/projects/infinitely/workers; mate .&quot;</span> <span style="color: #ff0033; font-weight: bold;">in</span> <span style="color: #000000;">&#40;</span>selected <span style="color: #0066ff;">tab</span> <span style="color: #ff0033; font-weight: bold;">of</span> win<span style="color: #000000;">&#41;</span>
			<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">if</span>
		<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">try</span>
	<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">repeat</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
workers
&nbsp;
<span style="color: #0066ff;">sleep</span> <span style="color: #000000;">1</span>
# 4. <span style="color: #0066ff;">Launch</span> Evernote
<span style="color: #0066ff;">open</span> <span style="color: #000000;">/</span>Applications<span style="color: #000000;">/</span>Evernote.app
&nbsp;
# 5. <span style="color: #0066ff;">Launch</span> Firefox
<span style="color: #0066ff;">open</span> <span style="color: #000000;">/</span>Applications<span style="color: #000000;">/</span>Firefox.app
&nbsp;
clear</pre></td></tr></table></div>

<p></code>
</div>
<p>There&#8217;s still no &#8220;Open iTunes and play songs in my &#8216;work&#8217; playlist&#8221; section, but I&#8217;m working on it. And here&#8217;s something to make it more interesting: <a href="http://www.apeth.com/rbappscript/00intro.html" onclick="pageTracker._trackPageview('/outgoing/www.apeth.com/rbappscript/00intro.html?referer=');">AppleScripting with Ruby</a>!</p>
<p><em>This script borrowed heavily from the ideas of the people in this <a href="http://stackoverflow.com/questions/1589114/opening-a-new-terminal-tab-in-osxsnow-leopard-with-the-opening-terminal-windows/1590818#1590818" onclick="pageTracker._trackPageview('/outgoing/stackoverflow.com/questions/1589114/opening-a-new-terminal-tab-in-osxsnow-leopard-with-the-opening-terminal-windows/1590818_1590818?referer=');">Stackoverflow thread</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2010/06/work-sh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>(CONSTANT == var) vs. (var == CONSTANT)</title>
		<link>http://rad.batnag.org/2010/02/constant-var-vs-var-constant/</link>
		<comments>http://rad.batnag.org/2010/02/constant-var-vs-var-constant/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 18:11:18 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=67</guid>
		<description><![CDATA[I&#8217;ve been programming for quite some time now, but until now I never understood why some programmers prefer CONSTANT == var over var == CONSTANT It&#8217;s to avoid a common C coding mistake of using = instead of ==. If you use the former form, and you inadvertently use = instead of ==, the compiler [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been programming for quite some time now, but until now I never understood why some programmers prefer<br />
<code>CONSTANT == var</code> over <code>var == CONSTANT</code></p>
<p>It&#8217;s to avoid a common C coding mistake of using = instead of ==. If you use the former form, and you inadvertently use = instead of ==, the compiler will catch your mistake because you&#8217;d be trying to assign a value to a constant.</p>
<p>I never really needed this convention because I have always been careful with my ==&#8217;s. One of the earliest C lessons I&#8217;ve learned. Still, it&#8217;s helpful to understand why some veterans prefer one form over the other.</p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2010/02/constant-var-vs-var-constant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS193P Study Group: Session 2</title>
		<link>http://rad.batnag.org/2010/02/cs193p-study-group-session-2/</link>
		<comments>http://rad.batnag.org/2010/02/cs193p-study-group-session-2/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 16:28:47 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[cs193p]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=58</guid>
		<description><![CDATA[Session 2 was conducted on the same venue as, and right after the PhRUG meetup. Attendees: topher rad eumir buddy tin nico There were two new attendees, tin and nico, who promised to catch up with the previous assignments. We discussed memory management. The following questions were raised: When should you call release on an [...]]]></description>
			<content:encoded><![CDATA[<p>Session 2 was conducted on the same venue as, and right after the <a href="http://groups.google.com/group/ruby-phil" onclick="pageTracker._trackPageview('/outgoing/groups.google.com/group/ruby-phil?referer=');">PhRUG</a> meetup.</p>
<p>Attendees:<br />
topher<br />
rad<br />
eumir<br />
buddy<br />
tin<br />
nico</p>
<p>There were two new attendees, tin and nico, who promised to catch up with the previous assignments.</p>
<p>We discussed memory management. The following questions were raised:</p>
<p><br/><br />
<em>When should you call release on an object?</em> </p>
<p>When you&#8217;re the one who did the alloc for the object.</p>
<p><br/><br />
<em>When should you not call release?</em> </p>
<p>When you did not do the alloc for the object.</p>
<p><br/><br />
<em>Why bother with alloc and init at all, when, for example, you can use class methods that do it for you?</em><br />
For example, why use:<br />
<code><br />
NSString *my_string = [[NSString alloc] initWithFormat:@"format"];<br />
</code></p>
<p>when you can instead the format below?<br />
<code><br />
NSString *my_string = [NSString stringWithFormat:@"format"];<br />
</code></p>
<p>Answer: The stringWithFormat call returns an autoreleased object. On the Mac OS X desktop, there&#8217;re practically no difference. On the iPhone, you want to limit the number of objects in the autorelease pool and use alloc/init most of the time so that you can be explicit (and optimize) on when you call release.</p>
<p><br/><br />
As before, let&#8217;s try to do Week 3 in one week. That means lectures 5 (Views, Animation, OpenGL) and 6 (View Controllers), and assignment 3 (HelloPoly II). Let&#8217;s aim to view the lectures and finish the assignment by next week and have a meetup Thursday next week, February 25. </p>
<p>For those that are catching up and still working on previous assignments, feel free to post questions about them, both on the forum and on meetups.</p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2010/02/cs193p-study-group-session-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Cocos2D course</title>
		<link>http://rad.batnag.org/2010/02/free-cocos2d-course/</link>
		<comments>http://rad.batnag.org/2010/02/free-cocos2d-course/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 16:26:50 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[cocos2d]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=55</guid>
		<description><![CDATA[The folks at web-geeks.com have organized a free class for Cocos2d and iPhone SDK 3.1.2:
<a href="http://web-geeks.com/uncategorized/cocos2d-course/" onclick="pageTracker._trackPageview('/outgoing/web-geeks.com/uncategorized/cocos2d-course/?referer=');">http://web-geeks.com/uncategorized/cocos2d-course/</a>]]></description>
			<content:encoded><![CDATA[<p>The folks at web-geeks.com have organized a free class for Cocos2d and iPhone SDK 3.1.2:<br />
<a href="http://web-geeks.com/uncategorized/cocos2d-course/" onclick="pageTracker._trackPageview('/outgoing/web-geeks.com/uncategorized/cocos2d-course/?referer=');">http://web-geeks.com/uncategorized/cocos2d-course/</a></p>
<p>It starts on Feb.15. Even if you don&#8217;t know anything about Objective-C and Cocoa, you still have some time to cram. You can actually get by with what you&#8217;ll learn from the first three chapters of this book: <a href="http://apress.com/book/view/1430216263" onclick="pageTracker._trackPageview('/outgoing/apress.com/book/view/1430216263?referer=');">Beginning iPhone Development: Exploring the iPhone SDK</a>.</p>
<p>See you in the class! </p>
<p>Er, the class is virtual, so see you in the class forum instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2010/02/free-cocos2d-course/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS193P Study Group: Session 1</title>
		<link>http://rad.batnag.org/2010/02/cs193p-study-group-session-1/</link>
		<comments>http://rad.batnag.org/2010/02/cs193p-study-group-session-1/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 12:40:39 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[cs193p]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=39</guid>
		<description><![CDATA[We had our first session last night, February 4. Johann of Sagada Solutions was kind enough to host the meet-up. Attendees: paul topher rad johann eumir buddy (cakey) We skipped discussion of assginment 1A as it was really very simple and no one had problems with it. Assignment 1B has four sections, so we took [...]]]></description>
			<content:encoded><![CDATA[<p><!– google_ad_section_start –><br />
We had our first session last night, February 4. Johann of <a href="http://sagadasolutions.com" onclick="pageTracker._trackPageview('/outgoing/sagadasolutions.com?referer=');">Sagada Solutions</a> was kind enough to host the meet-up.</p>
<p>Attendees:<br />
paul<br />
topher<br />
rad<br />
johann<br />
eumir<br />
buddy (cakey)</p>
<p>We skipped discussion of assginment 1A as it was really very simple and no one had problems with it.</p>
<p>Assignment 1B has four sections, so we took turns in discussing our solutions. Paul discussed section 1, Topher section 2, Rad section 3 and Eumir section 4.</p>
<p>Topher mentioned some confusion in creating the project under XCode 3.2/Snow Leopard. The screenshot provided by the handout was for XCode 3.1/Leopard. If you&#8217;re on XCode 3.2/SL, see the screenshot below on  how the New Project dialog should look like.</p>
<p><img width="542" height="450" src="http://rad.batnag.org/wp-content/uploads/2010/02/assignment1B.png" alt="Create New project dialog for Assignment 1B under XCode 3.2/Snow Leopard" /></p>
<p>Everyone was excited and wanted to try a bit faster pace. Tentatively, the next meetup is on Thursday, February 11. It will cover Lectures 3-4 and assignments 2A and 2B. We&#8217;ll check our progress over the weekend, and if this pace doesn&#8217;t seem workable, people should cry chicken as early as Monday, February 8.</p>
<p>Lastly, the off-topic discussions were also productive. Here are the links to the tools mentioned in passing during last night&#8217;s meetup:</p>
<p>Topher&#8217;s framework of choice for building iPhone apps:<br />
<a href="http://github.com/blog/389-three20-iphone-ui-goodness" onclick="pageTracker._trackPageview('/outgoing/github.com/blog/389-three20-iphone-ui-goodness?referer=');">http://github.com/blog/389-three20-iphone-ui-goodness</a></p>
<p>Rad&#8217;s framework of choice for building iPhone games:<br />
<a href="http://www.cocos2d-iphone.org/" onclick="pageTracker._trackPageview('/outgoing/www.cocos2d-iphone.org/?referer=');">http://www.cocos2d-iphone.org/</a></p>
<p>Rad&#8217;s framework of choice for Flash games:<br />
<a href="http://flixel.org/" onclick="pageTracker._trackPageview('/outgoing/flixel.org/?referer=');">http://flixel.org/</a></p>
<p>Interesting paper prototyping tools:<br />
<a href="http://apress.com/book/view/9781430228233" onclick="pageTracker._trackPageview('/outgoing/apress.com/book/view/9781430228233?referer=');">http://apress.com/book/view/9781430228233</a><br />
<a href="http://www.appsketchbook.com/" onclick="pageTracker._trackPageview('/outgoing/www.appsketchbook.com/?referer=');">http://www.appsketchbook.com/</a><br />
<!– google_ad_section_start –></p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2010/02/cs193p-study-group-session-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The CS193P Study Group is starting next week</title>
		<link>http://rad.batnag.org/2010/01/cs193p-study-group-starting-jan-25-2010/</link>
		<comments>http://rad.batnag.org/2010/01/cs193p-study-group-starting-jan-25-2010/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 11:33:12 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[cs193p]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=34</guid>
		<description><![CDATA[The CS193P study group is starting. Some changes in the mechanics: The study group will move at half the pace of the CS193P class. This means two lectures and 1-2 assignments every two weeks. There will be one meetup every week. Week 1 starts on January 25, 2010. Everyone views the lectures and works on [...]]]></description>
			<content:encoded><![CDATA[<p><!– google_ad_section_start –><br />
The <a href="http://cs193p.stanford.edu/" onclick="pageTracker._trackPageview('/outgoing/cs193p.stanford.edu/?referer=');">CS193P</a> <a href="http://groups.google.com/group/cocoaheads-manila" onclick="pageTracker._trackPageview('/outgoing/groups.google.com/group/cocoaheads-manila?referer=');">study group</a> is starting. Some changes in the mechanics:</p>
<ol>
<li>The study group will move at half the pace of the CS193P class. This means two lectures and 1-2 assignments every two weeks. There will be one meetup every week.</li>
<li>
</ol>
<p>Week 1 starts on January 25, 2010. Everyone views the lectures and works on the assignments on her own. There will be a meetup on February 4 to discuss concepts and assignment solutions.</p>
<p><!– google_ad_section_start –></p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2010/01/cs193p-study-group-starting-jan-25-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS193P Study Group</title>
		<link>http://rad.batnag.org/2010/01/cs193p-study-group/</link>
		<comments>http://rad.batnag.org/2010/01/cs193p-study-group/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 15:31:21 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[cs193p]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=28</guid>
		<description><![CDATA[I&#8217;m organizing a iPhone programming study group, based around the online materials available for Stanford CS193P (see my previous blog post). The mechanics are still being ironed out, but here&#8217;s what I&#8217;m envisioning: The study group will move at the same pace as the CS193P class. This means two one-hour lectures a week, and one [...]]]></description>
			<content:encoded><![CDATA[<p><!– google_ad_section_start –><br />
I&#8217;m organizing a iPhone programming study group, based around the online materials available for <a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.stanford.edu/class/cs193p/cgi-bin/drupal/?referer=');">Stanford CS193P</a> (see my previous <a href="http://rad.batnag.org/2010/01/stanford-cs193p-winter-2010-has-started/">blog post</a>).</p>
<p>The mechanics are still being ironed out, but here&#8217;s what I&#8217;m envisioning:</p>
<ol>
<li>The study group will move at the same pace as the CS193P class. This means two one-hour lectures a week, and one assignment a week.</li>
<li>Each participant will view the lecture videos on her own</li>
<li>Each participant will work on the assignments on her own</li>
<li>There will be an optional once-a-week meet-up to work on assignments together. Everyone still work on the assignment solution individually &#8211; the assignments have been designed that way &#8211; but the meet-up is an opportunity to have a high-bandwidth discussion on difficult concepts.</li>
<li>There will be once-a-week meet-ups to &#8220;submit&#8221; assignments and discuss solutions.</li>
</ol>
<p>The meet-ups will from 8pm to 9pm and will be held in the Ortigas office of <a href="http://sagadasolutions.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/sagadasolutions.com/?referer=');">Sagada Solutions</a>.</p>
<p>If you&#8217;re interested in joining the group, please join this <a href="http://groups.google.com/group/cocoaheads-manila" target="_blank" onclick="pageTracker._trackPageview('/outgoing/groups.google.com/group/cocoaheads-manila?referer=');">Google group</a>.<br />
<!– google_ad_section_start –></p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2010/01/cs193p-study-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stanford CS193P Winter 2010 has just started</title>
		<link>http://rad.batnag.org/2010/01/stanford-cs193p-winter-2010-has-started/</link>
		<comments>http://rad.batnag.org/2010/01/stanford-cs193p-winter-2010-has-started/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 02:09:11 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[cs193p]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/?p=21</guid>
		<description><![CDATA[Watching the videos (of the 2009 class) and working on the assignments has been the best iPhone programming exercise I've done so far. Highly recommended.]]></description>
			<content:encoded><![CDATA[<p><!– google_ad_section_start –></p>
<p>A new class has just started, and the material has been updated for iPhone OS 3.0. Videos of the lectures are available for free in iTunesU one week after the actual class.</p>
<p>Watching the videos (of the 2009 class) and working on the assignments has been the best iPhone programming exercise I&#8217;ve done so far. Highly recommended.</p>
<p>Follow the class here: <a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/" onclick="pageTracker._trackPageview('/outgoing/www.stanford.edu/class/cs193p/cgi-bin/drupal/?referer=');">http://www.stanford.edu/class/cs193p/cgi-bin/drupal/</a></p>
<p><!– google_ad_section_start –></p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2010/01/stanford-cs193p-winter-2010-has-started/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Learning iPhone Game Programming</title>
		<link>http://rad.batnag.org/2009/12/learning-iphone-game-programming/</link>
		<comments>http://rad.batnag.org/2009/12/learning-iphone-game-programming/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:29:04 +0000</pubDate>
		<dc:creator>rad</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://rad.batnag.org/2009/12/learning-iphone-game-programming/</guid>
		<description><![CDATA[If you're planning to embark on a similar journey, here's some advice.]]></description>
			<content:encoded><![CDATA[<p><!– google_ad_section_start –></p>
<p>Recently I decided to join the <em>Get Rich By Selling an iPhone Game</em> bandwagon. I had several things going against me. First, I&#8217;m starting from scratch when it comes to Objective-C and Cocoa. Second, this is completely unrelated to my current work, so I will not be able to port any know-how I gain from work into this new endeavor. Lastly, I still have to maintain my full-time job, and my family obligations, so this will at best get 5-10 hours a week of attention.</p>
<p>After several months of pursuing this inconsistently, my efforts have paid off and I finally am at point where my confidence in building an iPhone game is at about the same level as my confidence in building a web site on Ruby on Rails (my full-time job). I haven&#8217;t released a game yet, but I think I&#8217;m finally over the steep part of the learning curve.</p>
<p>If you&#8217;re planning to embark on a similar journey, here&#8217;s some advice:</p>
<p><strong>1. Enroll on an iPhone programming course</strong></p>
<p>I didn&#8217;t, but if one was available locally when I was learning, I would have seriously considered it. What I discovered during my learning process was that spending just one to two hours per session (the most I can spare in a day, given my full-time job and family obligations) for learning a completely new language and framework was very unproductive. I got stuck on most of those sessions, then I spent a considerable portion of the next session retracing my steps and figuring out where I stopped during the previous session. I made the most progress when I took a leave for several days from the my full-time job to concentrate on my studies.</p>
<p>Here are the bootcamps I recommend:</p>
<ul>
<li><a title="Big Nerd Ranch" href="http://www.bignerdranch.com/schedule.shtml" onclick="pageTracker._trackPageview('/outgoing/www.bignerdranch.com/schedule.shtml?referer=');">Big Nerd Ranch</a></li>
<li><a title="Mobile Orchard" href="http://www.mobileorchard.com/mobile-orchard-workshops-iphone-programming-training-classes" onclick="pageTracker._trackPageview('/outgoing/www.mobileorchard.com/mobile-orchard-workshops-iphone-programming-training-classes?referer=');">Mobile Orchard</a></li>
</ul>
<p>Alternatively, you can follow the <a href="http://cs193p.stanford.edu/" onclick="pageTracker._trackPageview('/outgoing/cs193p.stanford.edu/?referer=');">Stanford CS193P iPhone Application Development</a> class. Video transcripts of the lectures are freely available in iTunesU. The assignments are great, IMHO even better than the iPhone books. I&#8217;ve been looking for the Objective-C equivalent of the <a href="http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628" onclick="pageTracker._trackPageview('/outgoing/www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628?referer=');">K&#038;R book</a>, and the lectures and the assignments come closest to it.</p>
<p><strong>2. Go through these books, in order</strong></p>
<ul>
<li><a title="Introduction to Cocoa Application Tutorial" href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjCTutorial/01Introduction/01Introduction.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjCTutorial/01Introduction/01Introduction.html?referer=');">Introduction to Cocoa Application Tutorial</a></li>
<li><a title="Cocoa Fundamentals Guide" href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/Introduction.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/Introduction.html?referer=');">Cocoa Fundamentals Guide</a></li>
<li><a title="Beginning iPhone 3 Development, 2nd Edition" href="http://www.amazon.com/Beginning-iPhone-Development-Exploring-SDK/dp/1430224592/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1262017026&amp;sr=1-1" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.amazon.com/Beginning-iPhone-Development-Exploring-SDK/dp/1430224592/ref=sr_1_1?ie=UTF8_amp_s=books_amp_qid=1262017026_amp_sr=1-1&amp;referer=');">Beginning iPhone 3 Development, 2nd Edition</a></li>
<li><a title="The Objective-C Programming Language" href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html?referer=');">The Objective-C Programming Language</a></li>
<li><a title="Coding Guidelines for Cocoa" href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html?referer=');">Coding Guidelines for Cocoa</a></li>
<li><a title="iPhone Human Interface Guidelines" href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/index.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/index.html?referer=');">iPhone Human Interface Guidelines</a></li>
<li><a title="iPhone Developer's Cookbook, 2nd Edition" href="http://www.amazon.com/iPhone-Developers-Cookbook-Building-Applications/dp/0321659570/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1262017117&amp;sr=1-2" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.amazon.com/iPhone-Developers-Cookbook-Building-Applications/dp/0321659570/ref=sr_1_2?ie=UTF8_amp_s=books_amp_qid=1262017117_amp_sr=1-2&amp;referer=');">iPhone Developer&#8217;s CookBook: Building Applications with the iPhone 3.0 SDK 2nd Edition</a></li>
</ul>
<p>If you follow the Stanford CS193P class, you will find these books very useful. The Apple reference docs are your, well, references. The <i>Beginning iPhone</i> book and the <i>Developer&#8217;s Cookbook</i> will be helpful if you find some concepts aren&#8217;t adequately explained in the lectures or in the reference materials.</p>
<p><strong>3. Get an actual iPhone or at least an iPod Touch</strong></p>
<p>Theoretically it&#8217;s possible to build and release an app by just using the simulator, but it&#8217;s not recommended. Here&#8217;s why:</p>
<ul>
<li>You cannot test multi-touch and the accelerometer using the simulator</li>
<li>You need to be an actual iPhone OS user to be able to understand the UI expectations of your users. You need to actually use an iPhone or an iPod to be able to appreciate much of what&#8217;s written in iPhone Human Interface Guidelines</li>
<li>Apps, especially games, will be much slower on an actual device than on the simulator. You need to verify that your app won&#8217;t be sluggish on an actual device</li>
</ul>
<p><strong>4. Start with a framework</strong></p>
<p>I recommend the <a title="cocos2d-iphone" href="http://www.cocos2d-iphone.org/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.cocos2d-iphone.org/?referer=');">cocos2d-iphone</a> framework and the <a title="chipmunk Physics Engine" href="http://code.google.com/p/chipmunk-physics/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/chipmunk-physics/?referer=');">chipmunk physics engine</a>. Both are free and are supported by a healthy community. They may not be the best, but they&#8217;re accessible and are enough to get you started.</p>
<p><strong>5. Lastly, always remember to have fun!</strong></p>
<p>That&#8217;s what this is all about, right?</p>
<p><!– google_ad_section_end –></p>
]]></content:encoded>
			<wfw:commentRss>http://rad.batnag.org/2009/12/learning-iphone-game-programming/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
