<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Michael Luton is a software engineer living in the Bay Area. He currently works with Ruby on Rails in an Amazon Web Services environment.

He also created the iOS app Animal Sliding Flashcards for his 3-year-old daughter and hopes other parents will find it entertaining and educational as well.

</description><title>Sandmoose</title><generator>Tumblr (3.0; @sandmoose)</generator><link>http://sandmoose.com/</link><item><title>Coda 2 Impressions</title><description>&lt;p&gt;I played with the trial version of &lt;a href="http://www.panic.com/coda/"&gt;Coda 2&lt;/a&gt; for a few hours this morning. It&amp;#8217;s a very cool application. A great deal of craftsmanship and care went into making it. It&amp;#8217;s an amazing piece of software to behold. I&amp;#8217;d really &lt;strong&gt;like&lt;/strong&gt; to be able to switch to it for my everyday coding work. But as good as Coda 2 is I don&amp;#8217;t think it&amp;#8217;ll work out.&lt;/p&gt;

&lt;p&gt;Like the Coda 1, it&amp;#8217;s very centered around the concept of FTP sites. This is how all websites were maintained in the early days and many smaller sites are still maintained this way. This is not a criticism. It&amp;#8217;s a statement of fact. The workflow of editing locally and then transferring individual files to a server somewhere is an entirely appropriate and desirable workflow for many people. But not me. The heart of soul of Coda 2 is based on concepts and workflows which simply don&amp;#8217;t apply to me.&lt;/p&gt;

&lt;p&gt;Okay, can I ignore all the stuff I don&amp;#8217;t need and just use Coda 2 as solid lightweight code editor? Possibly. The code editor is really nice with Xcode style autocompletion and awesome CSS helpers. However, I have a couple of problems with the idea of using Coda 2 as just a code editor.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;d be paying for an extremely robust piece of software only to not use a lot of what makes it awesome to its core users. In this case, it&amp;#8217;s not lightweight since I&amp;#8217;d always be carrying around the other stuff I wouldn&amp;#8217;t use most of the time. This other stuff aren&amp;#8217;t just fluffy extras &amp;#8212; like most of the stuff in MS Word &amp;#8212; but critically important features to the users Coda 2 is targeted at. Which means I&amp;#8217;d be using Coda 2 in a way that goes against the way it was &lt;em&gt;intended&lt;/em&gt; to be used.&lt;/p&gt;

&lt;p&gt;In my experience, it&amp;#8217;s never a good idea to go against the grain with software applications. Meaning, it&amp;#8217;s a bad idea to adopt workarounds in order to use an application that wasn&amp;#8217;t originally intended to solve your problem. Sooner or later the experience will deteriorate because the developer may update the application in such a way that breaks your workaround. More importantly, over time the application may evolve in a direction that goes even further from your usage patterns. Thus, over time you may find yourself fighting the application more than being productive with it.&lt;/p&gt;

&lt;p&gt;For software you use everyday to make your living with it&amp;#8217;s especially important to choose applications which were &lt;em&gt;intended&lt;/em&gt; to solve your particular problems. Use applications which are optimized for your &lt;strong&gt;everyday use&lt;/strong&gt; rather than &lt;strong&gt;rare need&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So while Coda 2 is an amazing technological achievement and a case-study in amazing design and great user experience it&amp;#8217;s not suitable for me.&lt;/p&gt;</description><link>http://sandmoose.com/post/23690814009</link><guid>http://sandmoose.com/post/23690814009</guid><pubDate>Thu, 24 May 2012 14:22:25 -0700</pubDate><category>coda 2</category></item><item><title>iOS 6 Feature Requests</title><description>&lt;p&gt;As WWDC draws nears so does our first look at iOS 6. Here&amp;#8217;s a few things I&amp;#8217;d like to see.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;A redesigned Music app for the iPad. The existing one feels clunky and shallow. Considering the depth of apps like GarageBand, iPhoto, and iMovie on the iPad I think they could do a much better version of the Music app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Also, I really want iTunes Match to handle smart playlists. My entire music listening experience revolves around smart playlists.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The option to include videos in the Photo Stream. Yes, I&amp;#8217;m aware of the storage issues. I don&amp;#8217;t care how they address that. I just want to record video with my iPhone and edit with iMovie on my iPad without manually syncing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Developer Request:&lt;/strong&gt; I&amp;#8217;d like a button on the iPhone keyboard to dismisses the keyboard. The iPad keyboard has one. On the iPhone I have to put a UI element somewhere else on the screen &amp;#8212; typically a &amp;#8216;done&amp;#8217; button in the navigation bar &amp;#8212; to dismiss the keyboard. It would be really convenient if the iPhone keyboard could take care of dismissing itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Developer Request:&lt;/strong&gt; I&amp;#8217;d like more accurate font rendering for UIKit controls. I don&amp;#8217;t think many people know this but many UIKit controls like &lt;code&gt;UILabel&lt;/code&gt; and &lt;code&gt;UITextView&lt;/code&gt; use WebKit under the hood to render their text. Apparently, WebKit rendering is faster and uses less memory but is less accurate. I&amp;#8217;m currently working on a font catalog app where accurate font rendering is critical. The designer I&amp;#8217;m working with immediately noticed his fonts looked wrong. The solution is to use the low-level CoreText API and forego much of the niceties of UIKit. It would be really cool (for me) if iOS 6 switched to more accurate font rendering in UIKit controls.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://sandmoose.com/post/23656817363</link><guid>http://sandmoose.com/post/23656817363</guid><pubDate>Wed, 23 May 2012 21:41:30 -0700</pubDate></item><item><title>iTunes Playlist as a Timer</title><description>&lt;p&gt;Sometimes you want to work on a project but need to stop after to certain amount of time to do something else. You could set a timer on your iPhone. But that would be boring. If your activity is compatible with background music you can use an iTunes Smart Playlist as a timer. When the music&amp;#8217;s over, you&amp;#8217;ll know it&amp;#8217;s time to quit. Here&amp;#8217;s an example.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m3qaq1Pqta1qcnprg.png" alt="playlist timer"/&gt;&lt;/p&gt;

&lt;p&gt;The keys are those last checkboxes. The &amp;#8216;Limit to&amp;#8217; option allows you to limit the playlist to a certain amount of time. The &amp;#8216;selected by&amp;#8217; option allows you to choose songs randomly or by rating, play count, date of last play and bunch of other choices.&lt;/p&gt;

&lt;p&gt;This playlist won&amp;#8217;t come out to &lt;em&gt;exactly&lt;/em&gt; one hour but it gets within a minute or two which is good enough for me. If you want a different set of songs select them all (⌘-A) and hit delete. Because Live Updating is checked the playlist will automatically fill up with different songs.&lt;/p&gt;

&lt;p&gt;I have playlists for 15 minutes, 30 minutes, 45 minutes and 1 hour. Since I require musical accompaniment for practically everything I do these help keep me on schedule if I&amp;#8217;m time-bound.&lt;/p&gt;

&lt;p&gt;Now if iTunes Match could actually handle Smart Playlists&amp;#8230;&lt;/p&gt;</description><link>http://sandmoose.com/post/23506179018</link><guid>http://sandmoose.com/post/23506179018</guid><pubDate>Mon, 21 May 2012 16:05:16 -0700</pubDate></item><item><title>How to Type the Apple Command Symbol</title><description>&lt;p&gt;This character: ⌘. It&amp;#8217;s used a lot on the Mac. It&amp;#8217;d be nice to able put that symbol into a document. Here&amp;#8217;s how.&lt;/p&gt;

&lt;p&gt;Open the Keyboard preference panel. Make sure &amp;#8220;Show Keyboard &amp;amp; Character Viewers in menu bar&amp;#8221; is checked.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m3q92iFBka1qcnprg.png" alt="keyboard system preferences"/&gt;&lt;/p&gt;

&lt;p&gt;Select &amp;#8220;Character Viewer&amp;#8221; from the menu icon.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m3q93dwUjS1qcnprg.png" alt="character viewer"/&gt;&lt;/p&gt;

&lt;p&gt;In the resulting window select the &amp;#8220;gear&amp;#8221; button at the top left. Then select &amp;#8220;Customize List&amp;#8230;&amp;#8221;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m3q950zyLS1qcnprg.png" alt="customize"/&gt;&lt;/p&gt;

&lt;p&gt;Scroll down the list and make sure &amp;#8220;Technical Symbols&amp;#8221; is checked. It most likely isn&amp;#8217;t checked by default. Then select &amp;#8220;Technical Symbols&amp;#8221; in the list on the left.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m3q95mnv2I1qcnprg.png" alt="technical symbols"/&gt;&lt;/p&gt;

&lt;p&gt;It should be the first symbol in the upper left of the main part of the Character Viewer window. Double-click it to insert it into whatever document you&amp;#8217;re working on.&lt;/p&gt;

&lt;p&gt;If you don&amp;#8217;t want to go through the Character Viewer every time you want to insert the ⌘ symbol you can what I do. Add the ⌘ symbol to a document called &amp;#8216;scrap.txt&amp;#8217;. I usually have &lt;code&gt;scrap.txt&lt;/code&gt; open most of the time during the day anyway for short-lived notes. Alternatively, you could use &lt;a href="http://notational.net/"&gt;Notational Velocity&lt;/a&gt; and keep it as a note there. Copy-n-paste from that file whenever you need to.&lt;/p&gt;

&lt;p&gt;There&amp;#8217;s better ways of doing this for people who really need to type ⌘ a lot but that&amp;#8217;s my lo-fi approach.&lt;/p&gt;</description><link>http://sandmoose.com/post/23181605921</link><guid>http://sandmoose.com/post/23181605921</guid><pubDate>Wed, 16 May 2012 13:45:02 -0700</pubDate></item><item><title>Simple CoreText Example</title><description>&lt;p&gt;Here&amp;#8217;s a simple demonstration of how to use CoreText to draw text in an iOS application.&lt;/p&gt;

&lt;p&gt;The application consists of a &lt;code&gt;UIViewController&lt;/code&gt; and a &lt;code&gt;UIView&lt;/code&gt;. The view controller creates an instance of the view and adds it as a subview. The view uses CoreText to draw a string of text in it&amp;#8217;s &lt;code&gt;drawRect&lt;/code&gt; method. The &lt;code&gt;drawRect&lt;/code&gt; method is where all the interesting code is at.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;drawRect&lt;/code&gt; method is very heavily commented in an attempt to explain to myself how everything works. Hopefully, other people can benefit from this as well. Here&amp;#8217;s the basic rundown. This assumes a &lt;code&gt;NSMutableAttributedString&lt;/code&gt; instance variable named &lt;code&gt;string&lt;/code&gt; has been initialized in the view&amp;#8217;s &lt;code&gt;initWithFrame&lt;/code&gt; method. I&amp;#8217;m going to omit the typical &lt;code&gt;drawRect&lt;/code&gt; boilerplate code of saving the device context, flipping the coordinate plane, and any memory management in order to focus on the CoreText code. See the &lt;a href="https://github.com/mluton/SimpleCoreText"&gt;GitHub project&lt;/a&gt; for the complete implementation.&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;&lt;p&gt;Create a &lt;code&gt;CTFrameSetterRef&lt;/code&gt; object. The framesetter object contains the fully typeset string. But you can&amp;#8217;t use this to display it on screen. For that to happen you need to define the size and shape on the container it will be placed into. (The code below is ARC compliant hence the &lt;code&gt;__bridge&lt;/code&gt; cast. Omit the &lt;code&gt;__bridge&lt;/code&gt; cast for non-ARC projects.)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString((__bridge CFAttributedStringRef)string);
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In this simple example the size and shape of the container will be the boundaries of the view itself. This should be defined as a &lt;code&gt;CGPath&lt;/code&gt; because it is possible for text to exist within shapes other than basic rectangles.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;CGMutablePathRef path = CGPathCreateMutable();
CGPathAddRect(path, NULL, self.bounds);
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now that we have a framesetter object and the path in which it will be displayed we can create the &lt;code&gt;CTFrameRef&lt;/code&gt; object. This is what will be used to actually display the text on screen. The &lt;code&gt;CTFrameDraw&lt;/code&gt; is what actually draws the text.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;CTFrameRef textFrame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0,0), path, NULL);
CTFrameDraw(textFrame, ctx);
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Useful documentation includes Apple&amp;#8217;s &lt;a href="https://developer.apple.com/library/mac/#documentation/Carbon/Reference/CTFramesetterRef/Reference/reference.html"&gt;CTFrameSetter Reference&lt;/a&gt; and &lt;a href="https://developer.apple.com/library/mac/#documentation/Carbon/Reference/CTFrameRef/Reference/reference.html"&gt;CTFrame Reference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;View the complete &lt;a href="https://github.com/mluton/SimpleCoreText"&gt;GitHub project&lt;/a&gt;.&lt;/p&gt;</description><link>http://sandmoose.com/post/23112074886</link><guid>http://sandmoose.com/post/23112074886</guid><pubDate>Tue, 15 May 2012 11:10:12 -0700</pubDate></item><item><title>Google as the Internet's Address Bar</title><description>&lt;p&gt;Geeks often wonder why people type perfectly good domain names into the Google search box. Isn&amp;#8217;t that what the address bar is for? It turns out typing what you think is a perfectly good domain name into the address bar of your browser doesn&amp;#8217;t always take you where you want to go. Case in point: Simplenote.&lt;/p&gt;

&lt;p&gt;If you type &amp;#8220;simplenote.com&amp;#8221; into the address bar you&amp;#8217;ll see a site that doesn&amp;#8217;t have anything to do with the popular note taking app.&lt;/p&gt;

&lt;p&gt;However, if you type &amp;#8220;simplenote.com&amp;#8221; into the Google search box the first result is &lt;a href="http://simplenoteapp.com"&gt;simplenoteapp.com&lt;/a&gt; which is probably where you actually want to be.&lt;/p&gt;

&lt;p&gt;That&amp;#8217;s one example but there are many more like it. Next time you&amp;#8217;re looking at your Google Analytics don&amp;#8217;t be so quick to scoff at all the search engine referrals with &lt;code&gt;yourdomain.com&lt;/code&gt; as the search term. People have good reason to trust Google more than their address bar.&lt;/p&gt;</description><link>http://sandmoose.com/post/22796802218</link><guid>http://sandmoose.com/post/22796802218</guid><pubDate>Thu, 10 May 2012 13:59:26 -0700</pubDate></item><item><title>The OS X Sleep File</title><description>&lt;p&gt;I was browsing my filesystem with &lt;a href="http://www.daisydiskapp.com/"&gt;DaisyDisk&lt;/a&gt; this morning. While I love the speed of my SSD the 256&amp;#160;GB drive is rather tight and I find myself having to actively manage my storage more. Currently, I need to make sure I have enough room for &lt;a href="http://us.blizzard.com/en-us/games/d3/"&gt;Diablo III&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I noticed &lt;code&gt;/private/var/vm/sleepimage&lt;/code&gt; is taking up 8&amp;#160;GB on my system. Judging by the name of the file I thought I had a pretty good idea of what it was for. A quick Google search confirmed it. It&amp;#8217;s the entire contents of RAM at the time my Mac last went to sleep. OS X uses this file to restore itself to its previous state when waking up. You can safely delete this file but it&amp;#8217;ll only come back the next time your Mac goes to sleep.&lt;/p&gt;

&lt;p&gt;OS X Daily has &lt;a href="http://osxdaily.com/2010/10/11/sleepimage-mac/"&gt;more information&lt;/a&gt; on it. According to the comments it is possible to disable this functionality on a permanent basis but I&amp;#8217;m one of those &amp;#8220;go with the flow&amp;#8221; type of users so I&amp;#8217;ll keep it.&lt;/p&gt;</description><link>http://sandmoose.com/post/22766095694</link><guid>http://sandmoose.com/post/22766095694</guid><pubDate>Wed, 09 May 2012 22:03:20 -0700</pubDate></item><item><title>And the whole world shall live on Pacific time!</title><description>&lt;p&gt;Found this code in a project today.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Time.zone = ActiveSupport::TimeZone.all.find { |time_zone|
  (time_zone.name == "Pacific Time (US &amp;amp; Canada)")
}
&lt;/code&gt;&lt;/pre&gt;</description><link>http://sandmoose.com/post/22678738272</link><guid>http://sandmoose.com/post/22678738272</guid><pubDate>Tue, 08 May 2012 16:14:21 -0700</pubDate></item><item><title>On Why I Am Not Buying RubyMotion</title><description>&lt;a href="http://www.upbeat.it/2012/05/08/on-why-i-am-not-buying-rubymotion/"&gt;On Why I Am Not Buying RubyMotion&lt;/a&gt;: &lt;p&gt;This is a good article which clearly explains some of the disadvantages of using &lt;a href="http://www.rubymotion.com/"&gt;RubyMotion&lt;/a&gt;. Some of the arguments concerning support and documentation sound similar to my arguments for not &lt;a href="http://sandmoose.com/post/16872807565/covering-up-browser-languages"&gt;Covering Up Browser Languages&lt;/a&gt;.&lt;/p&gt;</description><link>http://sandmoose.com/post/22658240920</link><guid>http://sandmoose.com/post/22658240920</guid><pubDate>Tue, 08 May 2012 10:13:35 -0700</pubDate></item><item><title>Best Icon Ever :: ImageOptim</title><description>&lt;p&gt;This may be the best icon I&amp;#8217;ve ever seen for an application.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m3o0z2cefJ1qcnprg.png" alt="ImageOptim Icon"/&gt;&lt;/p&gt;

&lt;p&gt;The application, &lt;a href="http://imageoptim.com/"&gt;ImageOptim&lt;/a&gt;, is very cool too. Drag an image file onto its window and it will optimize it to make the file size smaller. The result is automatically saved in place of the original file. If you want to keep the original unoptimized version you should make a copy first. Alternatively, there&amp;#8217;s a preference option to backup originals before optimizing. If you keep the icon in your dock you can drag images to the icon and the app automatically opens and optimizes the selected images.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s an extremely low-friction way to quickly optimize images. It free but I&amp;#8217;d gladly pay a couple of bucks for this.&lt;/p&gt;</description><link>http://sandmoose.com/post/22598018446</link><guid>http://sandmoose.com/post/22598018446</guid><pubDate>Mon, 07 May 2012 11:56:37 -0700</pubDate><category>osx</category><category>imageoptim</category><category>icon</category></item><item><title>156 NBSPs</title><description>&lt;p&gt;I found this little gem in a template in my company&amp;#8217;s application today. It was written in 2011 by someone with the title of Senior Software Engineer. Seriously. I&amp;#8217;m not even kidding. This is real. It should come as no surprise this brain dead hack doesn&amp;#8217;t work with Mobile Safari and that&amp;#8217;s what I&amp;#8217;m tasked with fixing. I opened the template in my editor and saw this! One hundred and fifty-six non-breaking spaces. I had to cut some out for the purposes of this post.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;% else %&amp;gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;
&amp;lt;% end %&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I hung my head in exasperation for a couple of minutes before looking back up. It was still there. Somebody actually put this into a template in 2011. CSS exists for a reason. You might think a Senior Software Engineer who claims over 15-years of experience would ask someone if there was a better way to do this before pasting &lt;code&gt;&amp;amp;nbsp;&lt;/code&gt; 156 times.&lt;/p&gt;</description><link>http://sandmoose.com/post/22280451452</link><guid>http://sandmoose.com/post/22280451452</guid><pubDate>Wed, 02 May 2012 15:37:38 -0700</pubDate></item><item><title>iOS Simulator Location</title><description>&lt;p&gt;If you ever wanted to know where on your Mac the iOS Simulator application is located it&amp;#8217;s here.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Unless you&amp;#8217;re working with Xcode 4.3.2 or later of course. Recent version of Xcode is now a regular application in the Applications folder and related utilities are bundled in with the app package. You need to right-click Xcode.app and select &amp;#8216;Show Package Contents&amp;#8217;. Then the path to the simulator is here.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/Applications/Xcode.app/Contents//Developer/Platforms/
iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once iOS Simulator is running you can move its position in the Dock in order to make it stay in the Dock after you quit it. Then you can run the iOS Simulator by itself that way without going into the Xcode package. Of course, there may be other ways by creating aliases but the Dock is the way I&amp;#8217;ve done it for now.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s also called &lt;strong&gt;iOS Simulator&lt;/strong&gt; despite the fact &amp;#8216;iPhone&amp;#8217; exists in the path. You can always launch the iOS Simulator as a stand alone application with Spotlight. This can be useful for testing websites in Mobile Safari without having to look over/down at your device all day.&lt;/p&gt;</description><link>http://sandmoose.com/post/22266302926</link><guid>http://sandmoose.com/post/22266302926</guid><pubDate>Wed, 02 May 2012 11:57:00 -0700</pubDate><category>ios</category><category>mobile safari</category><category>iOS simulator</category></item><item><title>Microsoft Word is cumbersome, inefficient, and obsolete. It’s time for it to die. - Slate Magazine</title><description>&lt;a href="http://www.slate.com/articles/technology/technology/2012/04/microsoft_word_is_cumbersome_inefficient_and_obsolete_it_s_time_for_it_to_die_.single.html#pagebreak_anchor_2"&gt;Microsoft Word is cumbersome, inefficient, and obsolete. It’s time for it to die. - Slate Magazine&lt;/a&gt;: &lt;p&gt;&lt;a href="http://minimalmac.com/post/21032140498/microsoft-word-is-cumbersome-inefficient-and" class="tumblr_blog"&gt;minimalmac&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;A Word file is the story-fax of the early 21st century: cumbersome, inefficient, and a relic of obsolete assumptions about technology. It’s time to give up on Word.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(via my new Ace Boo from NOLA, Derek)&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://sandmoose.com/post/21032268567</link><guid>http://sandmoose.com/post/21032268567</guid><pubDate>Fri, 13 Apr 2012 10:58:40 -0700</pubDate></item><item><title>Trailers as Music Videos</title><description>&lt;p&gt;If the trailer for Wrath of the Titans were lengthened a bit and made the official music video for Marilyn Manson&amp;#8217;s Sweet Dreams it would be awesome music video. However, as a movie, I have no interest in it.&lt;/p&gt;</description><link>http://sandmoose.com/post/20193428583</link><guid>http://sandmoose.com/post/20193428583</guid><pubDate>Fri, 30 Mar 2012 16:22:26 -0700</pubDate></item><item><title>Lion’s Auto Save: If it ain’t broke, fix it</title><description>&lt;a href="http://www.betalogue.com/2012/03/27/lion-autosave-2/"&gt;Lion’s Auto Save: If it ain’t broke, fix it&lt;/a&gt;: &lt;p&gt;This article does a great job of pointing out some of the problems with Lion’s autosave feature. I very much agree there’s no reason for autosave and the Save As menu item to be mutually exclusive. The Duplicate menu item just doesn’t cut it for me.&lt;/p&gt;

&lt;p&gt;Another problem is how autosave is integrated with versions. I would very much like to just work in a document and not have to think about saving. At all. Period. But as soon as you start typing the title bar changes to have ‘Edited’ at the end. If I press ⌘S now what really happens is the current state of the document is tagged as a ‘version’. However, I don’t use versions and having ‘Edited’ in the title bar really bothers me. It makes me feel like the document is in an inconsistent state and I need to do something make it right. Like pressing ⌘S. It’s uncharacteristically inelegant for Apple software and something I really hope they address in Mountain Lion.&lt;/p&gt;</description><link>http://sandmoose.com/post/20131147200</link><guid>http://sandmoose.com/post/20131147200</guid><pubDate>Thu, 29 Mar 2012 13:51:00 -0700</pubDate><category>osx</category><category>lion</category><category>autosave</category></item><item><title>iOS: Adding a Nib-backed SubView to a View</title><description>&lt;p&gt;As simple as it may seem it may not be immediately obvious how to add a subview to a view and have that subview be backed by a nib file. Naturally, I created a dead-simple demonstration of exactly how to add a sub view to a view in an iOS application where the sub view is connected to a nib file.&lt;/p&gt;

&lt;p&gt;Note, you can use a &lt;code&gt;UIView&lt;/code&gt; object as a sub view but not a &lt;code&gt;UIViewController&lt;/code&gt; object. First, create a &lt;code&gt;UIView&lt;/code&gt; class. Unlike &lt;code&gt;UIViewController&lt;/code&gt; subclasses you won&amp;#8217;t have the option to create a nib file to go along with it. This is fine. Create the nib file by itself as a separate step. Open the nib file and go to the Identity Inspector for the top-level view object. Change the custom class to the corresponding view class you just previously created. For this example, place a &lt;code&gt;UILabel&lt;/code&gt; in the view and create an outlet for it in the corresponding view class. Now you can place this as a sub view in any view you want to and can change the label programmatically as well.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// Create an instance of UIView (FooView).
FooView *fooView = [[[NSBundle mainBundle] loadNibNamed:@"FooView" owner:self options:nil] objectAtIndex:0];

// Tell it where to go. Otherwise, it'll appear in the upper left corner.
fooView.frame = CGRectMake(10, 150, 300, 90);

// Modify the text of the label.
fooView.fooLabel.text = @"Modified Label Text";

// Actually add the subview.
[self.view addSubview:fooView];
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Using a nib file may be overkill if it contains nothing but a &lt;code&gt;UILabel&lt;/code&gt; but you can image how something more complex might be used in a real application. If you want to see this code in action check out the &lt;a href="https://github.com/mluton/SubViewWithNib"&gt;GitHub project&lt;/a&gt;.&lt;/p&gt;</description><link>http://sandmoose.com/post/20081391336</link><guid>http://sandmoose.com/post/20081391336</guid><pubDate>Wed, 28 Mar 2012 15:06:53 -0700</pubDate></item><item><title>Setting HTTP Expires Headers in Apache</title><description>&lt;p&gt;I don&amp;#8217;t do Apache configuration very often so when I do it I like to document what I did for future reference. Today I was asked to set an Expires header on some content so browsers wouldn&amp;#8217;t hold onto old copies for so long. First, you&amp;#8217;re going to need to know &lt;a href="http://sandmoose.com/post/19971702623/viewing-http-headers-in-safari-5-1"&gt;how to view content headers in Safari 5.1&lt;/a&gt; if you&amp;#8217;re using Safari.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;p&gt;Enable the &lt;code&gt;mod_expires&lt;/code&gt; module if it isn&amp;#8217;t already. The path may be different depending on your installation.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;LoadModule expires_module /usr/lib/apache2/modules/mod_expires.so&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I put this inside a directory block on my site&amp;#8217;s configuration. This way it&amp;#8217;ll only affect the files within a specific directory. If you use &lt;code&gt;.htaccess&lt;/code&gt; files then this configration would go in that.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;pre&gt;&lt;code&gt;
    ExpiresActive On
    ExpiresDefault "access plus 30 minutes"
    &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For other &lt;code&gt;ExpiresDefault&lt;/code&gt; options see &lt;a href="http://httpd.apache.org/docs/2.0/mod/mod_expires.html"&gt;Apache&amp;#8217;s documentation&lt;/a&gt;.&lt;/p&gt;</description><link>http://sandmoose.com/post/20051114459</link><guid>http://sandmoose.com/post/20051114459</guid><pubDate>Tue, 27 Mar 2012 22:05:39 -0700</pubDate></item><item><title>Viewing HTTP Headers in Safari 5.1</title><description>&lt;p&gt;Apple changed where you go to view HTTP headers with Safari 5.1.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Go to Preferences -&amp;gt; Advanced and check &amp;#8216;Show Develop menu in menu bar&amp;#8217; if it isn&amp;#8217;t already.&lt;/li&gt;
&lt;li&gt;Choose Develop | Show Web Inspector from the Safari menu.&lt;/li&gt;
&lt;li&gt;Select the Network tab in the Web Inspector pane.&lt;/li&gt;
&lt;li&gt;In the left column choose the resource you&amp;#8217;re interested in.&lt;/li&gt;
&lt;li&gt;In the right portion of the window select the &amp;#8216;Headers&amp;#8217; tab if it isn&amp;#8217;t already.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://sandmoose.com/post/19971702623</link><guid>http://sandmoose.com/post/19971702623</guid><pubDate>Mon, 26 Mar 2012 14:47:14 -0700</pubDate></item><item><title>Apparently, I’m working blue this evening.</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_m0zz7eoqFN1qccx92o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Apparently, I’m working blue this evening.&lt;/p&gt;</description><link>http://sandmoose.com/post/19790265953</link><guid>http://sandmoose.com/post/19790265953</guid><pubDate>Fri, 23 Mar 2012 11:40:03 -0700</pubDate><category>blue icons</category><category>xcode</category></item><item><title>Data Integrity</title><description>&lt;p&gt;Databases have the ability to enforce data integrity rules for a reason. One application is not the only thing that can affect data in a database. If you depend solely on application logic to enforce data integrity you&amp;#8217;re setting yourself up for problems later.&lt;/p&gt;</description><link>http://sandmoose.com/post/19745482556</link><guid>http://sandmoose.com/post/19745482556</guid><pubDate>Thu, 22 Mar 2012 13:50:04 -0700</pubDate><category>data integrity</category><category>databases</category></item></channel></rss>

