<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[4 Arrows Media]]></title>
  <link href="http://4arrowsmedia.com/atom.xml" rel="self"/>
  <link href="http://4arrowsmedia.com/"/>
  <updated>2012-02-17T14:56:50-05:00</updated>
  <id>http://4arrowsmedia.com/</id>
  <author>
    <name><![CDATA[Scott]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Combine 2 Git Repos and Save History]]></title>
    <link href="http://4arrowsmedia.com/blog/2012/02/09/combine-2-git-repos-and-save-history/"/>
    <updated>2012-02-09T23:35:00-05:00</updated>
    <id>http://4arrowsmedia.com/blog/2012/02/09/combine-2-git-repos-and-save-history</id>
    <content type="html"><![CDATA[<p>I had a small problem. I needed to setup private repositories on <a href="http://github.com">GitHub</a> for backing up my CubPath and ScoutTrail code and data. So, I signed up for the cheapest GitHub plan to get some private repos. The cheapest option provided 5 private repos, which is perfect for me right now. The problem is that I had 2 local repos for each app. This would use up 4 of my 5 remote repos. Not an ideal way of providing for future expansion.</p>

<p>My current app setup is this, I have 2 Xcode projects for each app. One project is the actual app, ScoutTrail. The other is a project, ScoutTrailData, I use for generating a <a href="http://4arrowsmedia.com/blog/2010/08/19/adding-a-preloaded-sqlite-db-to-scouttrail-app">SQLite database that is used to preload ScoutTrail Core Data</a> store with all rank and merit badge requirements data.</p>

<!-- more -->


<p>The better design would be to include the ScoutTrailData project inside the ScoutTrail project. In addition to consolidating both projects into a single git repository, it will allow me to consolidate the Core Data model files.</p>

<p>But just copying ScoutTrailData as a subdirectory to ScoutTrail is not ideal. Why? I would lose the git history of ScoutTrailData. I am not a git expert. In fact, I am a novice. I can handle your basic init, add, commit, checkout, diff, pull and push. I&#8217;ve even been known to create a branch and try my hand with merge. But combining two local repos into one while maintaining history was beyond my skillset. So, I did what any self-respecting indie developer would do. I typed in &#8220;move git repo inside another one&#8221; and let the power of internet search supply me with knowledge. 2nd on the search results was a post on <a href="http://twitter.com/gregbayer">Greg Bayer</a>&#8217;s (of <a href="http://pulse.me">Pulse</a>) <a href="http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history">blog</a>.</p>

<h4>Create remote repos on GitHub</h4>

<p>Create remote repos on GitHub for ScoutTrail and ScoutTrailData. Once I have everything moved and working correctly inside of ScoutTrail, I&#8217;ll go back and remove ScoutTrailData. After creating private repos, GitHub provides the commands for pushing an established local repo to a remote repo.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nb">cd </span>ScoutTrailData
</span><span class='line'>git remote add origin &lt;git repo ScoutTrailData url&gt;
</span><span class='line'>git push -u origin master
</span></code></pre></td></tr></table></div></figure>


<h4>Prepare ScoutTrailData repo for the move</h4>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>mkdir mergeDir
</span><span class='line'><span class="nb">cd </span>mergeDir
</span><span class='line'>git clone &lt;git repo ScoutTrailData url&gt;
</span><span class='line'><span class="nb">cd </span>ScoutTrailData
</span><span class='line'><span class="c"># create subdir</span>
</span><span class='line'>mkdir ScoutTrailData
</span><span class='line'><span class="c"># mv * into it, needed to create ScoutTrailData subdirectory in ScoutTrail repo</span>
</span><span class='line'>mv * ScoutTrailData
</span><span class='line'>git add .
</span><span class='line'><span class="c"># cleanup deletions caused by mv</span>
</span><span class='line'><span class="k">for </span>i in <span class="sb">`</span>git st | grep deleted | awk <span class="s1">&#39;{print $3}&#39;</span><span class="sb">`</span>; <span class="k">do </span><span class="nb">echo</span> <span class="nv">$i</span>; git rm <span class="nv">$i</span>; <span class="k">done</span>
</span><span class='line'>git commit
</span></code></pre></td></tr></table></div></figure>


<h4>Merge ScoutTrailData into ScoutTrail repo</h4>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nb">cd </span>mergeDir
</span><span class='line'>git clone &lt;git repo ScoutTrail url&gt;
</span><span class='line'><span class="nb">cd </span>ScoutTrail
</span><span class='line'>git remote scoutTrailData-branch ../ScoutTrailData
</span><span class='line'>git pull scoutTrailData-branch master
</span><span class='line'>git remote rm scoutTrailData-branch
</span><span class='line'>git push
</span></code></pre></td></tr></table></div></figure>


<p></p>

<p>Now, ScoutTrailData is a subdirectory of ScoutTrail and both git histories have been saved.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Get Out……]]></title>
    <link href="http://4arrowsmedia.com/blog/2012/02/07/get-out-and-meet-some-people/"/>
    <updated>2012-02-07T23:24:00-05:00</updated>
    <id>http://4arrowsmedia.com/blog/2012/02/07/get-out-and-meet-some-people</id>
    <content type="html"><![CDATA[<p>and meet some people.</p>

<p>Most developer types are introverts. We are at home sitting in front of our computers coding. However, it is hard to make a living while secluded in our own little world. To learn, we need to hear about other&#8217;s ideas and experiences. In order to get client work, you need to make contacts and build a reputation.</p>

<p>There are no secret formulas for this, just Get Out. Leave the confines of your home.</p>

<!-- more -->


<p>Here is a rundown of my getting out in the past 2 years for iOS devstuff:</p>

<ul>
<li>Attended <a href="http://modevdc.com">MoDevDC</a> in October 2010. Met <a href="http://twitter.com/kenyarmosh">Ken Yarmosh</a> during his <a href="http://www.amazon.com/dp/1449389767/?tag=my4ar-20">App Savvy</a> book release.</li>
<li>Attended <a href="http://360idev.com">360iDev 2010</a> in Austin, TX. Met many, here are a few: <a href="http://twitter.com/kirbyt">Kirby Turner</a>, <a href="http://twitter.com/juliobarros">Julio Barros</a>, <a href="http://twitter.com/casademora">Saul Mora</a>, <a href="http://twitter.com/lordbron">Tom Ortega</a>, <a href="http://twitter.com/manton">Manton Reese</a>, <a href="http://twitter.com/dazeend">Charles Perry</a>, <a href="http://twitter.com/tvf">Tom Frauenhofer</a>, <a href="http://twitter.com/jwilker">John Wilker</a>, <a href="http://twitter.com/dwsjoquist">Doug Sjoquist</a>, <a href="http://twitter.com/whilethis">Brandon Alexander</a> and many others.</li>
<li>I occasionally attend <a href="http://nscodernightdc.com">NSCoderNightDC</a>, where I met <a href="http://twitter.com/louielouie">Luis de la Rosa</a> and <a href="http://twitter.com/josevazquez">Jose Vazquez</a>.</li>
<li>Attended <a href="http://developer.apple.com/wwdc">WWDC11</a>. <a href="http://twitter.com/louielouie">Luis</a> introduced me to <a href="http://twitter.com/bdudney">Bill Dudney</a>, whose book <a href="http://www.amazon.com/dp/1934356255/?tag=my4ar-20">iPhone SDK Development</a> was my introduction to iOS development. <a href="http://twitter.com/kenyarmosh">Ken</a> introduced me to <a href="http://twitter.com/_davidsmith">David Smith</a>, another iOS developer here in northern Virginia. And many more…</li>
<li><a href="http://twitter.com/_davidsmith">David</a> opened up his office on Tuesdays for local devs to co-work. There, I met <a href="http://twitter.com/capttaco">Rob Rhyne</a>, cofounder of <a href="http://martiancraft.com">Martian Craft</a>.</li>
<li>Attended <a href="http://360idev.com">360iDev 2011</a> again. Met more folks.</li>
</ul>


<p>So, big deal. I went to meetups and conferences and met more devs. True, but my iOS dev knowledge has grown. Plus, these folks have been a huge resource for my knowledgebase. And one added bonus, work. I worked 6 months on a client job with <a href="http://twitter.com/louielouie">Luis</a>. The introduction to <a href="http://twitter.com/capttaco">Rob</a> and a recommendation from Luis led to my current work with <a href="http://martiancraft.com">Martian Craft</a>.</p>

<p>I feel very fortunate to have given these opportunities and none of it would have happened if I didn&#8217;t get out of the house and my comfort zone.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The Octopress Move]]></title>
    <link href="http://4arrowsmedia.com/blog/2012/01/07/octopress-move/"/>
    <updated>2012-01-07T13:58:00-05:00</updated>
    <id>http://4arrowsmedia.com/blog/2012/01/07/octopress-move</id>
    <content type="html"><![CDATA[<p><img src="http://4arrowsmedia.com/images/wordpress_to_octopress.jpg"></p>

<p>I am striving for simplicity. I&#8217;m trying to clean up my office of clutter.
I like clean simple UIs. I liked my website when I initially set it up,
but now I don&#8217;t. The black background no longer appeals to me and even
writing blogs using WordPress&#8217;s tools is no longer fun. After reading a
post on a <a href="http://david-smith.org">friend&#8217;s site</a>, I looked further at his
site and just plain liked the simple, but clean look and feel of it. I saw
the <a href="http://octopress.org">Octopress</a> tag at the bottom of the page and
looked further. After talking with Dave, I was convinced this was the system
I wanted to use for blogging.</p>

<!-- more -->


<p>I have been following the steps from <a href="http://octopress.org">Octopress</a> website
for basic site setup. Octopress requires that posts be written in Markdown, but
Wordpress posts are html (although technically php generated html from mysql database
contents. Thankfully, <a href="http://thomas.jossystem.se">Thomas Frossman</a> created <a href="https://github.com/thomasf/exitwp">exitwp</a>,
which I used to convert my WP pages and posts for Octopress. I&#8217;ve had to edit these
<a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a> files to fix image links,
code snippets, etc. But exitwp did a good job of converting my
past posts to Markdown.</p>

<p>Looking forward to further exploration of Octopress, but mainly just looking for the
simplicity it provides. The other features are just a bonus.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[More Proactive, Less Reactive]]></title>
    <link href="http://4arrowsmedia.com/blog/2012/01/05/more-proactive-less-reactive/"/>
    <updated>2012-01-05T03:08:19-05:00</updated>
    <id>http://4arrowsmedia.com/blog/2012/01/05/more-proactive-less-reactive</id>
    <content type="html"><![CDATA[<p>I hate conflict, personal conflict that is. More to the point, I hate fighting
with my wife and kids. Most, if not all, of these heated &#8220;discussions&#8221; are due
to improper planning or poor communication…the common signs of the lack of
<em>being proactive</em>.</p>

<p>However, <em>be more proactive</em> is not a SMART goal. It is generic and
immeasurable. To make it SMART, I need to break it down into a list of
specific objectives that can improve my reactive skills. So here is my list:</p>

<ol>
<li>Re-read David Allen&#8217;s book <a href="http://www.amazon.com/gp/product/B000WH7PKY/ref=as_li_tf_tl?ie=UTF8&amp;tag=my4ar-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000WH7PKY">Getting Things Done: The Art of Stress-Free Productivity</a><img src="http://www.assoc-amazon.com/e/ir?t=my4ar-20&amp;l=as2&amp;o=1&amp;a=B000WH7PKY" alt="" /> by the end of next week (1/13/2012). I read his book years ago and even attended his 1-day seminar, but I failed to apply what I learned. I consider myself my <em>own worse critic</em>, and with that revelation, my planning skills stink. And one of the first steps to planning is know what to plan, and the key factor to GTD his gathering and trapping that which needs to be planned.</li>
</ol>


<!-- more -->


<ol>
<li><p>Implement my GTD system by the end of this month (1/31/2012). An iPhone-based system is a must. One that I can also use on my computer is ideal. So, native-iOS required, with computer or web-based backup or synching system being ideal. I don&#8217;t expect the system to be working at 100% efficiency by the end of the month, but I do want the tools to be in place and working.</p></li>
<li><p>Read 2 communication-related books by 5/31/2012 and write a review for each. One book should cover verbal interpersonal communication skills. The bigger goal here is to improve how I communicate with my family and close friends. I am an independent loner by nature, which suits me just fine but not the rest of my house. The second should cover what I would consider professional communication, most likely presentation skills. I like attending technical conferences to improve my development skills, but I&#8217;ve been developing an itch to start presenting. Having the technical knowledge and presenting it are two different skills, and both are required for great tech talks.</p></li>
</ol>


<p>So there are my 3 SMART goals to make me a more <em>proactive</em> person this year.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Be SMART]]></title>
    <link href="http://4arrowsmedia.com/blog/2012/01/03/be-smart/"/>
    <updated>2012-01-03T04:49:46-05:00</updated>
    <id>http://4arrowsmedia.com/blog/2012/01/03/be-smart</id>
    <content type="html"><![CDATA[<p>What is <strong>SMART</strong>? It is a method for managing goals.</p>

<ul>
<li><strong>Specific</strong> - Set specific goals, not vague ones. Answering one or more of the <strong>W&#8217;s</strong> can help.

<ul>
<li>Who is involved?</li>
<li>What do I want to accomplish?</li>
<li>Where will I do this?</li>
<li>When will I do it?</li>
<li>Why do I want to complete this goal?</li>
</ul>
</li>
</ul>


<p>Vague - &#8220;I want to lose weight.&#8221;
Specific - &#8220;I will go to the gym three times per week so that I will lose 10lbs in 6 months.&#8221;</p>

<ul>
<li><strong>Measureable</strong> - If you cannot measure it, how do you know when you are done? Ask these questions:

<ul>
<li>How much?</li>
<li>How many?</li>
<li>What does done look like?</li>
</ul>
</li>
</ul>


<!-- more -->


<p>&#8220;Begin with the end in mind,&#8221; is the 2nd Habit in Steven Covey&#8217;s <a href="http://www.amazon.com/gp/product/B000WJVK26/ref=as_li_tf_tl?ie=UTF8&amp;tag=my4ar-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000WJVK26">&#8220;The 7
Habits of Highly Effective People&#8221;</a></p>

<ul>
<li><p><strong>Attainable</strong> - Your goal should stretch you, but not break you. When the goal is important to you, you will figure out ways to make them come true. You will develop the attitudes, abilities, skills and capacity to reach them.</p>

<ul>
<li>How can I accomplish this?</li>
</ul>
</li>
<li><p><strong>Relevant</strong> - The goal-setter must be willing and able to work towards completion.</p>

<ul>
<li>Is it worthwhile?</li>
</ul>
</li>
<li><p><strong>Timely</strong> - Set a due date. Commit to complete the goal on or before the due date.</p>

<ul>
<li>When?</li>
<li>What can I do in 6 months? In 6 weeks? In 6 hours?</li>
</ul>
</li>
</ul>


<p>This should define a little better what a SMART goal is and how to set them.
Hopefully, by being SMART, or should I say, using SMART…resolutions will
become goals which become accomplishments.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[2012 Plan…(this is not a resolution list)]]></title>
    <link href="http://4arrowsmedia.com/blog/2012/01/02/2012-planthis-is-not-a-resolution-list/"/>
    <updated>2012-01-02T16:54:35-05:00</updated>
    <id>http://4arrowsmedia.com/blog/2012/01/02/2012-planthis-is-not-a-resolution-list</id>
    <content type="html"><![CDATA[<p>At the start of each new year, everyone makes resolutions and informs the
world of the changes they are going to make to improve their lives. I usually
do this, but without much success. So, we&#8217;re trying something different this
time. The reason for lack of past success is that the resolution(s) was just a
list…a wishlist so to speak. For a list of resolutions to succeed a plan is
needed. Let&#8217;s define these to show the differences:</p>

<ol>
<li><p>A <em>resolution</em> is a commitment that a person makes to one or more lasting personal goals, projects, or the reforming of a habit.</p></li>
<li><p>A <em>plan</em> is a list of steps with timing and resources, used to achieve an objective. A commitment to a goal is great, but without a plan to detail how the goal will be achieved, success is unlikely.</p></li>
</ol>


<!-- more -->


<p>So first, here is my list of goals for the year. Later posts will turn them into plans.</p>

<ul>
<li>Be More Proactive &amp; Less Reactive</li>
<li>Get in Shape</li>
<li>Increase Productivity</li>
<li>Fix my Finances</li>
</ul>


<p>Something I have learned is that to achieve a goal, it must be <a href="http://en.wikipedia.org/wiki/SMART_criteria">SMART</a>.</p>

<ul>
<li>Specific</li>
<li>Measurable</li>
<li>Attainable</li>
<li>Relevant</li>
<li>Time-bound</li>
</ul>


<p>My goals are not SMART, yet. I&#8217;ll expand and refine them this week.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Haiti: We Have Not Forgotten]]></title>
    <link href="http://4arrowsmedia.com/blog/2011/10/10/haiti-we-have-not-forgotten/"/>
    <updated>2011-10-10T17:52:21-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2011/10/10/haiti-we-have-not-forgotten</id>
    <content type="html"><![CDATA[<p>In previous post, <a href="http://4arrowsmedia.com/2011/09/haiti-missions-trip/">Haiti Missions Trip</a>, I gave details of my upcoming trip to Haiti. I leave in 3 weeks but still have to raise almost $1700 for the trip.</p>

<p>Please donate at PayPal by clicking <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=LK52NSS4GTG4C"><img src="https://www.paypal.com/en_US/i/btn/x-click-but11.gif" title="Donate at Paypal" ></a>
Or, you can send a check made out to:
Help End Local Poverty, PO Box 26716, Raleigh, NC 27611 - in the memo please
put “McAlister - Haiti November Trip”.</p>

<p>Please watch these videos from <a href="http://helpendlocalpoverty.com">Help End Local Poverty</a> to see why we are going and who we
are helping. <!-- more --></p>

<iframe src="http://player.vimeo.com/video/17658950?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>


<p><a href="http://vimeo.com/17658950">Help End Local Poverty Haiti Trips, 2010</a> from <a href="http://vimeo.com/helpendpoverty">Help End Local Poverty</a> on <a href="http://vimeo.com">Vimeo</a>.</p>




<iframe src="http://player.vimeo.com/video/27063254?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>


<p><a href="http://vimeo.com/27063254">Restore Haiti</a> from <a href="http://vimeo.com/helpendpoverty">Help End Local Poverty</a> on <a href="http://vimeo.com">Vimeo</a>.</p>




<iframe src="http://player.vimeo.com/video/28246289?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>


<p><a href="http://vimeo.com/28246289">Haiti: We Have Not Forgotten 2.0</a> from <a href="http://vimeo.com/helpendpoverty">Help End Local Poverty</a> on <a href="http://vimeo.com">Vimeo</a>.</p>



]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Haiti Missions Trip]]></title>
    <link href="http://4arrowsmedia.com/blog/2011/09/08/haiti-missions-trip/"/>
    <updated>2011-09-08T16:31:52-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2011/09/08/haiti-missions-trip</id>
    <content type="html"><![CDATA[<p>Hello Friends and Family,</p>

<p>This November, I will be on a team heading to Haiti. We’re partnering with <a href="http://www.helpendlocalpoverty.com">Help End Local Poverty</a> and local Haitian leaders to love and serve the people of Haiti.</p>

<p><span class='pullquote-right' data-pullquote='many people are suffering! However, there is hope and God is moving in Haiti through local Haitian churches and leaders. '>
As most of you know, Haiti suffered a severe earthquake in January of 2010. Haiti is considered a 4th world country, or what’s called a <em>least developed country.</em> Extreme poverty has created a massive orphan crisis. The sex-trafficking industry is exploding, hunger and disease runs rampant and many people are suffering! However, there is hope and God is moving in Haiti through local Haitian churches and leaders. We want to come along side of these brave men and women and help serve Haiti together. We want to co-partner in the work God is already doing!
</span></p>

<!-- more -->


<p>Part of Help End Local Poverty’s mission is to build 100 homes and drill 25 water wells. On this trip, we will actually help fulfill part of this vision. Every team member has to raise an additional $500 that goes towards a key project, which will help our Haitian friends long-term. It will also help create jobs for our Haitian friends. So by going to Haiti, we will help a family move into a new home or help a community receive clean water, and we will also create jobs in the process. Our ultimate goal is to help restore Haiti while Haitians lead the way!</p>

<p>On this trip, we will be provide health care to Haitians (by running medical clinics), lead a kids camp for 35 orphans and work in a tent city with vulnerable kids!</p>

<p>Here’s where we need your help:</p>

<ul>
<li> We need you to pray for us.</li>
<li> We need your help financially. The trip cost is $2100, which includes $500 for the project.</li>
</ul>


<p>Would you be willing to support me financially? If so, you can donate at PayPal by clicking <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=LK52NSS4GTG4C"><img src="https://www.paypal.com/en_US/i/btn/x-click-but11.gif" title="Donate at Paypal" ></a>. You will get an automatic receipt emailed to you as soon as you donate.</p>

<p>Or, you can send a check made out to: Or, you can send a check made out to: Help End Local Poverty, PO Box 26716, Raleigh, NC 27611 - in the memo please put “McAlister - Haiti November Trip”. Help End Local Poverty will send you a receipt for your end of the year taxes, via mail.</p>

<p>To learn more about H.E.L.P. please visit their site:
<a href="http://www.helpendlocalpoverty.com">www.helpendlocalpoverty.com</a></p>

<p>If you have any questions, please let me know.</p>

<p>Thank you,</p>

<p>Scott</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[I'm Back]]></title>
    <link href="http://4arrowsmedia.com/blog/2011/09/08/im-back/"/>
    <updated>2011-09-08T16:24:47-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2011/09/08/im-back</id>
    <content type="html"><![CDATA[<p>It might seem like I had fallen off the edge of the world. Not sure why I
stopped blogging (not that I was prolific before), maybe with my work
struggles I didn&#8217;t feel like I had anything worthwhile to post about. I may
still not have anything worthwhile, but I am going to start back up blogging.</p>

<p>Look for a website redesign in the future and more posts, both technical and
well, non-technical.</p>

<p><em>- nock an arrow</em></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[ScoutTrail v1.3 Released Yesterday]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/10/28/scouttrail-v1-3-released-yesterday/"/>
    <updated>2010-10-28T15:37:16-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/10/28/scouttrail-v1-3-released-yesterday</id>
    <content type="html"><![CDATA[<p>Version 1.3 was released yesterday on the App Store. It had 2 user visible
fixes and 1 not visible to the user. The 2 visible were:</p>

<ol>
<li><p>A check all requirements feature - a useful quick-entry for the scout that has already completed all the requirements.</p></li>
<li><p>New Geocaching patch design
The not visible feature was a minor change to the underlying database. The
problem with changing the data model of your database is that previous
versions are not compatible with the new version.</p></li>
</ol>


<p>However, the iOS SDK provides the tools to migrate previous data to the new
model. As long as the migration works, this change remains invisible (other
than a slightly longer startup delay while migration occurs). If it doesn&#8217;t
work, then the app crashes. That was the cause for the delay in being released
last week. Apple saw this happen in their testing. I was able to repeat it
with the build I uploaded to Apple for approval. So, I did a clean rebuild of
the app, and it worked fine. So, I concluded that my build was bad for some
reason, such as I got in a rush as a I got closer to release and missed a step
in my build process, etc.</p>

<!-- more -->


<p>Apple approved and released the app yesterday, so I assumed their testing
concluded the same. However, a user contacted me last night and described the
problem above. It felt like a gut punch. Here I am trying to develop a useful
app and my first &#8220;major&#8221; update has a bug in it that will cause the user to
lose their data. Because the quick solution for a user is to delete ScoutTrail
from their device and reinstall.</p>

<p>Here is what I will do for those of you affected by this, you will get a free
promo code for ScoutTrail Pro (when it is released) or CubPath when it is
released. All I need from you is that you email me your crash log. Email it to
<a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#52;&#x61;&#114;&#x72;&#111;&#x77;&#115;&#x6d;&#x65;&#x64;&#x69;&#x61;&#x2e;&#99;&#x6f;&#109;">&#115;&#x75;&#x70;&#x70;&#111;&#114;&#116;&#64;&#52;&#97;&#114;&#x72;&#x6f;&#119;&#115;&#x6d;&#101;&#100;&#x69;&#97;&#46;&#x63;&#111;&#x6d;</a>. To get your crash log, follow these steps:</p>

<ul>
<li>Synch your device, and depending on your desktop OS, the log will be located at location listed</li>
<li>Mac OS X

<ul>
<li>/Users/<your username>/Library/Logs/CrashReporter/MobileDevice/<your iPhone’s name>/ScoutTrail*</li>
</ul>
</li>
<li>Windows XP

<ul>
<li>C:\Documents and Settings\Application Data\Apple computer\Logs\CrashReporter&lt;your iPhone’s name>\ScoutTrail*</li>
</ul>
</li>
<li>Windows Vista

<ul>
<li>C:\Users\AppData\Roaming\Apple computer\Logs\CrashReporter\MobileDevice&lt;your iPhone’s name>\ScoutTrail*
Lastly, my apologies for the bug in ST and the inconvenience it will cause
you.</li>
</ul>
</li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Heading back to the "Real World"?]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/10/26/heading-back-to-the-real-world/"/>
    <updated>2010-10-26T16:37:58-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/10/26/heading-back-to-the-real-world</id>
    <content type="html"><![CDATA[<p>I&#8217;m heading back to the &#8220;real working world&#8221; next week. I&#8217;m not giving up on
the solo-venture. I&#8217;ve been enjoying it. It&#8217;s just that the startup funds,
i.e. savings account, has run dry and I need to keep paying my mortgage and
feeding my family. 4 Arrows Media will continue, but on a part-time effort
until app sales can support us or I develop enough iOS dev skills to do
contract work.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Milestone Day for ScoutTrail]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/10/07/milestone-day-for-scouttrail/"/>
    <updated>2010-10-07T18:03:18-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/10/07/milestone-day-for-scouttrail</id>
    <content type="html"><![CDATA[<p>What makes a milestone day for an iPhone App? Well, for
<a href="http://4arrowsmedia.com/ScoutTrail">ScoutTrail</a>, today marks the day of it&#8217;s 100th purchase. There
are also currently 268 followers on <a href="http://www.fa%0Acebook.com/home.php?ref=home#!/pages/ScoutTrail/159885744021494">ScoutTrail&#8217;s Facebook page</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[GHUnit Setup]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/09/28/ghunit-setup/"/>
    <updated>2010-09-28T06:15:51-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/09/28/ghunit-setup</id>
    <content type="html"><![CDATA[<p>The unit test framework that Saul M recommends is GHUnit. It is a unit-testing
framework developed by <a href="http://rel.me/">Gabriel Handford</a>. To use it, there is
a bit of a setup process to go through. Here are the steps that I took.</p>

<ol>
<li><p>Create New Project in Xcode. Mine is called CubPath.</p></li>
<li><p>Add a New Target&#8230; by Right-click or Control-click on the <img class="right" src="http://4arrowsmedia.com/images/TestTarget.png" width="300" height="113">Target item in the Groups &amp; Files pane in Xcode. Since we are creating are own test suite, select Application instead of Unit Test Bundle. Name it using convention &#8221;<Project Name>Tests&#8221;, <em><strong>CubPathTests</strong></em>.  <!-- more --></p></li>
<li><p>Download GHUnitIOS from <a href="https://github.com/downloads/gabriel/gh-unit/GHUnitIOS-0.4.27.zip">Github</a>.</p></li>
<li><p>Add GHUnitIOS.framework to your project by dragging <img class="right" src="http://4arrowsmedia.com/images/framework.png" width="300" height="132"> the folder from the Finder to the Frameworks item in the Groups &amp; Files pane in Xcode. Select &#8220;Copy items into destination group&#8217;s folder (if needed) and select your Tests target and deselect the Project target in &#8220;Add to Target&#8221;.</p></li>
<li><p>In Finder, go into your projects folder. Duplicate your project&#8217;s precompiled header, <code>&lt;Project Name&gt;_Prefix.pch</code> and rename it to <code>&lt;Project Name&gt;Tests_Prefix.pch</code>. For me, it is <code>CubPath_Prefix.pch</code>, which I renamed to <code>CubPathTests_Prefix.pch</code>.</p></li>
<li><p>Right-click or Control-click Other Sources in Groups &amp; Files pane, and Add Existing Files&#8230; <code>&lt;Project Name&gt;Tests_Prefix.pch.</code> Make sure it is only added to Tests target.</p></li>
<li><p>Edit <code>&lt;Project Name&gt;Tests_Prefix.pch.</code> and add <code>#import &lt;GHUnit/GHUnit.h&gt;</code> to the import statements. Doing this allows you to avoid including that import in every test file.</p></li>
<li><p>Now we need to configure the Tests Target. Right-click or Control-click in the Groups &amp; Files pane and select Get Info.</p>

<ol>
<li>On the General tab, add your Project Target (CubPath for me) to the Direct Dependencies section and add CoreGraphics.framework, Foundation.framework and UIKit.framework to the Linked Libraries section.</li>
<li>On the Build tab, add <code>-all_load</code> and <code>-ObjC</code> to <code>Other Linker Flags</code>. (Typing &#8221;<code>other linker</code>&#8221; in the Search bar can help find it.)</li>
<li>Also on the Build tab, search for <code>GCC_Prefix</code>. <code>GCC_PRECOMPILE_PREFIX_HEADER</code> should be set to <code>YES</code> and <code>GCC_PREFIX_HEADER</code> should be set to <code>&lt;Project Name&gt;Tests_Prefix.pch</code>. Correct them if they are not.</li>
</ol>
</li>
<li><p>Select <code>&lt;Project Name&gt;Tests-Info.plist</code> and clear the <code>Main nib file base name</code> field. Its default setting is <code>MainWindow</code>.</p></li>
<li><p>Download and add <a href="http://github.com/gabriel/gh-unit/blob/master/Project-IPhone/GHUnitIOSTestMain.m">GHUnitIOSTestMain.m</a> into your project in the Other Sources folder in the Groups &amp; Files pane.</p></li>
<li><p>I like to keep my unit-test source files separate from my project source files. To do this, in Finder I&#8217;ll create a Tests folder inside my project folder. Then, back in Xcode, I&#8217;ll Right-click/Control-click in the Groups &amp; Files pane, and Add Existing Files&#8230; I&#8217;ll select the recently created Tests folder and Add. Uncheck Copy items into destination group&#8217;s folder (if needed) and <code>&lt;Project Name&gt;</code> target, and check <code>&lt;Project Name&gt;Tests</code> target.</p></li>
<li><p>Now we can finally add a unit-test file. Right-click/Control-click the Tests folder in the Groups &amp; Files pane, and Add New File&#8230; Select Objective-C class with Subclass of NSObject and click Next. Give it an appropriate file name. Since we want to make sure our setup is good, I named it SetupTests.m. I unchecked Also create &#8220;SetupTests.h&#8221;, and selected <code>&lt;Project Name&gt;Tests</code> target. Notice how location is set to your project directory/Tests created in step 11 above.</p></li>
</ol>


<p>   a. Since I didn&#8217;t create SetupTests.h, I had to add the interface to SetupTests.m. And I added two unit-test methods: testFirstUT and testSecondUT.</p>

<figure class='code'> <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
</pre></td><td class='code'><pre><code class='objc'><span class='line'><span class="k">@interface</span> <span class="nc">SetupTests</span> : <span class="nc">GHTestCase</span> <span class="p">{}</span>
</span><span class='line'><span class="k">@end</span>
</span><span class='line'>
</span><span class='line'><span class="err">@</span><span class="n">implementation</span> <span class="n">SetupTests</span>
</span><span class='line'><span class="o">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="n">testFirstUT</span> <span class="p">{</span>
</span><span class='line'>       <span class="n">GHAssertEquals</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="s">@&quot;Should fail&quot;</span><span class="p">);</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'><span class="o">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="n">testSecondUT</span> <span class="p">{</span>
</span><span class='line'>       <span class="n">GHAssertEquals</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s">@&quot;Should pass&quot;</span><span class="p">);</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'><span class="k">@end</span>
</span></code></pre></td></tr></table></div></figure>


<p>   b. Click Build and Run. This screen should appear in the Simulator <img class="right" src="http://4arrowsmedia.com/images/SetupTestsScreenShot.png" width="208" height="300">unless if you are configured for Device.</p>

<p>   c. Tap Run and you should see <img class="right" src="http://4arrowsmedia.com/images/SetupTestsRunScreenShot.png" width="208" height="300"> testFirstUT fail and testSecondUT pass.</p>

<p>Seems like a lot of work for a little output. Hopefully, with time, you will see the benefit unit-testing will have not only with the quality of your code, but the the quality of your software skills. Unit-testing is a part of agile development which is the rage these days and having this in your set of tools will only benefit you as a developer in today&#8217;s market.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Unit Testing for iOS Development]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/09/27/unit-testing-for-ios-development/"/>
    <updated>2010-09-27T20:31:45-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/09/27/unit-testing-for-ios-development</id>
    <content type="html"><![CDATA[<p>Been doing a little website updating work lately and not much iOS development, but getting ready to start my next project. I wanted to setup and do test-driven development when I started on ScoutTrail, but I didn&#8217;t really understand Apple&#8217;s suggestions. Then I ran into <a href="http://www.magicalpanda.com/">Saul Mora&#8217;s</a> chapter in <a href="http://www.amazon.com/gp/product/1430229225?ie=UTF8&amp;tag=4arrowsmedia-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1430229225">More iPhone Cool Projects</a>, &#8220;Write Better Code and Save Time with Unit Testing&#8221;.</p>

<h3>Why Unit Test?</h3>

<p>The goal of unit testing is to prove that your smallest software components, or units, work correctly in isolation. Units are generally the individual functions or methods of a software class. There are several benefits: <!-- more --></p>

<ul>
<li><p><strong>Facilitates Change</strong> - The unit test establishes the expected behavior for the unit. If the developer has a future need to modify the unit, the change must still pass the test to prove that the expected result has not changed.</p></li>
<li><p><strong>Simplified Integration</strong> - Proving that the units work correctly first eases the integration effort of the units into the completed software app.</p></li>
<li><p><strong>Documentation</strong> - Unit testing provides a &#8220;living document&#8221; of the system. Most coders, especially this one, dislike coding then documenting the code, modifying the code then fixing the documentation to match the modifications, and so on. Unit testing establishes the API and shows the functionality of the unit.</p></li>
<li><p><strong>Design</strong> - The unit tests are like a design document in that they specify the classes, methods and behavior. One advantage that test-driven development as design has over diagram-based design, such as UML, is in verifying adherence to design. The unit-tests themselves verify implementation adheres to design.</p></li>
</ul>


<p>Since a class may use or reference other classes, testing a single unit can end up testing other units because of this coupling. To reduce or prevent close-coupling during unit-testing, items such as mock objects or method stubs are used. By design, a unit-test should not leave its own class boundary. When it does, determining cause of failure becomes more difficult.</p>

<p>I&#8217;ll be starting out CubPath with Saul&#8217;s techniques and suggestions, and I&#8217;ll
keep you posted along the way.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Logo Selection]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/09/17/logo-selection/"/>
    <updated>2010-09-17T11:22:47-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/09/17/logo-selection</id>
    <content type="html"><![CDATA[<p>4AM needs a brand, a logo. Some simple, elegant design that can become the ID for our new company. I had some ideas of what I wanted but not the graphic expertise to create it. I don&#8217;t personally know any graphic designers, and I am on a limited budget right now as a startup.</p>

<h2>What to do?</h2>

<p>I remembered an article in the <a href="http://www.inc.com/magazine/20100401/company-logos-for-less.html">April 2010 Inc magazine</a> about online services that run contests to assist small-business owners like myself. I went with the recommended service, <a href="http://www.hatchwise.com">Hatchwise.com</a>. <!-- more --></p>

<p>After only 7 days of the contest, I narrowed down 185 entries down to 4 and with Susan&#8217;s input, we chose one. Here are my top 4 choices with the winner:</p>

<p><img src="http://4arrowsmedia.com/images/logo2.png"></p>

<p><img src="http://4arrowsmedia.com/images/logo3.png"></p>

<p><img src="http://4arrowsmedia.com/images/logo5.png"></p>

<h2>The Winner</h2>

<p><img src="http://4arrowsmedia.com/images/logo4.png"></p>

<h2>What I liked about the winner?</h2>

<p>The simple and elegant integration of the number 4 with an arrow. Plus the designer posted a second version that looks great on a dark background, and made a color change at my request.</p>

<h2>What I liked about Hatchwise?</h2>

<ul>
<li>Their easy to use interface.</li>
<li>That I could view the designers&#8217; previous work before I had to commit any money.</li>
<li>That I could rate the entries as I viewed them.</li>
<li>That I could communicate with the designers, providing them feedback and making special requests during the contest.</li>
<li>The high quality of the designers&#8217; work.</li>
</ul>


<h2>What&#8217;s next?</h2>

<p>I have been working on a website redesign in preparation for the new logo as well as the upcoming App Store approval of ScoutTrail.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Disable Tooltips in Safari and Firefox]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/09/17/disable-tooltips-in-safari-and-firefox/"/>
    <updated>2010-09-17T07:54:15-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/09/17/disable-tooltips-in-safari-and-firefox</id>
    <content type="html"><![CDATA[<p><img class="left" src="http://4arrowsmedia.com/images/tooltip.png">A browser tooltip: one of those annoyingly, informative little yellow boxes that magically appears when your mouse hovers over certain interface items. Some people like them, but I am one of those that doesn&#8217;t like them in the browser. But how do you get rid of them in Safari or Firefox? There is no simple preferences selection to disable them. But it can be done.</p>

<p>First, to disable in Safari, open up the Terminal application (in Applications/Utilities folder) and paste the following:<!-- more --></p>

<p><code>defaults write com.apple.Safari WebKitShowsURLsInToolTips 0</code></p>

<p>Press enter, quit and restart Safari. To re-enable tooltips, same command
except change the 0 to 1.</p>

<p>Now for Firefox. In the address bar, type <code>about:config</code>. Click the &#8220;I&#8217;ll be careful&#8221; button if it appears. <img src="http://4arrowsmedia.com/images/ff_tooltip.png" width="1024" height="270"> In the filter box, type <code>browser.chrome</code> to find <code>browser.chrome.toolbar_tips</code> which should have a value of <code>true</code>. Just double-click to change to <code>false</code> and close that tab or window so that you don&#8217;t accidentally do something &#8220;not careful.&#8221;</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[ScoutTrail has been submitted!!]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/09/04/scouttrail-has-been-submitted/"/>
    <updated>2010-09-04T06:03:43-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/09/04/scouttrail-has-been-submitted</id>
    <content type="html"><![CDATA[<p><img src="http://4arrowsmedia.com/images/Screen-shot-2010-09-04-at-1.43.48-AM.png"></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Adding a PreLoaded SQLite db to ScoutTrail app]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/08/19/adding-a-preloaded-sqlite-db-to-scouttrail-app/"/>
    <updated>2010-08-19T17:35:36-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/08/19/adding-a-preloaded-sqlite-db-to-scouttrail-app</id>
    <content type="html"><![CDATA[<p>Been some time since my last post, but it doesn&#8217;t mean I haven&#8217;t been working on my app. Progress on
ScoutTrail has been slow, but steady. The latest? While teaching myself about Core Data, I decided it
would be better if my input data (rank and merit badge requirements, etc) was Core Data based rather
than xml.  Justification is that I want to track completion of each requirement and coming up with a
data model that would stay coordinated with the XML input data would prove more difficult <em>IMHO</em> than
creating a data model to handle both. <!-- more --></p>

<p>To start with, I had 2 choices (based on what I found on <a href="http://www.raywenderlich.com/980/core-data-tutorial-how-to-%20preloadimport-existing-data">Ray Wenderlich&#8217;s site</a>):</p>

<ol>
<li><p>Fill in Core Data on startup from external source. For this the app can start up, notice that the
database hasn’t been imported yet, and start reading in data from an external source (such as an SQLite
database or XML file) and then start inserting the data into Core Data.</p></li>
<li><p>Provide pre-filled in SQLite database. For this we’ll let Core Data create the database structure for
us based on the model, and then we populate the database with a utility app. The utility app could be a
Mac or iPhone app that uses Core Data to populate the database via Core Data APIs, or some kind of program
that fills in the SQLite database directly. Once the database is populated, just include it with the app
and make the app use it as the default database if no database already exists.</p></li>
</ol>


<p>I chose the latter. Ray&#8217;s example uses a Python script to preload a SQLite db and he admits that using
the Core Data API interface to do this would be safer in case something in the Core Data to SQLite API
changes in the future. But as he says</p>

<p>Note that by using a Python script to import the data rather than working with a utility app that uses
Core Data APIs, it’s more likely to break in the future because we’re kind of going under the hood here…
but for this tutorial I thought a) it’s a better learning experience since we just covered SQLite and it
shows how things are working more clearly, and b) it is simpler!</p>

<p>My solution was to duplicate my current ScoutTrail project and rename it to ScoutTrailData.</p>

<ul>
<li><p>I removed the UI code from ScoutTrailData (since I am only interested in parsing the XML and loading
 it into the db),</p></li>
<li><p>Create the data model,</p>

<ol>
<li>Add a New Group, Model, to the project</li>
<li>Right click Model and Add New File. Select iPhone OS->Resource->Data Model (see <a href="http://developer.apple.com/iphone/library/documentation/DataManagement/Conceptual/iPhoneCoreData01/Articles/03_ManagedObject.html#//apple_ref/doc/uid/TP40008305-CH102-SW1">Core Data Tutorial for iOS</a> for more info on data model creation specifics),</li>
</ol>
</li>
<li><p>Add the Core Data calls to load the parsed XML data into SQLite.</p></li>
</ul>


<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
</pre></td><td class='code'><pre><code class='objc'><span class='line'><span class="c1">// To save the data, the basics are to create a NSEntityDescription for your model data:</span>
</span><span class='line'><span class="n">self</span><span class="p">.</span><span class="n">award</span> <span class="o">=</span> <span class="p">(</span><span class="n">Award</span><span class="o">*</span><span class="p">)[</span><span class="n">NSEntityDescription</span>
</span><span class='line'>          <span class="nl">insertNewObjectForEntityForName:</span><span class="s">@&quot;Award&quot;</span> <span class="nl">inManagedObjectContext:</span><span class="n">self</span><span class="p">.</span><span class="n">moc</span><span class="p">];</span>
</span><span class='line'>
</span><span class='line'><span class="c1">// Set the values:</span>
</span><span class='line'><span class="p">[</span><span class="n">self</span><span class="p">.</span><span class="n">award</span> <span class="nl">setName:</span><span class="p">[</span><span class="n">attributeDict</span> <span class="nl">objectForKey:</span><span class="s">@&quot;name&quot;</span><span class="p">]];</span>
</span><span class='line'><span class="p">[</span><span class="n">self</span><span class="p">.</span><span class="n">award</span> <span class="nl">setImageFileName:</span><span class="p">[</span><span class="n">attributeDict</span> <span class="nl">objectForKey:</span><span class="s">@&quot;img&quot;</span><span class="p">]];</span>
</span><span class='line'>      <span class="p">[</span><span class="n">self</span><span class="p">.</span><span class="n">award</span> <span class="nl">setEagleRequiredMB:</span><span class="p">[[</span><span class="n">NSNumber</span> <span class="n">alloc</span><span class="p">]</span>
</span><span class='line'>  <span class="nl">initWithBool:</span><span class="p">[[</span><span class="n">attributeDict</span> <span class="nl">objectForKey:</span><span class="s">@&quot;eagleRequiredMB&quot;</span><span class="p">]</span> <span class="n">boolValue</span><span class="p">]]];</span>
</span><span class='line'>
</span><span class='line'><span class="c1">// And save it:</span>
</span><span class='line'><span class="n">NSError</span> <span class="o">*</span><span class="n">error</span><span class="p">;</span>
</span><span class='line'><span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="p">[</span><span class="n">self</span><span class="p">.</span><span class="n">moc</span> <span class="nl">save:</span><span class="o">&amp;</span><span class="n">error</span><span class="p">;])</span> <span class="n">NSLOG</span><span class="p">(</span><span class="s">@&quot;Error: %@, %@&quot;</span><span class="p">,</span> <span class="n">error</span><span class="p">,</span> <span class="p">[</span><span class="n">error</span> <span class="n">userInfo</span><span class="p">]);</span>
</span></code></pre></td></tr></table></div></figure>


<ul>
<li>Copy the created db into my ScoutTrail Resources group and added code to ScoutTrailAppDelegate
 to load that db.

<ul>
<li>iPhone Simulator creates the SQLite db in the user&#8217;s Library folder. Find it and copy to your
 project&#8217;s Resource directory (usually the project&#8217;s root level dir).</li>
</ul>
</li>
</ul>


<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>cp <span class="s2">&quot;/Users/scott/Library/Application Support/iPhone Simulator/4.0.2/Applications/5E9724E0-37ED-44CF-8954-FBAFD68FE662/Documents/ScoutTrailData.sqlite&quot;</span> /Users/scott/Apps/ScoutTrail
</span></code></pre></td></tr></table></div></figure>


<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='objc'><span class='line'><span class="c1">// To load the db into ScoutTrail, change the storeURL code in persistentStoreCoordinator from: </span>
</span><span class='line'><span class="n">NSURL</span> <span class="o">*</span><span class="n">storeURL</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSURL</span> <span class="nl">fileURLWithPath:</span> <span class="p">[[</span><span class="n">self</span> <span class="n">applicationDocumentsDirectory</span><span class="p">]</span>
</span><span class='line'>  <span class="nl">stringByAppendingPathComponent:</span> <span class="s">@&quot;ScoutTrailData.sqlite&quot;</span><span class="p">]];</span>
</span></code></pre></td></tr></table></div></figure>


<p>to:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
</pre></td><td class='code'><pre><code class='objc'><span class='line'><span class="n">NSString</span> <span class="o">*</span><span class="n">storePath</span> <span class="o">=</span> <span class="p">[[</span><span class="n">self</span> <span class="n">applicationDocumentsDirectory</span><span class="p">]</span>
</span><span class='line'>  <span class="nl">stringByAppendingPathComponent:</span> <span class="s">@&quot;ScoutTrailData.sqlite&quot;</span><span class="p">];</span>
</span><span class='line'><span class="n">NSURL</span> <span class="o">*</span><span class="n">storeURL</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSURL</span> <span class="nl">fileURLWithPath:</span><span class="n">storePath</span><span class="p">];</span>
</span><span class='line'><span class="n">NSFileManager</span> <span class="o">*</span><span class="n">fileManager</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSFileManager</span> <span class="n">defaultManager</span><span class="p">];</span>
</span><span class='line'><span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="p">[</span><span class="n">fileManager</span> <span class="nl">fileExistsAtPath:</span><span class="n">storePath</span><span class="p">])</span> <span class="p">{</span>
</span><span class='line'>  <span class="n">NSString</span> <span class="o">*</span><span class="n">defaultStorePath</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSBundle</span> <span class="n">mainBundle</span><span class="p">]</span> <span class="nl">pathForResource:</span><span class="s">@&quot;ScoutTrailData&quot;</span> <span class="nl">ofType:</span><span class="s">@&quot;sqlite&quot;</span><span class="p">];</span>
</span><span class='line'>  <span class="k">if</span> <span class="p">(</span><span class="n">defaultStorePath</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>      <span class="n">fileManager</span> <span class="nl">copyItemAtPath:</span><span class="n">defaultStorePath</span> <span class="nl">toPath:</span><span class="n">storePath</span> <span class="nl">error:</span><span class="nb">NULL</span><span class="p">];</span>
</span><span class='line'>  <span class="p">}</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>


<ul>
<li>and fetch the data with Core Data calls.</li>
</ul>


<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
</pre></td><td class='code'><pre><code class='objc'><span class='line'><span class="n">NSEntityDescription</span> <span class="o">*</span><span class="n">entity</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSEntityDescription</span>
</span><span class='line'>  <span class="nl">entityForName:</span><span class="s">@&quot;Award&quot;</span> <span class="nl">inManagedObjectContext:</span><span class="n">moc</span><span class="p">];</span>
</span><span class='line'><span class="n">NSFetchRequest</span> <span class="o">*</span><span class="n">request</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSFetchRequest</span> <span class="n">alloc</span><span class="p">]</span> <span class="n">init</span><span class="p">];</span>
</span><span class='line'><span class="p">[</span><span class="n">request</span> <span class="nl">setEntity:</span><span class="n">entity</span><span class="p">];</span>
</span><span class='line'>  
</span><span class='line'><span class="n">NSPredicate</span> <span class="o">*</span><span class="n">pred</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSPredicate</span> <span class="nl">predicateWithFormat:</span><span class="s">@&quot;type == &#39;rank&#39;&quot;</span><span class="p">];</span>
</span><span class='line'><span class="p">[</span><span class="n">request</span> <span class="nl">setPredicate:</span><span class="n">pred</span><span class="p">];</span>
</span><span class='line'>  
</span><span class='line'><span class="n">NSSortDescriptor</span> <span class="o">*</span><span class="n">sort</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSSortDescriptor</span> <span class="n">alloc</span><span class="p">]</span>
</span><span class='line'>      <span class="nl">initWithKey:</span><span class="s">@&quot;displayOrder&quot;</span> <span class="nl">ascending:</span><span class="n">YES</span><span class="p">];</span>
</span><span class='line'><span class="p">[</span><span class="n">request</span> <span class="nl">setSortDescriptors:</span><span class="p">[</span><span class="n">NSArray</span> <span class="nl">arrayWithObject:</span><span class="n">sort</span><span class="p">]];</span>
</span><span class='line'>  
</span><span class='line'><span class="n">NSError</span> <span class="o">*</span><span class="n">error</span><span class="p">;</span>
</span><span class='line'><span class="n">self</span><span class="p">.</span><span class="n">data</span> <span class="o">=</span> <span class="p">[</span><span class="n">moc</span> <span class="nl">executeFetchRequest:</span><span class="n">request</span> <span class="nl">error:</span><span class="o">&amp;</span><span class="n">error</span><span class="p">;];</span>
</span><span class='line'><span class="k">if</span> <span class="p">(</span><span class="n">self</span><span class="p">.</span><span class="n">data</span> <span class="o">!=</span> <span class="nb">nil</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>  <span class="kt">int</span> <span class="n">count</span> <span class="o">=</span> <span class="p">[</span><span class="n">self</span><span class="p">.</span><span class="n">data</span> <span class="n">count</span><span class="p">];</span>
</span><span class='line'>  <span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="n">i</span><span class="o">&lt;</span><span class="n">count</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>      <span class="n">NSLOG</span><span class="p">(</span><span class="s">@&quot;rank[%d]: %@&quot;</span><span class="p">,</span> <span class="n">i</span><span class="p">,</span> <span class="p">[[</span><span class="n">self</span><span class="p">.</span><span class="n">data</span> <span class="nl">objectAtIndex:</span><span class="n">i</span><span class="p">]</span> <span class="n">name</span><span class="p">]);</span>
</span><span class='line'>  <span class="p">}</span>
</span><span class='line'><span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
</span><span class='line'>  <span class="n">NSLOG</span><span class="p">(</span><span class="s">@&quot;Error with fetch&quot;</span><span class="p">);</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'><span class="p">[</span><span class="n">request</span> <span class="n">release</span><span class="p">];</span>
</span><span class='line'><span class="p">[</span><span class="n">sort</span> <span class="n">release</span><span class="p">];</span>
</span></code></pre></td></tr></table></div></figure>


<p>Not all the aspects of adding Core Data has been covered in this post, such as adding the
CoreData framework, the required Core Data methods in your AppDelegate, etc., but hopefully
enough has been covered to help you along with using a preloaded db in your app.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[A design should not dominate people]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/07/20/a-design-should-not-dominate-people/"/>
    <updated>2010-07-20T07:45:55-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/07/20/a-design-should-not-dominate-people</id>
    <content type="html"><![CDATA[<p>Seeing, hearing and reading about good design are how I learn to design
better. Here is an interview with Dieter Rams, Braun&#8217;s chief of design from
1961-1995, on his design philosophy.</p>

<iframe width="560" height="315" src="http://www.youtube.com/embed/A6-wA-7QIeE" frameborder="0" allowfullscreen></iframe>


<p>Ram&#8217;s 10 principles to <strong><em>good design</em></strong> <!-- more --></p>

<ol>
<li>Good design is innovative</li>
<li>Good design makes a product useful</li>
<li>Good design is aesthetic</li>
<li>Good design makes a product understandable</li>
<li>Good design is unobtrusive</li>
<li>Good design is honest</li>
<li>Good design is long-lasting</li>
<li>Good design is thorough down to the last detail</li>
<li>Good design is environmentally friendly</li>
<li>Good design is as little design as possible</li>
</ol>


<hr />

<p>Looking for a good book on iPhone app design? Check out <a href="http://www.amazon.com/gp/product/1449381650?ie=UTF8&amp;tag=4arrowsmedia-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1449381650">Tapworthy: Designing Great iPhone Apps</a> by <a href="http://globalmoxie.com">Josh Clark</a>. It
is my current read. In addition to the above items:</p>

<ul>
<li>Develop your ideas from initial concept to finished design</li>
<li>Build an effortless user experience that rewards every tap</li>
<li>Explore the secrets of designing for touch</li>
<li>Discover how and why people really use iPhone apps</li>
<li>Learn to use iPhone controls the Apple way</li>
<li>Create your own personality-packed visuals</li>
</ul>


<p>The real highlight of the book are the interviews with app designers like Josh Williams (Gowalla), Joe Hewitt (Facebook), and others.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[At Scout Camp Last Week]]></title>
    <link href="http://4arrowsmedia.com/blog/2010/07/05/at-scout-camp-last-week/"/>
    <updated>2010-07-05T11:16:23-04:00</updated>
    <id>http://4arrowsmedia.com/blog/2010/07/05/at-scout-camp-last-week</id>
    <content type="html"><![CDATA[<p><img class="right" src="http://4arrowsmedia.com/images/swimmer.jpg"> Last week was spent at Bayport Scout Reservation with Boy Scout
Troop 317, of which I am the scoutmaster. It was a busy week for the scouts and myself. We had two
11 year old scouts wake up early each morning to train for the mile swim, and they both successfully
completed the mile swim on Thursday morning after swimming 32 laps in the 50m pool. I originally
thought about trying for the mile swim, but never having swam more than 1 lap in a pool and not knowing
how to pace myself in swimming, I decided not to try&#8230;maybe I should have at least tried to see what I
could do. <!-- more --></p>

<p>Instead, I spent most of my time in the &#8220;Scoutmaster&#8217;s Lounge&#8221; with my laptop working on the ScoutTrail
app. This turned out to be a good thing. I completed the XML parsing code. This led me to the next
problem: displaying all of the rank and merit badge requirements in UITableView. The issue with this is that
the requirements are variable length from 10 - 100 words. This will not fit in one of the default
UITableViewCells. I would need to customize.</p>

<p>With the help of Google search, I found some help over at <a href="http://www.cimgf.com">Cocoa is My Girlfriend</a>.
Matt Long wrote up a post on how to create <a href="http://www.cimgf.com/2009/09/23/uitableviewcell-dynamic-height/">UITableViewCell&#8217;s with Dynamic Height</a>.
I still need to customize for my specific needs, but it was a great help for getting me past this latest roadblock.</p>

<p><img src="http://4arrowsmedia.com/images/ScoutTrail-screenshot-before.png">  <img src="http://4arrowsmedia.com/images/ScoutTrail-screenshot-after.png"></p>
]]></content>
  </entry>
  
</feed>

