March 2011
10 posts
Tribal Thinking
Tim Bray:
I currently work for Android; can I write about Apple? Or, when I was at Sun, could I write about Dell or HP or Microsoft? I do and I did. But very carefully. The one thing people like better than tribal thinking is a ringside seat at a fight.
I think tribal thinking is a wonderfully succinct phrase for a litany of counterproductive-verging-on-evil human tendencies.
2 tags
Motorola's Web-based OS
Thomas Claburn @ InfomationWeek:
Motorola Mobility has hired a number of experienced mobile and Web engineers from Apple and Adobe and is developing a Web-based mobile operating system as a possible alternative to Google’s Android software, according to a source familiar with the matter.
(via HardMac)
Claburn apparently gets his information from a one Jonathan Goldberg, an analyst....
1 tag
#oldtwitter's cookie
Tonight a twitter cookie of mine expired and I was shunted again into #newtwitter.
Twitter offers a link to switch back to #oldtwitter, but it’s been broken for months now.
I did some digging and found the expired cookie entry in ~/Library/Cookies/Cookies.plist:
<dict>
<key>Created</key>
<real>322609921.51493198</real>
...
The Case for Associative Main Memory and Storage
Steve Dekorte:
If you look at the hw/sw stack, you’ll find that most everything we do involves associative lookups and it would all be much simpler if we moved to using CAMs (content addressable memory) for main memory. A CAM is basically a hw version of a sw dictionary/hasttable. It can do single cycle lookups between a key and a value and keys can be chosen at will.
Current PCs...
SixteenBitUniversalCharacterSetCharacter
Carbon’s MacTypes.h:
typedef unsigned short UInt16;
typedef UInt16 UniChar;
Core Foundation’s CFBase.h:
typedef unsigned short UniChar;
Foundation’s NSString.h:
typedef unsigned short unichar;
Three different frameworks with very differing tactics all boil down to an almost-same name and the exact same typedef.
This is the best evidence that I’ve seen in...
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...
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,...
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;
-...
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...
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...