Archive for July 2010

Saturday, July 31, 2010

Custom DTrace Instrument

Jonathan Wight:

I decided to instead use Intruments to probe the application and find out exactly what RGBA colour was being used by UIKit. In modified my project to display the element I wanted to find out the colour of (in my case it was the colour of a UITableView’s section footer label) and then ran the application through Intruments.

Tuesday, July 27, 2010

Node and Scaling in the Small vs Scaling in the Large

Alex Payne:

Herein lies my criticism of Node’s primary stated goal: “to provide an easy way to build scalable network programs”. I fundamentally do not believe that there is an easy way to build scalable anything. What’s happening is that people are confusing easy problems for easy solutions.

Nevertheless, Node is interesting tech.

Monday, July 26, 2010

DRM Ruling From the Library of Congress

Nate Anderson (via John Siracusa):

This time, the Library went (comparatively) nuts, allowing widespread bypassing of the CSS encryption on DVDs, declaring iPhone jailbreaking to be “fair use,” and letting consumers crack their legally purchased e-books in order to have them read aloud by computers.

Good news, although the CSS exemption does not include format-shifting, unfortunately.

Sunday, July 25, 2010

Safari AutoFill Security Flaw

Jeremiah Grossman (via NYTimes):

Right at the moment a Safari user visits a website, even if they’ve never been there before or entered any personal information, a malicious website can uncover their first name, last name, work place, city, state, and email address.

He recommends unchecking “Using info from my Address Book card.”

Will It Optimize?

Peter Ammon:

It is tempting to think of compiler optimizations as reducing the constant in your program’s big-O complexity, and nothing else. They aren’t supposed to be able to make your program asymptotically faster, or affect its output.

Naturally, he has some interesting counterexamples from GCC.

Wednesday, July 21, 2010

The Top Idea in Your Mind

Paul Graham:

I suspect a lot of people aren’t sure what’s the top idea in their mind at any given time. I’m often mistaken about it. I tend to think it’s the idea I’d want to be the top one, rather than the one that is. But it’s easy to figure this out: just take a shower. What topic do your thoughts keep returning to? If it’s not what you want to be thinking about, you may want to change something.

Rings true.

Interpreting Crash Logs With otx

Karsten Kusche:

So now we have the disassembly of the plugin, but the offsets of the crashlog cannot be found. The offsets produced by otx start at 0×00000f54 and go to 0×000024f3. That’s not nearly close to 0×179d383c. The reason behind that is simple: the plugin’s code is mapped into the memory where the linker things it got some space left. So we need to find out where the plugin was mapped in order to find the right spot in the disassembly.

The stack trace ended up looking funny in the crash log because of double method swizzling. I’ve run into the same issue with SpamSieve’s Apple Mail plug-in. SpamSieve always installs it in ~/Library/Mail/Bundles, but on some Macs another copy is installed in /Library/Mail/Bundles. (No user has admitted to putting it there, and it’s happened enough times that I think there must be some other software moving/copying it there. A mystery.) The plug-in now disables itself if another copy has already been loaded. For this crash, it was evident from the Binary Images section of the crash report what had happened, but it’s good to have otx in your toolbox.

Tuesday, July 20, 2010

Arq

Arq is an application for backing your Mac up to Amazon S3 (via Matt Henderson). I’m happy with CrashPlan, but Arq promises advantages such as better support for metadata and direct access to your backup data in a documented, Git-like format. S3 has an API and many clients, and Amazon is likely a very stable host, but it’s also considerably more expensive if you have hundreds of gigabytes of files.

PFiddlesoft Frameworks

Bill Cheeseman, developer of the UI Browser and UI Actions AppleScript utilities, has released some of his applications’ core technology as frameworks. The PFAssistive and PFEventTaps frameworks are Objective-C wrappers for the Accessibility and Quartz Event Tap APIs. There’s extensive PDF and HeaderDoc documentation, and for an extra fee you can get the source code. Garbage collection is not supported.

MacPaint and QuickDraw Source Code

The Computer History Museum:

For those who want to see how it worked “under the hood,” we are pleased, with the permission of Apple Inc., to make available the original program source code of MacPaint and the underlying QuickDraw graphics library.

Xcode won’t open the .a files for display. I recommend viewing using BBEdit, which has syntax highlighting for both Pascal and 68K assembler files.

Update (2023-08-23): See also: Hacker News.

Sunday, July 18, 2010

MAZeroingWeakRef

Mike Ash:

MAZeroingWeakRef brings zeroing weak references to manual memory managed Objective-C. Although it uses some trickery on the inside, the API is extremely simple to use. By automatically zeroing weak references, you avoid many potential crashers and data corruption. Zeroing weak references can also be used for things like object caches where non-zeroing weak references aren’t very practical at all.

Tone

The resolution of offering free cases is what many people predicted. Apple wasn’t going to do a recall or a mid-year redesign, though iPhone 5 will probably have a coating or other modification to reduce the attenuation in the “weak spot.” The odd part was the tone. I was expecting something like the classy open letters that Apple has been posting from time to time. It could have been direct, businesslike, and brief. Instead, the event seemed to drag on forever, and it had an emotional and political flavor. This is more apparent watching the video than in most written accounts.

Matt Drance:

The event opened awkwardly with the iPhone Antenna Song, which includes lyrics like “the media loves a failure,” “the facts won’t ever matter,” and ”this whole damn thing is stupid.” Members of “the media” who flew across the country on barely any notice to sit in that room and hear Apple out; who were about to be trusted with relaying a message critical to Apple’s reputation; were greeted with sarcastic hostility. Customers who have seen their dropped calls double and triple—statistical minority or not, they exist—were mocked.

David Weiss:

You really have to watch this quote to appreciate how the last line, “Okay. Great, let’s give everybody a case.” is dripping with disdain. Jobs seemed pretty forceful, even angry, during this whole presentation, but this part was exceptionally so. It’s like Jobs sees this “free case” response as a concession and certainly isn’t happy to announce it.

Farhad Manjoo:

Instead, he sounded wounded and paranoid, as if we were all being ungrateful for not recognizing Apple’s contributions to the world. “We love our users so much we’ve built 300 Apple retail stores for them,” he claimed at one point. […] At another point, he asked a questioner, bizarrely, “What would you prefer, that we’re a Korean company? Do you not like the fact that we’re an American company leading the world right here?”

Dave Winer:

On Friday, Apple asked us to believe that the iPhone is just a phone. It’s just like the phones that Nokia and RIM make, or Samsung or Motorola. Nothing special about it. That may be the single most important thing they said, and I’m not even sure they know they said it.

It seems this is the end of the antenna story for now. I will be happy to move on. However, I can’t help wondering whether we’ve just witnessed a significant shift in the relationship between the company and its customers.

Friday, July 16, 2010

iPhone 4 Antenna Press Conference

John Siracusa:

My hunch is that the iPhone 4 is more susceptible to signal loss from hand touches due to its external antenna. I also believe it does get better overall reception than earlier iPhones. What bothers me is that Apple, living up to the worst stereotypes of large corporations, hammers on the latter while never addressing the former. Maybe it has something to do with liability in all the class-action lawsuits, maybe it’s just “how things are done,” I don’t know. But it’s a shame.

Steve Jobs kept repeating that all smartphones are susceptible to this type of problem, but he could never quite say that Apple had made a tradeoff. He trotted out questionable statistics. (For example, the low return rate could be because the problem was well publicized, Apple had extended the return period, and people assumed a fix was in the works. And how likely is a return when you’re locked into the platform?) He didn’t address the possibility of adding a coating or some other hardware modification, instead joking that Apple hasn’t yet found a way around physics. The press let him spin and for the most part didn’t make good use of their questions.

The bumpers work, but I don’t think they’re a satisfactory solution. As Garrett Murray says:

But you can’t use the dock with a Bumper, and you can’t use most of the car accessories with a Bumper, and the Bumper makes it hard to put the phone into your pocket which means you’re more likely to drop it…

The good news is that Apple thinks the proximity sensor problem will be fixable in software.

Update: Marco Arment on cases.

Thursday, July 15, 2010

iOS 4.0.1 Signal Bars and Tape Reception Test

AnandTech:

The other thing the tape simulates is how the iPhone 4’s antenna would behave with a thick 1-mil (25.4 µm) coating. To test, I cupped the phone just like I did to cause the 24 dBm drop before.…The takeaway is that the best coatings Apple could possibly apply would bring the drop down to 15 or 16 dB—in league with the Nexus One’s worst case drop, and almost in league with the iPhone 3GS worst case drop.

Tuesday, July 13, 2010

Asterisk

Marco Arment:

The iPhone 4, by most accounts, is absolutely excellent. I love mine. It’s a huge step forward, and all previous iPhones look dated and primitive by comparison.

But there’s a giant asterisk. It has two major flaws, both of which appear to be physical and unsolvable by software updates…

Used to be that Apple’s products just worked, and if there was a problem you could count on them fixing it. iPhone 4 seems to be following the path of the Mini DisplayPort to Dual-Link DVI Adapter, where Apple stonewalls and eventually offers a fix that still doesn’t work properly.

Thursday, July 8, 2010

The Helvetica Killer

Bruno Maag on Helvetica and his Aktiv Grotesk (via John Gruber):

I can appreciate why a lot of designers like Helvetica compared to Univers—Univers has a starkness about it, it’s cold. Maybe because of the antique-ness of Helvetica it has a certain charm that Univers lacks and at the same time has this neutrality, so I can see why people go for it, but if you start analysing it and going into the nitty gritty it is quite a horrendous font.

Tuesday, July 6, 2010

Fake 0.2

Todd Ditchendorf (via Collin Allen):

Fake is a new browser for Mac OS X that makes Web automation simple. Fake allows you to drag discrete browser Actions into a graphical Workflow that can be run again and again without human interaction. And Fake Workflows can be saved, reopened, and shared.

Inspired by Apple’s Automator application, Fake is like a combination of Safari and Automator.

Monday, July 5, 2010

Fun With NoodleGlue

Paul Kim:

It’s a simple class that wraps around a block allowing you to use it as the target and action for APIs that require it. It also optionally can take an extra block that is executed when the glue object is deallocated. This allows you to do any cleanup. In my NSTimer category from last time, I used this cleanup ability to allow the object to unregister from any notifications.

App Farms and Hacked iTunes Accounts

The Next Web:

When some apps are left waiting weeks for approval, only to be rejected by Apple for minor objections, how does a company with no website, no description and apps that are literally swarming iTunes escape punishment? More importantly, how has someone managed to hack users’ accounts and left many, we can only assume, unaware they’ve been robbed?

More from Apple Insider.

Saturday, July 3, 2010

SICP ePub

Ian Eure has made the second edition of Structure and Interpretation of Computer Programs available in ePub format, e.g. for iBooks (via Dave Dribin). Highly recommended.

Friday, July 2, 2010

GCD Background Timers

Mike Ash:

Coalesce is good for periodic maintenance tasks. You can call the timer many times, and it will fire periodically as needed. By passing different delays into the timer, you can handle events with varying urgency. For example, if you write some very low-priority data to a file handle, you might specify a 60-second delay. If you write high-priority data, you might specify a 0.1-second delay. MABGTimer will intelligently combine those so that high-priority data following low-priority data will flush the entire cache.

Apple Responds to iPhone 4 Reception Problems

Apple’s response to the grip of death is:

  1. Pretending that previous iPhones were also subject to this problem, which as far as I know is not true—certainly not to the same extent.
  2. Acknowledging that iPhone has always inflated the signal strength. This explains why I usually have more bars than other AT&T phones and why calling is unreliable even with 4–5 bars.
  3. Announcing a free update that will reduce the number of displayed bars, thus hiding the drop.
  4. Not announcing anything that will improve the actual reception for people affected by this issue.
  5. Deflecting the blame to AT&T.

John Gruber brings his usual translation.

Thursday, July 1, 2010

ATPM 16.07

The July issue of ATPM is out:

AnandTech’s iPhone 4 Review

Brian Klug and Anand Lal Shimpi have a great iPhone 4 review, and it’s even available on a single page.