<?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>Luis de la Rosa &#187; Programming</title>
	<atom:link href="http://www.luisdelarosa.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.luisdelarosa.com</link>
	<description>iPhone, iPad and Mac OS X Programming (with a dash of Ruby)</description>
	<lastBuildDate>Fri, 13 Jan 2012 06:53:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>dim &#8211; visualize your Git diff in TextMate</title>
		<link>http://www.luisdelarosa.com/2009/10/15/dim-visualize-your-git-diff-in-textmate/</link>
		<comments>http://www.luisdelarosa.com/2009/10/15/dim-visualize-your-git-diff-in-textmate/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 19:26:35 +0000</pubDate>
		<dc:creator>luis</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://www.luisdelarosa.com/?p=403</guid>
		<description><![CDATA[I use git as my primary version control system and one nice alias that I have in my ~/.bash_profile is &#8220;dim&#8221;. When I type in &#8220;dim&#8221;, I see my Git diff within TextMate which makes it easy to see what &#8230; <a href="http://www.luisdelarosa.com/2009/10/15/dim-visualize-your-git-diff-in-textmate/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I use git as my primary version control system and one nice alias that I have in my ~/.bash_profile is &#8220;dim&#8221;.  When I type in &#8220;dim&#8221;, I see my Git diff within <a href="http://macromates.com/">TextMate</a> which makes it easy to see what I&#8217;m about to commit.</p>
<p>Here&#8217;s the entire source:<br />
<code>alias dim="git diff | mate"</code></p>
<p>It should automatically pick the &#8220;Diff&#8221; language for you, but if not, then just pick it from the chooser at the bottom of the window to get the nice highlighting where deleted lines are in red, added lines are in green and markers are in blue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisdelarosa.com/2009/10/15/dim-visualize-your-git-diff-in-textmate/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>C4[3] Blitz Talks and MacRuby</title>
		<link>http://www.luisdelarosa.com/2009/09/30/c43-blitz-talks-and-macruby/</link>
		<comments>http://www.luisdelarosa.com/2009/09/30/c43-blitz-talks-and-macruby/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 05:54:19 +0000</pubDate>
		<dc:creator>luis</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.luisdelarosa.com/?p=399</guid>
		<description><![CDATA[I just came back from C4[3] &#8211; an Independent Mac and iPhone Developer Conference in Chicago. Wolf and Victoria host it and I saw Daniel Jalkut helping out along with a few other folks. In case you&#8217;re not hip to &#8230; <a href="http://www.luisdelarosa.com/2009/09/30/c43-blitz-talks-and-macruby/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just came back from <a href="http://rentzsch.com/c4/threeOpen">C4[3]</a> &#8211; an Independent Mac and iPhone Developer Conference in Chicago.  <a href="http://rentzsch.com/">Wolf</a> and <a href="http://violasong.com/blog/">Victoria</a> host it and I saw <a href="http://www.red-sweater.com/blog/">Daniel Jalkut</a> helping out along with a few other folks.  In case you&#8217;re not hip to the zero numbering scheme, this is actually the 4th iteration of the conference.  <a href="http://www.luisdelarosa.com/2008/09/26/10-things-i-learned-from-c42/">I went last year to C4[2]</a> and this year was even better in my opinion.</p>
<p>There&#8217;s too many things to write about so I&#8217;ll just focus on two things that stick out in my mind: Blitz Talks and <a href="http://www.macruby.org/">MacRuby</a>.</p>
<p>I go to <a href="http://www.nscodernightdc.com/">NSCoderNightDC</a> and we have a nice core group of Mac and iPhone Devs who show up every week and eat Strawberry Napoleons.  We also code and talk about design.  Well 3 of the guys proposed Blitz Talks and got accepted.</p>
<p><a href="http://robrhyne.com/">Rob</a> hit it out of the park with his <a href="http://giveabrief.com/">Briefs iPhone prototyping tool</a>.  Jose actually created a Brief on the way from the airport to the hotel.  He was kinda nervous beforehand in the hotel room but he practiced his presentation a few times on me and was really well prepared.  His slides were top-notch but I think the idea is what really captivates people.  I&#8217;m personally a big fan of fake-powered prototypes &#8211; prototypes powered by objects that return canned responses, but I&#8217;m definitely going to try out Briefs on upcoming iPhone engagements.</p>
<p><a href="http://greenmango.org/">Jose</a> did well with his presentation about the different types of contexts that an iPhone user would use different apps in.  I&#8217;ve seen him give this talk before so it was interesting to see how he pared it down to fit in the much tighter 5 minute time frame.</p>
<p><a href="http://stationinthemetro.com/">Mark</a> gave an interesting talk about how to do video right for Mac and iPhone screencasts and demos.  I have a lot to learn about this and I&#8217;m hoping to work with Mark on a screencast sometime in the near future for Webnote.</p>
<p>There were many other Blitz Talks and I think they really were a nice Change of Pace that I haven&#8217;t seen in other conferences.  Wolf amped it up even further by providing an animated radar / pie that kept filling up as the talk progressed.</p>
<p>MacRuby was the other big surprise for me.  I had been tracking RubyCocoa and had seen the early MacRuby demo at RubyConf 2007.  I&#8217;m a former Smalltalker and current Rubyist.  I do all my automated build processes in Ruby and I&#8217;ve also created various non-Rails Ruby server-side components for clients.  Plus I did Ruby on Rails for a few years.  So I&#8217;ve been wanting to make Mac apps with Ruby, except one thing kept holding me back: I don&#8217;t want to show everyone my source.</p>
<p>Obfuscation is not a problem with server-side Ruby.  The users only see what you expose via the web or other ports.  They only see what&#8217;s rendered to them or the API that you expose.</p>
<p>Client-side Ruby is another world altogether.  Users learn that they can peek inside application packages and if you&#8217;re writing Ruby, they can see your source.  I&#8217;ve asked this question at WWDCs in the past and the answer was usually that its not a big deal and that you should just keep innovating.  But we don&#8217;t just leave our Objective-C sources lying around, do we?</p>
<p>MacRuby will soon solve that, or I hope it will, with his AOT (Ahead Of Time) compiler.  Or as it is known in the C/C++/Objective-C world: a compiler.  LOL.  So with the AOT, we will be able to write Cocoa apps in Ruby, compile them and run them on Mac.  (And maybe iPhone &#8211; the jury is still out on that.)  Which means that people can&#8217;t just look at your Ruby source.  Even better, there is the HotCocoa project which provides useful macros / shortcuts for common Cocoa idioms.</p>
<p>Why use Ruby to write Cocoa apps?  Ruby can be more concise, there are more libraries to choose from and the testing/mocking frameworks are better.  On the other hand, the debugging story is still hazy.</p>
<p>I&#8217;ll be trying out MacRuby soon and I&#8217;ll post what I find.  They&#8217;re currently at 0.4 with a 0.5 on the horizon, with nightlies for Snow Leopard available and the latest source available in both Subversion and Git.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisdelarosa.com/2009/09/30/c43-blitz-talks-and-macruby/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting Sparkle from source (using bzr as compared with svn and git)</title>
		<link>http://www.luisdelarosa.com/2009/07/01/getting-sparkle-from-source-using-bzr-as-compared-with-svn-and-git/</link>
		<comments>http://www.luisdelarosa.com/2009/07/01/getting-sparkle-from-source-using-bzr-as-compared-with-svn-and-git/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 17:29:27 +0000</pubDate>
		<dc:creator>luis</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bzr]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[sparkle]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.luisdelarosa.com/?p=396</guid>
		<description><![CDATA[A few notes about getting Sparkle, the widely used framework for updating Mac OS X apps, from source: 1. Get a branch. This is similar to &#8220;svn checkout&#8221; or &#8220;git clone&#8221;. bzr branch lp:sparkle I admit it is kind of &#8230; <a href="http://www.luisdelarosa.com/2009/07/01/getting-sparkle-from-source-using-bzr-as-compared-with-svn-and-git/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A few notes about getting Sparkle, the widely used framework for updating Mac OS X apps, from source:</p>
<p>1. Get a branch.  This is similar to &#8220;svn checkout&#8221; or &#8220;git clone&#8221;.<br />
<code>bzr branch lp:sparkle</code></p>
<p>I admit it is kind of cool to have such a short name here like &#8220;lp:sparkle&#8221; due to bzr&#8217;s integration with Launchpad, which is sort of like SourceForge or GitHub.</p>
<p>2. Later on, you might need to get the latest version.  This is similar to &#8220;svn update&#8221; or &#8220;git pull&#8221;.<br />
<code>bzr pull</code></p>
<p>3. To make sure you have the latest, you can check what version you have.  This is similar to &#8220;svn info&#8221;.  The closest to this in git is &#8220;git log &#8211;max-count=1&#8243;<br />
<code>bzr version-info</code></p>
<p>You can compare that version to the latest one in <a href="https://code.launchpad.net/~andymatuschak/sparkle/main">the main Sparkle branch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisdelarosa.com/2009/07/01/getting-sparkle-from-source-using-bzr-as-compared-with-svn-and-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developer Day &#8211; Falls Church, VA &#8211; this Saturday May 30</title>
		<link>http://www.luisdelarosa.com/2009/05/28/developer-day-falls-church-va-this-saturday-may-30/</link>
		<comments>http://www.luisdelarosa.com/2009/05/28/developer-day-falls-church-va-this-saturday-may-30/#comments</comments>
		<pubDate>Thu, 28 May 2009 18:18:46 +0000</pubDate>
		<dc:creator>luis</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Northern Virginia]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Washington DC]]></category>

		<guid isPermaLink="false">http://www.luisdelarosa.com/?p=382</guid>
		<description><![CDATA[There&#8217;s a local Developer Day one-day conference here in Falls Church, VA (which is right outside Washington, D.C.) It is happening two days from now, this Saturday May 30, 2009. The schedule looks pretty cool and it is being sponsored &#8230; <a href="http://www.luisdelarosa.com/2009/05/28/developer-day-falls-church-va-this-saturday-may-30/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a local <a href="http://developer-day.com/">Developer Day</a> one-day conference here in Falls Church, VA (which is right outside Washington, D.C.)  It is happening two days from now, this Saturday May 30, 2009.</p>
<p>The schedule looks pretty cool and it is being sponsored by <a href="http://www.viget.com/">Viget Labs</a> and <a href="http://thinkrelevance.com/">Relevance</a>.  I&#8217;ll probably be dropping by.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisdelarosa.com/2009/05/28/developer-day-falls-church-va-this-saturday-may-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;ve been busy</title>
		<link>http://www.luisdelarosa.com/2009/02/05/ive-been-busy/</link>
		<comments>http://www.luisdelarosa.com/2009/02/05/ive-been-busy/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 07:57:32 +0000</pubDate>
		<dc:creator>luis</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.luisdelarosa.com/2009/02/05/ive-been-busy/</guid>
		<description><![CDATA[It has been a few months since I&#8217;ve blogged here and where have I been? Short answer is that I, Luis de la Rosa, have been busy. I&#8217;ll get into the details over the next series of posts. In terms &#8230; <a href="http://www.luisdelarosa.com/2009/02/05/ive-been-busy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It has been a few months since I&#8217;ve blogged here and where have I been?  Short answer is that I, Luis de la Rosa, have been busy.  I&#8217;ll get into the details over the next series of posts.</p>
<p>In terms of programming, I&#8217;ve been mostly doing Objective-C the past few months.  I&#8217;m still doing Ruby on Rails, but Cocoa and Cocoa Touch are my main focuses.  I actually did get paid to do some Erlang as well. Finally I joined an open source project that I&#8217;ve used on most of my iPhone projects.  So there&#8217;s lots to talk about in the near future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisdelarosa.com/2009/02/05/ive-been-busy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NSCoderNightDC is going to be studying iPhone SDK Development</title>
		<link>http://www.luisdelarosa.com/2008/10/07/nscodernightdc-is-going-to-be-studying-iphone-sdk-development/</link>
		<comments>http://www.luisdelarosa.com/2008/10/07/nscodernightdc-is-going-to-be-studying-iphone-sdk-development/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 19:15:01 +0000</pubDate>
		<dc:creator>luis</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Washington DC]]></category>

		<guid isPermaLink="false">http://www.luisdelarosa.com/2008/10/07/nscodernightdc-is-going-to-be-studying-iphone-sdk-development/</guid>
		<description><![CDATA[NSCoderNight DC is going to be switching gears tonight and starting to study the new Beta Book from the Pragmatic Programmers titled iPhone SDK Development. Why the switch? Because the NDA has been lifted. It is the first book of &#8230; <a href="http://www.luisdelarosa.com/2008/10/07/nscodernightdc-is-going-to-be-studying-iphone-sdk-development/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>NSCoderNight DC is going to be switching gears tonight and starting to study the new Beta Book from the Pragmatic Programmers titled <a href="http://pragprog.com/titles/amiphd/iphone-sdk-development">iPhone SDK Development</a>.  Why the switch?  Because the NDA has been lifted.</p>
<p>It is the first book of its kind that I know of.  I ran into one of the authors, Marcel &#8211; who I also knew and respected from the Rails world, at C4[2] and he told me about the book.</p>
<p>So if you are in the Washington DC area and interested in learning about iPhone development, we&#8217;ll be having weekly meetings starting at 7pm every Tuesday at:<br />
La Madeleine &#8211; Bethesda, MD<br />
7607 Old Georgetown Rd<br />
Bethesda, MD 20814<br />
(301) 215-9139â€Ž</p>
<p><a href="http://www.luisdelarosa.com/2008/07/08/nscodernight-washington-dc-tonight/">More detailed driving / parking directions to La Madeleine &#8211; Bethesda, MD</a></p>
<p>See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisdelarosa.com/2008/10/07/nscodernightdc-is-going-to-be-studying-iphone-sdk-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Things I Learned from C4[2]</title>
		<link>http://www.luisdelarosa.com/2008/09/26/10-things-i-learned-from-c42/</link>
		<comments>http://www.luisdelarosa.com/2008/09/26/10-things-i-learned-from-c42/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 20:39:39 +0000</pubDate>
		<dc:creator>luis</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.luisdelarosa.com/2008/09/26/10-things-i-learned-from-c42/</guid>
		<description><![CDATA[I went to C4[2] last month. For the uninitiated, C4[2] is the third (yes we count from zero) conference of its kind, a conference for independent-minded Mac and now iPhone developers, held annually in Chicago, Illinois. It is run by &#8230; <a href="http://www.luisdelarosa.com/2008/09/26/10-things-i-learned-from-c42/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I went to C4[2] last month.  For the uninitiated, C4[2] is the third (yes we count from zero) conference of its kind, a conference for independent-minded Mac and now iPhone developers, held annually in Chicago, Illinois.  It is run by <a href="http://rentzsch.com/">Jonathan &#8220;Wolf&#8221; Rentzsch</a>, who is an independent Mac / WebObjects consultant.</p>
<p>It was a great gathering and I look forward to going to C4[3] if I have the opportunity.  So I thought I&#8217;d share my top 10 things that I learned at the conference:</p>
<p>1. Getting like-minded developers together at one place generates a lot of energy, enthusiasm and knowledge sharing.</p>
<p>I think it&#8217;d be great if we could replicate what has been happening in the Ruby community and start to have Regional Objective-C conferences.  This has started to happen with the iPhone Dev Camps already, but it&#8217;d be great to have combined Mac / iPhone Regional conferences, so devs that can&#8217;t afford to travel to Chicago and San Francisco can still get involved and interact with each other in Washington D.C., New York, Seattle, Denver, and wherever else we all are.</p>
<p>2. iPhone development has really come into its own, but its knowledge continues to be restrained by the NDA.</p>
<p>We started off with a presentation by <a href="http://furbo.org/">Craig Hockenberry</a> of how iPhone has changed the way humans interact with computers in much the same way the mouse did.  We ended with a programming contest called Iron Coder (a play off of Iron Chef) which traditionally has been with Mac OS X APIs but this time was on iPhone with an iPhone API.  I finally participated (after helping with past Iron Coders by providing licenses of <a href="http://www.happyapps.com/webnotehappy/">WebnoteHappy</a> as prizes), collaborating with <a href="http://www.joepezzillo.com/">Joe Pezzillo</a> to produce CoreParanoia and also contributed a tiny bit to <a href="http://greenmango.org/">Jose Vazquez</a>&#8216;s 2nd place Tipster.</p>
<p>The rest of the presentations were not iPhone focused, but there were mentions of it throughout.  And it seemed like having an iPhone was part of the requirements for attendance.  I personally got a live demo from <a href="http://blog.neontology.com/">Tim Burks</a> of his iPhone app <a href="http://tootsweet.com/masyu">Masyu</a> which is a pretty fun puzzle game.</p>
<p>The problem however was that the NDA on iPhone development stifled a lot of the conversation.  This generated a lot of complaints and even a t-shirt that rebelled against it.</p>
<p>3. Security is scary, but not as scary as not succeeding.</p>
<p>There was a wild presentation on security that said: don&#8217;t pretend to be a security expert.  Stick to using the Keychain or bcrypt for passwords, use openssl or gpg.  Don&#8217;t use installers or open up listeners on ports.  Don&#8217;t write directly into the DOM.  But all of that doesn&#8217;t matter if your business doesn&#8217;t succeed if you don&#8217;t have a nice looking application and it is unstable or slow.  Also, filter user-supplied content and write a fuzzer for the content you accept.  Make sure you have a security contact, use a crash reporter, and use auto-update securely.  Finally, turn off Java in your web browser to prevent against some of the newer, crazier attacks like GIFAR.</p>
<p>4. Mac users really care about user experience (as if you already didn&#8217;t know that.)</p>
<p>To reiterate what we all sort of know but sometimes overlook since we are so deep in our code, <a href="http://www.atomicwang.org/motherfucker/Index/Index.html">Mike Lee</a> presented &#8220;Pimp My App.&#8221;  The basics: Use real artists, don&#8217;t skimp on your art budget, watch real users use your app, solve a specific problem, and cut as many features as you can.</p>
<p>He also offered some iPhone specific UI tips: start as fast you can, the start-up screen should not be used as a splash screen but more like the real app, restore the state of your app instead of just restarting, don&#8217;t block the UI, and think about the user&#8217;s first experience carefully.</p>
<p>5. Contractors / consultants are Indies too.</p>
<p>I&#8217;ve made applications and I&#8217;ve done consulting.  Both qualify you to be an Indie, meaning independent from another company.  There was a presentation by <a href="http://www.losingfight.com/blog/">Andy Finnell</a> on this and it mostly reiterated what I knew but it was nice to hear it from someone else.  Basically: make sure you have good contracts, these will help you get paid properly and avoid constraints your future development.  I&#8217;d add to this that if you can be choosy, it is good to figure out what kind of clients you want to work for and what kind of projects you want to work on and then only choose those to work on, even if it means taking some time off between projects.</p>
<p>6. Pricing sends a message</p>
<p><a href="http://www.glorifiedtypist.com/">Rich Siegel</a> of Bare Bones gave a presentation on lessons learned over his career.  One of the key ones is that pricing: is a marketing message and shows how you feel about your product.  It also needs to consider how much your overall costs are.  It also positions you among competitors.  That being said, your product / service definitely needs to be differentiated to justify a premium.</p>
<p>7. Warnings should be fixed</p>
<p>This is probably also a no-brainer but I&#8217;ve been at a few companies / projects where warnings are tolerated.  Mentioned by both Rich and Mike, warnings can be the cause of run-time errors down the road.  Its best to generate the most warnings possible and fix them as they come up.  You may find it also advantageous to treat warnings as errors, but either way way, fix them.</p>
<p>8. Mac programmers really care about fonts</p>
<p>Minor but revealing tidbit: the fonts at C4 are carefully chosen.  Compared to other conferences I have been to, I think this shows that Mac programmers care about design more than other programmers.</p>
<p>9. Twitter is the preferred method of communication in the Mac / iPhone developer community</p>
<p>When I wanted to see what was going on and what people were thinking, I checked <a href="http://twitter.com/home">Twitter</a>.  At other conferences, sometimes we would have IRC back-channels.  Using twitter makes the back-channels more open.  Also, we voted for Iron Coder via Twitter.</p>
<p>10. Do the simplest thing possible</p>
<p>Mentioned by Craig, <a href="http://log.scifihifi.com/">Buzz Andersen</a>, and Mike, doing the simplest thing possible, getting feedback and then iterating on that is a good technique when developing products.  I knew this before, but many of us are perfectionists and so we have to keep reminding ourselves of this in order to combat the tendency to either add more features or to keep trying to perfect a certain specific part of our app.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisdelarosa.com/2008/09/26/10-things-i-learned-from-c42/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Generating random numbers in Cocoa</title>
		<link>http://www.luisdelarosa.com/2008/07/24/generating-random-numbers-in-cocoa/</link>
		<comments>http://www.luisdelarosa.com/2008/07/24/generating-random-numbers-in-cocoa/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 19:58:21 +0000</pubDate>
		<dc:creator>luis</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.luisdelarosa.com/2008/07/24/generating-random-numbers-in-cocoa/</guid>
		<description><![CDATA[I&#8217;m writing an application to pick prize winners for the RubyNation conference that&#8217;s coming up here in the Washington DC area. As part of that, I have to generate random numbers. So I went looking for how to generate random &#8230; <a href="http://www.luisdelarosa.com/2008/07/24/generating-random-numbers-in-cocoa/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m writing an application to pick prize winners for the RubyNation conference that&#8217;s coming up here in the Washington DC area.  As part of that, I have to generate random numbers.  So I went looking for how to generate random numbers in Cocoa.  I was looking for something reasonably fast, built-in to Mac OS X, had an easy to use API, and had the most randomness.  I defined a random number generation algorithm as being more random if it had a larger range of numbers that it could generate.</p>
<p>The basic usage of a random number generator is something like this:</p>
<ol>
<li>Seed (initialize) the random number generator</li>
<li>Generate a random number</li>
<li>Modulo the random number against your maximum number to get a number from 0 to your maximum number &#8211; 1.</li>
</ol>
<p>Alright, first off I looked for Objective-C libraries.  You know, maybe there was an NSRandom or something like that.  There isn&#8217;t really one, so I went to look for C functions instead.</p>
<p>Digging into my memory banks, I remembered from my early C days that the standard C library call is srand() with a seed to initialize and then rand() to get the random number.  So I looked up <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/srand.3.html">srand in the Apple Developer Connection</a> (also known as ADC)<br />
 and came up with the laughable description: </p>
<blockquote><p>rand, rand_r, srand, sranddev &#8212; bad random number generator<br />
&#8230;<br />
These interfaces are obsoleted by random(3).</p></blockquote>
<p>Alright, so onto random.  I looked up <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/random.3.html">random in the ADC</a> to see its Mac OS X Manual page.  Alright, so it can generate numbers from 0 to (2**31) &#8211; 1.  You can seed it with srandom() &#8211; which could be useful because the same seed will generate the same sequence of random numbers &#8211; useful for replaying a game sequence.  A better seeding is to use srandomdev() which creates a state array which can&#8217;t be guessed by attackers and effectively uses the <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man4/random.4.html#//apple_ref/doc/man/4/random">/dev/random device</a>.</p>
<p>OK that seemed pretty good, but I read on and found this intriguing line:</p>
<blockquote><p>Applications requiring cryptographic quality randomness should use arc4random(3).</p></blockquote>
<p>Alright, so now I look up <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/arc4random.3.html">arc4random on ADC</a>.  arc4random uses the Alleged RC4 cipher, hence the ARC4.  It has a range of 0 to (2**32 &#8211; 1), which is twice the range of random.  It uses the /dev/urandom device.  And best of all, in my opinion, it doesn&#8217;t require seeding/initializing since it initializes itself.</p>
<p>So the winner in my book for generating random numbers in Cocoa (really any Objective-C or C program on Mac OS X) is arc4random.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisdelarosa.com/2008/07/24/generating-random-numbers-in-cocoa/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>NSCoderNight tonight in Northern Virginia</title>
		<link>http://www.luisdelarosa.com/2008/06/03/nscodernight-tonight-in-northern-virginia/</link>
		<comments>http://www.luisdelarosa.com/2008/06/03/nscodernight-tonight-in-northern-virginia/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 20:05:05 +0000</pubDate>
		<dc:creator>luis</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Washington DC]]></category>

		<guid isPermaLink="false">http://www.luisdelarosa.com/2008/06/03/nscodernight-tonight-in-northern-virginia/</guid>
		<description><![CDATA[I&#8217;ve been going to the past few NSCoderNights here in Northern Virginia. We&#8217;ve met up at Panera in Tysons before (look for the Apple logos.) But tonight we&#8217;re trying a different venue: Camille&#8217;s Sidewalk Cafe near the Courthouse Metro in &#8230; <a href="http://www.luisdelarosa.com/2008/06/03/nscodernight-tonight-in-northern-virginia/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been going to the past few NSCoderNights here in Northern Virginia.  We&#8217;ve met up at Panera in Tysons before (look for the Apple logos.)  But tonight we&#8217;re trying a different venue: Camille&#8217;s Sidewalk Cafe near the Courthouse Metro in Clarendon, VA.  More details in Jose&#8217;s blog entry <a href="http://greenmango.org/2008/06/03/trying-a-new-location-tonite/">Trying a new location tonite</a>.</p>
<p>It&#8217;s been pretty motivating to meet up with other Cocoa Mac and iPhone developers.  I think we&#8217;re going to be discussing Cocoa Programming with Mac OS X by Aaron Hillegass soon, working our way through the chapters.  I was privileged to have the experience of doing technical review on that book and I&#8217;ll have a full review of it on this blog soon.  Short review: if you have the 1st or 2nd edition, it will help you get caught up to the newer Cocoa APIs and so its worth getting.  If you don&#8217;t, then you definitely need this book to help you with your Cocoa programming.  Big Nerd Ranch uses it as a text book for their Cocoa Bootcamps!</p>
<p>Cocoa / Washington DC Trivia: Aaron Hillegass grew up in Northern Virginia.  We actually attended the same high school, Thomas Jefferson High School for Science and Technology, though at different times.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisdelarosa.com/2008/06/03/nscodernight-tonight-in-northern-virginia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2007 Training in Review</title>
		<link>http://www.luisdelarosa.com/2008/01/21/2007-training-in-review/</link>
		<comments>http://www.luisdelarosa.com/2008/01/21/2007-training-in-review/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 07:09:54 +0000</pubDate>
		<dc:creator>luis</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[RailsConf]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.luisdelarosa.com/2008/01/21/2007-training-in-review/</guid>
		<description><![CDATA[Last year I took a lot of training. In the past, my employers would usually send me to one training event. Sometimes I would get to go to two if times were good. Other times, there was no training budget. &#8230; <a href="http://www.luisdelarosa.com/2008/01/21/2007-training-in-review/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last year I took a lot of training.  In the past, my employers would usually send me to one training event.  Sometimes I would get to go to two if times were good.  Other times, there was no training budget.</p>
<p>In 2007, I was self-employed as the sole member of Happy Apps LLC.  So being in charge of the training budget (well actually the entire budget), I went to six training events:</p>
<ol>
<li>Rails Edge in Reston, VA</li>
<li>Advanced Rails in Chicago, IL</li>
<li>WWDC in San Francisco, CA</li>
<li>RailsConf in Portland, OR</li>
<li>Advanced Ruby in Reston, VA</li>
<li>RubyConf in Charlotte, NC</li>
</ol>
<p>So that&#8217;s 2 Ruby conferences, 3 Rails conferences, and one Cocoa conference.  I actually was scheduled to go to another Cocoa conference, C4[1] over in Chicago, but had to cancel due to personal reasons.</p>
<p>So which ones were good and which ones were bad?  I think they were all quite good.  Obviously, if you want to make Mac applications like I do with <a href="http://www.happyapps.com/webnotehappy/">WebnoteHappy</a>, you&#8217;ll want to go WWDC.</p>
<p>In terms of being a good Ruby on Rails developer, I&#8217;d have to say that assuming that you already have a good background in object-oriented programming and web development, have worked through a beginning Rails book like Agile Web Development with Rails, then you really should take both the Advanced Ruby course by Pragmatic Studio, followed by the Advanced Rails course.  Both taught me quite a lot of things that I hadn&#8217;t known before.</p>
<p>Once you&#8217;ve got that though, I think its important to keep up with the latest in techniques and also be involved in your programming community.  I think <a href="http://pragmaticstudio.com/therailsedge/">The Rails Edge Conference</a> is top notch in keeping up with what&#8217;s new in the Rails world.  I hope that a date is announced soon though &#8211; I don&#8217;t see one for 2008 as of today.</p>
<p>RailsConf is also good for keeping up with Rails, but I think is maybe even better for just being involved in the Rails community.  There were a lot of opportunities, scheduled and unscheduled, to get together with fellow RoR developers and you could sense that Rails is really changing the way that web development is being done.</p>
<p>RubyConf on the other hand reminded me that Ruby is not just about Rails.  There&#8217;s certainly been a lot of growth of Ruby use because of Rails, but there is a deep and wide pool of talent that has fallen in love with Ruby.  It was interesting to see all the different uses that people have made of Ruby.  And it was definitely an honor and a pleasure to meet Matz in person.  In the end, it does seem like most people who are doing Ruby full-time are making their money with Rails.</p>
<p>I&#8217;m trying to plan out my training in 2008 now.  So I&#8217;m curious to hear what good conferences or classes other people went to in 2007.  Also if there were any bad ones.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.luisdelarosa.com/2008/01/21/2007-training-in-review/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 1/30 queries in 0.010 seconds using memcached
Object Caching 591/652 objects using memcached

Served from: www.luisdelarosa.com @ 2012-02-09 07:29:37 -->
