|
I put up on bitbucket NGMoviePlayer â it uses AVFoundation to play movies. It does some of what MPMoviePlayerControllerView does. (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. <radr://8326264>) 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...
Link Email item
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 useful.â 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 recalculate. Pure magic. PFM. I donât think thereâs a single VisiCalc moment that everyone will have for the iPad â but, for me personally, it was OmniFocus. Thatâs when my iPad went...
Link Email item
Whenever I think about new (or old) features in software, I think about whether theyâre flexibility or power features. Theyâre different things. Flexibility is the ability to change how software works; power is the ability to do more with less effort. 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. But flexibility detracts from power just as often â or more often. Flexibility is an invitation. It says, âHey, futz with this. And this. And this. Youâre not getting anything done, but at least you kind of...
Link Email item
I put up some sample code for getting an OAuth access token when calling https://api.twitter.com/oauth/access_token (for xAuth clients). 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.
Link Email item
I so adore Build and Analyze. Iâve developed a small set of rules I follow: Always 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. If the static analyzer finds a problem, I immediately add a TODO 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.) If the static analyzer finds a false positive, I immediately add a comment along the lines of //Static analyzer false...
Link Email item
In the previous post I have an initWithString method that looks like this: - (id)initWithString:(NSString *)aString { self = [super init]; if (self == nil) return nil; something = [aString retain]; return self; } I knew, as I was typing it, that Iâd get some feedback along the lines that I should use copy instead of retain. And I did. And itâs excellent advice, totally, no question. The reason to use copy instead of retain is because it enforces the expected immutability of that incoming string, so the caller is...
Link Email item
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. So I thought Iâd talk about how I do things. There are three important points, then a practical explanation of one of them. 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?) Memory management â the nuts and bolts of making sure you...
Link Email item
Iâm not sure what relative this is, but I love the pictureâs Alfred E. Neuman vibe. 
Link Email item
My great-grandmother (on left) and her sisters (I think) on the road to the beach in New Jersey. Click thumbnail for bigger version. 
Link Email item
Iâve moved the repositories for inessential.com and ranchero.com to bitbucket and made them public read-only. ranchero.com repository inessential.com repository 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. Not sure why I did this. Maybe just because I could. But sometimes big bunches of text can be useful for somebody somewhere. The actual posts are in the posts directory. Older posts are HTML, newer posts are written in Markdown. The lines at the top of each post that start with a @ character are metadata. Stuff between [[ and ]] are macros. Stuff between [[=...
Link Email item
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. 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. 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. More details are in a post on the...
Link Email item
No time to write something long or organized this year. Quick notes, then. Drink plenty of water. Make sure thereâs plenty of water in your hotel room. Try to avoid walking the streets at night alone. I wouldnât say the streets are dangerous. But still. Avoid the Tenderloin. You are your fellow developers keeper. Be inclusive. Help anyone who needs help. Be that good person your grandmother imagines you are. 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.) Go to the ADA ceremony. When you donât win (odds are you wonât win), remember that feeling.
Link Email item
I had reason to look at MGTwitterEngine 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 BSTweetParser from a couple years ago. (Folks did a real nice job of improving it, of course.) But I donât do my XML parsing like that anymore. I still use libxml, but I use the SAX interface these days. Hereâs a new demo project â somewhat like the old BSTweetParser, but using SAX: BSSAXTweetParserDemo. (Itâs an Xcode project folder with source.) I have no special unnatural love for SAX, like some people, but itâs the best way to get both...
Link Email item
Bill Gray: â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...â Excellent point. It can be done without, but so much better if we had that.
Link Email item
Daniel Stødle: â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.â Clever and interesting. I bet I never would have thought to use the Apple events debug option to make this work. Cool.
Link Email item
Rainer Brockerhoff: Re: Apps that work together â on iPad: â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.â
Link Email item
On ollicle.com appears an extension to my idea about URL schemes on iPad: a universal back button on Macs. Very interesting. I like it.
Link Email item
We have five Cocoa apps at NewsGator: TapLynx, Social Sites, and three versions of NetNewsWire. They share code. (You may not have heard of Social Sites. Written by Nick Harris, itâs an iPhone client for our Social Sites enterprise social networking app.) 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. The email: âShared Code Planâ Hereâs the issue: we have a...
Link Email item
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. 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.) On the iPad (and iPhone) we can sort-of do the same thing. We donât have AppleScript or Apple events, but we do...
Link Email item
curry.com: â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.â
Link Email item
Website
|