<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.9.2 (http://www.squarespace.com/) on Thu, 11 Mar 2010 19:33:33 GMT--><feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><title>Blog</title><subtitle>Blog</subtitle><id>http://www.agilitesoftware.com/blog/</id><link rel="alternate" type="application/xhtml+xml" href="http://www.agilitesoftware.com/blog/"/><link rel="self" type="application/atom+xml" href="http://www.agilitesoftware.com/blog/atom.xml"/><updated>2010-01-19T16:27:44Z</updated><generator uri="http://www.squarespace.com/" version="Squarespace Site Server v5.9.2 (http://www.squarespace.com/)">Squarespace</generator><entry><title>5 Reasons why to switch to Git</title><category term="Development"/><category term="Git"/><category term="git"/><category term="github"/><category term="subversion"/><category term="svn"/><id>http://www.agilitesoftware.com/blog/2010/1/17/5-reasons-why-to-switch-to-git.html</id><link rel="alternate" type="text/html" href="http://www.agilitesoftware.com/blog/2010/1/17/5-reasons-why-to-switch-to-git.html"/><author><name>Niels Hansen</name></author><published>2010-01-18T03:54:24Z</published><updated>2010-01-18T03:54:24Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p>I'm going to predict that 2010 is the year where <a href="http://git-scm.com/" target="_blank">Git</a> becomes the defacto version control for most open source projects.  I also think Git will see a wide spread use from corporations but not as fast because of the slow adoption of anything new.  If you've not heard of Git, I strongly suggest to check it out.  I was skeptical myself.  I had just moved over to Subversion a few years ago from CVS and that  from Visual Source Safe.  The last thing I wanted to do was learn another version control and SVN seemed to do the job.  That was until over the winter break I was looking for a project on GitHub and needed to use Git to download the source code.  I instantly fell in love with it.  All the things I loved about SVN it seemed to do better and all the problems of SVN seem to have been solved!  <strong><span style="color: #003366;">Reason's why to start using Git</span></strong></p>
<h3>#1 Local Repository features</h3>
<p>The one advantage Git has over other repositories is how much you can actually do on the local version.  Besides doing a fetch, push or a pull, most commands are done locally. The ability to do a diff locally without hitting the server can save a ton of time.</p>
<p>&nbsp;</p>
<p>One feature I like is creating local branches that I can do all my work on and not have the fear of messing up the remote repository with my changes because I committed the changes.  Now I can work locally, make as many commits as I need to and if I have to rollback I can do so with no worries.  Once I have the version that is what I feel is good for everyone on the team to use, I can simply commit to the remote repository.  <span class="full-image-block ssNonEditable"><span><a href="http://www.thoughtblog.com/wp-content/uploads/2010/01/Screen-shot-2010-01-17-at-4.27.22-PM.png"><img src="http://www.thoughtblog.com/wp-content/uploads/2010/01/Screen-shot-2010-01-17-at-4.27.22-PM-1024x571.png?__SQUARESPACE_CACHEVERSION=1263787027824" alt="" /></a></span></span></p>
<h3>#2 The staging area</h3>
<p>The staging area is a great idea.  Sometimes you have code that you're not quiet sure you want to commit but you want to store it in a place while you continue to work on the file.  If the changes made in working directory have gone 180 on you still have the code in the staging area.  However, If  satisfied with the new code, simply add the code to the staging area again.  Then use the commit command and the code is moved from staging  to the local repository.</p>
<p>The main advantage of using the staging area is that when committing to the repository only the files ready to be committed are actually added. This avoids accidentally sending files in the working directory that may not be ready.  <a href="http://www.thoughtblog.com/wp-content/uploads/2010/01/Screen-shot-2010-01-17-at-4.41.26-PM.png"><img class="alignnone size-full wp-image-366" title="Screen shot 2010-01-17 at 4.41.26 PM" src="http://www.thoughtblog.com/wp-content/uploads/2010/01/Screen-shot-2010-01-17-at-4.41.26-PM.png" alt="" width="609" height="264" /></a> Git does not force the developer to have to use the staging feature. Directly going from the working directory to the local repository can be done by adding the -a option when issuing the commit command.  However, remember that using the -a argument of the commit command, sends all the modified files that were added previously to the local repository.  <a href="http://www.thoughtblog.com/wp-content/uploads/2010/01/Screen-shot-2010-01-17-at-4.44.58-PM.png"><img class="size-full wp-image-367 alignnone" title="Screen shot 2010-01-17 at 4.44.58 PM" src="http://www.thoughtblog.com/wp-content/uploads/2010/01/Screen-shot-2010-01-17-at-4.44.58-PM.png" alt="" width="613" height="247" /></a> This has been a hard habit to break for myself since I'm so used to the way SVN handles commits, that I was using the commit command with the -a option.  Now what I know of the advantages of  staging, I can avoid these problems I've had in the past.</p>
<h3>#3 Local Branching is super easy</h3>
<p>Local branching allows for the developer to create as many branches without having to have them stored on the the remote repository!  Keep one(1) branch for production, one (1) for development where to do all work in, and then other branches for experimental work.</p>
<p>The beauty is that switching between branches is as quick as typing the branch name.  Simply type <strong><em>git checkout &lt;Your Branch Name&gt;</em></strong> and the working directory has switched over to the selected branch.  It's very easy to then merge changes from each branch.  Again this is all done locally.  These branches can stay local or any branch can be added to the remote repository.</p>
<h3>#4 Cloning a remote Repository gives you the entire repository!</h3>
<p>When cloning from remote repository,   a complete copy is added to the local repository, not the current version like how Subversion handles it. This alone has many advantages. If working offline because the internet connection is down, or on a train or plane, the entire repository is still available for all the features normally found only when making calls back to the remote repository.  The ability to continue to make commits when offline is a huge deal!  Commit the changes later when back online!</p>
<h3>#5 Github.com rocks</h3>
<p>There is no better place to host open source or host your private repositories than <a href="http://www.github.com" target="_blank">Github</a>!  Github has a great set of features that are simply amazing.  Open source projects are free but to host a private repository will cost a few bucks a month.  The prices are cheap and offer so many features that's its a no brainer to use them to host your projects!</p>
<h3>Summary</h3>
<p>I love SVN but when something better comes along that you can't simply ignore it because your comfortable with something else.  I'll still have to use Subversion for some of my older projects, but from now on, all new projects will be using Git and Github.com.  Sorry Subversion but it's time we parted our ways! :)</p>]]></content></entry><entry><title>Progress made to the Augmented Reality Toolkit. Now a static library!</title><category term="Development"/><category term="augmented reality"/><category term="augmented reality"/><category term="github"/><category term="iPhone"/><category term="iPhone"/><id>http://www.agilitesoftware.com/blog/2010/1/16/progress-made-to-the-augmented-reality-toolkit-now-a-static.html</id><link rel="alternate" type="text/html" href="http://www.agilitesoftware.com/blog/2010/1/16/progress-made-to-the-augmented-reality-toolkit-now-a-static.html"/><author><name>Niels Hansen</name></author><published>2010-01-17T01:35:42Z</published><updated>2010-01-17T01:35:42Z</updated><summary type="html" xml:lang="en-US"><![CDATA[The Augment Reality Toolkit has made some good progress this week with the fixes coming to the orientations, scaling and adding the main functionality to a static library.]]></summary></entry><entry><title>Augmented Reality Toolkit for the iPhone on GitHub</title><category term="Cocoa"/><category term="Development"/><category term="augmented reality"/><category term="github"/><category term="iPhone"/><category term="iPhone"/><id>http://www.agilitesoftware.com/blog/2009/12/29/augmented-reality-toolkit-for-the-iphone-on-github.html</id><link rel="alternate" type="text/html" href="http://www.agilitesoftware.com/blog/2009/12/29/augmented-reality-toolkit-for-the-iphone-on-github.html"/><author><name>Niels Hansen</name></author><published>2009-12-29T17:52:59Z</published><updated>2009-12-29T17:52:59Z</updated><summary type="html" xml:lang="en-US"><![CDATA[iPhone Toolkit for Augmented Reality projects]]></summary></entry><entry><title>Xcode 3.2: The New Find Redesign</title><category term="Apple"/><category term="Development"/><category term="Development"/><category term="xCode"/><id>http://www.agilitesoftware.com/blog/2009/9/30/xcode-32-the-new-find-redesign.html</id><link rel="alternate" type="text/html" href="http://www.agilitesoftware.com/blog/2009/9/30/xcode-32-the-new-find-redesign.html"/><author><name>Niels Hansen</name></author><published>2009-09-30T22:30:17Z</published><updated>2009-09-30T22:30:17Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p>One of the things that have driven me bad about Xcode was the Find dialog. &nbsp;I've always felt that the find dialog got in the way and there was no way to dock to the IDE. &nbsp;</p>
<p>Well I was pleasantly surprised to find out that when I starting using Xcode 3.2 and clicked Cmd + F to bring up the find dialog, that it did not pop up the old dialog but instead a docked version of it appeared in the IDE! &nbsp;If you've used Safari, you know what I'm talking about. &nbsp;It now expands &nbsp;above the editor.</p>
<p>Here is a screen shot of my Editor before I did a find.</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://www.agilitesoftware.com/storage/Screen shot 2009-09-30 at 3.25.57 PM.png?__SQUARESPACE_CACHEVERSION=1254350360366" alt="" /></span></span></p>
<p>This is is what it looks like after I did a find:</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://www.agilitesoftware.com/storage/Screen shot 2009-09-30 at 3.40.15 PM.png?__SQUARESPACE_CACHEVERSION=1254350472774" alt="" /></span></span></p>
<p>Now what's cool is that when you enter the word your'e looking for, they are all highlighted and the first one found is highlighted in yellow.</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://www.agilitesoftware.com/storage/Screen shot 2009-09-30 at 3.26.38 PM.png?__SQUARESPACE_CACHEVERSION=1254350547653" alt="" /></span></span></p>
<p>As you can see above, all the matches are highlighted. &nbsp;Now if you want to cycle between all of the found results, you can either click the arrow buttons or CMD + G to find the next result.&nbsp;</p>
<p>Not a huge deal but this new update makes it feel like the rest of the Mac applications in Snow Leopard. I also believe this increases my productivity because I'm not messing with the dialog box, I can instantly see how many results were found!</p>]]></content></entry><entry><title>Dismissing the iPhone Keyboard</title><category term="Development"/><category term="Development"/><category term="iPhone"/><category term="iPhone"/><category term="xCode"/><id>http://www.agilitesoftware.com/blog/2009/9/28/dismissing-the-iphone-keyboard.html</id><link rel="alternate" type="text/html" href="http://www.agilitesoftware.com/blog/2009/9/28/dismissing-the-iphone-keyboard.html"/><author><name>Niels Hansen</name></author><published>2009-09-28T20:42:39Z</published><updated>2009-09-28T20:42:39Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p>For some reason a simple task like dismissing the keyboard for the iPhone can cause one to pull their hair out because it just will not work. There are a couple of key points to remember. The number #1 part developers forget to set is the <strong>delegate</strong> of the textField. If you're using the Interface Builder, remember to set the delegate of the textField to the File Owner.</p>
<p>&nbsp;</p>
<p><span class="full-image-block ssNonEditable"><span><img class="alignnone" title="Delegate" src="http://www.thoughtblog.com/imgs/delegate.png" alt="" width="398" height="216" /></span></span></p>
<p>&nbsp;</p>
<p>&nbsp;If you're not using Interface Builder, then make sure to set the delegate of the textfield to <strong>self</strong>. I also include the returnType. For example, if the textField was called gameField:</p>
<div class="csharpcode">
<pre class="alt">gameField.<span class="kwrd">delegate</span> = <span class="kwrd">self</span>;</pre>
<pre>gameField.returnType = <span class="kwrd">UIReturnKeyDone</span>;</pre>
</div>
<p><strong>&nbsp;</strong></p>
<p><strong>Implement the UITextFieldDelegate</strong> Implement the <strong>UITextFieldDelegate</strong> for the <em>ViewController</em> is required.</p>
<div class="csharpcode">
<pre class="alt">@<span class="kwrd">interface</span> YourViewController : UIViewController &lt;<span class="kwrd">UITextFieldDelegate</span>&gt;</pre>
</div>
<p>Finally, implement the <strong>textFieldShouldReturn</strong> method and call <strong>[textField resignFirstResponder]</strong></p>
<pre class="csharpcode">- (BOOL)textFieldShouldReturn:(UITextField *)textField {{
     [textField <span class="kwrd">resignFirstResponder</span>];
     <span class="kwrd">return</span> YES;
}</pre>
<p>&nbsp;</p>
<p>All the textFields will use this same method, so this only needs to be setup once. Make sure the delegate is set for the textField and the <em>UITextFieldDelegate</em> is implemented for the interface. Finally, add the <em>textFieldShouldReturn</em> method and call the <em>resignFirstResponder</em> . That's it! Now there should not be the problem of dismissing the keyboard if these few steps are followed.</p>]]></content></entry><entry><title>iPhone TableView: Swiping a cell to delete</title><category term="Development"/><category term="Development"/><category term="SDK"/><category term="iPhone"/><category term="iPhone"/><category term="xCode"/><id>http://www.agilitesoftware.com/blog/2009/9/28/iphone-tableview-swiping-a-cell-to-delete.html</id><link rel="alternate" type="text/html" href="http://www.agilitesoftware.com/blog/2009/9/28/iphone-tableview-swiping-a-cell-to-delete.html"/><author><name>Niels Hansen</name></author><published>2009-09-28T20:25:28Z</published><updated>2009-09-28T20:25:28Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p>One of the elegant features added to the iPhone mail app was the ability to swipe your finger from left to right on a tableView cell and have the delete button appear (like the right image below) to delete an item from the tableView. <span class="full-image-float-left ssNonEditable">
<p><span><a href="http://www.thoughtblog.com/wp-content/uploads/2009/07/tableview.png"><img src="http://www.thoughtblog.com/wp-content/uploads/2009/07/tableview-150x150.png?__SQUARESPACE_CACHEVERSION=1254169083552" alt="" /></a></span></p>
<p><span>&nbsp;</span></p>
</span>Many people have asked me if this is possible to do for their own iPhone app.<span class="full-image-float-right ssNonEditable"><span><img class="alignright size-thumbnail wp-image-318" title="tableviewdelete" src="http://www.thoughtblog.com/wp-content/uploads/2009/07/tableviewdelete-150x150.png" alt="tableviewdelete" width="150" height="150" /></span></span>&nbsp;</p>
<p>The short answer is Yes but you have to use a couple of <em>undocumented API</em> calls. It's actually quiet easy. Set the cell's <strong>editingStyle</strong> to <strong>UITableViewCellEditingStyleDelete. </strong>This is an undocumented feature. Currently the documentation will show that it's a read only property. However there is nothing stopping one from setting the set property. A compiler warning like below will appear when implementing the set property.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://www.thoughtblog.com/wp-content/uploads/2009/07/editingstylewarning.png"><img class="size-full wp-image-311 " title="editingstylewarning" src="http://www.thoughtblog.com/wp-content/uploads/2009/07/editingstylewarning.png" alt="Editing Style Warning for setting the style" width="718" height="88" /></a></p>
<p>To set the style, do it either in the <em>cellForRowAtIndexPath</em> method or implement a <em>TableViewCell</em> object. I'm not going to get into details of how to create a cell, I assume you already know how to do that.</p>
<div class="csharpcode">
<pre class="alt">- (UITableViewCell *)tableView:(<span class="kwrd">UITableView*</span>)tableView cellForRowAtIndexPath:(<span class="kwrd">NSIndexPath*</span>)indexPath</pre>
<pre>{</pre>
<pre class="alt">   <span class="rem">// Add your code here to create the cell</span></pre>
<pre class="alt">   <span class="rem"> .....</span></pre>
<pre>    [cell <span class="kwrd">setEditingStyle</span>:<span class="kwrd">UITableViewCellEditingStyleDelete</span>];</pre>
<pre>}</pre>
</div>
<p>The final set step is to actually do something when the user swipes the cell and clicks the Delete button. This is handled by adding the <strong>commitEditingStyle</strong> message to the view.</p>
<div class="csharpcode">
<pre class="alt">- (<span class="kwrd">void</span>)tableView:(<span class="kwrd">UITableView*</span>)aTableView commitEditingStyle:(<span class="kwrd">UITableViewCellEditingStyle</span>)editingStyle forRowAtIndexPath:(<span class="kwrd">NSIndexPath*</span>)</pre>
<pre>{</pre>
<pre class="alt">    <span class="kwrd">if</span> (editingStyle == <span class="kwrd">UITableViewCellEditingStyleDelete</span>)    {</pre>
<pre>       <span class="rem"> //Add Code to delete from the Data Source</span></pre>
<pre>    }</pre>
<pre class="alt">}</pre>
</div>
<p>That's all to it. A very simple implementation for an elegant solution. I'm still miffed why this is undocumented, so be warned, you could have Apple decline your app because of the usage of an undocumented feature. <strong>UPDATE: iPhone 3.0 SDK you no longer have to set the EditingStyle of the Cell.</strong></p>]]></content></entry><entry><title>Xcode Tip: Column mode text Selecting</title><category term="Development"/><category term="Development"/><category term="xCode"/><id>http://www.agilitesoftware.com/blog/2009/9/28/xcode-tip-column-mode-text-selecting.html</id><link rel="alternate" type="text/html" href="http://www.agilitesoftware.com/blog/2009/9/28/xcode-tip-column-mode-text-selecting.html"/><author><name>Niels Hansen</name></author><published>2009-09-28T20:22:59Z</published><updated>2009-09-28T20:22:59Z</updated><content type="html" xml:lang="en-US"><![CDATA[There are times when you need to select text in column mode instead of the tradtional row selection. Think of it like selecting a range of columns in a spreadsheet like Excel or Numbers.

For example, lets say there is 4 members that you want to make into properties.

<a href="http://www.thoughtblog.com/wp-content/uploads/2009/08/Picture-4.png"><img class="aligncenter size-full wp-image-326" title="Text to Highlight" src="http://www.thoughtblog.com/wp-content/uploads/2009/08/Picture-4.png" alt="Text to Highlight" width="393" height="144" /></a>
<p style="text-align: auto;">Move the cursor to the beginning column you want to start highlighting from. Hold down the <span style="font-weight: bold;">ALT/Otption key</span> and then press and hold down the <span style="font-weight: bold;">left mouse button</span>. Next, highlight the code with the mouse or arrow keys. After the code is highlighted, simply copy  it to the clipboard. (command + C Key)</p>
<p align="left"><a href="http://www.thoughtblog.com/wp-content/uploads/2009/08/Highlighted.png"><img class="aligncenter size-full wp-image-327" title="Highlighted Text" src="http://www.thoughtblog.com/wp-content/uploads/2009/08/Highlighted.png" alt="Highlighted Text" width="341" height="287" /></a></p>
<p align="left">Notice in the image above, I previously pasted the @property four (4) times so that I could then insert the selected code once.  To do this, move the cursor to the position of the first @property and paste. (Command + V).</p>

<p align="left"><a href="http://www.thoughtblog.com/wp-content/uploads/2009/08/Text-Pasted.png"><img class="aligncenter size-full wp-image-328" title="Text Pasted" src="http://www.thoughtblog.com/wp-content/uploads/2009/08/Text-Pasted.png" alt="Text Pasted" width="398" height="102" /></a>
There you go!  The columns of code that were highlighted and saved to the clipboard are now pasted all at once.  No need to have to paste each variable one at a time!
<p align="left"><span style="font-weight: bold;">ALT</span> + <span style="font-weight: bold;">Left Mouse button</span> = Column Mode Text Selection</p>]]></content></entry><entry><title>Developing under OSX 10.6 and Xcode 3.2</title><category term="Development"/><category term="Development"/><category term="OSX"/><category term="Snow Leopard"/><category term="iPhone"/><category term="iPhone"/><category term="xCode"/><id>http://www.agilitesoftware.com/blog/2009/9/28/developing-under-osx-106-and-xcode-32.html</id><link rel="alternate" type="text/html" href="http://www.agilitesoftware.com/blog/2009/9/28/developing-under-osx-106-and-xcode-32.html"/><author><name>Niels Hansen</name></author><published>2009-09-28T20:08:28Z</published><updated>2009-09-28T20:08:28Z</updated><summary type="html" xml:lang="en-US"><![CDATA[The upgrade to Snow Leopard is worth it alone for xCode 3.2]]></summary></entry><entry><title>iPhone SDK Development Series</title><id>http://www.agilitesoftware.com/blog/2009/4/22/iphone-sdk-development-series.html</id><link rel="alternate" type="text/html" href="http://www.agilitesoftware.com/blog/2009/4/22/iphone-sdk-development-series.html"/><author><name>Niels Hansen</name></author><published>2009-04-22T21:11:42Z</published><updated>2009-04-22T21:11:42Z</updated><content type="html" xml:lang="en-US"><![CDATA[<p>We at Agilite Software simply love the iPhone. And what's not to like about it. &nbsp;We love developing for it more than any other device out there.&nbsp;</p>
<p>We'd like to share some of that with you by providing some tutorials on how to develop for the iPhone. &nbsp;In the coming weeks, we are going to publish a set of tutorials on how to develop applications for the iPhone!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content></entry></feed>