./victor.sh

Building parsers since the XXth Century

First Impressions of RubyMotion

A few days ago, former Apple engineer Laurent Sansonetti released RubyMotion to the world. RubyMotion is a MacRuby implementation and toolchain for iOS, with a few key differences that allow for apps developed with it, first, to work; and second, to be allowed on the App Store.

The technical differences between RubyMotion for iOS and MacRuby for the desktop lie principally in the memory management (while MacRuby uses Garbage Collection, RubyMotion uses something similar to ARC) and the compilation model (MacRuby is interpreted, though it can be compiled, while RubyMotion is all statically compiled, that is, it generates a monolithic binary that can run on iOS). Apart from that, the syntactical rules are mostly the same, so any knowledge you have about MacRuby will certainly be useful when is time to work with RubyMotion.

I purchased RubyMotion a couple of days after its release, when I had had opportunity to read about it and considered that it might be useful to me. I haven’t had the opportunity to play too much with it yet, but I already have formed a preliminary opinion and I’d thought I’d share my thoughts here, and perhaps see how they change after I play with it a bit more. Specially since RubyMotion is evolving very rapidly, so some considerations need to take into account the moment they occurred: for example, when initially released, the interfaces for iOS apps were expected to be coded purely programmatically, there was no support (other than using ibtool for compiling them manually) at all for using Interface Builder to design them. Nowadays, the Rakefile already takes care of compiling them for you.

I have a background in Ruby, even though I haven’t used it professionally as much as Objective-C. I was also eager to learn how to use Cocoa from Ruby, first with RubyCocoa, and later with MacRuby. Part of my motivation for doing so was partly to avoid the steep learning curve of Objective-C and Cocoa, and partly to be able to use Ruby’s natural expressiveness and terseness.

Nowadays I know better. No matter whether you develop in Ruby or in Objective-C, the hardest part is getting intimate with the Cocoa frameworks. There’s no way around it. The way the Cocoa framework is architected, you have two ways to work with it: swim upstream, or go with the current. If you go with the current, easy things are easy and hard things are still hard, but doable. If you pretend to go against the current, you’ll have a hard time just to make the simplest of things.

And so, working effectively with either MacRuby or RubyMotion requires knowing the Cocoa frameworks. Now, this means you either leverage your existing knowledge of them with Objective-C, or you learn on the fly how to use them with Ruby. And my opinion is that the later will be harder, since most of the documentation and examples are created for Objective-C, and the syntax changes Ruby has made to accommodate Objective-C’s method signatures makes it difficult even for (or specially for) experienced rubyists.

So, my guess is that RubyMotion will be more useful to accomplished Cocoa practitioners, which may find Ruby syntax and terseness very accommodating, than to expert rubyists which will find themselves a little disoriented, moreover when the gems they are familiar with are not available in RubyMotion, and they have to learn the new Cocoa ways of getting things done.

I am sure a lot of rails developers will flock to this new platform, since no doubt their customers are demanding mobile clients for their existing apps, and they find themselves at ease within the confines of the higher design standards of Apple. But I’m afraid that, finding themselves in unfamiliar territory, they’ll have to fall back to snippets, recipes and library wrappers (training wheels, if you like) created by the minority among them that already do develop for Objective-C, just as it happened when Ruby on Rails exploded in popularity. And some of them won’t find the effort worth doing in learning the Cocoa frameworks, and thus deeming RubyMotion inadequate for their development needs, when it is more than adequate for most kinds of applications.

My advice? If you have a Mac and are already familiar with both Ruby and the Cocoa Touch framework, and are willing to pony up $150, give it a try. If not, try first with MacRuby before paying for a tool that you won’t use.

Personally, I already have an app in mind which could leverage the expresiveness of Ruby code and simplify what could potentially be lengthy and cumbersome (and error-prone) Objetive-C code. But that is the matter of another post.

iPhone 4S

Yesterday, Tim Cook, Apple’s new CEO, announced the last device in the iPhone family, the iPhone 4S. It features a new dual core processor, a new GPU, a new camera, and a new antenna design. It will debut with iOS 5, which will be available for existing hardware starting October 12. And it will have an exclusive assistant app, Siri, featuring voice recognition, that is supposedly capable of understanding natural speech and carry on instructions.

The naysayers have been talking about disappointment. But, tell me about other phones that can do this:

Copyright © 2011 Apple Inc. All rights reserved. I just transcoded it to make it play in more browsers.

Of course, we’ll have to see if the voice recognition is as good as portrayed. And, non being a native English speaker, I’ll sure have problems using it (or, wait until Spanish is supported). But it is a technical feat nonetheless.

Siri used to be a normal app available in the App Store, which worked on all iPhone devices, not just the 4S. But it relied on external servers to do the processing of the natural language, as opposed to the new Siri feature, which while using Apple’s massive datacenter in North Carolina, needs a lot of RAM on the device itself to work. Apple bought the company and made the technology a feature of the operating system itself.

While I’m very happy with my iPhone 4, I’ll probably upgrade to the 4S, as my wife’s 3G is showing its age, and that way she’ll inherit my current one. And then she’ll be able to enjoy the features of iOS 4 (and 5) on adequate hardware. Also, being a professional iOS developer, it just makes sense to get test hardware, doesn’t it?

Spotify: You Can Have My Money or Facebook’s. But Not Both

There’s a turmoil on the internet regarding Facebook’s lubed (frictionless) sharing and how it means that Facebook will go all Big Brother on you and be aware of each and every movement you make online. And no service exemplifies it better than Spotify, which recently started requiring that you connect your Spotify account with your Facebook one. So, everything that you listen to, everything that you search for (possibly), and every user library that you browse, will be sent to Facebook for later analysis and correlation.

I was already concerned about the attitude of Facebook regarding privacy. But this is taking it too far. This is downright intrusive. And Spotify’s actions are a big bet on their part. I was the one who always played devil’s advocate, advising people to get a paid membership in order to ensure Spotify’s viability in the future. So, it doesn’t surprise me that much that they’re now in bed with Facebook. They need to keep the money flowing from somewhere, and if conversion rates are not that great, well, they’re more or less justified on having done that. Spotify’s free and open users shouldn’t be complaining now, as they’re not paying users, so they get what they pay for.

But, as a premium user, this is really annoying. If Spotify had a bit of sense, (and Facebook policies had allowed for that, I’m sure they do not), they would not have this requirement in place for paid users. That could even improve their conversion rates. But they did not, and now the common sentiment among paid users is that of being betrayed. And that’s never a good feeling to foster in your client base: their support forums are raging with righteous users announcing the cancellation of their subscriptions. When I went to open the Spotify client yesterday, I encountered a popup that could not be dismissed, and that required me to connect to Facebook in order to use Spotify. Fortunately, the Spotify application uses the same permission system as the other apps in Facebook, so I could log in and deny permission to the Spotify app (which had it previously, so now they’re the worse for that). But I suspect frictionless sharing is still enabled, even if the explicit sharing is not.

As it is right now, I am considering accelerating the cancellation of my Facebook account –I barely use it nowadays, but would hate to lose contact with some school friends and relatives, after all it took to bring it back–. If that would mean the disruption of my Spotify service, so be it. That’s 10€ more I will have for iTunes, DVDs or books each month. I want to be the customer, not the product, and will gladly pay for that. But if you want me to pay for the privilege of being the product, you’re dead wrong.

New VMWare Fusion 4

A couple of days ago VMWare released VMWare Fusion 4. What is new: optimized for OS X Lion, enhanced 3d graphics performance, Time Machine-friendly snapshots, an oh yeah! being able to host virtual OS X Lion instances – which was not something they could do something about, rather it was an OS X license limitation.

As opposed to previous releases, there’s no competitive upgrade from previous versions or from Parallels. The price for everyone is going to be $50 (for a limited time, then it’ll go up)

I have used both Fusion and Parallels and, from my POV, Parallels slows down more the performance of the rest of the Mac. If you’re only going to be on the virtual machine it‘s not so important but, if you try for example to develop a web app on the Mac and test it on a virtualized Windows, the development task will be easier if you’re hosting the VM with Fusion rather than on Parallels.

Reboot

This blog is being rebooted today. To begin with, after mulling over it for several days, I’ve migrated the setup to an static Octopress site. Mephisto, while nice, was going nowhere for lack of maintenance. And after discovering that one can easily migrate from Mephisto to a Jekyll-based system like Octopress, it was a done deal.

Octopress also has niceties for hackers, like powerful code embedding options. It’s still a bit difficult to blog from a smartphone, but that is just a matter of time, in my opinion.

So, over the following days, the archives will be markdown-ified and the comments will be enabled. But let’s mark today –a day almost, but not quite, entirely unlike any other in the year- as the day of the reboot.

A Fresh Start

Effective immediately, this blog is changing name and domain. From now on, the blog formerly known as Syntactic Saccharose will be known as ./victor.sh and the domain will cease to be carotena.net, being available at http://victor.sh/ instead.

I will let the old domain expire, as I’m not interested in it anymore, and will set up redirections so that people looking for the old web pages, or sending mail to my old addresses can find me meanwhile. This will cost me in google rank, but I don’t care particularly since the low posting frequency had made it already low anyway. At least I won’t be getting spam for a while… I hope.

I think this new name more accurately reflects my identity and personality, and while it clearly marks me as a geek (as I can’t pass for a Saint Helena citizen), it also brings the opportunity of starting a fresh stage.

Leaving Polymita

In a week, I’ll be changing jobs yet again. Except for the first gig, I’ve been working on progressively earlier stages during the live of a company: I worked for the publishing powerhouse Planeta Group, a big corporation with slow reflexes. Then, in the Barcelona office of Pivetal, a UK company with advanced automation and quality management products (don’t let their website fool you) for the telco industry. After that, came Polymita Technologies, a growth stage startup that sells a unique BPM platform that integrates all the infrastructure for today’s business applications. And next month, I’ll be joining an early stage startup. A web startup, in a way of speaking

I’ve enjoyed my stay at Polymita. I was currently in a support analyst position and, while not having the glamour of R&D or the hectic pace of the operations department (which I’m not sure I like anyway), it was rewarding all the same because everyday was different, I didn’t know beforehand what would the cases be like. But lately, with the product being so stable, my mad skillz were going unused (and please excuse my hubris, that’s how we geeks are). I hadn’t planned to leave or anything, but I was offered this new position last year and my inner engineer started to see lots of potential directions this tech could go to. Even so, at first I didn’t clearly see the way the technology could be monetized (that’s what reading TechCrunch will do to you). I didn’t hear back from this people until some weeks ago, where they presented me some changes that could make the product a hit. While I had figured out that my next job would involve Rails or Cocoa, looks like I’ll be sticking with Java (for the time being at least) on this new company. Still, the development platform of choice in the new company are MacBook Pro’s, so there’s still hope. I could do some internal tool with Cocoa or an iPhone client, who knows?

So, I decided to switch jobs in this crazy economic climate. I’m abandoning the stability and job security that Polymita provides me and diving head first into the dangerous waters and stressing climate of a true web startup. While some people have commented that I must be mad, some others have complimented me, and I think this is a golden opportunity to learn first-hand all an entrepreneur has to know. If the progression holds, my next job could be on my own company and I would need this knowledge. And anyway, I’ll get to work on lots of interesting stuff, there might even be some parsing involved (making this site’s motto relevant once more).

It could also be that this idea flops, but then again, I’m not overly stressed by this possibility. After a handful of interviews looking for new staff, I realized how difficult it is for companies to find competent engineers. I know that I wouldn’t be on the dole for too long.

Resolutions for 2009

I don’t usually write a list of resolutions, mostly because I don’t use to formalize this kind of list as such. But I though this year I could give it a try, at least one that can be bloggable. Without further a do, let’s go for it:

  • Write more on this blog. Currently I’m posting more to my Spanish blog, Principia Programmatica
  • Put an XML-RPC plugin into mephisto to be able to blog on the move from my iPhone. I also want to use my own themes.
  • Learn a new programming language. I’m almost decided for Smalltalk, but it could also be Processing or Nu
  • Practice Objective-C and Cocoa. Perhaps on the iPhone, even.
  • Also, I want to learn RubyCocoa or MacRuby. Whichever. As for Python, I don’t think I would be able to fit Python 3.0 in the schedule, I don’t currently have a use for it.
  • Finish reading at least 70% of all the books I currently have started but haven’t finished yet.
  • Write a Facebook application.
  • Get a media center for the living room. I’m saving for an AppleTV, but withouth HDMI on the TV set it’s a bit silly yet. I haven’t found a reasonably priced adapter kit yet. Perhaps the Mac Mini slated for Macworld expo next week will do, who knows?
  • Contribute to some open source project. I have already sent patches here and there, but since I’m using Mephisto intensively, I’ll scratch my own itch and write a couple of plugins at least.
  • Master git, and perhaps buy a subscription to github. I don’t really need a paid account yet, though
  • Modernize my home network. I have some scattered old PCs that aren’t currently being used, and their old hard disks are beginning to catch bit rot. I’d like to get a new home server, to store all my pictures/movies/mail, and perhaps to develop some of my projects on it.
  • I want to use all of my skills at work, at least the most enjoyable ones. If that means switching jobs (in this dire economic situation) so be it. I’m tired of reading people like Paul Graham or Jason Calacanis, but being afraid of leaving my comfortable and safe work place.

Ok. That’s about it, I think. Let’s review this list in a year or so…

Star Wars Link of the Day

A coworker, Juanma, and I use to send over IM more or less daily an star wars related link. In order to avoid all this effort to be lost, I’ll post them here as time permits.

Here is the first one: Dave Hill: Jedi Master