Photos.app from an Aperture user’s perspective

So I’ve updated to 10.10.3 and checked out Photos.app. There’s been quite a few reviews of it already, but I still feel like writing down some quick thoughts about it.

The downsides :

If you’re a pro or semi-pro photographer using Aperture, stick with it for now. As it is, Photos will not be a suitable replacement. The main area it’s lacking in is photo management : rating, flagging (those two are replaced by keywords when migrating from Aperture) and elaborated library structure (folders, projects, being able to store originals locally rather than on iCloud). It’s also lacking in retouching, the main missing features being tool brushes and curves. I don’t think I’ve seen a way to quickly apply a set of changes to several photos at once.

Possible future perspectives :

If Photos.app keeps on evolving like the Office apps (Pages, Numbers, Keynote), It’s likely it will gain some of these missing features eventually, the question being when and to what extent. Regarding the ability to store originals locally rather than on iCloud, Photos.app has a “consolidate” feature which, as far as I understand, is meant only to consolidate a converted Aperture library which had referenced originals. On one hand I’d say it’s likely that Apple will add the opposite feature at some point, on the other it might be complicated to integrate given the application’s design and the apparent goal of keeping it simple enough for casual photographers. But I’d be really surprised if Apple was completely giving up on the pro photographer market.

What does make Photos.app very interesting, though, are the photo editing features, even though they aren’t as complete as in Aperture. The controls are much better organized (Aperture is quite old-fashioned in that regard), and are also much more responsive (and I do mean much more). The cropping and straightening tools, in particular, are a lot more convenient to use. Most of all, the idea of “combined” settings (light, color, black and white) works quite well and speeds up the retouching process. In that aspect, even without the tool brushes and curves, I wish I could use Photos.app to handle further photo works.

In conclusion, for now I’m sticking with Aperture, hoping that Photos will keep on adding features and become a suitable replacement. I’m not sure this will ever be the case, and if it is it will take a long while. In the meantime, Lightroom can try and get a less ugly UI.

Posted in Uncategorized | Leave a comment

The coalescence of data-based culture

There’s been a debate in France last year about a law that prevents online book shops (i.e. mostly Amazon) from discounting their prices too much. This is clearly intended to ensure that traditional brick & mortar bookshops don’t disappear because they can’t withstand that kind of competition. Of course every libertarian railed against this meddling of the Government against the will of the Free Market. I’d like to explain here why I think this law is a good thing, and to reframe that in a more general problem : audience data has become the only criteria which drives culture, and this is turning it into a sterile endless rehash of the existent.

A couple of decades ago, if you wanted to buy a music record, you’d go to a record store. At that time, there still were quite a few of those. Since then, they’ve been killed by very large record stores (FNAC and Virgin in France, Tower Records in the US) and big malls like Carrefour or Walmart who sell only a few very popular records at a very low price. And now those large record stores are in turn being killed by Amazon and online music services like Spotify. What the record market lost with those record shops is a very good curation layer that was constantly listening to new stuff and would promote it to their customers whenever they liked it. That’s how many artists emerged, against the market trends that were current at their time. Contrast to what we have now, where the music landscape has a high turn-over of artists who don’t have time to establish themselves before vanishing from sight, and yet the musical landscape remains fairly stable, as most artists sound like many other.

This is the simple consequence of the fact that all record companies now only follow the sales or listening data they get from the market to determine their next move. And the recent arrival of big data providers like Amazon or Shazam make this only more pronounced. The data point to a short set of music types that people tend to prefer, so that’s what music majors provide, rarely risking to deviate from that guideline. In turn, people are mostly exposed to only this same set of types, which of course increases their popularity, and you’ve got your feedback loop. It’s the same as what a “top 10” listing displayed on a front page will do.

So the result is a big cultural precipitate, a race toward what the data says people with an ever-shrinking musical landscape will like, with no one to stir the pot, keep things fluid and breaking lumps. From Amazon’s algorithmic recommendations to what the music industry itself promotes, everything tends to put people in a cultural bubble from which they stand very little chance to pierce through. But since humans are easily bored creatures, they tend to lose their interest, and there you have one of the reasons why music is losing its cultural importance.

This is partially counter-balanced by the availability of a huge amount of music on the Net, but there’s no one to guide you through it. You can follow recommendations from friends and families, but there’s no one with an actual in-depth knowledge of musical culture who’s able to tell you “try this, it’s completely different from what you listen to, but it’s important”.

Likewise, this now applies to TV as well, as cable, satellite and on-demand video services can give tons of very precise consumer data.

You may have seen the movie “Mondovino”, a very interesting documentary about the wine-making industry. Wine is probably among the most territorially-based product, you literally drink what a very specific piece of land has produced, each with its own traits due to the soil, the vine, how the grapes are processed, and overall the technique of the wine maker. Yet, this variety of tastes is disappearing, because every wine-maker is trying to get a high mark in the most prominent wine guide, which means every one is trying to achieve the same “most popular” taste.

Finally, I wonder if this phenomenon also applies to politics : following market data, media becomes polarized, in turn people’s mindset become polarized as well, and then so do politics in general because politicians essentially cater to a specific audience which they study through polls.

To conclude, this is one (yet another) case where blindly following the Market is profitable in the short term but destructive in the long term. You need to maintain a layer of people whose job is to be attuned to a given branch of culture and who will have some amount of influence to promote really new stuff. Algorithms won’t replace that anytime soon. If one does, it’s likely to pass the Turing Test as a side feature.

Posted in Uncategorized | Leave a comment

Yet another bunch of Apple-related thoughts

iPhone 6 and 6 plus : what’s interesting about this is that iPhones with a larger screen were an open possibility since 2012, when autolayout was first introduced on iOS. It took another iteration in 2013 to get the tools right (not as much autolayout itself as how Xcode was handling it), and then yet another this year when size classes were unveiled at WWDC 14. So, Apple has been working on not only larger size iPhones but on enabling app devs to create coherent UIs on different display sizes for the past 3 years now. That’s the kind of long-term thinking and attention to details you expect from them.

Apple Pay : yet another extension of Apple’s ecosystem, and a pretty impressive one. As I said in my previous post, it’s really about Apple’s ecosystem. There are only so many cool products you can invent (really, what’s next ? TV ? OK, then what ? Cameras ? Cars ? Apple has covered most of the IT end-user sector already) and at some point the market will saturate with the ones you have and they lose their “wow” factor. That the iPhone 6 presentation was quickly gotten over with during the September 2014 keynote is a testimony of how the iPhone is now a relatively mundane product.

Apple Watch : it looks like a cool toy, I doubt I’d get one given that I’ve stopped wearing watches just about when I got my first iPhone (as have many smartphone owners I bet), but at the moment it’s quite interesting in the question it raises. First, it has a very prominent social feature (dedicated button to a list of friends) which, at the moment, is interesting only if many of your friends are also wearing Apple Watches. That may be a pretty tough bet. Second, what will be the upgrade cycle ? If, as rumored, the “edition” model’s price is in the $5k range, then it’s not possible that a new model will be released each year. You don’t upgrade a $5k watch every year, or every 2 year, you pass it on to your heirs. It’s not a computer, it’s a very personal object. So that’s where it gets tricky : I can understand that the CPU/memory specs are not very important, it can only be used for short interactions and glances, there’s little point in beefing up the hardware inside. So far so good. But it’s very likely that it could get thinner, so how and when will Apple introduce a new model ? Given the technical challenges it’s unlikely to be before a couple of years. However, the big issue is the battery. No matter what, the battery has to be serviceable, especially if it has to be charged daily. A device meant to be kept for several years with a very tiny battery with a capacity of 1 day or less won’t be an easy combination. John Gruber explains it all better here.

Beats acquisition : that was unexpected, but given the recent news about iTunes sales decreasing while subscription services profits are on the rise, it gets pretty obvious. An other interesting clue is in this interview of Jimmy Iovine when he talks about the importance of curation (17:20 mark). Tim Cook said how impressed he was by the quality of Beats’ playlists, and that’s typically the kind of service that Apple is supposed to provide : simplify the clutter, and guiding your choice (if not making it for you). Also, it turns out that music listening habits are changing. Contrary to what Steve Jobs said years ago when the iTunes Store was launched, people no longer care so much about actually owning their music (especially young ones who’ve grown up with music available on the Net). Having it all on subscription-based services is enough, what defines them are playlists, not CDs on a shelf. And as far I can see, if you’re under 30 or so, the album is dead. It’s become an middle-aged thing.

Swift : I’ve been using the language regularly almost ever since it was released. My initial enthusiasm was tempered by the low quality of the first releases (and the quality not consistently improving), but it’s nonetheless a very cool language. I’ve yet to find a feature I really dislike, and it took a little while but I’m grokking optionals and find them pretty well thought out. The real kick is in learning a new language and finding yourself increasingly proficient with it, flowing with it rather than stumbling around. I can’t really learn a language for its own sake, I have to do something actually useful with it, I won’t pick up fancy languages like Haskell or Scala on a whim. So I don’t get that feeling too often, and it’s nice to experience it again :).

Posted in Uncategorized | Leave a comment

Thoughts on WWDC 2014

Well I really don’t blog that much, do I. Anyway, a few thoughts about the whole thing.

First and foremost : as Matt Drance said, “this wouldn’t have happened with Steve Jobs”.

Joshua Topolsky said that he felt Apple had grown out of mourning Jobs’s passing. I disagree, they have moved to a different stance toward openness. Jobs was known to be against letting the customer alter the design and behavior of their products. He was against extension slots in the Apple II, against 3rd party apps in the iPhone. I doubt there’s a chance he’d have approved 3rd party keyboards in iOS for instance. Extensions, may be, but I wouldn’t bet on it either. So what we see now is Tim Cook doing as Steve said he should : not doing what Steve would have done, but doing what’s right. The new openness is also visible in the very relaxed NDAs (if any) going with the beta versions of iOS 8 and OS X 10.10, and the public beta program for the latter.

Other than openness, there’s also the integration : Apple showed coherent updates for both OS X and iOS, in that the transition between one environment to another is made much easier. Continuity is a pretty big deal, more than it would seem. It shows how Apple’s main product isn’t the iPhone or the Mac, it is the Apple ecosystem.

Swift : by the time Craig Federighi started talking about Objective C and how it had served well for so long, the keynote was already more than any dev could have ever hoped for. It was pretty clear how he was going but I think everybody had a hard time believing it. My initial reaction to the language itself was pretty enthusiastic, it looks pretty darn promising. However I haven’t had enough time to seriously practice it yet, so perhaps the shortcomings many others are talking about will annoy me too eventually. So far the best article I’ve seen about it is this one by Rainer Brockerhoff. Swift is bound to irritate almost everyone, as it apparently aims to do more than what ObjC is good at, which is mainly application development. That means doing some compromises, and breaking many an old entrenched habit, like being more strict toward typing. While it means that Swift is likely to be in some ways less convenient than ObjC for desktop and mobile app development, it also means it could be quite good on the server side. At the moment, this doesn’t really fit into Apple’s business lines, but I wouldn’t bet against Swift ever being used on the sending side of an http connection.

Finally, since this is my other topic of interest, photos : what does the new app that was announced to replace iPhoto mean for Aperture ? When the Mac Pro was announced, there were some mentions of a new version tailored for the little black beast, but if so it still hasn’t been released, and it’s clear that Aperture lacks the same level of care other “Pro” apps currently have. I doubt they would replace both iPhoto and Aperture with one single app, but I wouldn’t deem it completely impossible either. Let’s wait and see…

update 28/06/2014 : well, that was quick – they did just that.  Apple confirmed it was stopping the development of Aperture. The new Photos.app will be able to read librairies from Aperture, and will offer pro-level features. The main worry is that Photos won’t offer the same functionality level as Aperture, but if iOS Photos is any indicator, it should at least be more extensible than Aperture (which was really poor on that regard). I also have a hard time thinking that Apple would put the massive amount of image processing skills that they have to offer only a barebones photo app.

Posted in Uncategorized | Leave a comment

HOWTO : DVD ripping with subtitles on OS X

A while ago I looked into ripping some of my DVDs to add them to my iTunes library. I expected this to be as straightforward a process as with a CD, but no. Ripping the video and audio is simple, I’d recommend handbrake or iVI pro for that. The problem is with subtitles. My english is good enough for me to follow most english movies or shows without subtitles, but they still help.

I naively thought that DVD subtitles were merely text files in the DVD… Nope, they are video files : subtitles in a DVD are stored as images which are overlaid over the main image. I’m sure there were plenty of good reasons for what now seems like an asinine technical choice, like for instance it would have been too expensive to require DVD players to have the necessary hardware for displaying text in Unicode and compositing it on the screen in real time, I don’t know. The end result is that ripping a DVD with its subtitles actually requires OCR.

I looked for software doing that on OS X but didn’t find any, until recently I found that you can do it using handbrake and subler. Since the process is very poorly documented (if at all) and isn’t straightforward, it’s worth a blog post.

  1. rip your DVD using handbrake. In the ‘subtitles’ pane, select the ‘VobSub’ tracks you want. Those are the subtitles in video format. handbrake_screenshot
  2. launch subler, create a new document (no, don’t open the m4v file with subler directly)
  3. drag’n drop the m4v you generated on that document. subler will show a pane where you can select what to do with each track of the m4v. You can disable whatever sound tracks you’re not interested in if you want, but that’s all you have to do. The default action for a VobSub track is ‘Tx3g’ which means ‘run OCR on it’. subler_screenshot_1
  4. enable all the tracks you want (in particular the ‘chapters’ and ‘subtitles’ ones, of course)subler_screenshot_2
  5. save the document
  6. You now have an m4v files with text subtitles that Quicktime or your Apple TV will happily display.

    Side notes :

    I discovered subler could do this because I had checked out the code and read the release notes – can’t think of a more poorly advertised feature :-). Typical OSS problem here :).

    subler uses Tesseract for OCR, and only packages the ‘english’ language data file. For more languages, download the corresponding file from the Tesseract language data files.

    as of version 0.25, subler seems to choke on some 5.1 sound tracks on save, simply disable those if you encounter the problem.

Posted in Uncategorized | Leave a comment

Thoughts on WWDC 2013

As usual, some thoughts on this year’s WWDC

I found the keynote and sessions much more stimulating than last year. Things that particularly stood up :

First, Apple is not abandoning the Mac, nor professional users. There’s still a lot of work being done on OS X, and not just spit and polish. Given the architecture of the new MacPro with one of its GPU not dedicated to graphics (see this article on how the new MacPro’s design really is new, and not just because of its cylindrical shape), low-level stuff like OpenCL and Grand Central Dispatch appear to be part of a much wider strategy, not just cool new tech. Even the venerable AppleScript platform is getting some new features, much to the relief of many who expected it to be abandoned because it would be inherently incompatible with the Mac App Store requirements.

There’s also the announce of a long overdue update of iWork for OS X. I really hope it will be more than cosmetic, like the previous one was. At least it’s nice to see Apple putting back more efforts behind its own OS X software.

Second, obviously, iOS7. The new “flat” design may look off-putting at first but I find it quickly becomes very familiar, and visually restful compared to the crowded look of iOS 6. I hope that the welcome restrain on graphic appearance won’t be spoiled by an overuse of the physics engine, though. Be wary of the “new tool” syndrome here.

Regarding iOS7’s visual appearance, it is quite interesting to see that it was indeed pioneered by Android (and even Windows Mobile to some extent), as a means of differentiation from iOS’s skeuomorphic style. Given that it appears such an abstract style was Johnny Ive’s intent all along starting from the first iPhone prototypes, I wonder if the iPhone would have been such a success if Ive’s design had been favoured over Forstall’s. I feel that the original iPhone opened the door with a familiar enough UI, then Android proved that something much more abstract would work, thus breaking the path for iOS 7.

A side note on skeuomorphism compared to well, “non-skeuomorphism” (what would be a better name for that ? “free-form” ?). Skeuomorphic UIs may look cool and instantly familiar, but it does constrain what you can do with them. The best example is Calendar in OS X Mavericks compared to Mountain Lion. The Mountain Lion version looks like an actual calendar, and you can move the pages as you would with one. And just like a real calendar, you can’t really see the last half of a month followed by the first half of the next one. In Mavericks, you just have a continuous scroll which may be less impressive visually but is way more useful and practical, because it lets you see any portion of a week or month no matter where it starts.

Update Aug. 2nd 2013 : As for the new look being an improvement or not, I was mostly positive when I first saw the screenshots and after a week of using it on my iPhone and several weeks using it on my iPad, I think it’s way better. This article by Matt Gemmell summarizes the evolution very well.

Posted in Uncategorized | Leave a comment

iTunes library tagging

A long while ago I looked into solutions to help me clean up and complete the mp3 tags of my iTunes music library. The problem is that many of my CDs were ripped on Linux, with a Ruby script I had written which used FreeDB (an alternative to CDDB) to fetch tags.

(Actually I’ve just dug out the sources of that script and it was more sophisticated than I remember – thanks to Ruby’s DRb (Distributed Ruby) module, it had a ripper client feeding the wavs to an encoder server using lame and freeDB – not bad)

Anyway, FreeDB didn’t really have the quality of CDDB, so many of my tags are lacking data such as genre or year. Having migrated now to OS X, I started searching for a convenient way of fixing this.

About the only solution I could find is Song Genie by Equinux (which name awfully sounds like a Linux shop :) ). It looked like a good solution but I quickly ran into serious limitations. One is that, in the case of tags with multiple choices, it’s very tedious to undo the choice you’ve picked. But the main one is precisely that many songs will yield several possible tags. Song Genie treats your library as a list of tracks, not a list of albums. Therefore each track is seen independently of any other, and if a given song has been featured on an album and a compilation for instance, SongGenie will show both possibilities and ask you to you decide. It gets worse for jazz or classical music tracks, where the “packaging” scheme of songs into albums is much looser than in rock/pop. So, forget about using this for an automatic solution : you have to make sure you pick the right choice for each track, and it also occasionally gives only one choice which is still wrong. One particularly annoying detail : this applies to album titles, and also to track numbering.

To sum up, I’d often start with an album lacking genre and year, but otherwise properly named and numbered, and Song Genie would turn it to a bunch of tracks apparently coming from several different albums, each with their own numbering order. So much for a hassle-free solution.

When iTunes Match was introduced, I hoped it could provide a solution since the iTunes Store obviously has properly tagged files. I thought there would be a “update tags” feature in iTunes but no. I also tried matchtag which does pretty much that, fetching tags from iTunes Store (only on tracks which have been redownloaded via iTunes Match), but the problem of track vs. album dichotomy remains. Also, matchTag often fails to find info (I just tried with Pink Floyd’s Dark Side of the Moon).

I also tried MusicBrain’s Picard but the UI is very cumbersome, and while it does seem to be build around the concept of albums rather than tracks, I couldn’t get it to work reliably and simply.

Finally I found iTunes Script, in particular this one which copies track info to CD tracks (for when you need to re-rip a CD). I simply reversed the source and destination, and now I can insert a CD, and copy its CDDB info on the tracks. The main problem is that it’s so very tedious (I have to manually select the corresponding tracks in iTunes), but it’s simple and does the job.

A remaining lead would be to use GraceNote’s SDK to try and see if I can do without inserting a CD, or having to manually select the tracks in iTunes.

Posted in Uncategorized | Leave a comment

Miscellaneous bits

It’s been quite a while since my last post, and I missed a few news topics I felt like commenting on, so here goes, all in one block.

Canon 5D mark III

Boy has this one kept us waiting. The main hope was even better low-light performance than the mrkII, and the first samples were indeed astounding. But that’s because it applies heavy noise reduction on the jpegs. The raw files show only a much lesser improvement compared to the mrkII. What remains is a much improved auto-focus, something I could certainly do with given that all the focus spots on the mrkII except the central one can be pretty stubborn.

the Linux desktop is dead, and it finally knows it

When someone like Miguel de Icaza publishes a post titled What killed the Linux desktop, it’s safe to assume the idea has gotten wide recognition. It did get a serious backlash from no less than Alan Cox and Linus Torvalds, but neither claimed the premise was untrue, only the causes which Miguel invoked.

For one thing, Alan Cox’s response is spot on, Miguel helped creating the confusion he laments by launching Gnome (though he fails to recognize he was once an active member of Gnome, albeit not a very enthusiast one, as I remember). Gnome certainly helped killing any hope of Linux ever making a dent on the desktop because 3rd-party apps devs would be confronted by a choice no dev want to make : about which platform you’ll code for. The only worst thing to do would have been to offer a “choice” in different C libraries.

Moreover, I really can’t see how Linus Torvalds character or his stance toward Linux ABI compatibility can be seen as part of the problem. Linus certainly did not “invent” the “tough geek” persona, that existed long before him.

And the reason behind that was not that we have a culture of “engineering excellence” as Miguel stated in his original post (though we certainly liked to think we had that). Constantly breaking APIs is not a sign of good engineering, engineering is also about pragmatism, not just lofty ideals. We saw ourselves as programming prodigies able to code better and faster than the old grumpy suits-and-tie corporation engineers, but that was the arrogance of inexperience.

The reason is because everyone still wants to have things the way he likes and nobody is willing to give up his own preferences for the sake of common good. We had the moral caution to keep doing so from the old Cathedral and the Bazar manifesto, since we believed the Right Solution would always impose itself in the end. It never did.

iPhone 5 and iOS 6

It’s already a commercial success, while the press consensus is that it’s boring (“no vision”, “no creativity”, etc… with the recent addition of “you can see Steve Jobs is dead”). It was the same for the 4S, perhaps not so much for the 4 given the redesign, but it was also the case for the 3GS… Anyway, the best description I’ve read about this so far is from John Gruber : “this is (still) how Apple rolls”. No, we won’t ever again feel the same sense of wonder and history-in-the-making that the initial 2007 MacWorld keynote created. The iPhone is an established product, it will only have incremental improvements. Remember that even the iPad was met with collective yawns from the press : “It’s just a big iPhone”. It took a while to understand that it was yet another whole new market.

The only comment I have is, it may actually be too tall for me. The 3.5″ screen format fits my hand perfectly, I don’t have to reach too much with my thumb to activate any control, though the top ones are a bit hard to attain. I haven’t handled an iPhone 5 yet, but I doubt it will be as comfortable for me, and I actually hope Apple will keep maintaining models with both screen ratios, though I think that’s very unlikely.

About iOS 6, the big disappointment of Plans overshadowed almost everything else. Yes, Apple shouldn’t have bragged so much about it during the presentation. That said, the application itself is way better than Google Maps : it displays much faster, zooms and rotates much more smoothly. It’s just the data which sucks, though from what I’ve seen with the satellite tiles around here (south of France), which were updated twice already between now and the first iOS beta, Apple is pretty hard at work at improving it. It’s still remarkable that Tim Cook wrote an apology about it, that’s not a common thing in Apple’s history.

I joke, however, that Plans is actually a ploy to divert the attention from the real fiasco, namely Podcasts. The new app which is supposed to handle that very important functionality of iPhones (the term ‘podcast’ derives from ‘iPod’) may be pretty (if you like skeuomorphic UIs – I don’t, and I find it idiotic that a device like an iPhone should present the appearance of a 4 decades old reel-to-reel tape player) but it can’t handle playlists and, worse, does not properly sync the episodes status with iTunes. As many, I had a simple “unplayed podcasts” playlist (a smart-playlist, actually, giving me all unplayed podcasts from the French national radio France Inter), and the whole thing was maintenance free. Refresh daily on iTunes, sync the iPhone, then in the car, ask Siri to play the smart-list, and that was it. Now iOS 6 has broken this, because even after removing the Podcasts app and having them back in the Music app, iTunes still fails to sync the episodes status, I have to manually mark them as played. It’s hard to think of something more stupid than this. I hope the next release will fix that.

Posted in Uncategorized | Leave a comment

Objective C and C++ verbosities compared

In my previous post I mentioned Steve Job’s choice of Objective C over C++ for development, based on his assertion that he wanted “to eliminate 80% of the code you have to write for you app”. To which Chris commented that in this older post, a piece of C++ code that I had converted to Objective C was actually twice as long as the original.

I probably should have gone into a bit more details in that initial remark on Objective C vs. C++, but that would have been rather off topic. Chris’s comment calls for more discussion, though.

The quick reply :

the C++ code I converted uses a simple STL-based data structure. The Objective C version uses Core Data.

There’s no question that, for simple operations, Core Data is more verbose than the STL equivalent. In the latter case you’re iterating over a simple container, in the former you’re actually querying a DB (an SQLite db, btw – yet another example of a well-reused piece of technology).

So, even though both codes do the same thing conceptually, the underlying technology is completely different. Yes, the Objc version is much longer, however… in the C++ case, there’s the whole definition of the STL data structure which is not shown in the example, and that you have to write. In the case of Core Data, well, there isn’t. You simply design the data model with Xcode’s Core Data builder :-). So the complete number of lines of code is actually smaller in the ObjC case.

The longer reply :

Core Data didn’t exist yet in at the time Jobs chose Objective C as the base language for NeXTStep, and Objective C does tend to be more verbose in its APIs than C++. The best way to demonstrate this is through a basic example of an array of ints :

C++

// declare an array of ints
std::vector arrayOfInts;

// add one element
arrayOfInts.push_back(1);

// get the element’s value
int i = arrayOfInts[0];

Objective C

// no array of ints, only arrays of NSObject* so :
NSMutableArray* arrayOfInts = [NSMutableArray array];

// add one element
[arrayOfInts addObject:[NSNumber numberWithInt:1]];

int i = [[arrayOfInts objectAtIndex:0] intValue];

If that reminds you of Java, you’re right. And thankfully, autoboxing is being added in Objective C (better late than never).

Edit Jan. 12th, 2013 : the above code would now be written as follows :

// no array of ints, only arrays of NSObject* so :
NSMutableArray* arrayOfInts = [NSMutableArray array];

// add one element
[arrayOfInts addObject:@1];

int i = arrayOfInts[0].intValue;

// or, even simpler :

NSArray* arrayOfInts = @[ @1 ];

int i = arrayOfInts[0].intValue;

end Edit

So why choose Objective C over C++ at the time ?

Because Objective C, as verbose are its basic APIs, is actually closer to Python than to C++. The object model is much more elaborate than in C++ (in which you have nothing else but virtual methods) : classes are first class objects, an object can be asked if it handles a method or not, you can add methods to a class at runtime and without having to derive it, and the language’s position toward type safety is much more relaxed – it’s essentially duck typing. You don’t have to declare a method in the interface to implement it, which is very convenient for internal methods. You do not have to declare a method that you override either, again simply implementing your classes’s own version is enough.

@interface MyClass : NSObject

// nothing

@end

@implementation MyClass

// this overrides NSObject:init
– (id)init
{
// some code
[self moreInit]; // moreInit not declared in interface
}

– (void)moreInit
{
// some more code
}

@end

In C++ that would be :

class MyClass : public Object
{
virtual void init();
virtual void moreInit();
}

void MyClass::init()
{
// some code
moreInit();
}

void MyClass::moreInit()
{
// some more code
}

All this makes of Objective C almost a scripted language in disguise. While in C++ you will spend a lot of time getting your types right, and any non-trivial refactoring will take a whole lot of time, Objective C lets you code much more freely.

Posted in Uncategorized | 1 Comment

Focus

(yes, this is an old topic, but I’m a slow blogger. Anyway…)

Of all the material that came under the spotlight shortly after Steve Jobs’s death, the most interesting one I’ve seen by far was his WWDC keynote from 1997 :

Let’s recap the situation : Apple is months away from bankruptcy, Gil Amelio is the current CEO, they’ve just bought NeXT and Steve Jobs has returned as “advisor”.

At the WWDC (that’s the Mac developers worldwide conference), Steve Jobs walks on stage and instead of doing a presentation, offers to take questions from the audience. And his answers have made me realise why the guy really was completely different from the other tech CEOs that run other IT companies.

Here’s a breakdown of the most interesting moments (time indications are approximative) :

4:00 – explains how he thinks that there’s a market for great products. Not “fancy products with an apple logo on them” – great products. Products that stand above the others in term of quality. All other companies do market studies, try to offer a variety of products tailored to each market segment… He wants Apple to do differently.

5:00 – “I know some of you worked on stuff that we put a bullet in the head of” : the way he acknowledges that is rather uncommon in my experience. Most would try to weasel around the issue and soften the blow. The reason he doesn’t is not because of his usual callous approach, it’s because he’s able to justify it with what comes next : “Focus is saying no”. This will echo to any developers who’s been involved in a project that has fallen to feature bloat. Raise your hand if you’ve met many managers with this kind of mindset. I haven’t.

10:00 – at this point he acknowledges that Apple should no longer reinvent everything, as they had done in the past. Pick the right elements (i.e. the Unix core technologies), figure out what they need to turn them into a product that is really better than the competition. And they did just that.

13:00 – “using computers not for computation intensive tasks, but as a window into communication intensive tasks” – coming from NeXT, he describes what his experience was using an OS which had the network built in from the start. A familiar vision to any Unix user, something very remote to Mac users at the time. In more ways than one, he also describes what cloud computing is aiming to bring to everybody now.

He also mentions gigabit ethernet, which will only be deployed 3 years later.

16:00 “what is really exciting to me is to look at that personal computer, and take out every moving part except the keyboard and the mouse”. That’s the Macbook Air, right there, which would be released 11 years later, in 2008. There was also the failed Sun/Oracle Network computer in between, but Apple pulled it off.

19:00 “Apple is vertically integrated – makes the hardware, the software, the marketing experience”. To this day, nobody else than Apple has this, and few still understand how fundamental a strength this is for them. So he got that while the PC world has the advantage of economies of scale, they can’t match Apple’s reactivity and ability to provide a much more seamless experience.

22:00 let’s not forget this is a developer convention – here he explains how cool the NeXTStep development platform is. Nothing special in itself, except that I don’t know of too many CEOs of IT companies who can convincingly sell a development environment to an audience of experienced developers. The part about “managing complexity” (at 25:00) really hits home.

41:00 “the way you get programmer productivity is not by increasing the number of lines of code per programmer per day. That doesn’t work. The way you get programmer productivity is by eliminating the lines of code you have to write. […] the goal here is to eliminate 80% of the code you have to write for your app”. Another thing that not too many tech managers get (although more do nowadays than back when this was recorded). That’s why he chose Objective C over C++.

01:01 About the Newton. “Most companies can be successful with 1 stack of system software. Rarely can they manage two and we are going to succeed at managing two during the next several years with MacOS and Rhapsody. I cannot imagine being successful at managing 3″. Let’s recap : this is still MacOS 9. Rhapsody, which will become Mac OS X, is in its infancy. So Apple will have to manage those two. The 3rd one is the Newton OS, therefore that will have to be shut down. Again, focus.

In a few years, once OS X is well established, they still will release the iPod, which did have its own (very simple) OS.

“Do you have a newton ?” asks a guy – He replies he bought one of the early ones, thought it was a piece of junk and threw it away, same with a Motorola Invoice. He grants that the new Newtons may be a lot better, the guy suggests he tries one, but he stops the argument with this : “the high-order bit is connectivity. It’s being in touch, connected to a network”. He then explains that using infrared to transfer data from your organizer to your computer when you get back is not what he wants. “If somebody would make a thing where you’re connected to the Net at all times… I’d love to buy one”.

Again, 1997. The Net is mostly accessed through modems. DSL is in its infancy. Wireless data access hardly exists at all. Yes, the concept itself is obvious, but at this point it’s clearly many years away… 10 years away, to be exact, when he took the stage at MacWorld and started with those words : “we’re gonna make some history today”. Others had implemented that concept before them (Treo, Blackberry), but they set the bar on how to do it.

Name one IT company which could see and plan 10 years ahead, and successfully achieve those plans. That’s focus.

Posted in Uncategorized | 5 Comments