Thursday, September 2, 2010

Apple’s Trouble With TV

John Siracusa:

Any living room “solution” that doesn’t offer a way to view that hot serial drama on the night it airs or a favorite soap opera or that obscure cooking reality show your dad is obsessed with will never be a comprehensive solution. Instead, it just adds to the giant mess hanging off the back of the TV: another expense, another device, another remote, another headache.

There’s far too little content compared with cable/satellite or Netflix, and the video quality is 720p, and then only nominally. None of this is necessarily Apple’s fault, but it’s Apple TV’s problem. I think they’re on the right track with streaming rentals, though. I never wanted to “buy” large DRM-encoded files and then worry about backing them up and syncing them.

iTunes 10

To restore the stoplight buttons to their rightful horizontal orientation (via Mike Ash):

defaults write com.apple.iTunes full-window -int -1

Garrett Murray:

A year ago, I compared the then-brand-new iTunes 9 against its predecessor. New year, new version of iTunes, so here’s an updated comparison. It’s amazing to see just how much visual tweaking Apple does with each new major version of the application.

He’s got a nice rollover comparison. I prefer the tighter vertical spacing and the color icons, although I like the move to making some of them more symbolic.

Shawn Blanc has screenshots of the new capacity indicator, now reflection-free.

It’s nice to see the funny tabs gone from the iPhone screen. The new recessed tabs are at least consistent with the iTunes Store, if not other Mac applications.

Jesper has some interesting comments:

It looks like the balance of power continues tipping. Info.plist now enlists an NSPrincipalClass, ITNSApplication, meaning that it uses the Cocoa startup path. (Very curiously, I can’t find that class by dumping iTunes.) Still chock full of Carbon, but it seems they’re going to do this over several versions.

I’m also following the MacInTouch reader report.

ATPM 16.09

The September issue of ATPM is out:

Wednesday, September 1, 2010

Dr. Gregory Parker, Department of Diagnostic Engineering

Greg Parker:

Go back to the board. Symptom: the object was allocated as an NSPathStore2. Symptom: the object’s isa pointer is now 0xa0050000, which is not NSPathStore2. What should the isa pointer’s value have been? otool and objc_getClass() agreed: the correct isa pointer should have been 0xa005f198. 0xa0050000 is suspiciously similar. Theory: something had cleared two bytes of this object, leaving a nonsense isa pointer. @"tzm-Latn" was a red herring.

Great post.

HTTP Live Streaming

Chris Adamson:

To summarize the spec: a client retrieves a playlist (an .m3u8, which is basically a UTF-8′ed version of the old WinAmp playlist format) that lists segments of the stream as flat files (often .m4a’s for audio, and .ts for video, which is an MPEG-2 transport stream, though Apple’s payload is presumably H.264/AAC). The client downloads these flat files and sends them to its local media player, and refreshes the playlist periodically to see if there are new files to fetch. The sizing and timing is configurable, but I think the defaults are like a 60-second refresh cycle on the playlist, and segments of about 10 seconds each.

Tuesday, August 31, 2010

Developer Color Picker 1.5

Panic’s Developer Color Picker lets you copy colors as source code (NSColor, CSS, HTML, etc.).

iAd for Developers

David Smith:

I was willing to try out iAd because it did one thing that no other platform can offer—a seamless purchase experience. The user never leaves the current app to complete the purchase, so the user experience is about as good as you get. However, I think that Apple has found itself falling foul of exactly the same problems they called out when the unveiled iAd.

It cost him $15 for each download of his $0.99 app. Part of the problem may have been the app’s 3-start rating, though. Interestingly, he got a much higher click-through rate with AdMob.

Thursday, August 26, 2010

Briefs in App Store Limbo

Rob Rhyne has open-sourced Briefs after waiting three months for Apple to accept or reject it. Jeff LaMarche:

…in that time, the app review team has allowed other prototyping applications onto the app store: applications that do the same basic tasks that Briefs.app was created to do. Interface was approved several weeks after Briefs.app was submitted to the App Store. LiveView and Dapp were both updated just yesterday. iMockups was approved about a week ago.

But Briefs still sits in the queue and nobody can be bothered to even say what the exact holdup is or what needs to happen before a decision will get made.

Tuesday, August 24, 2010

Why Python’s Integer Division Floors

Guido van Rossum:

I made the same choice because there are some interesting applications of the modulo operation where the sign of a is uninteresting. Consider taking a POSIX timestamp (seconds since the start of 1970) and turning it into the time of day. Since there are 24*3600 = 86400 seconds in a day, this calculation is simply t % 86400. But if we were to express times before 1970 using negative numbers, the "truncate towards zero" rule would give a meaningless result! Using the floor rule it all works out fine.

Keeping Mint’s Unique Referrers List Clean and Useful

Shawn Blanc:

I did a bit of research and compiled a list of 286 unique Google domains, many of which send traffic via search results, Google Reader, and translating. Additionally, it’s not that helpful to see all the unique visits coming from the Tumblr Dashboard, someone’s Facebook wall, or an Instapaper/Read it Later/Pinboard account.

Xbox System-on-a-Chip

Jon Stokes (via John Siracusa):

It would have been easier and more natural to just connect the CPU and GPU with a high-bandwidth, low-latency internal connection, but that would have made the new SoC faster in some respects than the older systems, and that’s not allowed. So they had to introduce this separate module onto the chip that could actually add latency between the CPU and GPU blocks, and generally behave like an off-die FSB.

Thursday, August 19, 2010

Type-Savvy Logging Macro

Vincent Gable has written a nifty macro that, given an expression, prints the code for the expression and the expression’s value, no matter whether it’s an object, scalar, or struct. For example, LOG_EXPR(self.window.frame.size) prints self.window.frame.size = {320, 480}. No need to type format strings or conversion functions.

App Store Director Developed “Animal Farts” and “iWiz”

Wired (via Jesper):

Apple has long been an icon for quality products, but its overflowing iOS App Store is a crapshoot: Nuggets of quality are buried in a vast, steaming heap of inanity. In fact, the man who oversees the App Store process runs a side business selling fart and urination apps.

Phillip Shoemaker, director of applications technology at Apple, who runs the App Store process, sells iPhone apps in the App Store under the company name Gray Noodle.

Choosing this guy to be the head curator sends a great message.

Sunday, August 15, 2010

Kindle and iPad Displays

Keith Peters used a USB microscope to take photos of text displayed by an iPad, a Kindle 2, a newspaper, a magazine, and a book.

Wednesday, August 11, 2010

Don’t Auto-Update Safari Extensions

Lex Friedman (via John Gruber):

Thus, the mythical A Decidedly Un-Evil Extension, which could provide the definition of any word you double-clicked on, could seem noble and safe. After a few months of swelling popularity, the extension’s nefarious creator could update the extension with <iframe> evilness, and start gathering personal information about you, from the webpages you visit.

With auto-updating, you probably wouldn’t know that the extension had been updated. Even with manual updating, you have no way of knowing whether the new version has been vetted for security.

Finger Tools

Matt Gemmell:

On a touchscreen, you often have a simplified interface, with very few options, commands or tools. I was thinking about how to improve interaction in canvas-based applications (drawing, painting, charts, diagrams, etc), and it occurred to me that you often have fewer commonly-used tools than you have fingers. So, I created a UI concept/prototype that I call Finger Tools (or perhaps Touch Tools, or the Tool Glove, or some other such thing).

When you multi-touch, each finger is assigned a tool, which you can then use with a single gesture. Clever.

Tuesday, August 10, 2010

BetterSource

Awarepixel’s BetterSource is a Safari 5 extension that opens a new tab with a syntax colored display of the current page’s source (via John Siracusa). It can also show HTML that was dynamically generated.

Monday, August 9, 2010

P ≠ NP

Greg Baker mentions a supposed proof from Vinay Deolalikar of HP Labs that P ≠ NP. This is somewhat like the Fermat’s Last Theorem of computer science, with most people believing it to be true, though the proof was elusive. P vs. NP is a more interesting question, however, and the consequences would have been staggering if the result had turned out the other way.

Update (2010-08-11): doespequalnp.com is tracking articles and discussions about the paper.

iPads in Education: DRM Hell

Fraser Speirs:

[This way is] fraught with hassle but is about the best that I could design. I have a Mac mini that will be the “canonical” computer for App Store purchases. Once bought on this machine, iTunes Home Sharing will make sure it appears on all the other machines.

[…]

This is a hole in Apple’s App Store infrastructure that the massive interest in iPads for education is exposing, in a way that the iPhone and iPod touch never did. One can hope that someone at Apple is looking at ways to solve it.

AnandTech’s Mac mini Review

Anand Lal Shimpi:

The idle battery life advantage comes from lower idle power, presumably through heavy OS and hardware optimization. While I measured 8W at idle under OS X, running Windows 7 (power saver mode) on the Mac mini resulted in a 12W idle power without any changes to the hardware. Granted I don’t have identical hardware by another manufacturer to confirm that this isn’t negligence on Apple’s part to optimize its firmware for Windows 7. However in the past we’ve shown that systems from Lenovo, despite having similar specifications to Apple notebooks deliver worse idle battery life. I believe it’s safe to assume that part of the reason Apple is able to make such a bold claim about the mini’s energy efficiency is because it is the only desktop that can be sold running Mac OS X.

He also compares the 2010 Mac mini with a PowerMac G5, which actually bested it on one of the Photoshop tests.

Stay 1.0

Cordless Dog’s Stay is a new utility that stores window configurations for each combination of displays and automatically restores them when you connect or disconnect a display. I’ve been doing this sort of thing via AppleScript for a while now, but it’s nice to see an application that makes it easy. Most Adobe applications don’t work with it, presumably because they don’t support Mac OS X’s accessibility features.

Friday, August 6, 2010

App Store “Try Before You Buy”

Jonathan Rentzsch:

Apple willfully ignored 25+ years of commercial software distribution trial-and-error market experimentation and education.

Try Before You Buy won a long time ago, but for some inexplicable reason Apple seems to want to drag us back to the days of Egghead Software outlets.

Aside from the approval process, I think the lack of demos is the biggest problem with the App Store. As a user, I can waste time reading reviews and still get the decision wrong, or spend a few minutes actually using the app to quickly know whether it’s what I want. As a developer, I want as low a barrier as possible for people to try my apps, and I definitely want to avoid situations where someone buys the app, finds out it’s not what they thought it was, and I can’t even give them a refund.

Ironically, due to the closed architecture of iOS and the App Store, Apple is in position to offer the best try-before-you-buy experience. The OS could track and enforce the demo period, preventing piracy and making it standardized and easy for both developers and users. The app could simply ask the OS whether it’s running in demo mode. When the demo period is over, you could purchase in-app and continue, with all your data, without even having to re-launch. Instead, Apple is promoting lite apps, which pollute the App Store and offer a clumsy upgrade path.

Thursday, August 5, 2010

Interarchy 10

Interarchy 10, modern looking despite being written largely in Pascal, adds some interesting new features, such as plug-ins for running commands (implemented as Perl scripts) on the server via SSH. The new Interarchy File Transfer Protocol (iFTP) apparently uses this architecture to offer better performance by supplying its own scripts that re-implement SFTP.

Tuesday, August 3, 2010

iOS Background App Kludge

iOS 4 includes seven multitasking services, but none of them are conducive to running a utility service in the background. An application can run in the background to get updates from the GPS, but Apple won’t allow it to run in the background to get updates from IM, Twitter, or a mail server. (Apple’s own Mail app is exempt from this rule, of course.)

The developers of Pastebot wanted to run their app in the background to listen for updates from their companion Mac utility. Their solution is to use the multitasking service that lets apps play music in the background (via John Gruber). They thoughtfully included a silent audio clip so that this kludge would be invisible to the user and not drain the battery. Apple rejected the app, saying that the music must be audible.

So, instead, you must create or buy a silent audio clip, put it in iTunes, sync it to your iPhone, and select it in Pastebot’s settings, all to work around Apple’s decision to forbid normal background processing. This makes the app more difficult to use and wastes the time of both the developers and the users.

Apple Removes Antenna Videos

Eliot Van Buskirk:

Apple deleted videos depicting the signal loss of the iPhone 4 and other smartphones from the U.S. and Asian versions of its website, after Wired.com (and others) criticized the way videos confused a reception issue associated with the iPhone 4’s external antenna design with a general absorption problem suffered by all radio devices.

The new page talks about Apple’s testing process and labs. I suppose the idea is to convince people that there is no reception issue compared with other phones. But if you’re already seeing it with your own eyes and ears, this is questionable logic. The message starts to look like, Apple did all this testing so they must have known about the problem. Or, how did their $100 million lab miss detecting something that ordinary users found right away?

Monday, August 2, 2010

ATPM 16.08

The August issue of ATPM is out:

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.

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.