<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
  xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>inessential.com</title>
    <link>http://inessential.com/</link>
    <description>Brent Simmons’s weblog.</description>
    <item>
      <title>NGMoviePlayer - AVFoundation-based video player</title>
      <link>http://inessential.com/2010/08/19/ngmovieplayer_avfoundation-based_video</link>
      <description>&lt;p&gt;I put up on bitbucket &lt;a href=&quot;http://bitbucket.org/brentsimmons/ngmovieplayer/src&quot;&gt;NGMoviePlayer&lt;/a&gt; — it uses AVFoundation to play movies. It does some of what MPMoviePlayerControllerView does.&lt;/p&gt;

&lt;p&gt;(I had to write a custom movie player because of a bug in iOS 4 where after you play a movie that’s embedded in a UIWebView, MPMoviePlayerController won’t work as expected: it plays just a few frames and then automatically pauses the movie. &amp;lt;&lt;a href=&quot;radr://8326264&quot;&gt;radr://8326264&lt;/a&gt;&amp;gt;)&lt;/p&gt;

&lt;p&gt;In writing this code I used a few things that were new to me: AVFoundation, blocks, and UIGestureRecognizer. (I got to do some learnin’, in other words.) (I still have to support older OSes with most of my code, and sometimes it takes a while before I get to use the cool new stuff.)&lt;/p&gt;

&lt;p&gt;Side note: one of the interesting things about AVFoundation is that the headers say it will be available for Mac OS X 10.7.&lt;/p&gt;

&lt;p&gt;Anyway... if this helps somebody out there at some point, then cool.&lt;/p&gt;</description>
      <pubDate>Thu, 19 Aug 2010 11:59:50 -0700</pubDate>
      <guid>http://inessential.com/2010/08/19/ngmovieplayer_avfoundation-based_video</guid>
      <dc:date>2010-08-19T11:59:50-07:00</dc:date>
    </item>
    <item>
      <title>My personal VisiCalc moment</title>
      <link>http://inessential.com/2010/08/09/my_personal_visicalc_moment</link>
      <description>&lt;p&gt;Every successful computing platform has to have a “VisiCalc moment” — the moment it goes from fun toy and technology demo to “holy crap this thing is &lt;em&gt;useful&lt;/em&gt;.”&lt;/p&gt;

&lt;p&gt;For the Apple II Plus that moment came the first time people saw VisiCalc. Imagine never having seen a spreadsheet on a computer — imagine always having done that stuff by hand. Then, for the first time, you enter some numbers and formulas into a computer and watch it calculate. Then edit some numbers and watch it &lt;em&gt;re&lt;/em&gt;calculate. Pure magic. PFM.&lt;/p&gt;

&lt;p&gt;I don’t think there’s a single VisiCalc moment that everyone will have for the iPad — but, for me personally, it was &lt;a href=&quot;http://www.omnigroup.com/products/omnifocus-ipad/&quot;&gt;OmniFocus&lt;/a&gt;. That’s when my iPad went from toy to indispensable tool (oh, but still a fun toy, too).&lt;/p&gt;

&lt;p&gt;Before OmniFocus, my iPad wandered around my desks without a real place. Now it has a place right next to my dev machine’s keyboard.&lt;/p&gt;</description>
      <pubDate>Mon, 09 Aug 2010 22:40:29 -0700</pubDate>
      <guid>http://inessential.com/2010/08/09/my_personal_visicalc_moment</guid>
      <dc:date>2010-08-09T22:40:29-07:00</dc:date>
    </item>
    <item>
      <title>Flexibility and power</title>
      <link>http://inessential.com/2010/08/09/flexibility_and_power</link>
      <description>&lt;p&gt;Whenever I think about new (or old) features in software, I think about whether they’re &lt;em&gt;flexibility&lt;/em&gt; or &lt;em&gt;power&lt;/em&gt; features.&lt;/p&gt;

&lt;p&gt;They’re different things. Flexibility is the ability to change how software works; power is the ability to do more with less effort.&lt;/p&gt;

&lt;p&gt;There’s a complicated relationship between the two things. Sometimes flexibility may add to power — if I could just make these things green, my eye could pick them out more easily, and I’d get my work done more quickly.&lt;/p&gt;

&lt;p&gt;But flexibility detracts from power just as often — or more often. Flexibility is an &lt;em&gt;invitation&lt;/em&gt;. It says, “Hey, futz with this. And this. And this. You’re not getting anything done, but at least you kind of have the illusion of doing something.”&lt;/p&gt;

&lt;p&gt;One thing I love about iPhone and iPad apps is that they have to be designed for power. There’s just not enough conceptual canvas space for a ton of flexibility.&lt;/p&gt;

&lt;p&gt;And I think people who use software — which includes you and me and everybody reading this — are learning to value power over flexibility. In part because of iOS apps, and in part because our attentions are further disintegrated and we have less time for each app.&lt;/p&gt;

&lt;p&gt;How many more apps do you use now than you did five years ago? You used to get by with email and chat — then you added Twitter and Facebook. And an iPhone and screenfuls of more apps. And an iPad and more screenfuls.&lt;/p&gt;

&lt;p&gt;You don’t spend your time skinning your audio player anymore, in other words. You just play music. And you do other things while the music’s playing.&lt;/p&gt;

&lt;p&gt;It may go against the grain a little bit, but I’ll say it: I’m incredibly excited for the future of Mac software. I don’t expect we’ll make software that looks and feels like iOS apps (we shouldn’t), but I do expect we’ll learn from iOS apps how &lt;em&gt;power&lt;/em&gt; is the real goal, and that flexibility is just a tool to use exceedingly sparingly, only when it substantially increases power.&lt;/p&gt;</description>
      <pubDate>Mon, 09 Aug 2010 20:31:49 -0700</pubDate>
      <guid>http://inessential.com/2010/08/09/flexibility_and_power</guid>
      <dc:date>2010-08-09T20:31:49-07:00</dc:date>
    </item>
    <item>
      <title>RSTwitterCallGetXAuthAccessToken</title>
      <link>http://inessential.com/2010/08/02/rstwittercallgetxauthaccesstoken</link>
      <description>&lt;p&gt;&lt;a href=&quot;http://bitbucket.org/brentsimmons/rstwittercallgetxauthaccesstoken/src&quot;&gt;I put up some sample code&lt;/a&gt; for getting an OAuth access token when calling https://api.twitter.com/oauth/access_token (for xAuth clients).&lt;/p&gt;

&lt;p&gt;I was having trouble getting this working, so I wrote a one-.m-file, easy-to-debug class so I could make it work. It’s not meant to be used as-is, but it might be helpful to other folks writing apps that talk to Twitter.&lt;/p&gt;</description>
      <pubDate>Mon, 02 Aug 2010 12:51:37 -0700</pubDate>
      <guid>http://inessential.com/2010/08/02/rstwittercallgetxauthaccesstoken</guid>
      <dc:date>2010-08-02T12:51:37-07:00</dc:date>
    </item>
    <item>
      <title>Static analyzer rules (for me)</title>
      <link>http://inessential.com/2010/07/05/static_analyzer_rules_for_me_</link>
      <description>&lt;p&gt;I so adore Build and Analyze.&lt;/p&gt;

&lt;p&gt;I’ve developed a small set of rules I follow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Always&lt;/em&gt; run static analysis. There’s a project setting called Run Static Analyzer — if you set it to true, it will always run the analyzer when you build the project. So I set it to true.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the static analyzer finds a problem, I immediately add a &lt;code&gt;TODO&lt;/code&gt; comment with a quick note about what needs to be done. Even if I think I’m going to fix it right away. (Because the phone might ring, cat might need dinner, and I’ll forget.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the static analyzer finds a false positive, I immediately add a comment along the lines of &lt;code&gt;//Static analyzer false positive&lt;/code&gt;. This way I don’t waste time on it later, and nobody else does, either. (Ideally there’s an explanation, too, if it’s not self-evident.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;But I still consider a false positive a kind of warning. It’s a good sign that something too clever (in a bad way) is going on. So, if I think I should — and I usually should — I also add a &lt;code&gt;TODO&lt;/code&gt; comment about revising whatever it was that triggered the false positive.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The goal is, as with errors and warnings, a completely clean bill of health.&lt;/p&gt;</description>
      <pubDate>Mon, 05 Jul 2010 15:15:18 -0700</pubDate>
      <guid>http://inessential.com/2010/07/05/static_analyzer_rules_for_me_</guid>
      <dc:date>2010-07-05T15:15:18-07:00</dc:date>
    </item>
    <item>
      <title>Follow up to memory management thing</title>
      <link>http://inessential.com/2010/06/28/follow_up_to_memory_management_thing</link>
      <description>&lt;p&gt;In the &lt;a href=&quot;http://inessential.com/2010/06/28/how_i_manage_memory&quot;&gt;previous post&lt;/a&gt; I have an initWithString method that looks like this:&lt;/p&gt;

&lt;pre&gt;- (id)initWithString:(NSString *)aString {
    self = [super init];
    if (self == nil)
        return nil;
    something = [aString retain];
    return self;
}&lt;/pre&gt;


&lt;p&gt;I knew, as I was typing it, that I’d get some feedback along the lines that I should use &lt;em&gt;copy&lt;/em&gt; instead of &lt;em&gt;retain&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And I did.&lt;/p&gt;

&lt;p&gt;And it’s excellent advice, totally, no question. The reason to use &lt;code&gt;copy&lt;/code&gt; instead of &lt;code&gt;retain&lt;/code&gt; is because it enforces the expected immutability of that incoming string, so the caller is free to change it in case it’s really a mutable string.&lt;/p&gt;

&lt;p&gt;However, I don’t follow that advice. One reason is that, in my eight years of Cocoa programming, this has never been an issue. Not once have I run into a problem because I used &lt;code&gt;retain&lt;/code&gt; instead of &lt;code&gt;copy&lt;/code&gt; in a case like this.&lt;/p&gt;

&lt;p&gt;The second reason is that I consider the use of &lt;code&gt;copy&lt;/code&gt; here a case of overly-defensive programming. The effect would be to hide a bug, if one exists, and I wouldn’t want that.&lt;/p&gt;

&lt;p&gt;Given those two reasons, it’s just bonus that using &lt;code&gt;retain&lt;/code&gt; means avoiding the extra allocation that using &lt;code&gt;copy&lt;/code&gt; would mean — but I’ll take that bonus.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update 5:24 pm:&lt;/em&gt; Yes, &lt;em&gt;copy&lt;/em&gt; returns &lt;em&gt;self&lt;/em&gt; for immutable objects. (All the time, at least for Foundation objects? I don’t know.) So, no bonus in those cases. But I myself often pass mutable objects where immutable is expected. So I get the bonus. (And it’s not a bug on my part, no.)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update 5:41 pm:&lt;/em&gt; OK, why do I consider it a bug if aString is really a mutable string &lt;em&gt;and&lt;/em&gt; I change it elsewhere? It’s totally legal if aString is really an NSMutableString. I do things like that all the time. But I code as if there’s an implicit contract: any Foundation objects (strings, dictionaries, arrays, sets, etc.) passed between objects must be treated as if immutable. If the object that receives the object wants to do something based on aString, it may, indeed, then have to make a mutableCopy or whatever. And if aString was really a mutable string, the caller has to not change it from that point on.&lt;/p&gt;

&lt;p&gt;Why do I code this way? It simplifies things. It removes doubt.&lt;/p&gt;</description>
      <pubDate>Mon, 28 Jun 2010 13:41:04 -0700</pubDate>
      <guid>http://inessential.com/2010/06/28/follow_up_to_memory_management_thing</guid>
      <dc:date>2010-06-28T13:41:04-07:00</dc:date>
    </item>
    <item>
      <title>How I Manage Memory</title>
      <link>http://inessential.com/2010/06/28/how_i_manage_memory</link>
      <description>&lt;p&gt;I’ve noticed, in looking at other people’s Cocoa code over the years, that sometimes people still do weird things with retain, release, and autorelease — as if they’re not quite sure on the basics of memory management yet.&lt;/p&gt;

&lt;p&gt;So I thought I’d talk about how I do things. There are three important points, then a practical explanation of one of them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Overall memory use is a design issue. It’s not usually a case of over-using autorelease or something like that. (For instance: are all your objects in memory at all times, or do you use something like Core Data so you don’t have to do that?)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Memory management — the nuts and bolts of making sure you don’t leak or over-release — should be as simple as possible and done in the same way every time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The exceptions to #2 should be done only as a result of profiling in Shark and Instruments.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;h4&gt;Practical explanation of #2&lt;/h4&gt;


&lt;p&gt;I find not-leaking and not-over-releasing very, very easy. That’s because I have a simple system, and I do things the same way every time, except when profiling tells me I need to make an exception. (Which is rare.)&lt;/p&gt;

&lt;p&gt;Here’s what I do:&lt;/p&gt;

&lt;p&gt;I use properties, and I use the full form: &lt;code&gt;self.something&lt;/code&gt; and &lt;code&gt;self.something = whatever&lt;/code&gt;. I try to avoid custom accessor methods, just use the standard synthesized methods.&lt;/p&gt;

&lt;p&gt;I don’t use the full form in &lt;code&gt;init&lt;/code&gt; and &lt;code&gt;dealloc&lt;/code&gt;, though, because it might trigger KVO or have other side effects.&lt;/p&gt;

&lt;p&gt;So a made-up class might look like this:&lt;/p&gt;

&lt;pre&gt;
@interface BSThing : NSObject {
@private
    NSString *something;
}

- (id)initWithString:(NSString *)aString;

@property (nonatomic, retain) NSString *something;

@end

@implementation BSThing

@synthesize something;

- (id)initWithString:(NSString *)aString {
    self = [super init];
    if (self == nil)
        return nil;
    something = [aString retain];
    return self;
}

- (void)dealloc {
    [something release];
    [super dealloc];
}


- (void)someRandomMethodThatDoesStuff {
    //Let's just change something
    self.something = @&quot;Something else&quot;;
}

@end
&lt;/pre&gt;


&lt;p&gt;Make sense? Outside of &lt;code&gt;init&lt;/code&gt; and &lt;code&gt;dealloc&lt;/code&gt;, access is always via &lt;code&gt;self.something&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There are two other things I do:&lt;/p&gt;

&lt;h4&gt;Pretty much create everything as autoreleased&lt;/h4&gt;


&lt;p&gt;Seriously. I almost never write code like this:&lt;/p&gt;

&lt;pre&gt;
NSMutableDictionary *dict = &amp;#91;[NSMutableDictionary alloc] init];
//do something with dict
[dict release];
&lt;/pre&gt;


&lt;p&gt;It’s more code and it complicates things and it’s easy to make mistakes. I get confused. I don’t understand at-a-glance that the code is correct. I know there is advice to avoid &lt;code&gt;autorelease&lt;/code&gt; on iPhone — but you already know you can’t avoid it, and I’ve found that any drawbacks by use of &lt;code&gt;autorelease&lt;/code&gt; are over-shadowed by other issues.&lt;/p&gt;

&lt;p&gt;So here’s what I always write:&lt;/p&gt;

&lt;pre&gt;
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
//do something with dict, completely un-worried about leaking it.
//I can even return early.
&lt;/pre&gt;




&lt;h4&gt;Autorelease pools&lt;/h4&gt;


&lt;p&gt;One exception to the above is, of course, when you’re doing a bunch of allocations in a loop. Then I will use an inner &lt;code&gt;autorelease&lt;/code&gt; pool. I won’t do that crazy thing where you make it drain every 10 times or whatever — I’ll drain it in each pass. Simpler — and no reason to change that unless Shark or Instruments says to change it.&lt;/p&gt;

&lt;p&gt;I’ve been doing it that way since reading Mike Ash’s article &lt;a href=&quot;http://www.mikeash.com/pyblog/autorelease-is-fast.html&quot;&gt;Autorelease is Fast&lt;/a&gt;. Though, obviously, it’s not as fast on iPhone, it’s still probably faster than you think it is.&lt;/p&gt;

&lt;h4&gt;Recap: my simple rules&lt;/h4&gt;


&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Use properties, and use synthesized accessors as much as possible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Always use the &lt;em&gt;self.something&lt;/em&gt; form — no direct access to ivars, except in &lt;code&gt;init&lt;/code&gt; and &lt;code&gt;dealloc&lt;/code&gt;, where &lt;em&gt;only&lt;/em&gt; direct access is allowed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create temporary objects, or objects that get returned by a method, as autoreleased.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use autorelease pools as needed, but don’t try anything fancy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Profile in Shark and Instruments, and make exceptions to the above only when it makes a real difference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Consider that your overall memory use issues are probably design issues, not (usually) code issues.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Following these rules, writing Cocoa code is damn close to scripting.&lt;/p&gt;</description>
      <pubDate>Mon, 28 Jun 2010 12:19:59 -0700</pubDate>
      <guid>http://inessential.com/2010/06/28/how_i_manage_memory</guid>
      <dc:date>2010-06-28T12:19:59-07:00</dc:date>
    </item>
    <item>
      <title>Casual</title>
      <link>http://inessential.com/2010/06/24/casual</link>
      <description>&lt;p&gt;I’m not sure what relative this is, but I love the picture’s Alfred E. Neuman vibe.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://inessential.com/images/allgoodhereyep.jpg&quot; alt=&quot;All’s good here, yep&quot; width=&quot;356&quot; height=&quot;375&quot; /&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 24 Jun 2010 11:30:12 -0700</pubDate>
      <guid>http://inessential.com/2010/06/24/casual</guid>
      <dc:date>2010-06-24T11:30:12-07:00</dc:date>
    </item>
    <item>
      <title>Road to beach</title>
      <link>http://inessential.com/2010/06/24/road_to_beach</link>
      <description>&lt;p&gt;My great-grandmother (on left) and her sisters (I think) on the road to the beach in New Jersey. Click thumbnail for bigger version.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://inessential.com/images/roadtobeach.jpg&quot;&gt;&lt;img src=&quot;http://inessential.com/images/roadtobeach_thumb.png&quot; alt=&quot;Road to beach&quot; height=&quot;160&quot; width=&quot;313&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 24 Jun 2010 11:18:39 -0700</pubDate>
      <guid>http://inessential.com/2010/06/24/road_to_beach</guid>
      <dc:date>2010-06-24T11:18:39-07:00</dc:date>
    </item>
    <item>
      <title>Put weblogs on bitbucket</title>
      <link>http://inessential.com/2010/06/18/put_weblogs_on_bitbucket</link>
      <description>&lt;p&gt;I’ve moved the repositories for inessential.com and ranchero.com to bitbucket and made them public read-only.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://bitbucket.org/brentsimmons/ranchero.com/overview&quot;&gt;ranchero.com repository&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://bitbucket.org/brentsimmons/inessential.com/overview&quot;&gt;inessential.com repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s just the raw stuff that gets rendered into weblog posts — it’s not the rendering scripts. There’s no actual software. Just a bunch of words.&lt;/p&gt;

&lt;p&gt;Not sure why I did this. Maybe just because I could. But sometimes big bunches of text can be useful for somebody somewhere.&lt;/p&gt;

&lt;p&gt;The actual posts are in the posts directory. Older posts are HTML, newer posts are written in &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt;. The lines at the top of each post that start with a @ character are metadata. Stuff between &amp;#91;[ and ]] are macros. Stuff between &amp;#91;[= and ]] are includes (grabbed from Snippets folder).&lt;/p&gt;

&lt;p&gt;I wrote about my system in early 2009 &lt;a href=&quot;http://inessential.com/2009/01/30/new_publishing_system_tour_of_my_head&quot;&gt;here&lt;/a&gt;. I’ve been quite happy with it. To restate the advantages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Static HTML pages are &lt;em&gt;fast&lt;/em&gt;. I don’t have to worry about getting Fireballed. :) And they’re easily portable, if I ever have to change web hosts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Static RSS feeds are fast too, which is good because they get requested a lot.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Having source control is especially nice when I’m working on templates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Having source control is great for offsite backups. (I was using Dropbox before I switched to bitbucket. I’ll probably still keep a backup on Dropbox, just because.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Being able to search through my weblogs on my desktop using Spotlight or &lt;a href=&quot;http://betterthangrep.com/&quot;&gt;ack&lt;/a&gt; is very convenient. (Okay, I admit I use ack mostly.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The system can generate a local preview version, so I can render my site just on my machine and look at it before uploading. I don’t use that often, but it’s nice when working on templates.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Best part: I still get to use &lt;a href=&quot;http://www.red-sweater.com/marsedit/&quot;&gt;MarsEdit&lt;/a&gt; — I have a small Ruby-based server that implements the API that MarsEdit expects. I hardly ever actually look at the weblogs as files-on-disk, and I never edit the posts that way (though I could).&lt;/p&gt;</description>
      <pubDate>Fri, 18 Jun 2010 11:36:42 -0700</pubDate>
      <guid>http://inessential.com/2010/06/18/put_weblogs_on_bitbucket</guid>
      <dc:date>2010-06-18T11:36:42-07:00</dc:date>
    </item>
    <item>
      <title>Reminder about upgrading NetNewsWire</title>
      <link>http://inessential.com/2010/06/14/reminder_about_upgrading_netnewswire</link>
      <description>&lt;p&gt;I don’t usually use my personal weblog for this kind of thing — but it’s important for NetNewsWire users, so I want to make sure all bases are covered.&lt;/p&gt;

&lt;p&gt;A couple months ago we released updated versions of NetNewsWire that work with an upcoming change in Google Reader. That change (in the authentication system) goes into effect tomorrow (Tuesday). So it’s important to make sure you have the latest version.&lt;/p&gt;

&lt;p&gt;In a nutshell: you should have Mac 3.2.7 or greater (you can look at the About window). For iPhone and iPad, you should just check the App Store to make sure there isn’t an update waiting for you.&lt;/p&gt;

&lt;p&gt;More details are in a &lt;a href=&quot;http://netnewswireapp.com/2010/06/reminder-make-sure-netnewswire-is-latest-version/&quot;&gt;post on the NetNewsWire weblog&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Mon, 14 Jun 2010 17:48:20 -0700</pubDate>
      <guid>http://inessential.com/2010/06/14/reminder_about_upgrading_netnewswire</guid>
      <dc:date>2010-06-14T17:48:20-07:00</dc:date>
    </item>
    <item>
      <title>Practical WWDC tips</title>
      <link>http://inessential.com/2010/06/05/practical_wwdc_tips</link>
      <description>&lt;p&gt;No time to write something long or organized this year. Quick notes, then.&lt;/p&gt;

&lt;p&gt;Drink plenty of water. Make sure there’s plenty of water in your hotel room.&lt;/p&gt;

&lt;p&gt;Try to avoid walking the streets at night alone. I wouldn’t say the streets are dangerous. But still.&lt;/p&gt;

&lt;p&gt;Avoid the Tenderloin.&lt;/p&gt;

&lt;p&gt;You are your fellow developers keeper. Be inclusive. Help anyone who needs help. Be that good person your grandmother imagines you are.&lt;/p&gt;

&lt;p&gt;You’re here to learn and see cool things. Part of that is telling other people about the cool things you’ve seen. (Related: you’re not here to complain.)&lt;/p&gt;

&lt;p&gt;Go to the ADA ceremony. When you don’t win (odds are you won’t win), remember that feeling. It’s useful year-round. But clap hard for the folks who &lt;em&gt;do&lt;/em&gt; win — they worked hard and earned it, and they deserve your support. If you see them later, congratulate them.&lt;/p&gt;

&lt;p&gt;Use your iPhone alarm &lt;em&gt;and&lt;/em&gt; the hotel’s alarm clock, especially for Monday morning.&lt;/p&gt;

&lt;p&gt;Make it drop-dead easy to plug your iPhone into power at night, so you don’t forget.&lt;/p&gt;

&lt;p&gt;Put your hotel room number in your wallet.&lt;/p&gt;

&lt;p&gt;Use Twitter for organizing and finding out what’s going on.&lt;/p&gt;

&lt;p&gt;Remember to eat. Don’t worry about &lt;em&gt;what&lt;/em&gt; you eat too much — you’ll go back to being virtuous when you get home. The important thing is to not skip meals: you’ll need the energy.&lt;/p&gt;

&lt;p&gt;Remember to listen to music sometimes. You’ll need the energy from that, too.&lt;/p&gt;

&lt;p&gt;You won’t be graded on your week — except by you.&lt;/p&gt;

&lt;p&gt;The friends you make will mean more to you than the APIs you learn.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://twitter.com/kickingbear&quot;&gt;Guy English&lt;/a&gt; is there only to break your heart. (Total sadist, that guy. Delights in it. Whatareyagonnado.)&lt;/p&gt;</description>
      <pubDate>Sat, 05 Jun 2010 16:31:37 -0700</pubDate>
      <guid>http://inessential.com/2010/06/05/practical_wwdc_tips</guid>
      <dc:date>2010-06-05T16:31:37-07:00</dc:date>
    </item>
    <item>
      <title>BSSAXTweetParserDemo</title>
      <link>http://inessential.com/2010/06/03/bssaxtweetparserdemo</link>
      <description>&lt;p&gt;I had reason to look at &lt;a href=&quot;http://github.com/mattgemmell/MGTwitterEngine&quot;&gt;MGTwitterEngine&lt;/a&gt; today. It had been a while since I looked at it, and I was reminded that the libxml-based parser in there was originally based on my &lt;a href=&quot;http://inessential.com/2008/04/15/libxml2_xmltextreader_on_macs&quot;&gt;BSTweetParser&lt;/a&gt; from a couple years ago. (Folks did a real nice job of improving it, of course.)&lt;/p&gt;

&lt;p&gt;But I don’t do my XML parsing like that anymore. I still use libxml, but I use the SAX interface these days.&lt;/p&gt;

&lt;p&gt;Here’s a new demo project — somewhat like the old BSTweetParser, but using SAX: &lt;a href=&quot;http://ranchero.com/downloads/BSSAXTweetParserDemo.zip&quot;&gt;BSSAXTweetParserDemo&lt;/a&gt;. (It’s an Xcode project folder with source.)&lt;/p&gt;

&lt;p&gt;I have no special unnatural love for SAX, like some &lt;a href=&quot;http://shapeof.com/&quot;&gt;people&lt;/a&gt;, but it’s the best way to get both high performance and low memory use. (These days I &lt;em&gt;always&lt;/em&gt; use SAX.)&lt;/p&gt;

&lt;h4&gt;Notes about the code&lt;/h4&gt;


&lt;p&gt;Twitter’s public timeline XML is very simple, so it makes a great demo. Easy to follow what’s going on.&lt;/p&gt;

&lt;p&gt;SAX is event-based.&lt;/p&gt;

&lt;p&gt;SAX means you don’t have to have the entire XML document in memory — you can pass it to the parser in chunks. This demo doesn’t do that, but my production code does. (Do you want to hold a 5MB XML document in memory on an iPhone? Nope.) Luckily, NSURLConnection makes this very simple. Don’t append data to build the response body — just pass each chunk to the parser and forget it.&lt;/p&gt;

&lt;p&gt;The original BSTweetParser code allocated a ton of strings and dictionaries. This new code still has to allocate memory — but it allocates a whole lot &lt;em&gt;less&lt;/em&gt; memory. This makes a giant difference on iPhones and iPads.&lt;/p&gt;

&lt;p&gt;The original BSTweetParser code just turned everything into arrays, dictionaries, and strings. This new code is selective: it stores only what it wants to store, and it uses custom objects: BSTweet and BSUser instead of dictionaries. I recommend this when performance and memory use matter (as they always do on iPhones and iPads).&lt;/p&gt;

&lt;p&gt;The comments in the demo code hint at, but don’t entirely demonstrate, the best way to parse a stream like a stream of tweets: don’t create a big array — instead, each time you have a new tweet, call some delegate to do something with it. No need to store the whole thing as an array and then process it — that uses too much memory. (But that’s exactly what the demo is doing. To keep the demo simple.)&lt;/p&gt;

&lt;p&gt;This code not only does less memory allocation, it’s also more than twice as fast as the original BSTweetParser. (The two things are related, of course.) On my development machine, BSSAXTweetParser parsed the timeline in about 0.0008 seconds, while BSTweetParser did it in about 0.0017 seconds. (“Faster &lt;em&gt;and&lt;/em&gt; less memory? Sold!”) (I bet the difference is way more dramatic on iPhones, but I built this is a Mac Foundation tool.)&lt;/p&gt;

&lt;p&gt;You’ll probably realize fairly quickly what parts of the BSTweetParser class could be made an abstract class from which your real parsers would inherit.&lt;/p&gt;

&lt;p&gt;There’s a bunch more code in BSSAXTweetParserDemo than in BSTweetParser. I prefer less code to more code almost as much as I prefer breathing to not-breathing. But that’s life — sometimes the faster and better thing takes more code.&lt;/p&gt;

&lt;p&gt;I put this thing in the public domain. Use however and wherever.&lt;/p&gt;

&lt;p&gt;In the tradition of all demos ever, there’s no error checking or handling.&lt;/p&gt;

&lt;p&gt;When it comes to things like XML parsing on iPhones and iPads, the entire name of the game is &lt;em&gt;doing the least work possible&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;There are ways to make this even faster still.&lt;/p&gt;</description>
      <pubDate>Thu, 03 Jun 2010 21:09:58 -0700</pubDate>
      <guid>http://inessential.com/2010/06/03/bssaxtweetparserdemo</guid>
      <dc:date>2010-06-03T21:09:58-07:00</dc:date>
    </item>
    <item>
      <title>More on Apps that work together – on iPad</title>
      <link>http://www.zetetic.net/blog/2010/05/27/re-apps-that-work-together-on-ipad</link>
      <description>&lt;p&gt;&lt;a href=&quot;http://www.zetetic.net/blog/2010/05/27/re-apps-that-work-together-on-ipad&quot;&gt;Bill Gray&lt;/a&gt;: “However, there’s still no way an app could ‘discover’ what other apps are available and what services they provide under this scenario, and that’s really clutch for this sort of thing...”&lt;/p&gt;

&lt;p&gt;Excellent point. It can be done without, but so much better if we had that.&lt;/p&gt;</description>
      <pubDate>Thu, 27 May 2010 08:30:32 -0700</pubDate>
      <guid>http://inessential.com/2010/05/27/more_on_apps_that_work_together_–_on_i</guid>
      <dc:date>2010-05-27T08:30:32-07:00</dc:date>
    </item>
    <item>
      <title>Universal Back Button app</title>
      <link>http://www.scsc.no/blog/2010/05-26-universal-back-button-released-for-mac-os-x.html</link>
      <description>&lt;p&gt;&lt;a href=&quot;http://www.scsc.no/blog/2010/05-26-universal-back-button-released-for-mac-os-x.html&quot;&gt;Daniel Stødle&lt;/a&gt;: “The idea is to provide a back button that takes you back to the task you were working on, before you opened a file, clicked a link, or similar.”&lt;/p&gt;

&lt;p&gt;Clever and interesting. I bet I never would have thought to use the Apple events debug option to make this work. Cool.&lt;/p&gt;</description>
      <pubDate>Wed, 26 May 2010 17:35:11 -0700</pubDate>
      <guid>http://inessential.com/2010/05/26/universal_back_button_app</guid>
      <dc:date>2010-05-26T17:35:11-07:00</dc:date>
    </item>
    <item>
      <title>Re: Apps that work together — on iPad</title>
      <link>http://brockerhoff.net/blog/2010/05/24/re-apps-that-work-together-—-on-ipad/</link>
      <description>&lt;p&gt;Rainer Brockerhoff: &lt;a href=&quot;http://brockerhoff.net/blog/2010/05/24/re-apps-that-work-together-—-on-ipad/&quot;&gt;Re: Apps that work together — on iPad&lt;/a&gt;: “I was thinking about the same issue, coincidentally, and one idea which occurred to me is to use the equivalent of the http referrer URL.”&lt;/p&gt;</description>
      <pubDate>Mon, 24 May 2010 17:18:16 -0700</pubDate>
      <guid>http://inessential.com/2010/05/24/re_apps_that_work_together_on_ipad</guid>
      <dc:date>2010-05-24T17:18:16-07:00</dc:date>
    </item>
    <item>
      <title>Universal back button?</title>
      <link>http://inessential.com/2010/05/24/universal_back_button_</link>
      <description>&lt;p&gt;On ollicle.com appears an extension to my idea about URL schemes on iPad: a &lt;a href=&quot;http://www.ollicle.com/2010/may/24/universal_back_button.html&quot;&gt;universal back button on Macs&lt;/a&gt;. Very interesting. I like it.&lt;/p&gt;</description>
      <pubDate>Mon, 24 May 2010 11:42:59 -0700</pubDate>
      <guid>http://inessential.com/2010/05/24/universal_back_button_</guid>
      <dc:date>2010-05-24T11:42:59-07:00</dc:date>
    </item>
    <item>
      <title>Shared code management</title>
      <link>http://inessential.com/2010/05/24/shared_code_management</link>
      <description>&lt;p&gt;We have five Cocoa apps at NewsGator: TapLynx, Social Sites, and three versions of NetNewsWire. They share code.&lt;/p&gt;

&lt;p&gt;(You may not have heard of &lt;a href=&quot;http://itunes.apple.com/us/app/newsgator-social-sites/id358181841?mt=8&quot;&gt;Social Sites&lt;/a&gt;. Written by &lt;a href=&quot;http://twitter.com/nick_harris&quot;&gt;Nick Harris&lt;/a&gt;, it’s an iPhone client for our Social Sites enterprise social networking app.)&lt;/p&gt;

&lt;p&gt;We’ve just been doing the copy-files thing. Not good. So below I present an (ever-so-slightly edited: took out two words) internal email I just sent about managing the shared code. This is as a sanity check: I think, given our tools, this is the best way to manage this stuff, but I wouldn’t mind hearing that there are other, better ways.&lt;/p&gt;

&lt;h4&gt;The email: “Shared Code Plan”&lt;/h4&gt;

&lt;p&gt;Here’s the issue: we have a bunch of code that’s shared between two or more apps. We don’t have a way of managing this right now other than just copying files — which is inconvenient at best, and leads to files being not-quite-the-same in different places as bugs are fixed and features added.&lt;/p&gt;

&lt;p&gt;Here’s the solution I’m thinking of. If any of this sounds like the wrong way to go, let me know.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Code shared between two or more apps will all live together in an RSCore repository. (If Apple can keep using NS, we can use RS. I just find the initials more poetic than NG, and that actually, bizarrely, matters to me.) This way the shared code will all be the same for each app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Existing and new projects will include the RSCore repository as a Mercurial sub-repository (a sub-folder in the project folder).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The RSCore repository will have Foundation and UIKit sub-sections. (This way NetNewsWire/Mac can still use the Foundation stuff.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A given project will include just what RSCore files it needs. It won’t be presented as a static library, since that makes debugging a pain, and leads to including unnecessary code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;However, RSCore will have a unit tests project, so we can verify code changes before committing, so we can avoid breaking all our apps at once.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Category methods on Foundation and UIKit will begin with an rs_ prefix, to avoid namespace collisions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New classes in RSCore will be prefixed with RS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We’ll be conservative about what we add. &lt;em&gt;Only&lt;/em&gt; things that are for sure used in more than one app will go in there.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The idea is not to make additional work, but to make less work in the future, to make all this manageable, to increase productivity.&lt;/p&gt;

&lt;p&gt;Make sense? Not make sense?&lt;/p&gt;</description>
      <pubDate>Mon, 24 May 2010 11:11:26 -0700</pubDate>
      <guid>http://inessential.com/2010/05/24/shared_code_management</guid>
      <dc:date>2010-05-24T11:11:26-07:00</dc:date>
    </item>
    <item>
      <title>Apps that work together — on iPad</title>
      <link>http://inessential.com/2010/05/23/apps_that_work_together_on_ipad</link>
      <description>&lt;p&gt;On Macs we have a long-standing culture of apps working together. I can think of a few examples from my own Mac app: you can send a podcast to iTunes, send an article to Twitterrific to tweet it, or send an article to MarsEdit to post it to your weblog.&lt;/p&gt;

&lt;p&gt;Of course, on a Mac, the calling app doesn’t quit when you do these things. It stays open. You can get right back to it. (In some cases, the calling app stays in front the whole time, like when sending a podcast from NetNewsWire to iTunes.)&lt;/p&gt;

&lt;p&gt;On the iPad (and iPhone) we can sort-of do the same thing. We don’t have AppleScript or Apple events, but we do have the URL scheme thing for inter-application communication. It’s technically possible to do some of these same things.&lt;/p&gt;

&lt;p&gt;But we don’t have an easy way to get back to the calling app. Imagine a hypothetical case like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;You’re in Twitterrific, looking at a web page, and there’s a link to a feed. You want to subscribe to that feed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;So you choose a “Subscribe in NetNewsWire” command. It opens NetNewsWire and subscribes to the feed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now that you’ve done that, you want to get back to your place in Twitterrific. You want it to be exactly as if it never quit.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;We can do #1 and #2. It’s #3 that’s tricky.&lt;/p&gt;

&lt;p&gt;So I have an idea. It just came to me, so I don’t know if it’s good or bad — but it’s worth posting, at least.&lt;/p&gt;

&lt;p&gt;What if the calling app added, as a parameter to the URL, a URL to call when the task is completed?&lt;/p&gt;

&lt;p&gt;This way the helper app (NetNewsWire in this case) would know, once the task is complete, how to get the user back to their place in the calling app (Twitterrific in this case).&lt;/p&gt;

&lt;p&gt;The helper app wouldn’t even have to know anything about the calling app — it’s opening the URL that it was handed. (Maybe there’d be a spot for a success/fail return code of some kind too, but that’s a small side issue.)&lt;/p&gt;

&lt;p&gt;Sensible? Silly?&lt;/p&gt;</description>
      <pubDate>Sun, 23 May 2010 20:59:54 -0700</pubDate>
      <guid>http://inessential.com/2010/05/23/apps_that_work_together_on_ipad</guid>
      <dc:date>2010-05-23T20:59:54-07:00</dc:date>
    </item>
    <item>
      <title>Adam Curry on creating the Big App Show</title>
      <link>http://inessential.com/2010/05/19/adam_curry_on_creating_the_big_app_show</link>
      <description>&lt;p&gt;&lt;a href=&quot;http://curry.com/?p=2265&quot;&gt;curry.com&lt;/a&gt;: “If my intuition is right, I think we might even see app programmers become the heroes of a generation, where fans can’t wait for the release of the next magical app their idol has become famous for.”&lt;/p&gt;</description>
      <pubDate>Wed, 19 May 2010 11:03:02 -0700</pubDate>
      <guid>http://inessential.com/2010/05/19/adam_curry_on_creating_the_big_app_show</guid>
      <dc:date>2010-05-19T11:03:02-07:00</dc:date>
    </item>
  </channel>
</rss>
