Saturday, July 31, 2010
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
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
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
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.”
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
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.
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 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.
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.
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.
Sunday, July 18, 2010
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.
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
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
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
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
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
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
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.
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
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
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’s response to the grip of death is:
- 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.
- 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.
- Announcing a free update that will reduce the number of displayed bars, thus hiding the drop.
- Not announcing anything that will improve the actual reception for people affected by this issue.
- Deflecting the blame to AT&T.
John Gruber brings his usual translation.
Thursday, July 1, 2010
Brian Klug and Anand Lal Shimpi have a great iPhone 4 review, and it’s even available on a single page.
Wednesday, June 30, 2010
Jonathan Ive (via Brandon Walkin):
The amount of care that went into that SIM tray is extraordinary. To achieve this kind of build quality is extraordinarily hard work and requires care across so many teams. It demands incredibly close collaboration with experts in certain areas, material sciences and so on.
The interview, from Core77, includes some nice production photos, and I love the first comment by John Appleseed. Ive’s comments are interesting in that some might say iPhone 4 places too much emphasis on form rather than function. The symmetrical shape has its advantages, and overall I like it, but it doesn’t feel as pleasing or identifiable in the hand. John Gruber:
Both aesthetically and tactilely, the iPhone 4’s glass back is very pleasing. It has a 2001-monolith-like symmetry. But as a heavy iPhone user since day one, I’m finding it slightly disconcerting. I’ve always carried my iPhone the same way: front right pants pocket, with the glass toward my body, so that if my leg hits something or something hits my leg, the back of the iPhone would take the impact, not the glass. Now it’s glass on both sides, and what keeps happening is that I reach into my pocket to take it out, my fingers feel the smooth glass facing out, and I think, “Shit, I pocketed my iPhone wrong last time.”
Gruber also has interesting comments about the new system font, Helvetica Neue.
Like Core77, I’ve wondered why you can’t undock an iPhone one-handed. I liked that with the old Pilot 5000.
WebKit and Gecko support a CSS declaration for better kerning and ligatures (via John Gruber).
Update (2010-07-01): Jim Ray’s keming is a Safari 5 extension to inject this into every page.
Yesterday, I shipped version 3.0 of DropDMG. This is the biggest update ever for my first Mac OS X application, and it adds lots of new features and refinements that customers have been requesting and I’ve been wanting for myself. Pretty much everything has been rewritten or revised and modernized. It’s come a long way from the first version, more than eight years ago, which ran a single thread, had no preferences, and used an icon designed by the programmer. The basic concept—easy disk image creation via drag-and-drop or AppleScript—remains the same, however.
Although I’m the sole developer, I have many others to thank for helping with this release. Kenichi Yoshida did a great job on the new icon. The volunteer localizers had five translations ready by the time I was done with the code. The beta testers made lots of good suggestions and found all the significant bugs (so far, fingers crossed). And thanks, of course, to the users who paid for DropDMG, told me what was good and what needed improvement, and politely nagged about when the new version would be ready.
DropDMG 1.0 running on Mac OS X 10.1.2. I was pleased to find that it still works on Snow Leopard, a testament to good application code, Rosetta, and Apple honoring its API contracts.
Saturday, June 26, 2010
Apple (via Apple Insider):
Apple and its partners use cookies and other technologies in mobile advertising services to control the number of times you see a given ad, deliver ads that relate to your interests, and measure the effectiveness of ad campaigns. If you do not want to receive ads with this level of relevance on your mobile device, you can opt out by accessing the following link on your iOS 4 mobile device: http://oo.apple.com. The message "You have successfully opted out" will appear and you will be automatically opted out of interest-based ads.
Friday, June 25, 2010
Martin Pilkington:
At WWDC Apple announced a few more features, which I personally think of as Objective-C 2.2. These are “@synthesize by default” and “declare ivars in class extensions.” These are features that I have wanted for quite a while and I am sure a lot of other Objective-C developers have wanted.
They’re available in Xcode 3.2.3 if you use the 64-bit runtime and the LLVM compiler.
Fraser Speirs:
For all the supposed design refinement of the iPhone 4, this is a near-showstopper. It’s very surprising that the device shipped with this kind of flaw. If the fix is to add Apple’s £29 rubber bumper on top of this £600 device, that will be a very poor show indeed.
He has videos demonstrating the problem. Unfortunately, the bumpers don’t fit in docks and would probably make the phone stick in your pocket. Better to use tape. Perhaps some black electrical tape wouldn’t be so unsightly. Apple’s response is not encouraging, nor do I think it makes sense to blame the FCC. This is something that should work out of the box without accessories or instructions not to hold it in the normal way. Maybe they can add a clear coating or something.
Wednesday, June 23, 2010
Matt Henderson:
Yesterday, the SSD startup drive in my OS X MacBook became extensively corrupted, such that the computer would no longer boot from it. The process of recovering and repairing the drive revealed a number of important lessons related to recovery preparedness.
Friday, June 18, 2010
Andrew Vande Moere (via Jason Kottke):
Bing Destination Maps seems quite interesting as a new way of rendering geographical maps in a more visually simplified, understandable and accessible way. In other words, imagine one can now create a sort of information-optimized summary maps, similar to those you would quickly draw yourself on the back of napkin.
Cool looking and useful. Alas, it requires Silverlight.
Thursday, June 17, 2010
Jay from LinkedIn’s SNA team describes interpolation search, which is like binary search except that it looks at the values of the elements so that it can do better than guessing the middle each time (via
Alan Odgaard):
The data structure for these uses a large sorted index file to do lookups, what is stored in this file is an MD5 of the key. Since the MD5s are used for the sort, the file is guaranteed to be uniformly distributed over the key space, and can often be many GBs in size. These files are memory mapped to help reduce the cost of a read, but the improved search algorithm can help to greatly reduce the number of seeks when the index is not fully memory resident. A disk seek comes at a price of around 10ms, so saving even one or two is a huge performance win.
Apple has posted the session videos for the 2010 Worldwide Developers Conference (via Michael Jurewitz). Incredibly, they are available less than a week after the end of the conference, and they’re free for registered developers. In 2009, it was more than a month before the videos were available (the fastest to that point, as I recall), and Apple charged $500.
Wednesday, June 16, 2010
John Siracusa:
The fate of individual competitors aside, the fact that the most dangerous players are all coming out of the gate with languages and APIs a generation ahead of what Apple offers should be a huge warning sign. And again, this is all happening in the memory-starved, CPU-constrained mobile world. On the desktop, Apple is even farther behind.
This is not to say that Cocoa isn’t a great framework or that Objective-C isn’t very good for what it is. However, I think Siracusa is right that there’s a bit of groupthink and complacence at Apple and in the community. There’s a world out there where properties, blocks, and garbage collection are not shiny new toys.
Objective-C does have garbage collection now, but I still read about showstopping bugs in the GC versions of the frameworks. And, of course, any code that might be shared with an iOS app needs to be written with manual memory management. So, practically speaking, garbage collection cannot be the default choice today.
This all reminds of Jonathan Rentzsch’s recent points that (1) developers in the Apple community are great at focusing on user experience but that there is too little concern for the lower levels, and (2) that Section 3.3.1 limits engineering innovation to what Apple is able and willing to provide.
Update (2010-06-19): Jesper thinks that Apple is working on a new language to surpass Objective-C.
Monday, June 14, 2010
Kirk McElhearn:
This is disturbing; are publishers really not performing quality checks for ebooks? In this case, nearly 1/6 of the book is missing; the length of the file should have been checked.
It’s worth noting that this particular book has been the object of several “reviews” in the iBookstore mentioning the glitch (I bought the book before these reviews were posted), some of which mention having contacted Apple. That Apple is still selling the book is at a minimum disturbing.
Drew Thaler’s JavaScript Blacklist is a Safari plug-in that blocks Tynt’s copy/paste modifications, green double-underlined links, and floating link previews.
Friday, June 11, 2010
Linus Torvalds:
One of the
absolute worst features of C++ is how it makes a
lot of things so context-dependent—which just means
that when you look at the code, a local view simply seldom
gives enough context to know what is going on.
And:
There’s no “debugger” in communication. There is no IDE
that helps figure out what’s going on. There is no syntax
highlighting etc.
There are just e-mails with patches and suggestions flying
around. There’s no room for special tools—if you as a
human cannot see what the code does from the change,
it’s a problem. And you usually see about three lines of
context around the code.
In this situation with hundreds or thousands of developers, primitive tools, and a huge code base, it makes more sense to optimize for clarity than conciseness or abstraction power.
Thursday, June 10, 2010
Marco Arment:
By naming these features “multitasking”, Apple has set customers’ expectations to include what apps can do in a traditional computer multitasking environment.
It’s going to mislead people into expecting such behavior from apps, but we can’t actually deliver most of it.
It’s especially confusing because Apple lets built-in apps such as Mail do this sort of thing.
NoMoreiTunes (via Safari Extensions) prevents Safari from auto-opening iTunes when you view a Web page for the iTunes store. You can still click the “View In iTunes” button manually. So far this is the only Safari 5 extension that I’m using.