<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Dustin Bachrach Blog</title>
	
	<link>http://dbachrach.com/blog</link>
	<description>a developer blog</description>
	<lastBuildDate>Mon, 28 Mar 2011 14:10:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/dbachrach" /><feedburner:info uri="dbachrach" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><item>
		<title>Flickpad 2: Every Photo. Every friend. Every day.</title>
		<link>http://feedproxy.google.com/~r/dbachrach/~3/JHZ9-FMLL74/</link>
		<comments>http://dbachrach.com/blog/2010/08/flickpad-2-every-photo-every-friend-every-day/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 23:14:50 +0000</pubDate>
		<dc:creator>Dustin Bachrach</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbachrach.com/blog/?p=605</guid>
		<description><![CDATA[Chad and I couldn&#8217;t be happier with the newest version of Flickpad. Flickpad is an immersive photo experience that pulls your friends photos from Facebook and Flickr. Watch the video and get it on the App Store.]]></description>
			<content:encoded><![CDATA[<p>Chad and I couldn&#8217;t be happier with the newest version of Flickpad. Flickpad is an immersive photo experience that pulls your friends photos from Facebook and Flickr. Watch the video and <a href="http://itunes.apple.com/us/app/flickpad-flickr-facebook-photos/id358635466?mt=8">get it on the App Store</a>.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/SRgSTs4C63I&amp;hl=en_US&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/SRgSTs4C63I&amp;hl=en_US&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbachrach?a=JHZ9-FMLL74:VQ-Sg856CXA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=JHZ9-FMLL74:VQ-Sg856CXA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=JHZ9-FMLL74:VQ-Sg856CXA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbachrach?i=JHZ9-FMLL74:VQ-Sg856CXA:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dbachrach/~4/JHZ9-FMLL74" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dbachrach.com/blog/2010/08/flickpad-2-every-photo-every-friend-every-day/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://dbachrach.com/blog/2010/08/flickpad-2-every-photo-every-friend-every-day/</feedburner:origLink></item>
		<item>
		<title>App Releases: The Now &amp; Flickpad</title>
		<link>http://feedproxy.google.com/~r/dbachrach/~3/IxPK_dJu8Ms/</link>
		<comments>http://dbachrach.com/blog/2010/04/app-releases-the-now-flickpad/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 01:20:04 +0000</pubDate>
		<dc:creator>Dustin Bachrach</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbachrach.com/blog/?p=597</guid>
		<description><![CDATA[It&#8217;s been a long while since I&#8217;ve put out a post. In the meantime, I&#8217;ve been pumping out a couple iPhone and iPad apps. I wanted to share the cool apps we at Shacked made, so here they are. As always, I love comments and suggestions, so feel free to post in the comments below. [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long while since I&#8217;ve put out a post. In the meantime, I&#8217;ve been pumping out a couple iPhone and iPad apps. I wanted to share the cool apps we at <a href="http://shackedapps.com/">Shacked</a> made, so here they are. As always, I love comments and suggestions, so feel free to post in the comments below.</p>
<h2 class="with_underline">The Now</h2>
<p><img src="http://shackedapps.com/thenow.png" alt="The Now" style="float:left; margin-right:10px;" />If you&#8217;ve ever read books like <em>The Precious Present</em> or <em>The Power of Now</em>, you know that a great way to stay positive in life is to be mindful of the present moment. However, it can become difficult to stay focused when you have all the distractions and stresses of daily life. That&#8217;s why we created <a href="http://shackedapps.com/now.html">The Now</a>. It&#8217;s an iPhone app that uses push notifications to send you quotes and messages about staying in the moment. We use the time of day to send more meaningful messages. For instance, before lunch, you might get a message to truly savor the taste of your food instead of quickly eating it. We&#8217;ve really enjoyed creating it, so please give it a try.</p>
<h2 class="with_underline">Flickpad</h2>
<p><img src="http://dbachrach.com/blog/wp-content/uploads/2010/04/flickpad_icon.png" alt="Flickpad" title="Flickpad" width="115" height="115" style="float:left; margin-right:10px;" /> We set out to make an awesome Facebook photo browser for the iPad. And we call it <a href="http://shackedapps.com/flickpad.html">Flickpad</a>. It&#8217;s a simple and intuitive way to view friends&#8217; albums, and you&#8217;re going to love tossing photos off the screen to discard them. We&#8217;ve got a ton of features planned for Flickpad, and we&#8217;d really appreciate any of your suggestions too. Just let us know!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbachrach?a=IxPK_dJu8Ms:u-gr8En3OzM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=IxPK_dJu8Ms:u-gr8En3OzM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=IxPK_dJu8Ms:u-gr8En3OzM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbachrach?i=IxPK_dJu8Ms:u-gr8En3OzM:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dbachrach/~4/IxPK_dJu8Ms" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dbachrach.com/blog/2010/04/app-releases-the-now-flickpad/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://dbachrach.com/blog/2010/04/app-releases-the-now-flickpad/</feedburner:origLink></item>
		<item>
		<title>XCode Feature Proposal: Linking NSLog to Code</title>
		<link>http://feedproxy.google.com/~r/dbachrach/~3/0CK773E_kBc/</link>
		<comments>http://dbachrach.com/blog/2009/10/xcode-feature-proposal-linking-nslog-to-code/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 22:44:11 +0000</pubDate>
		<dc:creator>Dustin Bachrach</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbachrach.com/blog/?p=590</guid>
		<description><![CDATA[If you&#8217;ve ever used NSLogs to help in your debug process, this description probably fits your process. You add a log statement in this code over here. You look further at the code and find that the problem is probably elsewhere, so you go down the chain of files and add more NSLogs. You do [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever used NSLogs to help in your debug process, this description probably fits your process. You add a log statement in this code over here. You look further at the code and find that the problem is probably elsewhere, so you go down the chain of files and add more NSLogs. You do this for awhile, and you&#8217;ve built up a sometimes large list of NSLogs. And sometimes what you log might be equivalent to other messages. Now looking at your console logs, you see all the statements, and you don&#8217;t immediately know where those messages are originating from. This could also arise if you leave your log statements in and come back to the code 3 months later. </p>
<p>Your solution right now is to pop up the global search window, copy and paste part of the message in, and then track down which log statement that came from. This can amount to a lot of work after awhile.</p>
<p>Instead, I propose that the XCode team add a very small feature to NSLog and their console that hyperlinks the outputted NSLog message in the console to the file and line number where it was generated. It would be great for developers to have a quick link they can follow that shows exactly where their log statements are coming from.</p>
<p>The code to add this would be relatively minor. For instance, you only need to write a one line macro to fix NSLog.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#define NSLog2(...) NSLog([NSString stringWithFormat:@&quot;&lt;!%s,%s!&gt; %@&quot;, __FILE__, __LINE__, [NSString stringWithFormat: __VA_ARGS__]])</span></pre></div></div>

<p>A call to NSLog2 will simply call NSLog and prepend the file name and line number. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">NSLog2<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Hello %i %@&quot;</span>, <span style="color: #2400d9;">500</span>, <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSArray</span> arrayWithObject<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;hi&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;
<span style="color: #11740a; font-style: italic;">/* Prints to console:
2009-10-22 17:27:30.809 Todos[22446:a0f] &lt;!/Users/deb/repositories/todos/AppController.m,22!&gt; Hello 500 (
    hi
)
*/</span></pre></div></div>

<p>In XCode, they would need to add a bit of code to the console that would look for strings formatted like <! ... , ... !>. Then, they can strip everything between <! and !> from the console method. They would the generate a clickable link for the message that would open up that source file and position the cursor at the line number. Very simple and incredible useful. </p>
<p><strong>Thoughts?</strong> Good or bad idea? Do you have a hack to implement this?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbachrach?a=0CK773E_kBc:pp61b_m8p8M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=0CK773E_kBc:pp61b_m8p8M:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=0CK773E_kBc:pp61b_m8p8M:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbachrach?i=0CK773E_kBc:pp61b_m8p8M:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dbachrach/~4/0CK773E_kBc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dbachrach.com/blog/2009/10/xcode-feature-proposal-linking-nslog-to-code/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://dbachrach.com/blog/2009/10/xcode-feature-proposal-linking-nslog-to-code/</feedburner:origLink></item>
		<item>
		<title>Inline SCM: A Proposal For A Better SVN or Git</title>
		<link>http://feedproxy.google.com/~r/dbachrach/~3/QlLVHgr4A5E/</link>
		<comments>http://dbachrach.com/blog/2009/06/inline-scm-a-proposal-for-a-better-svn-or-git/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 09:04:29 +0000</pubDate>
		<dc:creator>Dustin Bachrach</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://dbachrach.com/blog/?p=580</guid>
		<description><![CDATA[Recently, my team had to shift focus in development slightly. Our changes required us to go back to the latest QA verified build in our source control repository (in our case Subversion). We started working off of this version to ensure that any new stuff was branching off from a verified source. There are some [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, my team had to shift focus in development slightly. Our changes required us to go back to the latest QA verified build in our source control repository (in our case Subversion). We started working off of this version to ensure that any new stuff was branching off from a verified source. There are some problems with this, of course. Source control programs have great ability to tag, branch, and merge code. One thing that is weak is reverting and rolling back changes.</p>
<h2 class="with_underline">An Example</h2>
<p>Joe at Apple checks in r1000 to his team&#8217;s SVN repository. This version marks the release candidate of, say, PhotoBooth 1.0. QA tests this version and confirms it works, and Apple ships r1000. Gearing up for the next release, Joe&#8217;s team start commiting to the repository. Joe checks in r1500, which is in very good condition. Over the last 500 checkins, Joe&#8217;s team has added a bunch of cool new features and fixed up a bunch of pesky bugs that existed in r1000 (the last public release). The only thing wrong with r1500 is that a few of the new features are not quite implemented, and some things that worked in r1000 don&#8217;t work in r1500.</p>
<p>Now, Steve Jobs rolls into Joe&#8217;s office and has a great idea for a new quick feature to add to Photo Booth, and he wants that new feature done and released to the public in one week. This new feature itself won&#8217;t take long at all, but for Joe&#8217;s team to fix all the things wrong with r1500, they would need much longer than a week. So instead, Joe reverts back to r1000, which he know works pretty well. The team branches and works off of r1000 and creates the new feature Steve wanted. They are now ready for release.</p>
<p>But&#8230; old bugs that were fixed between r1000 and r1500 are now reappearing. Since all the work that&#8217;s taken place in between r1000 and r1500 (new features and bug fixes) was dropped to get this new release out, many old problems that were fixed come back up.</p>
<p>Now begins the painful process of seeing at which commit points certain bugs were fixed and then trying to merge all of these back. This is a pain, messy, and needs to be reworked.</p>
<h2 class="with_underline">A New Way</h2>
<p>I suggest a new way to handle source control management. SCM has always done a great job of tracking changes among a large set of files. The one thing it does not do so great a job on is tracking changes within the same file. SVN will let you diff between two file revisions, but we cannot comment what specifically changed at the code level, nor can we even comment what happened at the file level, only at the commit level.</p>
<p>Consider the following screenshot:</p>
<p><img class="alignnone size-full wp-image-581" title="svn" src="http://dbachrach.com/blog/wp-content/uploads/2009/06/svn.png" alt="svn" width="506" height="212" /></p>
<p>Imagine if XCode or any IDE of your choice would handle your SCM. Any time you chose to do a commit, you would be presented with a global list of all files that had modifications (ie: svn stat). You would then go through these modified files and be presented with a diff of the previous revision and the current revision (ie: FileMerge). Instead of just confirming that you are changing what you think you are changing, you take a little extra time for each commit. In place of just writing a commit message for the entire commit with many files,  you can write a separate commit message for each particular block of code that changed. This could become tedious, but there could be easy ways to select large portions of a file and mark them all as the same Change. </p>
<p>For example, say we are cleaning up a large method. We might have many different changes here and there every few lines, but all of these little changes group together to make one large Change: that of cleaning up this method. So instead of commenting each one of these minor changes, we would just comment the larger Change and say &#8220;we cleaned up this method.&#8221; Just having this sort of inlining could greatly help trying to trackdown when some piece of code changed somehwere in the history of the repository and why. As of right now, if you are trying to figure out what changed in a particular file, the only information you have is the commit message, which usually is only a line or two and covers the entire commit not a specific part of it.</p>
<p>This is fine and semi-useful, but I think the next feature of Inline SCM would be incredibly useful. You might have noticed in the picture above the &#8220;Mark as&#8221; check boxes. Each Change (Change with a capital C does not necessarily mean a single change in the diff but a collective group of minor changes) allows for you to specify some sort of category. I&#8217;ve listed two possible categories: Bug Fix and New Feature. Everytime you add some new code or rework some old code, you can tag it as a Bug Fix or a New Feature. The repository would then have all this extra data to know how exactly every line between one revision and another changed.</p>
<h2 class="with_underline">Returning to Joe</h2>
<p>Now imagine our story line with Joe. If Joe and his team were using Inline SCM, the repository would know when any of their Changes fixed bugs and when any Change added a new feature. When Steve asks Joe to pump out a new version, Joe could roll back to r1000, but instead of just throwing away all that hard work, he could keep all the bug fixes between r1000 and r1500 and toss the new features.</p>
<p>Joe now would have a working version of code he knows passed QA along with all the bug fixes they found since they last released. </p>
<h2 class="with_underline">Other Opportunities</h2>
<p>This is scratching the surface of what Inline SCM could accomplish. There could be many more tags other than just Bug Fix and New Feature to add relevance and meta data to each Change within a commit. You could even link Changes with other Changes to communicate interdependencies and other important information.</p>
<p>The other clear opportunity here is for easy scanning of history. Commit messages are broad and global. Change-level comments would be focused and relevant. This could greatly help developers when trying to figure out what was going on in between revisions.</p>
<p>Subversion and Git allow great branching and tagging of entire commits, but truly lack the power that Inline SCM could add. Inline SCM would be tagging and adding information on a level so much closer to the source code than a single commit message could ever hope to achieve.</p>
<p>If you can think of any other useful applications of Inline SCm, I&#8217;d love to hear more in the comments. I wrote this article to facilitate discussion, so please add your opinion.</p>
<p>Finally I wanted to note, that this type of Inline commenting would not even require a new UI. You could make this work with TextEdit. For instance, you could place your Inline SCM messages in comments like below. Then, the SCM application would analyze your comments and interpret them properly.</p>
<p><img src="http://dbachrach.com/blog/wp-content/uploads/2009/06/snv2.png" alt="snv2" title="snv2" width="506" height="141" class="alignnone size-full wp-image-586" /></p>
<h2 class="with_underline">Perceived Problems</h2>
<p>The major deterrent to this whole approach would be the amount of time investment required by developers. I know many developers (I might succomb to it too once and awhile) who don&#8217;t even bother writing descriptive commit messages. To get these developers to write comments for code-level Changes might be difficult. Inline SCM would have to provide some benefit far outweighing the negative of having to tag everything. For some companies rolling-back might be critical. For others, perhaps not. That&#8217;s why I hope to get feedback as to other positive reasons to use it.</p>
<h2 class="with_underline">Conclusion</h2>
<p>This idea came to me today because of our rolling back to an older revision, and it struck me as incredibly useful to solve the very problem of rollbacks. Obviously, there are tons of other things that could make use of Inline SCM and there are, of course, many negatives to it as well. Please join the discussion and add your opinions or ideas.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbachrach?a=QlLVHgr4A5E:mj4vXuB4kAc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=QlLVHgr4A5E:mj4vXuB4kAc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=QlLVHgr4A5E:mj4vXuB4kAc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbachrach?i=QlLVHgr4A5E:mj4vXuB4kAc:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dbachrach/~4/QlLVHgr4A5E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dbachrach.com/blog/2009/06/inline-scm-a-proposal-for-a-better-svn-or-git/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://dbachrach.com/blog/2009/06/inline-scm-a-proposal-for-a-better-svn-or-git/</feedburner:origLink></item>
		<item>
		<title>Hawaii for the College Student (or college-like budget)</title>
		<link>http://feedproxy.google.com/~r/dbachrach/~3/uOjvSAquauo/</link>
		<comments>http://dbachrach.com/blog/2009/05/hawaii-for-the-college-student-or-college-like-budget/#comments</comments>
		<pubDate>Wed, 20 May 2009 07:04:08 +0000</pubDate>
		<dc:creator>Dustin Bachrach</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbachrach.com/blog/?p=536</guid>
		<description><![CDATA[If you&#8217;re planning a trip to Hawaii, specifically O&#8217;ahu, then it can be a tough task to find which places to go (there are so many) and how to keep it affordable (most of those places cost a ton). But with some patience, and planning you can have a sweet trip to one of the [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re planning a trip to Hawaii, specifically O&#8217;ahu, then it can be a tough task to find which places to go (there are so many) and how to keep it affordable (most of those places cost a ton). But with some patience, and planning you can have a sweet trip to one of the world&#8217;s most beautiful places and still have some extra bucks left over for pizza and your Xbox live account.</p>
<p><a title="DSC00810 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3527363491/"><img src="http://farm4.static.flickr.com/3664/3527363491_7c6faf3862.jpg" alt="DSC00810" width="500" height="375" /></a></p>
<p>My girlfriend, Erin, and I just recently vacationed in Hawaii (thanks to the summer job I have at <a href="http://ilovephotos.com">iLovePhotos</a>. And we managed to have a spectacular time all for about $500 for two people over 5 days minus flight and hotel. That includes food (with one fancier meal) and a few high-end purchases, so you could easily get this lower. Cutting out the expensive purchases, you could easily do it for $300. I&#8217;d also like to point out that if you have any chance of getting out of school early (like very early May) that would be best for your trip. Hawaii can get insanely packed with tourists, so exploring the island without having to weave your way between kids eating ice cream cones and herds of Japanese tourists all photographing their tour guide&#8217;s sun burn can really be nice. Our trip (starting May 4th) has been very quiet tourist wise, plus flights are cheaper than in July.</p>
<h2 class="with_underline">Transportation</h2>
<p>You have three options for travel: walking, the bus, or a cab. Or you can rent a car. But you&#8217;re a college student and, because all college students total their Hertz rental cars five minutes after they drive them off the lot, you won&#8217;t be able to rent a car. If you&#8217;re 21, you most likely can rent a car but with stiff premiums, so it&#8217;s probably not the most affordable option.</p>
<p>Walking? From your hotel to the beach, sure. From Waikiki to the north shore, even <a href="http://maps.google.com/maps?f=d&amp;source=s_d&amp;saddr=waikiki+hawaii&amp;daddr=north+shore+hawaii&amp;hl=en&amp;geocode=&amp;mra=ls&amp;dirflg=w&amp;sll=21.584658,-157.955246&amp;sspn=0.316054,0.616608&amp;ie=UTF8&amp;ll=21.45882,-157.91748&amp;spn=0.316328,0.616608&amp;t=h&amp;z=11">Google&#8217;s direction</a> won&#8217;t cure the fact that it&#8217;s too freaking far. So let&#8217;s put the marathon shoes back in the closet and head on over to a 7/11 store to pick up <a href="http://www.thebus.org/">TheBus</a> pass. Hawaii bus passes will run you $20 for 4 days or $40 for a month. If you don&#8217;t want to buy a pass, you can pay 2 bucks per bus ride (you get one transfer for every 2 dollars that&#8217;s good for a few hours). So do the math for your trip and pick which one suits you best. If you&#8217;re confident that you&#8217;ll be riding the bus a lot, it&#8217;s definitely worth the 4-day or month pass just for the peace of mind to know that you can get on and off the bus as much as you want. For perspective, a cab ride from the airport to Waikiki will run you roughly 35 bucks plus tip.</p>
<p>Oh, and for catching a cab? Yeah, not happening on our budget.</p>
<p>So, yes, riding the bus sucks and you&#8217;ll have to wait longer before you can go or leave places, and you&#8217;ll have to inevitably sit across from some insane dude he keeps talking to himself and cursing, but overall, it&#8217;s a great deal. It&#8217;s cheap and Hawaii has a terrific bus system. You can literally get anywhere you want from pretty much anywhere on the island. Plus, if you check on Google Maps (this works on your iPhone too), you can plan out your trip including which busses to take and what times they arrive at.</p>
<h2 class="with_underline">Suggested Trips</h2>
<p>So here are some day trips that ended up being a lot of fun for us. Every place is described and includes expected prices with a total day price as well. Each of these trips really filled up our days and will give you a combination of good fun and good food. These days aren&#8217;t jam packed so you can add in a stop or two or just hang out at the hotel or beach. A note on the food. These suggested plans have the food options we chose. We will discuss our thoughts on each restaurant. You may want to try where we ate, or you may want to go some place else. Following all the day trip suggestions, there is a section dedicated just to food suggestions. The day trips also include an estimated total cost, which includes food.</p>
<h2 class="with_underline">Day 1: Pearl Harbor and Diamond Head ($40)</h2>
<p>Day 1 is the time to knock out the two biggest things on the Hawaii must-do list. You&#8217;ll want to start early in the morning, like getting up around 7-8 (remember it&#8217;s not that hard since you probably haven&#8217;t adjusted to Hawaii time). You&#8217;ll want to hop a bus (we took the A, which has fewer stops) all the way over to <a href="http://www.nps.gov/usar/">Pearl Harbor</a>. This will be about a 45 minute trip give or take. Once you get off, you have just a minute or two walk to the entrance. Pearl Harbor is great on a tight budget. It&#8217;s free. That&#8217;s right, this is one of the few places on the whole island where you can go for free. You&#8217;re tax dollars at work.</p>
<p>Now Pearl Harbor is not the most exciting National Park I&#8217;ve been to. It&#8217;s quite small, really, but it is definitely something you&#8217;re going to want to do while in Hawaii. It marks a crucial point in our country&#8217;s history, and it gives you a chance to honor and remember those who gave their lives for us.</p>
<p><a title="DSC00589 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3508225753/"><img src="http://farm4.static.flickr.com/3022/3508225753_7a0fd9acb8.jpg" alt="DSC00589" width="500" height="375" /></a></p>
<p>As you enter Pearl Harbor&#8217;s visitor center, you&#8217;ll receive a ticket for a tour time. While you wait, you can grab some food (try the lemon-blueberry scone), browse through the museum, buy some souvenirs, or just look out at the harbor. When you&#8217;re tour begins, you&#8217;ll watch a 20 minute movie about the history of Pearl Harbor, which actually ended up being the highlight of the trip for me. Once the movie finishes, you&#8217;ll be escorted to the Arizona Memorial by boat manned by military personnel. All very snazzy for a 0 buck admission fee.</p>
<p>The Arizona Memorial itself is quite nice with an interesting architectural design. They have a nice wall with all the soldiers&#8217; names who died on the boat. You won&#8217;t get to see a whole lot of the actual ship since it&#8217;s still under water, but a few parts of it poke above the water. You&#8217;ll even get to see the oil from the boat that still seeps into the bay today. Seems like an EPA nightmare to me.</p>
<p>If you&#8217;re interested in viewing actual battle ships and submarines, there are other attractions around the harbor to explore, but each of these requires travel to its location and possibly other fees, so we skipped these to continue on to other events.</p>
<p>Finished with the memorial, you&#8217;ll want to travel back to Waikiki, but try stopping along the way in downtown Honolulu. This will give you a nice chance to explore the urban landscape of Hawaii and also grab a bite to eat. There&#8217;s a fantastic sushi restaurant in downtown just off of Fort Street near Bishop. I&#8217;d highly recommend giving <a href="https://www.ninja-sushi.com/">Ninja Sushi</a> a try. Ordering one Superman roll will probably be enough and only set you back 8 bones or so.</p>
<p>Once you&#8217;re through with lunch, hop on the B bus that stops at Bishop and Beretania. This&#8217;ll take you back to your hotel in Waikiki. You&#8217;ll want to spend an hour or two resting, because the next activity is to hike through <a href="http://en.wikipedia.org/wiki/Diamond_Head,_Hawaii">Diamond Head</a>, and you&#8217;ll not want to be doing that around noon.</p>
<p>You can catch a few busses from Waikiki to Diamond Head (we took the 22 along Kuhio). The bus lets you out at the start to Diamond Head Crater Park and most guides detail that Diamond Head is .8 miles either way. Well, that&#8217;s half true. You&#8217;ve got about a half a mile hike into the park before you even get to the trail, so be aware of that if you&#8217;re feeling tired.</p>
<p><a title="DSC00601 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3528132108/"><img src="http://farm3.static.flickr.com/2343/3528132108_756997eb7f.jpg" alt="DSC00601" width="500" height="375" /></a></p>
<p>Once you get there though, you&#8217;ll only need to fork over all of a dollar per person to get in (5 bucks for cars). You&#8217;ll then just start hiking up the trail. The trail is fairly easy at the beginning and slowly gets more difficult. It starts out paved, then unpaved, then relatively rock, and then just stairs. It&#8217;s pretty easy until you get to the stairs, which would send Jimmy Stewart in Vertigo into an all out panic attack. Although once you make it up them it&#8217;s a fantastic view of Waikiki, the beach, the mountains, and the east side of the island. You&#8217;ll also have a great sense of accomplishment. Overall, a great, fun hike. Just remember to bring a good amount of water (ABC stores sell 1.5 liters of water for only a buck), and don&#8217;t be stupid and wear heels like one lady we saw.</p>
<p>Once you&#8217;re done with Diamond Head (2 hours or so), you&#8217;ll probably want to get to your hotel and just crash for a little. We were out of energy in the evening so we just ordered a pizza from King&#8217;s Pub in our hotel which advertised the best pizza in Hawaii. I&#8217;d probably suggest heading to another pizza joint or wherever since I&#8217;m pretty sure the pizza is just a premade pizza from a grocery store shoved in an oven for 10 minutes and then they charge you 18 bucks (bastards!). Also, if you call when the damn delivery guy is out, no one else, apparently, can put the pizza in the oven, so you&#8217;ll have to wait until he gets back. You&#8217;ll probably want to check my restaurant guide at the bottom to find a better choice for the evening.</p>
<h2 class="with_underline">Day 2: Hanauma Bay ($60)</h2>
<p>This trip focuses around <a href="http://www.honolulu.gov/parks/facility/hanaumabay/welcome.htm">Hanauma Bay</a>. Since this place is closed on Tuesdays, make sure you schedule your trip appropriately. Waikiki has a bus designed to take you to Hanauma Bay. Just hop on the 22 (it comes once an hour) heading east towards Sandy Beach, which picks up frequently on Kuhio. The bus ride is about 45 minutes, but it&#8217;s well worth it. The bus will even drive you all the way into Hanauma Bay Nature Preserve, so you don&#8217;t even have to walk very far like at Diamond Head. It&#8217;s 5 bucks a person to get in, and you&#8217;ll have to watch a little orientation video because it&#8217;s a conservation area. The video is really cheesy and stupid, but it gives you a good chance to put your sunscreen on. They&#8217;ll let you out and you can walk down the big hill to get to the sandy bay. At the bottom they have restrooms, an education area and a snorkeling stand. You really want to rent the snorkeling stuff because it is absolutely amazing. The gear will run you about 6-11 bucks based on which kind you get. They run out of the cheap kind early in the day so be prepared to pay about 9 bucks. The more expensive kind is supposed to keep the water out better, which is good for contact wearers, so spending a bit more is probably best for everybody. Locker rentals are 5 bucks, so if you don&#8217;t want to pay for that be sure to leave valuables at the hotel.</p>
<p><a title="DSC00617 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3511438323/"><img src="http://farm4.static.flickr.com/3612/3511438323_a1963d3f4c.jpg" alt="DSC00617" width="500" height="375" /></a></p>
<p>The beach is spectacularly pretty and very relaxing. There will be a bunch of people, but it&#8217;s a large beach, so you can find a nice spot that&#8217;s not too crowded. The snorkeling was really fun and you&#8217;ll get to see some beautiful and colorful fish, a reef, and maybe even a sea turtle if you&#8217;re lucky. For a while it&#8217;s pretty shallow but you can go farther out and it gets pretty deep. That&#8217;s where you might run into a turtle. We had never gone snorkeling, so it was a bit weird at first but turned out to be one of the highlights of the trip.</p>
<p>One thing we didn&#8217;t know is you can go in and out of the park, so if you do rent a car, you can head back to it and bring you lunch down to the beach. You can still bring a picnic if you&#8217;re a bus rider, which would make a really lovely morning and afternoon. I didn&#8217;t realize that you could bring food in, but I definitely suggest packing a lunch and eating on the beach. You can go snorkeling, take a little break and suntan, eat lunch, take some pictures, and go snorkeling again.</p>
<p>You can probably just spend the whole day at Hanauma Bay. If you&#8217;re not into beaches for the whole day, you can head back to Waikiki and consider looking at my other suggestions at the bottom for other little things to do. We ended up eating at <a href="http://vitshawaiiansteakhouse.com/">Vit&#8217;s Hawaiian Steak House</a> in Waikiki (definitely worth stopping for the Macadamia nut pie) for lunch and <a href="http://maps.google.com/maps?hl=en&amp;client=safari&amp;rls=en-us&amp;ei=kH4KSpOrJ6GctgPf2K3fCA&amp;resnum=0&amp;um=1&amp;ie=UTF-8&amp;q=keoni+by+keo's&amp;near=Honolulu,+HI&amp;fb=1&amp;split=1&amp;gl=us&amp;cid=0,0,15751073846805421123&amp;ei=tH4KSqnlG530tAO1gdHpCA&amp;sa=X&amp;oi=local_result&amp;ct=image&amp;resnum=4">Keoni by Keo&#8217;s</a> for dinner (average Thai and American food and moderately priced). We spent the rest of the evening walking down Waikiki and on the beach. There&#8217;s a lot of excitement on Kalakaua at night. If you walk on the north side of the street (further from the beach), there are a bunch of street performers and vendors as well as dudes desperately trying to get you to come to a gun club.</p>
<h2 class="with_underline">Day 3: North Shore ($65)</h2>
<p>This is a day for getting up early cause you have a really long ride ahead of you, but it&#8217;s totally worth it. This is the one day I would suggest renting a car if you&#8217;re old enough/can afford it. It&#8217;s about a 45-minute car ride, and about 2 hour bus trip one way. Just remember all the money you&#8217;re saving by a bus pass though.</p>
<p>Anyways, you&#8217;ll catch a bus into downtown (either the A, B, 2, 13 or a few others). From there you&#8217;ll transfer over to the 52. It runs down Beretania downtown. Once you&#8217;re on the 52, you have a good chunk of time to sit back and read, but be sure to peak out the window every once in awhile and see the interesting vegetation all over Hawaii.</p>
<p>To break up this long drive as well as to have some fun, you might want to stop off at the <a href="http://www.dole-plantation.com/">Dole Plantation</a>. This is right on the 52 bus line, so you are not going out of you&#8217;re way at all. The bust stop is Kamehameha &amp; Dole Plantation. The Dole Plantation is a bit of a tourist trap surrounding the pineapple plant. They have a nice store with Hawaiian and Dole merchandise. They also have the world&#8217;s largest maze (think Harry Potter #4 and yes the maze walls move) that costs 6 bones. We wandered around for about an hour (make sure you bring some water) and still didn&#8217;t freaking find all the secret stations in the maze. It&#8217;s definitely a fun little thing to do, but after about an hour we were done. Keep an eye out for coupons in local free magazines because we found one for a buy one get one free entrance to the maze. They also have a train ride and a tour, but we had our share of Dole craziness. Except of course for the food. You&#8217;ll want to stand in line for the amazing Dole Whip. It&#8217;s pineapple ice cream, but it tastes more like sorbet, and it is delicious. It&#8217;s about 4 dollars, but it&#8217;s huge and will feed 2 people.</p>
<p><a title="DSC00679 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3528137368/"><img src="http://farm3.static.flickr.com/2156/3528137368_0e3423f6cd.jpg" alt="DSC00679" width="500" height="375" /></a></p>
<p>After that, just walk back outside and hop on the next 52 bus (they run every half hour) and continue heading towards the North Shore. We planned on heading to Sunset Beach known for its surfing, but because of a slight confusion we got off a few stops early and ended up at Ehukai beach, which was spectacular. It was not crowded at all, and had a beautiful view of bright blue water and sandy beaches. It&#8217;s essentially the beauty of the North Shore beaches without the insanity of little kids. Note that there is a pretty strong current here. We had a picnic at this beach, so if you skipped having one at Hanauma Bay, you might want to have one here. There&#8217;s even a grocery store a few stops before the beach.</p>
<p><a title="DSC00706 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3528140186/"><img src="http://farm3.static.flickr.com/2387/3528140186_ab65c801c8.jpg" alt="DSC00706" width="500" height="375" /></a></p>
<p>After awhile, you can get back on the 52, this time running the other direction and that will bring you back to Waimea Valley and Bay, which you originally passed. The bus will drop you off at the Kamehameha &amp; Waimea Valley Road stop. You can do either one first. We did the bay first, but we&#8217;d recommend doing the valley first.</p>
<p>To get to <a href="http://www.waimeavalley.net/">Waimea Valley</a>, you walk under a half-mile in to the visitor center, but it&#8217;s a really pretty walk. The valley costs 10 bucks per person. They have a lot of activities going on throughout the day like ancient Hawaiian games and lei making (these activities occur earlier on in the day, so the earlier you get there the better). The valley also has a very large and spread out botanical gardens, which will give you a nice sample of a lot of beautiful plants. You don&#8217;t have to actively seek out the gardens because you&#8217;ll see them as you walk the path towards Waimea Falls. Waimea Falls was the main attraction for us, mainly due to its <a href="http://www.lostvirtualtour.com/lost/filming_locations/waimeafalls/index.html">inclusion in Lost</a> (the waterfall where Kate and Sawyer find the briefcase and guns. Sorry for my mild Lost-nerdiness). It&#8217;s about a mile hike, but it&#8217;s longer if you want to walk through any of the side-gardens.  Once you get to the falls, you&#8217;ll have a picturesque photo spot, and you can even go swimming. It&#8217;s 30 feet deep, but they have free life jackets and there are lifeguards. The falls are really beautiful and envisioning you are Kate and Sawyer is pretty fun too.</p>
<p><a title="DSC00761 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3527333211/"><img src="http://farm3.static.flickr.com/2023/3527333211_a1248afa24.jpg" alt="DSC00761" width="500" height="366" /></a></p>
<p>You&#8217;ll also want to check out <a href="http://maps.google.com/maps?client=safari&amp;rls=en-us&amp;q=waimea%20bay&amp;oe=UTF-8&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;hl=en&amp;tab=wl">Waimea Bay</a>, which is just a little bit of a walk from the bus stop (in the direction heading back to downtown). The bay has a very nice view and an awesome current. It&#8217;s so powerful that it&#8217;ll move you up and down along the shore, and it&#8217;ll steal your swimsuit if you&#8217;re not careful. That all sounds bad but it&#8217;s a lot of fun like a rollercoaster.</p>
<p><a title="DSC00732 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3528147844/"><img src="http://farm3.static.flickr.com/2178/3528147844_16117457b4.jpg" alt="DSC00732" width="500" height="375" /></a></p>
<p>We headed to <a href="http://maps.google.com/maps?client=safari&amp;rls=en-us&amp;oe=UTF-8&amp;um=1&amp;ie=UTF-8&amp;q=north+shore+marketplace&amp;near=Honolulu,+HI&amp;fb=1&amp;split=1&amp;gl=us&amp;view=text&amp;latlng=17920916080618475633">North Shore Marketplace</a>, which is 5 minutes on the 52 bus back towards downtown. We ate at a really great Mexican restaurant called <a href="http://cholosmexican.com/">Cholo&#8217;s Homestyle Mexican</a> (great fish tacos and burritos made with fresh ahi). It&#8217;s definitely worth a stop. The mall around it has some unique shops with some cool Hawaiian gifts and there is a surfing museum.</p>
<p>And the one final thing of North Shore: the shaved ice.  If you head up Kamehameha back towards Waimea Bay this time, you&#8217;ll run into <a href="http://www.aokishaveice.com/">Aoki&#8217;s Shave Ice</a> and <a href="http://www.matsumotoshaveice.com/">Matsumoto&#8217;s Shave Ice</a> both on the left side of the street. Now if it&#8217;s before 6 and you don&#8217;t mind standing in line, then go to Matsumoto&#8217;s. It&#8217;s an experience. But if you&#8217;re impatient or happen to be arrive 2 minutes past 6 o&#8217;clock and the damn lady won&#8217;t serve you a freaking shaved ice after you&#8217;re long trek to North Shore and you&#8217;re specifically trying to get to this very Shave Ice stand, ah whatever, then you&#8217;ll want to go to Aoki&#8217;s just a minute away from Matsumoto&#8217;s. Both places have spectacular desserts (although it&#8217;s the most simple thing ever to make). Be sure you know what flavors you want and how to order because they want to move fast. You can get these sweet beans on your ice cream if you want. It&#8217;s definitely an interesting addition but not required. Also, it&#8217;s worth coughing up the extra 25 cents for the plastic container.</p>
<p><a title="DSC00780 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3527339379/"><img src="http://farm4.static.flickr.com/3299/3527339379_02c0bf4b93.jpg" alt="DSC00780" width="500" height="375" /></a></p>
<p>After all that, you&#8217;ll probably be tired and ready to crash. Hop the 52, the 88A, or the 62 (52 turns into the 62 later in the evening) back to downtown Honolulu. Take a transfer and you&#8217;re back to your hotel. Enjoy your bed.</p>
<h2 class="with_underline">Day 4: Zoo ($75)</h2>
<p>For an enjoyable and leisurely day after a long traveling to North Shore, I suggest starting the day off by hopping the 22 bus (runs once an hour on weekdays, twice an hour on weekends, but doesn&#8217;t travel on Tuesdays) down to the Monsarrat &amp; Kanaina stop. On your right in the little strip mall is <a href="http://maps.google.com/maps?hl=en&amp;client=safari&amp;rls=en-us&amp;um=1&amp;ie=UTF-8&amp;q=bogarts+cafe+and+espresso+bar&amp;near=Honolulu,+HI&amp;fb=1&amp;split=1&amp;gl=us&amp;cid=0,0,14262428234187767660&amp;ei=VhwJStmbD6WutAPMgcnjCA&amp;sa=X&amp;oi=local_result&amp;ct=image&amp;resnum=4">Bogart&#8217;s Café and Espresso Bar</a>. This is a great little local joint that offers a wide variety breakfast/brunch foods. Your choices range from bagel sandwiches to unique omelettes to smoothies to orgasm-inducing waffles (seriously, try the Nutella and strawberry waffles that are sprinkled with powdered sugar- don&#8217;t even bother with the syrup) and even sandwiches. Just make sure you bring cash and know they don&#8217;t have a public toilet. Food costs somewhere between 6 and 12 bucks and will keep you full until dinner.</p>
<p>Now having consumed 3 days worth of your calorie and intake in one sitting, head down Monsarrat one block to Leahi. At the corner on the right will be the Queen Kapiolani Gardens, a nice little garden filled with some native Hawaiian plants. It&#8217;s a nice early afternoon stroll. It only takes about 15 minutes, is free, and lets you sample some of Hawaii&#8217;s natural vegetation without dedicating an entire afternoon to the botanical gardens.</p>
<p><a title="DSC00789 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3528154722/"><img src="http://farm4.static.flickr.com/3550/3528154722_d54697fcb2.jpg" alt="DSC00789" width="500" height="375" /></a></p>
<p>Afterwards, you can head over to the zoo, which is just down the road at Paki and Kapahula. The <a href="http://www.honoluluzoo.org/">Honolulu Zoo</a> will set you back 8 bucks a person. Don&#8217;t expect the San Diego Zoo or anything, but you&#8217;ll see some humongous turtles and the other standard zoo fare. We were even stalked by a few wondering peacocks wandering freely. Spend a few hours and take some time to relax by looking at the animals. Just don&#8217;t be lame and take videos of all the animals. You&#8217;re not on a safari.</p>
<p><a title="DSC00795 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3528157194/"><img src="http://farm4.static.flickr.com/3363/3528157194_e849d10d00.jpg" alt="DSC00795" width="500" height="375" /></a></p>
<p>That was pretty much all we planned for the day, so if you&#8217;re in a leisurely mood take a nice walk down Waikiki beach back to your hotel or if you&#8217;re still feeling adventurous, stop by <a href="http://www.waquarium.org/">Waikiki Aquarium</a> or something like that.</p>
<p>Since we&#8217;d been saving money by eating cheaply, we decided to have one nicer meal in Waikiki. As recommended by a Hawaiian friend, we decided to head to <a href="http://www.arancino.com/">Arancino on Beachwalk</a>. The place is pretty small so you&#8217;ll probably want to make reservations (808-923-5557). Note that they only accept reservations between 5 and 6, so if you want to eat later than that, call ahead and get on the waiting list. It&#8217;s definitely worth it. The staff is friendly and funny, and the food is wonderful. We enjoyed the lasagna and the Owner&#8217;s Favorite Pizza (perhaps one of the most unique and tasty pizzas I have ever had). The portions are pretty large and there are a decent number of menu items that don&#8217;t exceed 20 bucks. You can splurge just a little.</p>
<h2 class="with_underline">Day 5: Manoa Falls ($170)</h2>
<p>If you&#8217;re really tight on cash, transportation for this day might run a little high, so you might need to modify it a bit for the bus. We wanted to get around the island and get a little wind on our faces. So we headed down to rent a 2-person moped from <a href="http://maps.google.com/maps?client=safari&amp;rls=en-us&amp;oe=UTF-8&amp;um=1&amp;ie=UTF-8&amp;q=mini+coupe+hawaii&amp;fb=1&amp;split=1&amp;gl=us&amp;cid=0,0,3253532850522168091&amp;ei=84IKSrzULpfisgPS7rTUCA&amp;sa=X&amp;oi=local_result&amp;ct=image&amp;resnum=1">Mini Coupe Hawaii</a>. I will describe our experiences with them in a future blog post. Let me say that it was a mixed experience, but overall it was quite a lot of fun. It does cost about 125 bucks though for a full day (8 hours).</p>
<p><a title="DSC00547 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3505917029/"><img src="http://farm4.static.flickr.com/3577/3505917029_cc4354ee93.jpg" alt="DSC00547" width="500" height="375" /></a></p>
<p>Our first stop was <a href="http://maps.google.com/maps?client=safari&amp;rls=en-us&amp;q=manoa+falls&amp;oe=UTF-8&amp;um=1&amp;ie=UTF-8&amp;split=0&amp;gl=us&amp;ei=XoMKSrncJqHYswOnjtTgCA&amp;sa=X&amp;oi=geocode_result&amp;ct=title&amp;resnum=1">Manoa Falls</a> (free entry and 5 bucks for parking). This is a nice, pretty easy hike a little less than a mile one way. It&#8217;ll take you through jungle and some bamboo, all the way up to a tall waterfall. The scenery and the views you get are gorgeous and well worth carrying a camera for.  You&#8217;ll want to wear good shoes because it might get muddy and has some rockier areas.</p>
<p><a title="DSC00514 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3506780506/"><img src="http://farm4.static.flickr.com/3631/3506780506_829f69b0c8.jpg" alt="DSC00514" width="500" height="375" /></a></p>
<p>After Manoa Falls, we decided to drive out to <a href="http://www.konabrewingco.com/">Kona Brewery</a> in Hawaii Kai. The drive there is nice, as you get to see a nice view of the water part of the way. The food is also really great and they have some awesome beers (note: we don&#8217;t endorse drinking and driving a mini coupe). The humus and the pizzas are great choices.</p>
<p>We continued out east. That&#8217;s where you get the really pretty drive (especially in the mini coupe). You&#8217;re driving at 35 mph with the wind in your face, it&#8217;s sunny out, and you have a beautiful view of the water.</p>
<p><a title="DSC00554 by ahdustin, on Flickr" href="http://www.flickr.com/photos/ahdustin/3506714566/"><img src="http://farm4.static.flickr.com/3241/3506714566_b5d90b70f9.jpg" alt="DSC00554" width="500" height="375" /></a></p>
<p>Along this drive there are a few nice lookouts to pull over at and take a few snapshots. We stopped when we got to <a href="http://maps.google.com/maps?hl=en&amp;q=Sandy%20Beach%20hawaii&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;tab=wl">Sandy Beach</a> and had a nice walk along the shore. You&#8217;ll really enjoy the sights from here and the water, swimming, and body surfing are great here.</p>
<p>We just grabbed a quick Subway for dinner (there are plenty around town for a quick cheap meal).</p>
<h2 class="with_underline">Other Fun Things</h2>
<ul>
<li><a href="http://www.primetimesportshawaii.com/pts-waterrentals.htm">Aqua Cycle</a>: Take a floating tricycle paddle boat out on the water.</li>
<li><a href="http://www.iolanipalace.org/">Iolani Palace</a> and the Capitol: See some history right in the middle of downtown.</li>
<li><a href="http://maps.google.com/maps?client=safari&amp;rls=en-us&amp;oe=UTF-8&amp;um=1&amp;ie=UTF-8&amp;q=fort+street+market&amp;near=Honolulu,+HI&amp;fb=1&amp;split=1&amp;gl=us&amp;ei=ZpEKStDyPJrqtQP14ajoCA&amp;sa=X&amp;oi=local_group&amp;resnum=4&amp;ct=image">Fort street farmer&#8217;s market</a>: Tuesdays and Fridays there is a market at Fort &amp; King. You can get fresh fruits and breads, jewelry, and other souvenirs.</li>
<li><a href="http://www.movietickets.com/house_detail.asp?house_id=10692">Movie at Kahala Mall</a>: Closest theater to Waikiki with a nice mall.</li>
<li><a href="http://www.hawaiinaturecenter.org/">Hawaii Nature Center</a>: Start of a few nice trails and hikes.</li>
<li><a href="http://www.sunsetonthebeach.net/">Sunset on the Beach</a>: Some Saturdays they play a movie on the beach at sunset.</li>
</ul>
<h2 class="with_underline">Food Suggestions</h2>
<ul>
<li><a href="http://maps.google.com/maps?client=safari&amp;rls=en-us&amp;oe=UTF-8&amp;um=1&amp;ie=UTF-8&amp;q=olive+tree+cafe&amp;near=Honolulu,+HI&amp;fb=1&amp;split=1&amp;gl=us&amp;view=text&amp;latlng=1940816457641509312">Olive Tree Café</a>: Pretty good Greek food near Kahala Mall. No credit cards.</li>
<li><a href="http://www.gordonbiersch.com/">Gordon Biersch</a>: Right on the waterfront. Good food.</li>
<li><a href="http://www.leostaverna.com/">Leo&#8217;s Taverna</a>: Greek food downtown.</li>
<li><a href="http://www.giovannipastrami.com/">Giovanni Pastrami</a>: Deli food and such in Waikiki.</li>
<li><a href="http://www.yardhouse.com/">The Yard House</a>: A bit pricey, but a great beer selection.</li>
<li><a hef="http://www.hyshawaii.com/">Hy&#8217;s Steak House</a>: Fancy steak house in Waikiki. Lost shooting location, too.</li>
</ul>
<h2 class="with_underline">Conclusion</h2>
<p>I hope this gives you a good starting point for planning your trip to Hawaii. Now you can save by not buying a Hawaiian guidebook, and put the extra money toward the Mini Coupe rental. If you have any comments or would like to add any ideas please feel free in the comments below.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbachrach?a=uOjvSAquauo:3HFggE4dgf8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=uOjvSAquauo:3HFggE4dgf8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=uOjvSAquauo:3HFggE4dgf8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbachrach?i=uOjvSAquauo:3HFggE4dgf8:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dbachrach/~4/uOjvSAquauo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dbachrach.com/blog/2009/05/hawaii-for-the-college-student-or-college-like-budget/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://dbachrach.com/blog/2009/05/hawaii-for-the-college-student-or-college-like-budget/</feedburner:origLink></item>
		<item>
		<title>Mashduo 1.0 Released</title>
		<link>http://feedproxy.google.com/~r/dbachrach/~3/J4vtA4SxNv0/</link>
		<comments>http://dbachrach.com/blog/2009/05/mashduo-10-released/#comments</comments>
		<pubDate>Fri, 01 May 2009 20:45:53 +0000</pubDate>
		<dc:creator>Dustin Bachrach</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://dbachrach.com/blog/?p=519</guid>
		<description><![CDATA[After a great experience, I&#8217;m proud to release my new application, Mashduo. This was really a terrific experience. I had this idea for an app to take me and my friends iTunes library, do some fancy magic, and then tell each of us what songs the other person has that we don&#8217;t. I thought it would be [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-520" style="float:right; margin-left:10px" title="Mashduo" src="http://dbachrach.com/blog/wp-content/uploads/2009/05/mashduo_icon_128_new.png" alt="Mashduo" width="128" height="128" />After a great experience, I&#8217;m proud to release my new application, <a href="http://mashduo.com">Mashduo</a>. This was really a terrific experience. I had this idea for an app to take me and my friends iTunes library, do some fancy magic, and then tell each of us what songs the other person has that we don&#8217;t. I thought it would be really useful, so I started brainstorming UI and writing up the code that checks both libraries and finds differences. </p>
<h2 class="with_underline">Algorithm</h2>
<p>Working on that algorithm was a lot of fun. I have some interesting tweaks in there to get the best results from the comparison. For instance, if you have:</p>
<blockquote><p>Gold Digger (Feat. Jamie Foxx) by Kanye West</p></blockquote>
<p>Or:</p>
<blockquote><p>Gold Digger (FT Jamie Foxx) by Kanye West</p></blockquote>
<p>They will be considered the same song. However, if you have:</p>
<blockquote><p>Gold Digger (Remix) by Kanye West</p></blockquote>
<p>This will be considered different since the Remix is really a different version. Same for &#8220;Live&#8221;, &#8220;Acoustic&#8221;, etc. I also had to debate a performance issue. There were two options: a single thread option and a multi-threaded approach. The single thread option would scan through Library A and find similarities. Any time a similarity was found, it would be removed from both Library A and B. Once library A was finished Library B would be traversed in the same way. The idea here is that when libraries that are very similar are compared, the loop through Library B would be much less. Some problems rose their heads. What if one library has 2 copies of the same song and the other library only has one? Then when we delete a copy from both, one library has a copy of the song and one doesn&#8217;t, so the program would say that this song is different even though its not. There are ways to get around it, but that involves a search through each library for duplicates which just raises execution time.</p>
<p>Instead, I went for the multi-threaded approach. On Thread 1, Library A looks for songs that Library B doesn&#8217;t have. On Thread 2, Library B looks for songs Library A doesn&#8217;t have. Since, all of our Macs have 2 core machines, this puts both to good use and results in great execution. Now, in this case we don&#8217;t get the advantage of removing similarities from the second search (because the second search is executing at the same time as the first). We could use a series of locks to do this, but the added speed benefit of reducing size of the second search might not outweigh the speed hits from locking, not to mention the ease for bugs to be introduced. So I took the multi-threaded read-only safe approach, and in my opinion it&#8217;s running fast enough. If you are a performance guru, I welcome you to hack at the code and make it even faster (it&#8217;s a fun challenge). The code is all open source and available <a href="http://mashduo.com/source/">here</a>.</p>
<h2 class="with_underline">The UI</h2>
<p>The UI was also a ton of fun. My girlfriend and I spent a lot of time mocking up designs and trying to perfect this to the best it could be. I think we have a pretty nice UI, but I&#8217;m always welcome to comments and suggestions. Here are some of the screenshots of the UI.</p>
<p><a href="http://dbachrach.com/blog/wp-content/uploads/2009/05/screen1.png"><img src="http://dbachrach.com/blog/wp-content/uploads/2009/05/screen1-215x300.png" alt="screen1" title="screen1" width="215" height="300" class="alignnone size-medium wp-image-521" /></a><br />
<a href="http://dbachrach.com/blog/wp-content/uploads/2009/05/screen2.png"><img src="http://dbachrach.com/blog/wp-content/uploads/2009/05/screen2-275x300.png" alt="screen2" title="screen2" width="275" height="300" class="alignnone size-medium wp-image-522" /></a><br />
<a href="http://dbachrach.com/blog/wp-content/uploads/2009/05/screen3.png"><img src="http://dbachrach.com/blog/wp-content/uploads/2009/05/screen3-300x213.png" alt="screen3" title="screen3" width="300" height="213" class="alignnone size-medium wp-image-523" /></a></p>
<p>For this project, I used up about half a notebook just playing with designs and formats, but I think in the end it paid off.</p>
<h2 class="with_underline">Post-Production</h2>
<p>After I got the code working and running functionally, I started working on the icon, which you saw at the top of this post. I am not a great graphics designer obviously, but this was by far my best icon (not that I&#8217;ve done too many). For professional projects, you have to get a good designer, but for open-source projects, there&#8217;s just really not the cash. I hope this was good enough.</p>
<p>And finally, we have the <a href="http://mashduo.com">website</a>. I haven&#8217;t done web design in forever, so this was a fun refresh to get back into it. The site is super simple both graphically and textually, but I think the simplicity works really well in its favor. I was originally planning on much more complexity, but once I got in Photoshop this popped out to me.</p>
<h2 class="with_underline">Overall</h2>
<p>Overall, I am phenomenally pleased with how this turned out. I want to thank Erin for all her suggestions and design tips. All the guys over at <a href="http://ilovephotos.com">iLovePhotos</a> for beta-testing, and you the user for downloading and spreading the word. I hope you guys really enjoy this program. I put a lot of work into fine tuning it, and I had tons of fun. I have some great ideas for new features and versions, so this is far from the last release. Enjoy and I would really appreciate if you twittered, friendfeeded, or whatever this so that lots of people can try it. Lastly, if you have any comments, suggestions, or whatever, you can comment below or send me an email to the Mashduo <a href="http://mashduo.com/help.html#email">support address</a>. Thanks for reading.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbachrach?a=J4vtA4SxNv0:NnPDyPE3BVs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=J4vtA4SxNv0:NnPDyPE3BVs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=J4vtA4SxNv0:NnPDyPE3BVs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbachrach?i=J4vtA4SxNv0:NnPDyPE3BVs:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dbachrach/~4/J4vtA4SxNv0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dbachrach.com/blog/2009/05/mashduo-10-released/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://dbachrach.com/blog/2009/05/mashduo-10-released/</feedburner:origLink></item>
		<item>
		<title>Making UUID’s in Cocoa</title>
		<link>http://feedproxy.google.com/~r/dbachrach/~3/CAFgrfdcln0/</link>
		<comments>http://dbachrach.com/blog/2009/03/making-uuids-in-cocoa/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 21:00:11 +0000</pubDate>
		<dc:creator>Dustin Bachrach</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbachrach.com/blog/?p=512</guid>
		<description><![CDATA[If you haven&#8217;t heard of Universally Unique Identifiers or (UUIDs), they are a way to make a unique identifier for anything (possibly your database entries) from different locations without having to use a central server to create unique identifiers. As an example, you might want to create a unique identifier of your user inside your [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t heard of <a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier">Universally Unique Identifiers</a> or (UUIDs), they are a way to make a unique identifier for anything (possibly your database entries) from different locations without having to use a central server to create unique identifiers. As an example, you might want to create a unique identifier of your user inside your Cocoa app that will never clash with any other user&#8217;s unique ID. You could create your own server and write a script that would generate a unique ID for each client, but this is a centralized approach and requires a network connection, is slower, and involves processing time on your server. Instead you can use UUID&#8217;s, which are created on the client machine.</p>
<p>To do this in Cocoa is fairly easy. We just need to drop down to the Carbon API&#8217;s, which can be difficult for beginners. Here&#8217;s how:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;">CFUUIDRef uuidRef <span style="color: #002200;">=</span> CFUUIDCreate<span style="color: #002200;">&#40;</span>kCFAllocatorDefault<span style="color: #002200;">&#41;</span>;
CFStringRef strRef <span style="color: #002200;">=</span> CFUUIDCreateString<span style="color: #002200;">&#40;</span>kCFAllocatorDefault, uuidRef<span style="color: #002200;">&#41;</span>;
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>uuidString <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithString<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>strRef<span style="color: #002200;">&#93;</span>;
CFRelease<span style="color: #002200;">&#40;</span>strRef<span style="color: #002200;">&#41;</span>;
CFRelease<span style="color: #002200;">&#40;</span>uuidRef<span style="color: #002200;">&#41;</span>;</pre></td></tr></table></div>

<p>Very simply, this creates a UUID, turns it into a string, and turns that Core Foundation string into an NSString. It then releases the memory of those two carbon objects. You will note that we just cast strRef as an NSString. This is toll-free bridging between CF and Cocoa going to work for you. If you have any questions or comments please feel free to comment below.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbachrach?a=CAFgrfdcln0:ygQl6qSxzNc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=CAFgrfdcln0:ygQl6qSxzNc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=CAFgrfdcln0:ygQl6qSxzNc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbachrach?i=CAFgrfdcln0:ygQl6qSxzNc:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dbachrach/~4/CAFgrfdcln0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dbachrach.com/blog/2009/03/making-uuids-in-cocoa/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://dbachrach.com/blog/2009/03/making-uuids-in-cocoa/</feedburner:origLink></item>
		<item>
		<title>Awful Experience Canceling Powweb Account</title>
		<link>http://feedproxy.google.com/~r/dbachrach/~3/JA1zoj7EmzE/</link>
		<comments>http://dbachrach.com/blog/2009/03/awful-experience-canceling-powweb-account/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 19:09:56 +0000</pubDate>
		<dc:creator>Dustin Bachrach</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbachrach.com/blog/?p=507</guid>
		<description><![CDATA[I transitioned from Powweb to MediaTemple over the last few days. I moved to MediaTemple mainly for a more reliable server, more professional hosting, better speeds, and to handle many domains in a better manner (plus the awesome control panel helped convinced me). I had really enjoyed my stay with Powweb, but it was just [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://dbachrach.com/blog/wp-content/uploads/2009/03/picture-3.png" alt="Powweb" title="Powweb" width="201" height="66" class="alignnone size-full wp-image-508" style="float:right; margin-left: 10px;" />I transitioned from <a href="http://www.powweb.com">Powweb</a> to <a href="http://mediatemple.com">MediaTemple</a> over the last few days. I moved to MediaTemple mainly for a more reliable server, more professional hosting, better speeds, and to handle many domains in a better manner (plus the awesome control panel helped convinced me). I had really enjoyed my stay with Powweb, but it was just growing pains and time to move.</p>
<p>I had planned to write a very nice review about Powweb and talk about my move to (mt), but I just had a less than satisfactory experience with Powweb today. Powweb allows you to sign up with a credit card and have it auto-renew. There is not an option in the control panel to disable auto-renewal. Once I had all my files transferred over to (mt) servers, I wanted to cancel my Powweb account. They make you talk to support to cancel your account, which entails the annoying questions like &#8220;why are you leaving?&#8221; and just the general hassle. I understand that though. They want one last chance to convince you not to leave.</p>
<p>I spoke with an agent named Hannah. I was very friendly and gave them a list of things that they could do to improve there services. I then asked for her to cancel my account so it does not auto-renew. After a few moments, she said my account would be cancelled in a couple of days, and I would receive an email about the confirmation. That email never came. I just assumed that it must have not managed to get to my email account. I logged in today to my Powweb account to see if there was any notice on my Powweb account of cancellation. There was nothing.</p>
<p>I decided to chat with the support team just to confirm that my account was cancelled. To my shock, it had not been. I asked the new agent whether there was a record of my conversation with Hannah. He said yes, but my account was not scheduled to be cancelled. If I had not checked in that day, my account would have been auto-renewed, and I would have no proof that I had asked for a cancellation.</p>
<p>The thing was, that my experience with the new agent was not much better. It was a pain to get him to understand that I wanted to cancel my account. Finally, I got him to cancel my service and send a confirmation notice.</p>
<p>I really enjoyed my hosting time with Powweb, but this has really soured the experience. It&#8217;s unacceptable to tell a customer their account is cancelled and they will not be billed, and then leave them to discover a line on their credit card for a charge from Powweb they thought they had cancelled.</p>
<p>I hope to leave this as a warning for other Powweb customers wishing to cancel their accounts. Make sure it really is cancelled. You don&#8217;t want an unexpected charge to creep up on you just because Powweb support didn&#8217;t do its job.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbachrach?a=JA1zoj7EmzE:NlE6eh7KhMM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=JA1zoj7EmzE:NlE6eh7KhMM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=JA1zoj7EmzE:NlE6eh7KhMM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbachrach?i=JA1zoj7EmzE:NlE6eh7KhMM:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dbachrach/~4/JA1zoj7EmzE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dbachrach.com/blog/2009/03/awful-experience-canceling-powweb-account/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://dbachrach.com/blog/2009/03/awful-experience-canceling-powweb-account/</feedburner:origLink></item>
		<item>
		<title>Moved to MediaTemple</title>
		<link>http://feedproxy.google.com/~r/dbachrach/~3/EH630gTPJVA/</link>
		<comments>http://dbachrach.com/blog/2009/03/moved-to-mediatemple/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 23:04:43 +0000</pubDate>
		<dc:creator>Dustin Bachrach</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dbachrach.com/blog/?p=502</guid>
		<description><![CDATA[Just moved my servers over to MediaTemple. Just confirming this is all working.]]></description>
			<content:encoded><![CDATA[<p>Just moved my servers over to MediaTemple. Just confirming this is all working.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbachrach?a=EH630gTPJVA:9EYSuZ3hQLY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=EH630gTPJVA:9EYSuZ3hQLY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=EH630gTPJVA:9EYSuZ3hQLY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbachrach?i=EH630gTPJVA:9EYSuZ3hQLY:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dbachrach/~4/EH630gTPJVA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dbachrach.com/blog/2009/03/moved-to-mediatemple/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://dbachrach.com/blog/2009/03/moved-to-mediatemple/</feedburner:origLink></item>
		<item>
		<title>How to Send an Email in Cocoa</title>
		<link>http://feedproxy.google.com/~r/dbachrach/~3/l_2bBC-BtFU/</link>
		<comments>http://dbachrach.com/blog/2009/03/how-to-send-an-email-in-cocoa/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 15:48:13 +0000</pubDate>
		<dc:creator>Dustin Bachrach</dc:creator>
				<category><![CDATA[Cocoa Code Snippet]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://dbachrach.com/blog/?p=501</guid>
		<description><![CDATA[There are a few ways to send email from a Cocoa app. A few frameworks let you directly send an email without the user ever having to do anything. In my development, I wanted to open Mail with a pre-constructed message and let the user edit the email in Mail before sending it. I had [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few ways to send email from a Cocoa app. A few frameworks let you directly send an email without the user ever having to do anything. In my development, I wanted to open Mail with a pre-constructed message and let the user edit the email in Mail before sending it. I had to make two tries at this to get it to work properly.</p>
<h2 class="with_underline">Initial Try</h2>
<p>I originally used a <em>mailto:</em> link to open Mail. The code looks something like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>encodedSubject <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;SUBJECT=%@&quot;</span>, <span style="color: #002200;">&#91;</span>subject stringByAddingPercentEscapesUsingEncoding<span style="color: #002200;">:</span>NSUTF8StringEncoding<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>encodedBody <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;BODY=%@&quot;</span>, <span style="color: #002200;">&#91;</span>body stringByAddingPercentEscapesUsingEncoding<span style="color: #002200;">:</span>NSUTF8StringEncoding<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>encodedTo <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>to stringByAddingPercentEscapesUsingEncoding<span style="color: #002200;">:</span>NSUTF8StringEncoding<span style="color: #002200;">&#93;</span>;
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>encodedURLString <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;mailto:%@?%@&amp;%@&quot;</span>, encodedTo, encodedSubject, encodedBody<span style="color: #002200;">&#93;</span>;
<span style="color: #400080;">NSURL</span> <span style="color: #002200;">*</span>mailtoURL <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span>encodedURLString<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSWorkspace</span> sharedWorkspace<span style="color: #002200;">&#93;</span> openURL<span style="color: #002200;">:</span>mailtoURL<span style="color: #002200;">&#93;</span>;</pre></td></tr></table></div>

<p>The above code is really simple. Essentially you take three strings <em>subject</em>, <em>body</em>, and <em>to</em> and escape them. You then formulate a <em>mailto:</em> url and open it. This is a very simple and clean approach, and I like it much more than what I ended up having to do.</p>
<h2 class="with_underline">The Problem</h2>
<p>The issue here actually lies not with Cocoa. I can&#8217;t find an knowledgeable source stating an exact number, but there appears to be some character limit at which Mail messages get cut off. This was unacceptable for me because I need to include long body messages. Instead, I turned to AppleScript.</p>
<h2 class="with_underline">The Solution</h2>
<p>I made a quick AppleScript that sends an email:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Mail&quot;</span>
	<span style="color: #0066ff;">make</span> <span style="color: #0066ff;">new</span> outgoing message <span style="color: #ff0033; font-weight: bold;">with</span> <span style="color: #0066ff;">properties</span> <span style="color: #000000;">&#123;</span>visible:<span style="color: #0066ff;">true</span>, subject:<span style="color: #009900;">&quot;a&quot;</span>, <span style="color: #0066ff;">content</span>:<span style="color: #009900;">&quot;b&quot;</span><span style="color: #000000;">&#125;</span>
	<span style="color: #0066ff;">activate</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></pre></td></tr></table></div>

<p>Moving it into Cocoa, I have:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSAppleScript</span> <span style="color: #002200;">*</span>mailScript;
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>scriptString<span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;tell application <span style="color: #2400d9;">\&quot;</span>Mail<span style="color: #2400d9;">\&quot;</span><span style="color: #2400d9;">\n</span>make new outgoing message with properties {visible:true, subject:<span style="color: #2400d9;">\&quot;</span>%@<span style="color: #2400d9;">\&quot;</span>, content:<span style="color: #2400d9;">\&quot;</span>%@<span style="color: #2400d9;">\&quot;</span>}<span style="color: #2400d9;">\n</span>activate<span style="color: #2400d9;">\n</span>end tell&quot;</span>,subject,body<span style="color: #002200;">&#93;</span>;
mailScript <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSAppleScript</span> alloc<span style="color: #002200;">&#93;</span> initWithSource<span style="color: #002200;">:</span>scriptString<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>mailScript executeAndReturnError<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>mailScript release<span style="color: #002200;">&#93;</span>;</pre></td></tr></table></div>

<p>The script is quite simple. I tells Mail to make a new message and fill in the message with our given properties. It then tells Mail to activate so the email becomes the main, key window. You might want to change this if you don&#8217;t want your application to lose focus when a user opts to send an email.</p>
<p>There is a small little bug that creeps its way in to this. Have you found it? If you have a subject or body string that contains a quote (&#8220;), then that will cause AppleScript to fail. To fix this just add a line like this above the previous code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span>body replaceOccurrencesOfString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;<span style="color: #2400d9;">\&quot;</span>&quot;</span> withString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;<span style="color: #2400d9;">\\</span><span style="color: #2400d9;">\&quot;</span>&quot;</span> options<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span> range<span style="color: #002200;">:</span>NSMakeRange<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #002200;">&#91;</span>body length<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;</pre></td></tr></table></div>

<p>That should do it. You should be able to launch a new Mail window with fields already populated. You can look through the AppleScript dictionary to find other properties you can set like who the email goes to and more. <strong>If you have any comments or other ways to do this, please feel free to comment below.</strong></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/dbachrach?a=l_2bBC-BtFU:eri6vaSXupg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=l_2bBC-BtFU:eri6vaSXupg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/dbachrach?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/dbachrach?a=l_2bBC-BtFU:eri6vaSXupg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/dbachrach?i=l_2bBC-BtFU:eri6vaSXupg:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/dbachrach/~4/l_2bBC-BtFU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://dbachrach.com/blog/2009/03/how-to-send-an-email-in-cocoa/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://dbachrach.com/blog/2009/03/how-to-send-an-email-in-cocoa/</feedburner:origLink></item>
	</channel>
</rss>
