Flexing His Power

August 10th, 2010

Brent Simmons makes the case for power of software as a more admirable quality than flexibility:

It may go against the grain a little bit, but I’ll say it: I’m incredibly excited for the future of Mac software. I don’t expect we’ll make software that looks and feels like iOS apps (we shouldn’t), but I do expect we’ll learn from iOS apps how power is the real goal, and that flexibility is just a tool to use exceedingly sparingly, only when it substantially increases power.

I like, no … I LOVE the idea of learning from iOS apps, in order to build superb Mac apps.

As many of you know, I don’t believe the Mac is dead, and it should go without saying I don’t believe iPhone or iPad is dead.

We’re on the brink of an Apple-dominated consumer-electronics era, and we’re in charge of making the software good.

Before Google

August 5th, 2010

On a whim today I tried to figure out what the oldest pages are on the internet that mention the names of Google’s founders, Sergey Brin and Larry Page. In particular, I wanted to find out what information Google’s founders left on the internet before they had the notion to index it all.

This pursuit was of course assisted by Google itself. It has a nifty advanced search feature where you can specify a date range for the results. Unfortunately the algorithm for assigning dates to pages seems really buggy, and you end up with a lot of false positives for the date range you specify. For example, Google was being talked about in 1973?

GoogleDates.png

I was able to find some interesting newsgroup postings from Sergey in 1994. On August 18, 1994, he sought advice about booking air travel from San Francisco to Baltimore. In 2010, this conversation would almost certainly not happen, as any number of powerful airfare search engines crunch the numbers and compare rates across carriers, dates, and airports.

But even more interesting to me is a math question posed in 1994 about the Karhunen-Loeve theorem:

Hi,

I ran across a reference to a Karhunen-Loeve transform in a paper I was reading and from the brief mention it seems that it is relevant to my research.  However, there is no pointer to where I could find more information.

Could someone let me know what a good reference for the Karhunen-Loeve transform would be?

thanx
–sergey

Today you just type “Karhunen-Loeve” into Google to get the answer.

RegExKitLite v. Clang

July 23rd, 2010

I finally updated to Xcode 3.2.3. I was a little late because I had other priorities, but I wanted to get my iPhone projects building and installing onto my iPhone OS 4.0 devices, so I decided to download and install the latest SDK.

Unfortunately, this seemingly minor update presented a major failure in my debug builds, which I’m adventurously compiling using the LLVM clang compiler. They built fine with Xcode 3.2.2, but starting in 3.2.3, I got a linkage failure, tracing back to the popular open source RegExKitLite:

Undefined symbols:
  "___gxx_personality_v0", referenced from:
      _rkl_debugCacheSpinLock in RegexKitLite.o
      ...
  "__ZSt9terminatev", referenced from:
      +[NSString(RegexKitLiteAdditions) clearStringCache]
      in RegexKitLite.o

What? Those symbols smack of C++, but there isn’t any C++ code in my project. At least, I don’t think there is. RegExKitLite is so famously advanced in its designed, I couldn’t easily tell you whether there was stuff in there intended as C++ or not. On a whim, I tried to switch the file type to C++ to see if that made clang any happier. No, it screamed bloody murder. It agrees with me, RegExKitLite is not C++ code.

So why the link errors? I examined the compile line carefully for RegExKitLite and confirmed that it’s using clang in a manner that should only be generating plain C linkage:

/Developer/usr/bin/clang -x objective-c -arch x86_64 ...

But when I look at the resulting RegExKitLite.o with the “nm” command-line tool, it shows the culprits symbols have been listed as references in the binary object file:

% nm RegexKitLite.o | grep -e terminate\\\|personality 
                 U __ZSt9terminatev
                 U ___gxx_personality_v0

Normally when I’m getting some kind of issue like this, I just type in the problematic symbols in to Google and usually find somebody else has found and solved the problem. No such luck this time. There are lots of false positives for the typical reason somebody runs into this link error: they are compiling legitimate C++ code but neglecting to link with the stdc++ library. But in our case, we are not compiling C++ code, but we’re ending up with C++ dependencies nonetheless.

I hopped on to the #clang IRC channel on irc.oftc.net, where a couple extremely helpful clang engineers (thanks to dgregor and rjmccall) helped talk me through the problem, and determine that it does seem to be a clang 1.5 bug. They confirmed that with their latest and greatest clang the bug seems to be fixed, but I was curious to confirm it myself, so I checked out and built the latest clang, too. Sure enough, all is well for future generations!

But what do we do now, stuck with the clang 1.5 that ships with Xcode? There is a crude workaround: simply link to stdc++. But yuck! All that C++ linkage dirtying up my pristine Objective-C project? Since I only use clang (for now) to build debug builds, I don’t have too much of a problem doing this. But if I was shipping these binaries I would be very hesitant to make that concession.

Radar #8230225: clang 1.5 forces linkage to C++ for non-C++ source file
(Open Radar Link)

The best we can do is report the issue to Apple and let them decide whether it’s worth their time to backport whatever fix in later clang is missing from clang 1.5. If you have other suggestions for how to work around the problem in the mean time, please do chime in with a comment below.

Update: The author of RegExKitLite kindly chimed in below with a pointer to the revision in the clang source repository that that fixes the issue. He also suggests a simple, and seemingly safe workaround, involving a slight tweak to the RegExKitLite source code.

Surviving Success

July 19th, 2010

Apple is taking a beating, even while at its most victorious.

After the launch of the iPhone 4, a well-designed device with one easily-demonstrable flaw, the company is losing its famous control over the emphasis of press coverage. Apple is typically brilliant at walking the line between humility and pomposity, adjusting its tone to suit the current situation.

When Apple was suffering in the late 1990’s, it played to historic core values with campaigns like “Think Different,” but held on to the sliver of confident superiority that helps to sell its brand. Now that it’s on top of the world, it tends more toward a triumphant strut, with just a dash of idealism. Recent blunders paint the company as both arrogant and user-hostile, two attributes that incite pundits to attack without mercy.

Nobody likes a sore winner. Whatever the fight, struggle, ambition, the odds are good that judgement will be harshest on the one who emerges victorious. Anybody who ever received an A+ on an exam in grade-school, only to have the teacher publicly celebrate it among classmates, knows that success turns you into a target. Surviving that success requires careful management of one’s own image, as perceived by the audience that was most invested in the outcome.

Imagine you’ve just achieved something incredible. Bystanders will react with one of three reactions: praise, indifference, or scorn. You can ignore the majority, who don’t care a whit one way or another. Your fate will be decided by the passionate minority, so you must inspire fans to be more passionate and tireless than detractors. A small, energized core of supporters can outlast even a large, committed group of critics. At its best, Apple inspires passionate users to identify more with the company’s egalitarian rhetoric than with the billions of dollars that are flowing into the company’s bank accounts. (The billions are pretty inspirational to stockholders, however).

Apple makes fantastic products that are, by and large, defect free. In my opinion, they deserve to win. I applaud the company, and in particular, its employees. As the years go by, almost every part of the company seems to be improving. They routinely launch new products that stun and delight us with a combination of obviousness-in-hindsight, and that futuristic “Apple magic.” Kudos to them.

Apple is also brilliant at public relations. They produce beautiful, inspiring advertisements. Their web content strikes the balance of confidence and customer-centric humility. And their rank-and-file employees show off their passion for the company in email lists, internet fora, and on Twitter. But at the height of success, the fact that critics are gaining the upper hand is evidence that the company is failing to control its image.

Most of Apple’s recent PR gaffes trace back directly to Steve Jobs. His famous arrogance was exactly what the company needed while it restored itself to, and then surpassed, its former glory. During Apple’s recovery, detractors belittled and dismissed Apple as an “also-ran” company, suggesting they should give up and yield to the obvious victories of companies like Dell and Microsoft. But Jobs ignored the critics and spoke to the fans, inspiring us to stand by and loudly defend Apple.

Now that Apple is on top again, Jobs seems to be losing that knack for inspiring fans. He’s turning into a sore winner. He defensively chides his own customers for holding their iPhone 4 “the wrong way.” He tersely defends questionable Apple practices in one-liner email responses. He spins the truth in that barely plausible manner that used to be celebrated as the “reality distortion field,” but now comes off as purposefully dishonest and manipulative.

I believe Jobs is an idealist product visionary who wants the best for Apple and for its customers. But he’s lost his ability to manage his own image, and thus the image of the company. Apple’s PR department is in charge of manipulating how the company is perceived, but their efforts are being drowned out by the live-wire personality at the helm of the ship. Jobs needs to quiet down now and let cooler heads speak. No more arrogant, terse email replies. No more defensive press conferences. No more snarky interview quips. Just chill out and try to get your groove back.

At his best, Steve Jobs is a brilliant, inspirational spokesman for the company. At his worst, he is the pompous winner who begs to be taken down a notch. Jobs is the kid who, having been celebrated for the A+ exam grade, reacts by chiding his classmates: “You all are a bunch of idiots.” Fans lose their faith, detractors gain momentum. This guy’s in for a rough victory.


This entry was inspired by Michael Tsai’s Tone.