<?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>High Order Blog &#187; Programming</title>
	<atom:link href="http://blog.highorderbit.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.highorderbit.com</link>
	<description>Building a company from the bottom up.</description>
	<lastBuildDate>Tue, 27 Jul 2010 20:20:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>The Case for Immutability as a Language Feature</title>
		<link>http://blog.highorderbit.com/2010/05/09/the-case-for-immutability-as-a-language-feature/</link>
		<comments>http://blog.highorderbit.com/2010/05/09/the-case-for-immutability-as-a-language-feature/#comments</comments>
		<pubDate>Sun, 09 May 2010 20:43:08 +0000</pubDate>
		<dc:creator>kurthd</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://blog.highorderbit.com/?p=736</guid>
		<description><![CDATA[It&#8217;s all about the programming language. I believe that&#8217;s a pretty unpopular opinion these days. Everyone seems to brag about the power of their framework, development process, tools and development environment. If I had to rank the importance of those items, &#8216;language&#8217; would top the list. You might imagine, then, that I&#8217;m very particular when [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s all about the programming language. I believe that&#8217;s a pretty unpopular opinion these days. Everyone seems to brag about the power of their framework, development process, tools and development environment. If I had to rank the importance of those items, &#8216;language&#8217; would top the list. You might imagine, then, that I&#8217;m very particular when it comes to programming languages. I prefer statically typed, pure, mixed OO/functional languages. I appreciate the value of inheritance (including multiple), despite the fact that I think most uses are inappropriate substitutions for composition. Generics are a must. I also value uniform access.</p>

<p>There&#8217;s one language feature I crave, however, that seems to be entirely dismissed by modern programming languages: immutability. Immutable types are simply types whose instances are unmodifiable. Of course you can create immutable types in many languages, but I&#8217;m not familiar with one where you can enforce it and declare a type as such in a public interface.</p>

<p>Immutable types matter because they&#8217;re simple, less error-prone, and encourage better designs.</p>

<p>Where&#8217;s the appeal in knowing a type&#8217;s mutability value? Inheritance. Your class can&#8217;t be immutable unless it&#8217;s superclass is immutable. And how do you know that if you aren&#8217;t granted access to the implementation? You don&#8217;t. You guess. Your class&#8217;s immutability is conditional on it&#8217;s superclass&#8217;s immutability. What&#8217;s worse, is that your superclass&#8217;s immutability might be variable. Because it&#8217;s interface doesn&#8217;t change, you might incorrectly assume it is backwards compatible with your code.</p>

<p>The problem that comes to mind when I consider treating every class as though it only <em>might</em> be immutable is efficient object creation. If a class is immutable there&#8217;s no need to ever create a copy of it. Only one instance is ever needed for a given value. If you know your type is immutable, your copy method is simply a &#8216;return self&#8217;. Or better yet, you don&#8217;t implement a copy method.</p>

<p>Admittedly there are some reasons this isn&#8217;t <em>so</em> critical. One, memory is cheap these days. Perhaps making unnecessary copies of data is simply something you can usually afford to do. Two, you might assume any overhead in allocating and garbage collecting the redundant data is negligible &#8212; probably a safe assumption. Then again, why do what isn&#8217;t necessary? And why implement a verbose copy method when it isn&#8217;t necessary?</p>

<p>Maybe the feature would add too much complexity to justify it&#8217;s value, but it seems like it could fit in pretty elegantly. Add an &#8216;immutable&#8217; class keyword, which can only be declared on classes whose parents are also immutable. Such a declaration would also limit member variable assignments to the constructor. Child classes can be mutable despite their immutable parents. (This might seem to violate the Liskov Substitution Principle on the surface, but I don&#8217;t believe it does.)</p>

<p>What do people think? Is there a flaw in my argument? Is it just not that important? Of course you might prefer a language where this is moot.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.highorderbit.com/2010/05/09/the-case-for-immutability-as-a-language-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>High Order Code</title>
		<link>http://blog.highorderbit.com/2010/02/24/high-order-code/</link>
		<comments>http://blog.highorderbit.com/2010/02/24/high-order-code/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 20:14:36 +0000</pubDate>
		<dc:creator>kurthd</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[bug watch]]></category>
		<category><![CDATA[build watch]]></category>
		<category><![CDATA[code watch]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[lighthouse]]></category>

		<guid isPermaLink="false">http://blog.highorderbit.com/?p=555</guid>
		<description><![CDATA[All our code is belong to you. That&#8217;s right, starting today we&#8217;re making the source code for three of our four projects publicly available. Those projects are Build Watch, Code Watch and Bug Watch (never released) and are meant to comprise a nice little suite of development utilities for the iPhone. You can find the [...]]]></description>
			<content:encoded><![CDATA[<p>All our code is belong to you. That&#8217;s right, starting today we&#8217;re making the source code for three of our four projects publicly available. Those projects are Build Watch, Code Watch and Bug Watch (never released) and are meant to comprise a nice little suite of development utilities for the iPhone. You can find the code for those projects and others on our <a href="http://github.com/highorderbit">GitHub page</a>.  In case you&#8217;re unfamiliar with these projects, here&#8217;s a little information on each:</p>

<p><strong><a href="http://highorderbit.com/bugwatch/">Bug Watch</a></strong> is a <a href="http://lighthouseapp.com/">Lighthouse</a> client for the iPhone and iPod touch. (<a href="http://blog.highorderbit.com/2009/04/07/issue-tracking-with-lighthouse/">Lighthouse is our preferred issue tracking system</a>.) We were close to releasing this app some time ago when we got distracted by writing a Twitter push notification server. We planned to come back and finish it when we found some time. Still waiting for that to happen. Here&#8217;s a screenshot:</p>

<p><img class="aligncenter size-full wp-image-623" title="img_0001" src="http://blog.highorderbit.com/wp-content/uploads/2009/12/img_0001.png" alt="img_0001" width="320" height="480" /></p>

<p><strong><a href="http://highorderbit.com/codewatch/">Code </a></strong><strong><a href="http://highorderbit.com/codewatch/">Watch</a></strong> is a GitHub iPhone app. This app was available on the iPhone App Store as a free download called &#8216;Code Watch Open Source&#8217; and as a paid version that provided access to private repos, just called &#8216;Code Watch&#8217;. For now, we&#8217;ve dropped the lite version and made the &#8216;pro&#8217; version a <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=313796078&amp;mt=8">free download</a>.</p>

<p><strong><a href="http://highorderbit.com/buildwatch/">Build Watch</a></strong>, High Order Bit&#8217;s first project, is a simple client for various continuous integration servers (CruiseControl and Hudson). There are many types of continuous integration servers and even more customized configurations. We hope opening up the source code will allow people to implement support for their setup with minimal effort while being able to leverage the full range of Build Watch features.</p>

<p>All of these projects are licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>, which basically means you can do whatever you want with the code. Unfortunately, we don&#8217;t anticipate having a ton of time to further contribute to these projects, so we&#8217;re hoping they&#8217;ll attract some new developers. If that&#8217;s you, <a href="http://highorderbit.com/contact.php">we&#8217;d love to hear from you</a> and answer any questions you might have.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.highorderbit.com/2010/02/24/high-order-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Features vs. Usability: A False Dichotomy</title>
		<link>http://blog.highorderbit.com/2009/10/08/features-vs-usability-a-false-dichotomy/</link>
		<comments>http://blog.highorderbit.com/2009/10/08/features-vs-usability-a-false-dichotomy/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 23:43:54 +0000</pubDate>
		<dc:creator>kurthd</dc:creator>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[twitbit]]></category>

		<guid isPermaLink="false">http://blog.highorderbit.com/?p=405</guid>
		<description><![CDATA[When we released Twitbit 1.1 we felt like the majority of work was behind us. Sure, we still had some sizable features to implement, but the framework was done.  The major pieces were in place. The style was solidified. We spent a couple days away from the code base after the release and returned to [...]]]></description>
			<content:encoded><![CDATA[<p>When we released Twitbit 1.1 we felt like the majority of work was behind us. Sure, we still had some sizable features to implement, but the <em>framework</em> was done.  The major pieces were in place. The style was solidified. We spent a couple days away from the code base after the release and returned to discover our sentimental attachment to it faded. We sat down to code with fresh perspectives and what started as a 1.2 became a 2.0.</p>

<p>We fall into a useful state of denial during a release phase. We rationalize away problems with our design and conclude the code couldn&#8217;t possibly be any better. That&#8217;s useful for the purpose of getting something out the door. But once it&#8217;s out, and once we&#8217;ve had some time to recover from a frantic development cycle, our self-evaluation becomes a little more sober.</p>

<p>In the case of Twitbit 1.1, we really had a problem with the &#8216;More&#8217; tab. That is, we had 7 functional tabs, but the last three were tucked under an organizational tab called &#8216;More&#8217;.  It just didn&#8217;t feel right. We deliberated long and hard about whether to even use tabs &#8212; and we&#8217;re comfortable with that decision &#8212; but are the functions of Twitter so diverse as to justify more than 5 tabs? After all, much of the appeal of Twitter is its simplicity. It wasn&#8217;t so much a matter of concrete problems with 5+ tabs, but that it indicated a degree of laziness on our part. It felt bloated; like the UI was too big for the feature set. There was a mentality of &#8220;new function, new tab&#8221;. Simple solutions are usually best, and our solutions were definitely that. But in this case that reasoning felt like an excuse.</p>

<p>We swallowed our pride and set out to get our app back to 5 tabs. We were open to every possibility, no matter how much work it entailed. You&#8217;ll have to wait for Twitbit 2.0 to see exactly how we did it, but we did do it.  5 tabs. I&#8217;ll give you a hint: some of the common tricks in our toolbox were persistence, shortcuts and generally considering how other apps solved similar problems elegantly.</p>

<p>The interesting part has nothing to do with 5 being a magic number, but what we observed during this exercise of reduction. The natural assumption is that you&#8217;d have to make sacrifices in the UI to support more functionality. Turns out, the opposite can also happen. We learned that there&#8217;s an optimal UI density &#8212; and it&#8217;s possible to be both too dense, but also too sparse. I&#8217;m reminded of that saying, &#8220;Sorry this letter is so long. I didn&#8217;t have time to make it shorter.&#8221;.</p>

<p>The result is a UI that feels a lot more powerful and intuitive. Patterns emerge and the app feels more familiar. Where we expected the user to choose tabs before based on arbitrary distinctions, there are now fewer choices. The UI feels more like a helpful guide than it had previously. The tradeoff, in some cases, is the number of taps to get you to your destination. In such cases, elegant shortcuts can help and even make the app feel more familiar and reduce taps.</p>

<p>I&#8217;m really pleased we overcame our state of denial. And I think Twitbit users will be, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.highorderbit.com/2009/10/08/features-vs-usability-a-false-dichotomy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Just Put Your Modal View in a UINavigationController</title>
		<link>http://blog.highorderbit.com/2009/09/16/just-put-your-modal-view-in-a-uinavigationcontroller/</link>
		<comments>http://blog.highorderbit.com/2009/09/16/just-put-your-modal-view-in-a-uinavigationcontroller/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 20:53:48 +0000</pubDate>
		<dc:creator>kurthd</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.highorderbit.com/?p=349</guid>
		<description><![CDATA[You&#8217;ll end up doing it eventually, anyway. Here&#8217;s the situation: you need a modal view with a standard navigation bar, much like the &#8220;Log In&#8221; view in Twitbit: It&#8217;s really easy to convince yourself that you just need this view to collect some basic info and be done with it. It won&#8217;t need to push [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ll end up doing it eventually, anyway. Here&#8217;s the situation: you need a modal view with a standard navigation bar, much like the &#8220;Log In&#8221; view in Twitbit:</p>

<div><img class="aligncenter size-full wp-image-350" style="margin-top: 25px; margin-bottom: 25px;" title="Twitbit Log In View" src="http://blog.highorderbit.com/wp-content/uploads/2009/08/IMG_0094.PNG" alt="Twitbit Log In View" width="320" height="480" /></div>

<p>It&#8217;s really easy to convince yourself that you just need this view to collect some basic info and be done with it. It won&#8217;t need to push other views onto a stack; it will always be the root of the modal view controller. So what do you do? You manually throw a navigation bar in your nib file, slap some buttons and a title on there and you&#8217;re done right?</p>

<p>No, you&#8217;re not done. You were wrong &#8212; you&#8217;ll need this view to appear in a stack of views, and sometimes it won&#8217;t be at the root of the modal view controller. In this case, I needed to add a help view. Save yourself the trouble and just wrap your view in a navigation controller from the get-go. Set its navigation item (why can&#8217;t you do this in Interface Builder, by the way?) and always put your view in a UINavigationController and you&#8217;ll have a more portable view. You win.</p>

<p>While I&#8217;m on the topic, does anybody else build just about every interface in IB only to redo it in code? Don&#8217;t get me wrong, I like the idea of IB, but it seems like there&#8217;s always something, whether that&#8217;s optimizing drawing, controlling initialization, or realizing everything is a table view cell, anyway, and you don&#8217;t need to lay anything out.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.highorderbit.com/2009/09/16/just-put-your-modal-view-in-a-uinavigationcontroller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Xcode Projects in Vim with Rake</title>
		<link>http://blog.highorderbit.com/2009/09/02/building-xcode-projects-in-vim-with-rake/</link>
		<comments>http://blog.highorderbit.com/2009/09/02/building-xcode-projects-in-vim-with-rake/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 16:46:54 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://blog.highorderbit.com/?p=374</guid>
		<description><![CDATA[We spend the vast majority of our time writing code in Objective-C for our iPhone applications. In my opinion, one of the biggest problems with iPhone or Mac development is Xcode. Yeah, it&#8217;s gotten progressively better over the years, but I still wonder how any developer can use it productively as their full-time development environment. [...]]]></description>
			<content:encoded><![CDATA[<p>We spend the vast majority of our time writing code in Objective-C for our
iPhone applications. In my opinion, one of the biggest problems with iPhone
or Mac development is Xcode. Yeah, it&#8217;s gotten progressively better over
the years, but I still wonder how any developer can use it productively as
their full-time development environment.</p>

<p>My weapon of choice for day-to-day iPhone development is
<a href="http://code.google.com/p/macvim/" title="macvim - Project Hosting on Google
Code">Vim</a>. Of course, at its core Vim is a text editor, not an IDE, so those
looking to duplicate the functionality of more modern development
environments in Vim have to either look to Vim&#8217;s rich <a href="http://www.vim.org/scripts/">plug-in
ecosystem</a>, or roll their own.</p>

<p>One of the first problems I wanted solved was to build my programs and fix
compiler errors in Vim. I&#8217;m trying to minimize the number of times I need
to switch between Vim and Xcode (in other words, reduce my Xcode use) as
much as possible.</p>

<p>Xcode helpfully ships with a command line build tool called <code>xcodebuild</code>.
It should be in your <code>$PATH</code> by default once you&#8217;ve installed the Xcode
tools:</p>

<pre><code>$ xcodebuild -help
    Usage: xcodebuild [-project &lt;projectname&gt;] [-activetarget]
          [-alltargets] [-target &lt;targetname&gt;]... [-parallelizeTargets]
          [-activeconfiguration] [-configuration &lt;configurationname&gt;]
          [-sdk &lt;sdkfullpath&gt;|&lt;sdkname&gt;] [&lt;buildsetting&gt;=&lt;value&gt;]...
          [&lt;buildaction&gt;]...
        xcodebuild [-version [-sdk [&lt;sdkfullpath&gt;|&lt;sdkname&gt;] [&lt;item&gt;] ]
        xcodebuild [-showsdks]
        xcodebuild [-find &lt;binary&gt; -sdk &lt;sdkfullpath&gt;|&lt;sdkname&gt;]
        xcodebuild [-list]
</code></pre>

<p><br />
Vim includes the ability to build programs via <code>make</code>, and, more
importantly for me, supports customizing the command-line builder is uses
as its make program. All that&#8217;s needed is to configure Vim to use
<code>xcodebuild</code> as our make program, instead of <code>make</code>, and we should be in
business.</p>

<p>For <code>xcodebuild</code> to work properly, the command needs to be run from within
the same directory as your <code>.xcodeproj</code> file, or it needs to be told
where that file is located via the <code>-project</code> command line option. This is
a problem for me, since I like Vim to set its working directory to the
directory of the file I&#8217;m editing, which is never the same directory that
contains my <code>.xcodeproj</code> file. Since my current directory can&#8217;t be
relied upon, I needed to find a way to dynamically locate the <code>.xcodeproj</code>
file in order to correctly trigger a build.</p>

<p>Enter <a href="http://rake.rubyforge.org/" title="Rake -- Ruby Make"><code>Rake</code></a>. Anyone
whose ever done any Ruby programming is probably familiar with it, and if
you&#8217;ve never heard of it, I encourage you to check it out. I like to use
Rake for simple project automation, including updating my tags file and
performing certain git operations.</p>

<p>One feature of Rake that came in handy for solving this particular problem
is that when <code>rake</code> is typed at the command line, it will recursively
search up your directory tree looking for a Rakefile. That means if I
execute Rake from within <code>foo/bar/baz</code>, and my Rakefile is in <code>foo</code>, Rake
will find it and run it correctly.</p>

<p>Taking advantage of this, I&#8217;ve set up a build task within my project&#8217;s
Rakefile that will perform the default Xcode build (which is configured
within the Xcode project itself) via <code>xcodebuild</code>. The relevant Rakefile
snippets looks something like this:</p>

<pre><code>def project_file(root_dir='.')
  Find.find(root_dir) do |f|
    if f =~ /\.xcodeproj$/
      return f
    end
  end
  nil
end

def xcodebuild
  "xcodebuild -project #{project_file}"
end

desc 'Build the default target using the default configuration'
task :build do |t|
  puts %x{
    #{xcodebuild} |
    grep -v "note: This view overlaps one of its siblings ."
  }
end

task :default =&gt; [ :build ]
</code></pre>

<p><br />
Note that I have to search for my <code>.xcodeproj</code> file because our project
structure conventions have it living in a subdirectory of the project root,
and I don&#8217;t want to hardcode the path or the project file name for project
portability reasons. Note also that piping the output through <code>grep</code> is a
hack to suppress annoying Interface Builder warnings that I can&#8217;t figure
out how to shut off in IB or Xcode. If anyone knows how to do this, please
share.</p>

<p>Now all you have to do is invoke your Rakefile from within Vim by setting
Rake to be your make program by typing:</p>

<pre><code>:set makeprg=rake
</code></pre>

<p><br />
Now when you type <code>:make</code> from within Vim, it&#8217;ll invoke Rake. If
your working directory is within your project&#8217;s root directory, Rake will
search for your Rakefile, and, when it&#8217;s found, invoke the build task. You
can also pass arguments to the <code>make</code> command within Vim, so you&#8217;re not
restricted to running a single Rake task with no arguments.</p>

<p>Since Xcode uses GCC to compile iPhone programs, Vim can already parse the
compiler&#8217;s output and make sense of compiler warnings and errors. This
allows you to navigate to those warnings and errors From within Vim using
the standard <code>cnext</code> and <code>cprevious</code> commands.</p>

<p>To load the build output as a Vim window that spans the width of the frame
underneath any other windows (important for me as I like to run Vim with
two vertically split editor windows and a
<a href="http://www.vim.org/scripts/script.php?script_id=1658" title="The NERD tree - A tree explorer plugin for navigating the filesystem : vim online">NERDTree</a>
window to the left of those), just type <code>:botright cwindow</code>.</p>

<p>I also set this configuration automatically whenever I edit an Objective-C
file via my <code>.vimrc</code> file:</p>

<pre><code>autocmd FileType objc set makeprg=rake
</code></pre>

<p><br />
That&#8217;s my setup. I hope it helps more people get out of the swamp of Xcode
and into an environment that&#8217;s actually productive. And of course, any
suggestions for improvements, or other tips or tricks, are always welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.highorderbit.com/2009/09/02/building-xcode-projects-in-vim-with-rake/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Under Development: iPhone Issue Tracking with Lighthouse</title>
		<link>http://blog.highorderbit.com/2009/05/15/under-development-iphone-issue-tracking-with-lighthouse/</link>
		<comments>http://blog.highorderbit.com/2009/05/15/under-development-iphone-issue-tracking-with-lighthouse/#comments</comments>
		<pubDate>Fri, 15 May 2009 18:16:51 +0000</pubDate>
		<dc:creator>kurthd</dc:creator>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bug watch]]></category>
		<category><![CDATA[lighthouse]]></category>

		<guid isPermaLink="false">http://blog.highorderbit.com/?p=271</guid>
		<description><![CDATA[While we&#8217;ve dropped a few hints on our website and elsewhere, today we&#8217;re making it official: High Order Bit is building a Lighthouse client for the iPhone.  We still have some work to do, and the polished product might look significantly different from the screenshot below, but it will be available sometime this summer.  Until [...]]]></description>
			<content:encoded><![CDATA[<p>While we&#8217;ve dropped a few <a title="High Order Bit Products" href="http://highorderbit.com/products.php">hints on our website</a> and elsewhere, today we&#8217;re making it official: High Order Bit is building a Lighthouse client for the iPhone.  We still have some work to do, and the polished product might look significantly different from the screenshot below, but it will be available sometime this summer.  Until then, check out our other <a title="High Order Bit Products" href="http://highorderbit.com/products.php">iPhone development products</a> and <a title="Feedback" href="mailto:feedback@highorderbit.com">let us know</a> what other development utilities you&#8217;d like to see on the iPhone.</p>

<p style="text-align: center;"><img class="aligncenter size-full wp-image-272" style="border:none;" title="Bug Watch Screenshot" src="http://blog.highorderbit.com/wp-content/uploads/2009/05/img_0001.png" alt="Bug Watch Screenshot" width="320" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.highorderbit.com/2009/05/15/under-development-iphone-issue-tracking-with-lighthouse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Supporting iPhone Push Notifications</title>
		<link>http://blog.highorderbit.com/2009/04/24/supporting-iphone-push-otifications/</link>
		<comments>http://blog.highorderbit.com/2009/04/24/supporting-iphone-push-otifications/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 23:59:31 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[push notifications]]></category>

		<guid isPermaLink="false">http://blog.highorderbit.com/?p=187</guid>
		<description><![CDATA[Last week Ars Technica posted an interesting article about whether or not it&#8217;s feasible for small iPhone developers to support the &#8220;push notification&#8221; service Apple plans to include in version 3.0 of the iPhone OS. I can speak to this not only because we&#8217;re a small company (tiny, really) building iPhone applications, but because at [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.highorderbit.com/wp-content/uploads/2009/04/apple-push-notification-service.jpg" alt="Apple Push Notification Service" title="Apple Push Notification Service" width="195" height="212" class="alignleft size-full wp-image-198" style="border: none;" />Last week Ars Technica posted an interesting
<a href="http://arstechnica.com/web/news/2009/04/the-problem-with-push-can-small-developers-afford-it.ars" title="The problem with push: can small developers afford it? - Ars Technica">article</a>
about whether or not it&#8217;s feasible for small iPhone developers to support
the &#8220;push notification&#8221; service Apple plans to include in version 3.0 of
the iPhone OS.</p>

<p>I can speak to this not only because we&#8217;re a small company (tiny, really)
building iPhone applications, but because at least <a href="http://www.highorderbit.com/buildwatch/" title="Build Watch - CruiseControl client for iPhone">one</a>, maybe <a href="http://www.highorderbit.com/codewatch/" title="Code Watch - GitHub client for iPhone">two</a>, and probably more of our
applications could be improved by adding &#8220;background notifications,&#8221;
regardless of whether the implementation takes the form of processing done
on our server and a small notification pushed to the phone, as Apple
proposes, or processing done in the background on the client.</p>

<p>First, let me say that I can understand the reasons why Apple is hesitant
to open up the phone to background processing. My own iPhone currently has
about 5 or 6 &#8220;pages&#8221; of applications. The vast majority are ones I&#8217;ve
downloaded, run once or twice, and have never run again, a pattern which
seems to be
<a href="http://arstechnica.com/apple/news/2009/02/most-iphone-users-never-use-an-app-after-the-first-download.ars" title="Most iPhone users never use an app after the first download - Ars Technica">representative</a>. Furthermore, the quality of those apps varies dramatically.</p>

<p>Many of these apps would run in the background if they could. Would I want
them to? I&#8217;m not sure. While it would be possible for developers to write
background processes that are well-behaved, and therefore don&#8217;t needlessly
suck up CPU cycles and battery life, I&#8217;m not convinced that would be the
common case.</p>

<p>The cost to the user of a misbehaving background app is pretty high. Worse,
troubleshooting the problem isn&#8217;t exactly straightforward. All the user
knows is that his phone seems sluggish, or that his battery life doesn&#8217;t
seem to be what it was. Is it the phone or an app? If it&#8217;s an app, which
one out of the 30 or 40 that have been installed is the problem?</p>

<p>I can definitely understand why Apple wants to sidestep this whole issue.</p>

<p>All that said, I think the utility of <a href="http://www.highorderbit.com/buildwatch/" title="Build Watch - CruiseControl
client for iPhone">Build
Watch</a> would be increased dramatically if notifications of
failed builds could be pushed to users in the background. Let&#8217;s consider
what would be required for Build Watch to leverage push notifications.</p>

<p>First, we&#8217;d have to replicate most of the business logic that&#8217;s implemented
in the app within a web application. This would include storing the list of
servers for each user, the show/hide status of each project (since we don&#8217;t
want to be sending notifications for projects they don&#8217;t care about), and
the most recent build status for each project, so we know when that status
changes. This would all have to be new code, since we&#8217;re not going to be
running Objective-C on our web servers. The iPhone and web applications
would then have to be maintained in parallel as new features are added and
bugs are fixed. (Maybe this duplication means that the architecture of
iPhone apps leveraging background notifications will fundamentally shift
over time. All important state and business logic will live on the server,
and the native iPhone client will reduce to just a pretty front-end.)</p>

<p>Some functionality won&#8217;t work at all. For example, it&#8217;s currently possible
to hide and unhide projects even when the phone doesn&#8217;t have an Internet
connection. This is just configuration stored locally, so the current
implementation is simple. Getting this working in conjunction with push
notifications requires us either to forbid the behavior altogether, which
is a clumsy compromise, or devise some mechanism for syncing the user&#8217;s
offline changes with the server&#8217;s state. The latter can only be performed
the next time the user opens the app while connected to the Internet. In
the meantime, perhaps confusingly, they&#8217;ll continue to receive updates for
projects they don&#8217;t care about and/or miss updates for projects they do
care about.</p>

<p>More critically, consider people whose build servers are protected behind
corporate firewalls. I suspect the majority of our users fall into this
category. A web service pushing notifications doesn&#8217;t work at all for these
users. One might argue that they&#8217;re not any worse off than they are now,
but push notifications as a general purpose solution has no answer for
this problem. Background processes, on the other hand, would work quite
nicely.</p>

<p>Next we have to consider cost. Build Watch currently costs $2.99, and
that&#8217;s a price point we like and will likely follow for future apps that
are similar in scope. That&#8217;s about the price of a small latte. If we want
to support background notifications, we can no longer just code up the app,
release, and move on. We now have server processes we have to continue to
develop, pay for, and maintain, with no obvious path for earning continuing
revenue from the user.</p>

<p>All this must be overcome just so our little app can download a few
kilobytes of RSS data and alert the user if necessary. Seems a little
disproportionate, doesn&#8217;t it?</p>

<p>This becomes an even bigger problem for small shops like us as background
notifications become a user expectation. Will users even bother checking
out our apps if we don&#8217;t support this behavior?</p>

<p>I&#8217;m not terribly concerned with the scaling issue pointed out in the Ars
article. Granted, we&#8217;re not building <a href="http://www.atebits.com/tweetie-iphone/" title="atebits - Tweetie for
iPhone">Twitter
clients</a>, but even if we were I&#8217;d consider scaling problems to be a good
one to have. Several hundred thousand paying customers sounds just fine to
me. I&#8217;m much more concerned about its limited usefulness for a large class
of applications that could benefit tremendously from background processing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.highorderbit.com/2009/04/24/supporting-iphone-push-otifications/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Issue Tracking with Lighthouse</title>
		<link>http://blog.highorderbit.com/2009/04/07/issue-tracking-with-lighthouse/</link>
		<comments>http://blog.highorderbit.com/2009/04/07/issue-tracking-with-lighthouse/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 23:07:01 +0000</pubDate>
		<dc:creator>kurthd</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[code watch]]></category>
		<category><![CDATA[issue tracking]]></category>
		<category><![CDATA[lighthouse]]></category>

		<guid isPermaLink="false">http://blog.highorderbit.com/?p=156</guid>
		<description><![CDATA[Since John and I started coding about two months ago, we&#8217;ve been looking around at various issue tracking systems. For Code Watch development, we used Lighthouse, which I quite like and want to share &#8216;why&#8217;. Before I do that, however, let me get the following disclaimer out of the way: I think there&#8217;s something weird [...]]]></description>
			<content:encoded><![CDATA[<p>Since John and I started coding about two months ago, we&#8217;ve been looking around at various issue tracking systems. For <a title="Code Watch" href="http://www.highorderbit.com/codewatch/">Code Watch</a> development, we used <a title="Lighthouse" href="http://lighthouseapp.com/">Lighthouse</a>, which I quite like and want to share &#8216;why&#8217;.</p>

<p>Before I do that, however, let me get the following disclaimer out of the way: I think there&#8217;s something weird about issue tracking software. I rarely, if ever, hear anyone praise their issue tracking system &#8212; which isn&#8217;t the case with other types of software, like version control. And there are all kinds of issue tracking systems out there, which is somewhat unique. These trends probably result from the fact that issue tracking systems are meant to help people in a realm in which we all work very differently. Things like team and organization size and structure, project scope and culture vary considerably and these are just a few factors that determine <em>how</em> we work.</p>

<p>Given that, maybe there isn&#8217;t a &#8216;best&#8217; system. Perhaps we ought to have a million different issue tracking systems to meet our diverging needs. Or perhaps <em>we</em> are the problem. Perhaps we tend to organize ourselves and communicate in dysfunctional ways, and we blame the software for our dysfunctions. I&#8217;m sure there&#8217;s some truth to both theories, but, regardless, I&#8217;ll explain what I want from my issue tracking system:</p>

<p>Not much. I&#8217;m a big believer in keeping things simple. Software teams should be as small as possible. That&#8217;s the most effective way of managing a project. Sure, issue tracking and project management systems can facilitate communication to a point, but there&#8217;s no software substitute for small focused teams. I don&#8217;t dispute the fact that some tasks involved with software development like testing and &#8216;project management&#8217; are quite different from coding, and it&#8217;s tempting to hire specialists, create special teams and create software to help manage these entities. And I don&#8217;t dispute that these skill sets aren&#8217;t necessarily correlated. Furthermore, a great coder is worth his weight in gold despite any deficiencies in other software development skills. I just believe that those skills aren&#8217;t mutually exclusive, either. The fewer points of knowledge and dependencies the better. That&#8217;s my theory. Simple.</p>

<p>So, specifically now, what do I want from my issue tracking system? I want it to get out of the way. The easier question to answer is &#8216;what don&#8217;t I want&#8217;.  </p>

<p>I don&#8217;t want &#8216;workflows&#8217;. I don&#8217;t want to submit an issue that gets sent to one department for processing, which then sends it to another department upon completion, and so on. Assembly lines are cool, but creative human work doesn&#8217;t seem to resemble them.</p>

<p>I don&#8217;t want to set a task&#8217;s priority. If a team is small and focused, everyone knows how to best spend their time.</p>

<p>I don&#8217;t want to estimate how long a ticket will take to implement. I&#8217;m always way off. I spent multiple hours yesterday getting a table cell to display properly. In the same amount of time, I probably often times knock off 2 or 3 sizable features. And as far as aggregating time estimations (even with some fancy statistical considerations) to estimate a deadline? Forget about it. What about the five huge features you didn&#8217;t expect, the three that ended up not making any sense, and the massive refactoring two weeks into the project? How do you account for those? You should constantly re-evaluate scope and priorities. It&#8217;s safe to say &#8216;this is the focus for the next month and we&#8217;ll get at least this far, and nowhere near that far&#8217;, but that&#8217;s about it. Again, if you&#8217;re confident that everyone is working on the most important things, how much does it really matter? What tradeoff would you make?</p>

<p>Interestingly, most of my Lighthouse tickets are less than a couple days old.  There&#8217;s no way I could have anticipated those issues before we started development.  I could have anticipated some set of issues, but I would have deleted them over time and created new ones.</p>

<p>Lighthouse doesn&#8217;t support any of the above features, and I hope they never do. It really is &#8216;beautifully simple issue tracking&#8217;. Useful features like tags, milestones, powerful search, ticket status and ownership, attachments, extensibility, etc. are all there &#8212; and not much else. <a title="Check it out" href="http://lighthouseapp.com/">Check it out</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.highorderbit.com/2009/04/07/issue-tracking-with-lighthouse/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Customizing Xcode File Templates</title>
		<link>http://blog.highorderbit.com/2009/03/15/customizing-xcode-cocoa-touch-file-templates/</link>
		<comments>http://blog.highorderbit.com/2009/03/15/customizing-xcode-cocoa-touch-file-templates/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 19:10:48 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://blog.highorderbit.com/?p=101</guid>
		<description><![CDATA[One of the first things many users of Xcode want to do is customize the file templates used to generate stubs for classes and other items in your project. We&#8217;re spending most of our time building iPhone applications, so we&#8217;re interested in customizing the Cocoa Touch templates. Losing &#95;&#95;MyCompanyName&#95;&#95; Getting rid of the &#95;&#95;MyCompanyName&#95;&#95; placeholder [...]]]></description>
			<content:encoded><![CDATA[<p>One of the first things many users of Xcode want to do is customize the
file templates used to generate stubs for classes and other items in your
project. We&#8217;re spending most of our time building <a href="http://www.highorderbit.com/buildwatch/">iPhone
applications</a>, so we&#8217;re interested
in customizing the Cocoa Touch templates.</p>

<h3>Losing &#95;&#95;MyCompanyName&#95;&#95;</h3>

<p>Getting rid of the &#95;&#95;MyCompanyName&#95;&#95; placeholder is almost always the first
thing people want changed when they start using Xcode. This can be done in
one of two ways.</p>

<h4>Set Your Company in Address Book</h4>

<p>Definitely the simplest method: just set the company field for <a href="http://docs.info.apple.com/article.html?path=AddressBook/4.0/en/ad955.html">your
personal card</a> in Address Book.</p>

<h4>Set Your Company Manually</h4>

<p>You can set your company manually by running the following command in your
terminal:</p>

<p>
<pre>
$ defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions \
  '{"ORGANIZATIONNAME"="High Order Bit";}'
</pre>
</p>

<h3>Customizing Cocoa Touch Templates</h3>

<p>You&#8217;ll save a lot of time over the long term with a bit of up-front
investment configuring Xcode with your own templates.</p>

<p>You can find the standard Xcode Cocoa Touch plugins here:</p>

<pre><code>/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/
    File Templates/Cocoa Touch Classes/
</code></pre>

<p><br />
Each directory with the extension <code>.pbfiletemplate</code> is its own template.</p>

<p>You don&#8217;t want to edit these files. While doing so will work, the next time
you install Xcode, your changes will be overwritten. Instead, you should
place your custom templates within your home directory (create these
folders if they don&#8217;t already exist):</p>

<pre><code>~/Library/Application Support/Developer/Shared/Xcode/File Templates
</code></pre>

<p><br />
Inside the <code>File Templates</code> directory, your templates must be placed in a
<code>Cocoa Touch Classes</code> directory. This directory can either sit directly
within <code>File Templates</code>, or you can create subfolders to further group your
templates.  For example, I&#8217;ve created a <code>High Order Bit</code> subfolder where
the templates include our standard comment header and the boilerplate code
is formatted per our coding conventions.</p>

<div id="attachment_116" class="wp-caption aligncenter" style="width: 610px"><img src="http://blog.highorderbit.com/wp-content/uploads/2009/03/xcode-custom-templates.png" alt="Installed Custom Templates" title="Installed Custom Templates" width="600" height="467" class="size-full wp-image-116" /><p class="wp-caption-text">Installed Custom Templates</p></div>

<p>We&#8217;ve also added to the list of available templates, adding one for
creating new protocols and another for creating class categories. Creating
new templates is pretty self-explanatory once you crack open the
<code>.pbfiletemplate</code> folder contents.</p>

<p>We keep these templates in <a href="http://github.com/highorderbit/xcode-configuration/tree">source
control</a>. I want
Xcode to pick up changes automatically when I pull from our repository, and
I want to easily share any local changes I make. I could just clone the
repository into the Xcode File Template directory, but I prefer to
keep them in the directory where I keep the rest of my source code and
create a symbolic link to this location where Xcode expects it:</p>

<pre><code>$ ln -s $HOME/src/xcode-configuration/File\ Templates/Cocoa\ Touch\ Classes \
  ~/Library/Application\ Support/Developer/Shared/Xcode/\
  File\ Templates/High\ Order\ Bit/Cocoa\ Touch\ Classes
</code></pre>

<p><br />
Done! Your own custom Xcode Cocoa Touch templates, tracked and shared in
source control.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.highorderbit.com/2009/03/15/customizing-xcode-cocoa-touch-file-templates/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

