March 2011
10 posts
1 tag
Avoiding retain cycles with blocks
Joel Bernstein: In the traditional pattern for breaking retain cycles, the object with the strong reference is responsible for notifying the other object when it’s deallocating, so the other object can change its weak pointer to nil. This would neatly avoid the problem, because messages sent to nil don’t cause exceptions. Sadly, there’s no way to tell a block to nil-out a pointer in its...
Mar 19th
15 notes
1 tag
retain/release debugging
While I’m on the topic of debugging, here’s some code I use when I tracking down a retain/release bug: #if 1 - (id)retain { NSUInteger oldRetainCount = [super retainCount]; id result = [super retain]; NSUInteger newRetainCount = [super retainCount]; printf("%s<%p> ++retainCount: %lu => %lu\n", [[self className] UTF8String], self, oldRetainCount,...
Mar 16th
32 notes
4 tags
id self = (id)0x1 for Block Debugging
I’ve just been bitten again by how easy it is to accidentally retain self using Objective-C blocks. After a little thought, I came up with a single line of code you can place in the header of your block that will root out most (all?) possible errors: id self = (id)0x1. Here it is in action: @implementation MyClass @synthesize window; -...
Mar 16th
14 notes
Multitasking
Lukas Mathis: However, the argument that multitasking on computers is bad because humans can’t multitask is flawed. It uses the word «multitasking» in two different ways, but implies that the two kinds of multitasking are somehow the same thing. They’re not: a task (or an app) on a computer, and a task performed by a human don’t map to each other one-to-one. In fact, a single task performed by...
Mar 5th
22 notes
1 tag
mogenerator 1.22
What’s New: [FIX] Xmo’d 1.21 introduced a bug where it would no longer create a source folder for your data model (it would work fine it one already existed). bug 43 (rentzsch) [NEW] -keyPathsForValuesAffectingValueForKey: is now generated in machine.m files, populated by your entity’s scalar attributes. The idea is code like myObject.myIntAttributeValue++ tells Core Data...
Mar 3rd
5 notes
February 2011
2 posts
2 tags
CS is not for me
Eugene Wallingford: Of course, using a powerful, fun language in CS1 creates a new set of problems for us. A while back, a CS educator on the SIGCSE mailing list pointed out one: Starting in Python postpones the discovery that “CS is not for me”. After years of languages such as C++, Java, and Ada in CS1, which hastened the exit of many a potential CS major,...
Feb 13th
28 notes
1 tag
Carrier Billing
I wrote: All said, I think webapps + Carrier billing are the most credible upcoming threat to the App Store so far. Peter-Paul Koch agrees and fills in details: One of the major changes 2011 is going to bring is the start of operator billing on the web. It will provide a user-friendly way of making mobile (and web) payments without those silly credit cards that are preventing the...
Feb 1st
7 notes
January 2011
4 posts
1 tag
Programming with Quartz
I tweeted: rentzsch / @rentzsch: I love it when a Google search yields a result in a book that’s sitting on my shelf (in this case Gelphman and Laden’s isbn.nu/0123694736) rentzsch / @rentzsch: Gelphman and Laden’s Programming With Quartz is a fantastic book, by the way. Highly shelfspace-worthy A bunch of other devs chimed in expressing their adoration of David Gelphman’s...
Jan 24th
11 notes
2 tags
Time Machine Failure
Alan Snyder: I wonder how many people who read this list use Time Machine and, of those, how many have ever checked to see if the Time Machine backup is a faithful copy of the original volume(s). … I can demonstrate one (perhaps pathological) case where Time Machine fails to back up a file. I was able to reproduce Alan’s bug on my machine. Time Machine is great. But...
Jan 12th
24 notes
Average Corporate Lifespan: 40-50 years
Jonah Lehrer: Recently, [Geoffrey West] and Bettencourt, led by this impatience, began exploring yet another subject: the corporation. At first glance, cities and companies look very similar. They’re both large agglomerations of people, interacting in a well-defined physical space. They contain infrastructure and human capital; the mayor is like a C.E.O. But it turns out that cities and...
Jan 11th
9 notes
1 tag
Tweetov
GitHub pro-Smurf Conspiracy A Reasonable Facsimile Regarding My Level of Discourse They’ll Never Learn Convergence BRRRRRRRAAAAAWWWWRWRRRMRMRMMRMRMMMMM Uttered Daily Mayor McCheese Scandal
Jan 9th
1 note
December 2010
6 posts
Creation Addiction
Tim Burks / @timburks: “In Auden’s interpretation, the Prolific are those who produce… Devourers are the political types who depend on what is already produced.” For many, creation is an addiction. The unaffected will always have leverage over the addicted.
Dec 30th
3 notes
3 tags
Apple Disables Safari Extensions
Handoff’s FAQ: 5. Why doesn’t Handoff work well on some Apple sites? Apple disables Safari extension access to their site, so we can Handoff the URL but no other information. This causes Handoff of some Apple sites to be more incomplete than we would like. Interesting. It appears Apple doesn’t disable Safari Extensions across their entire site, but does block...
Dec 21st
7 notes
Analysing a Touch-to-Desktop UI port using Fitts’s...
Daniel Kennett: It’s finally happened. Someone came out with a Mac OS application that’s clearly a touch UI crowbarred into a point-and-click universe. And it doesn’t work. Great write-up. Unfortunately I fear it doesn’t matter — I can’t think of a single example where adherence to Fitt’s Law had any market impact. However I can come up with plenty examples of...
Dec 2nd
16 notes
3 tags
UUID Encoding Usability
UUIDs encode 124 unique bits with one nibble (4 bits) reserved as a version field. 128 bits total. They look something like this: E07F95D8-7187-4096-8E73-948606804B92 That’s kind of long: 36 characters. But that’s hexadecimal-encoded, which is rather inefficient: 4 bits/character. Jumping to Base32 encoding (5 bits/character) with similar separator spacing is 30 characters...
Dec 2nd
18 notes
1 tag
Big Forehead
Dec 1st
6 notes
1 tag
JSTalk Shell Scripts
Daniel Jalkut / @danielpunkass: @rentzsch Can you please write a bug: “FastScripts is too good.” ? Daniel Jalkut / @danielpunkass: @rentzsch Currently scratching my head as to how FastScripts is running your .jstalk ;) I tweeted back at Jalkut, but I probably should document the magic here as well. ※ ※ ※ Install the jstalk command-line tool: http://jstalk.org...
Dec 1st
2 notes
1 tag
Drobo Backup
Tim Wood / @tjw: Why yes Drobo, I would like to you flash all your lights and tell me my data isn’t protected but not tell me why. Thanks. Tim Wood / @tjw: Oh. Now it says “No Drobo is detected.” Luckily everything on this device is a backup… of the other Drobo. Confidence - - I had a similar scare with my Drobo, so I bought a couple of 2 TB drives, popped them into my Voyager Q...
Dec 1st
12 notes
3 tags
Hibari+MarsEdit: Blog a Tweet (via JSTalk)
Last year I wrote a script (original, improved) which posted the selected tweet to MarsEdit from Twitterrific via AppleScript. Here’s the same script, but I switched out Hibari for Twitterrific and JSTalk for AppleScript: var t = [[JSTalk application:'Hibari'] selectedTweet]; var output = '['+t.name+' / @'+t.screenName+']' ...
Dec 1st
6 notes
November 2010
11 posts
1 tag
Kindle 3
Tom Robinson: I find I’ve been reading much more than I used too. I never read books daily before, but I do now. I agree with all of Tom’s points in his excellent write-up, but this is the litmus test for me. I’m reading books again. I stopped reading books a few years back. I didn’t stop buying them, they just got pushed into a queue I never got around to consuming. Big...
Nov 30th
9 notes