Saturday, September 4, 2010

Blog moved to jimpravetz.com

I moved my blog to jimpravetz.com where it is now generated using Octopress.

Sunday, May 30, 2010

iPad an Impediment to Document Innovation

The popularity of Apple's version of the web has the potential of stifling innovation in non obvious ways. Interactive document formats are a case in point. Here Apple has two sets of rules: if you are Apple you are free to innovate, if you are not Apple you must innovate on top of HTML5 and Javascript. But are official World Wide Web Consortium standard languages sufficient tools to deliver cutting edge document functionality? The answer is no.

Here is an excerpt of Apple's licensing limitations:

3.3.2 An Application may not itself install or launch other executable code by any means, including without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise. No interpreted code may be downloaded and used in an Application except for code that is interpreted and run by Apple’s Published APIs and built-in interpreter(s).

We can conclude that rich, interactive document formats that require scripting must use a language that is already available on Apple's devices. If that language is not good enough or not tailored to the environment (e.g. 3D scripting) then you are out of luck. If another manufacturer has similar rules to Apple but supports different languages then making a cross device document solution is not possible.

In fact the rules are even more stringent because the only built-in interpreter is Javascript, and it is only available from within Webkit, and you can't used it to manipulate your own document object model (DOM). Meaning the only content you are allowed to script is HTML. That means other interactive document formats are just plain verbotten.

There are some pretty reasonable and popular document formats out there that are not HTML. PDF and Excel spreadsheets are but two examples. PDF actually supports interactivity in several ways, including embedding Javascript (a basic use is to do the math in PDF forms) and 3D. The forms Javascript is an older variation that is not compatible with the Apple-provided interpreter (you can't really update 10 year old documents nor call Adobe lazy for not doing so). Even if it were, the Javascript has to bind to a native DOM, and Apple's Javascipt interpreter does not allow this.

Apple Preview supports a subset of PDF but does not support embedded Javascript. Rule 3.3.2 forbids an application from supporting PDF with Javascript. This is really too bad, because I could have seen the iPad as being a great, portable platform for using PDFs with rich forms entry and calculations.

Looking further at PDF, PDF has 3D capabilities that by their interactive nature require scripting. The existing scripting engines provided on Apple devices (Javascript) just don't cut it. 3D is the type of technology where developing the language is part of the innovation. Flash has similar, advanced rendering capabilities that are not available in HTML5 and Javascript. Essentially, therefore, innovation of this type becomes stifled.

Excel spreadsheets are not allowed because they use formulas that are not written in Javascript. iWorks gets away with providing excel support because, well, all iPhoneOS developers are equal, however Apple is more equal then others.

Apple is essentially killing these formats on their devices, which means the formats are not really universal any more. The only workaround is for the formats to avoid interpreted code, which is very limiting as well as impossible to do retroactively on already widely used formats (though, as the person responsible for digital signatures in Acrobat, I have to say I'd have welcomed a less-interactive version of PDF that was more stable when signed).

Some argue that the iPad is open because it supports native apps. I hope I am showing you that this is not a wide open field for those native apps. The apps being written are mainly web apps or other lighter weight apps that are content front ends. They tend not to be innovative platform applications on the scale of iTunes, Acrobat, Excel or a browser (note the emphasis on mainly and tend).

What about the next new document format? Look at what Wired did with their first magazine app. They essentially took screenshots of the pages, created an XML manifest of the contents, and added a bit of animation. Some are accusing Wired of being lazy, saying that they should have used HTML5 and Javascript. Perhaps they should have, but the argument is that they required and could not achieve pixel perfect rendering with HTML5. As well, HTML5 and Javascript weren't decreed to be the standard until this year, we might assume that they had legacy work that they needed to quickly rebuilt to a different format. Here the onus is on the Wired to adapt rather then what normally happens, which is for the platform provider to provide adequately for content generators. If Wired, or someone else, wants to innovate beyond what HTML5 + Javascript delivers, what do they do? The answer is that they are stuck.

Unfortunately all this is more evidence of the control that Apple is exerting over software development and the internet, and getting away with it because they are so good at what they do. They are the first company to explicitly ban capabilities from a general computing device (rather then mobile phone). They have enough of a foot hold that content generators need to take heed. Wide success will serve to chop off any pre-existing non Apple file formats at the knees, and serve to ban future formats by pigeon holing developers to use HTML + Javascript.

What we had all hoped for in the mobile market is that these devices would adopt the open PC model. That partially happened with Apple allowing a play-by-Apple-rules set of apps onto mobile. This was so much better then what existed before. Unfortunately what we are seeing is Apple's not-quite-open mobile model being extended to the PC. That is a scary vision and not my ideal vision for the future.

Update: See these blog posts The rules have changed and Apple Fears the Killer App

Friday, May 28, 2010

Somewhat Improved Facebook Privacy Controls

Facebook has made some reasonable, but not perfect, fixes to the user interface for changing privacy settings. A few things are better exposed, such as the list of applications that have access to your data, and what data you are sharing with who. But it's still broken because you can't, in one place, tighten your security settings.

If you edit privacy settings and set the Sharing on Facebook option to Friends of Friends, this indicates that Family and Relationships can only be seen by Friends of Friends. But your list of friends remains public under Basic Directory Information. You need to go into Basic Directory Information and fix this manually. I don't see why the Sharing on Facebook settings can't be used to determine the Basic Directory Information sharing.

A similar problem exists for sharing data on other sites. Under Applications and Websites I am happy that I can "control what information is available to applications and websites when your friends use them". I am less happy that this again is not under the umbrella of Sharing on Facebook.

The new top level privacy settings page is an improvement, but you still need to dig too deeply to protect yourself. If you can't describe to a non techie in memorable words what they need to do do protect themselves, then it's too complex.

Monday, May 3, 2010

MacRuby for Application Scripting

MacRuby 0.6 was released a few days ago (30 April 2010). MacRuby is a version of Ruby 1.9, ported to run on the Mac OS X Objective-C common runtime. You can write Cocoa apps and, interestingly, you can also use ruby as a scripting language to control applications running on your system.

The MacRuby install includes macirb, the MacRuby equivalent of Ruby's irb command line interpreter.

Here is an example script to read from and control iTunes via the scripting bridge.

framework 'ScriptingBridge
itunes = SBApplication.applicationWithBundleIdentifier('com.apple.iTunes')
itunes.playpause
track = itunes.currentTrack
name = track.name

Here is an example script for Photoshop.

photoshop = SBApplication.applicationWithBundleIdentifier('com.adobe.photoshop')
doc = photoshop.currentDocument
n = doc.name
doc.rotateCanvasAngle 45

To see a list of what methods are available for an object, call its methods method as follows, subtracting out the methods available to Object.

photoshop.methods(true,true) - Object.methods(true,true)

Pretty cool stuff. I was never a big fan of AppleScript, and in fact stayed away from scripting applications because I didn't like using AppleScript. I can see MacRuby busting the doors off of scripting on the Mac!

Thursday, April 29, 2010

Look who's whining now?

Steve Jobs posted on Apple's web site today an unprecedented diatribe on Adobe's Flash technology. I know a lot of folks like to revel in the Flash bashing, and worship the flip flops Steve walks in. But I think it's way over the top when you are in a strong market position and yet feel the need to rip into another company and denigrate their technology. It's particularly true when the remarks are mostly wrong. What this really is is politics: one party labeling and name calling to make the other party look bad and deflect attention.

Jobs states that Adobe has been late to port their apps to Cocoa. It so happens that's also true of many of Apple's own software products. Finder only finally shipped on Cocoa in late 2009, and iTunes hasn't made the switch yet?!? That's just how development cycles go. Why try to spin this as if Adobe is somehow not being a good citizen towards Apple?

He claims that development environments that abstract the OS don't take full advantage of the OS. Well many apps don't need to (there are some pretty horrific apps on the app store). Take iTunes, as an example, which is off the same code base and runs on both Mac and Windows. Actually maybe it's iTunes performance on Windows that makes Steve make this generalized assumption?

He says that Flash isn't for multi-touch (or touch). Why not? Why didn't Apple work with Adobe on that one? In fact Adobe is working on touch, and you've already seen demos of this, and you'll see it in releases later this year. Regardless, there aren't really any web sites that have touch capability, and that is where Flash is used, and yet the iPad is for browsing the web, so why single Flash out here? [Read more about Flash and touch]

Jobs says a lot of content is going to h.264 so you don't need Flash, then says that a lot of Flash content isn't h.264 and burns compute cycles. Which is it Steve? Why not work this from a different angle? Work with Adobe to improve the performance of on2 and Sorenson. Then work to encourage hi def content to use h.264 (it could be that most of the on2 and Sorenson is probably older low def anyway).  Or just work with Adobe to disable these video formats. In summary, why don't you work well with others, Steve? What is ever so clear in all of this is that Apple had no intentions ever of working with Adobe on this, so what chance did Adobe have? And so don't blame Adobe on this!

He says that Flash is not open. iPhone OS is open? Do you license them to anyone? Oh, it's only "the web" that is meant to be open. And your web only includes h.264 video. I see. Perhaps this is more about forcing people to develop Apple-specific apps because they can't build rich enough apps in HTML5. And regaining control over video delivery, something that you lost when Flash first introduced video and put the Quicktime, Real Player, Windows Media Player wars behind us.

He whines about Flash crashing. When do most of those crashes occur, Steve? Right after a Mac OS update? Could it be that you are changing code under the hood that ripples up to Flash? Flash tries to use the OS as much as possible. That's why it is able to be as light weight as it is for being a plug-in, but it also makes it susceptible to OS dependencies that can cause it to crash. My personal experience is that Flash does not crash very often, and the crashes do tend to occur more often when the OS is updated.

Steve says that Flash is not secure. Heavens to Betsy, Flash has been on the forefront of both innovative, security-minded features and vulnerability response for years, and is pretty good about getting updates out there. They are popular and so they are a big target. They are not perfect, but then no one is, as apparently QuickTime vulnerabilities account for most of the attacks that are being launched against Apple software. The point is that I am not sure Flash is intrinsically less secure then any other software out there, and Jobs is short an argument.

This is not to say that there aren't things to complain about when it comes to Adobe, and Flash. Or that Jobs doesn't have a business position on excluding Flash. But my post is a response to Jobs' letter and his tactics, and not anything else. It's one thing to exclude Flash on business grounds, it's another to fabricate a story that is harmful in order to justify your position.

Spin things how you like Steve. You're a good politician and adept at deflecting blame. You'll probably succeed for the same reasons that politicians do, and that is that they cater to people who like to take sides. Or maybe people will see through this latest move and start seeing you for the who you are.

Sunday, April 25, 2010

Help me understand Facebook and Privacy?

Help me out here. I'm trying to understand how Facebook's new move to share my information with other sites is okay (Hint: I'm not a teenager, so aim your explanation accordingly). Take LikeButton.me as an example. I've never explicitly trusted this site with any information. Yet they know the names of my friends, and yet all I did was visit this site? Visit = type URL, click return.


Granted, giving out the names of my friends is not the same as giving out my credit card numbers, but it is still valuable information, right? And is it not just valuable to me, but maybe valuable to my friends as well? Shouldn't they get a say in whether their names can be mined by these sites? Rather, shouldn't I get a say in whether my name gets mined by a site that my friends visit? Is that a stupid question? And yes, I know that Facebook has previously said that my list of friends is public. But I was waiting for the first exploit, not expecting it to come from Facebook itself.

I feel so stupid right now. All those silly ideas I was working on relating to Identity 2.0 and consent to release of information (which never included friends information) were apparently wrong, apparently old fashioned and apparently ideas that belong to people over 45, as one investor pointed out last week at an event I attended.

Apparently there is great goodness that can come from these features. I can now discover the musical tastes of my friends, via services such as Pandora, and so the benefits far outweigh the concerns of the post 45 crowd. The old fashioned idea of asking my friends about their musical tastes just went poof!

Facebook does provide tools to change your privacy settings, but this whole system is opt-in by default. If you look on Facebook's site the privacy settings are explained in words that I suspect most people would not bother to read (including my teenage daughter):


Note the highlighted text. In my settings (shown below), which I get to by clicking the link above, I (don't think I) am not sharing any information with "Everyone".


In addition there is the following setting - not referenced in the above instructions - which should be unchecked:


I confirmed all of the settings above, and yet LikeButton.me still knew the names of my friends. Now this I find hard to believe, so I actually think my Dopamine levels are affecting my ability to process these instructions. Otherwise, it almost seems like the privacy controls are broken?

It seems to be that there are several problems here:
  1. Visiting any random site may now expose you to having your information read by that site. Do you generally trust every site to guard your information adequately? I don't. And I don't trust Facebook to make the assessment of which sites to trust.
  2. These sites have access to my information even if my friends visit them?!? Really, I'm struggling with believing this to be an okay scenario.
  3. Default opt-in is not right. How do we protect our children? My daughter thinks it's okay to accept any friend invite (700 and growing) and that she doesn't need to backup her Mac.
  4. The Facebook user interface to opt out of sharing your information is not clean.
  5. I am not even sure that opting out works (as demonstrated by my screenshots above).
  6. You can never opt out of sharing your list of friends
  7. Facebook privacy seems to be eroding
Back to my opening sentence. Help me understand this? I actually do think I am missing something either technical, philosophical, or perhaps being born before Atari and Apple is leaving me at a mental disadvantage.

Update #1:
Check out this good summary of the Facebook changes at spylogic.net.

Update #2:
I found yet another Facebook page to change privacy settings. I also started the steps of deactivating my account, and discovered that the user interface that tries to convince you to not deactivate your account is quite a bit better then the privacy settings pages.

Wednesday, March 3, 2010

Flash CPU Performance Dependent on Hardware Acceleration

Jan Ozer in this article compares H.264 video playback performance of Flash and HTML5 across Windows/Mac, Chrome/Safari/Firefox and Flash 10.0/10.1.

The conclusion:
Overall, it's inaccurate to conclude that Flash is inherently inefficient. Rather, Flash is efficient on platforms where it can access hardware acceleration and less efficient where it can't. 
Adobe has responded to the CPU Performance gripes and Steve Jobs finger pointing and done a lot to improve performance in Flash Player 10.1.
With Flash Player 10.1, Flash has the opportunity for a true leap in video playback performance on all platforms that enable hardware acceleration.
But Apple does not expose the necessary hooks to do hardware accelerated video playback on Macs.
I don't follow the politics of the situation, but after noting significant playback efficiencies in Flash Player 10.1 on the Mac, respected technologist and AnandTech founder Anand Lai Shimpi commented "with actual GPU-accelerated H.264 decoding I’m guessing those CPU utilization numbers could drop to a remotely reasonable value. But it’s up to Apple to expose the appropriate hooks to allow Adobe to (eventually) enable that functionality." So it looks like the ball is in Apple's court.