All posts by Sébastien

Versioning is Just Too Complex

I’m currently trying to unlearn 10 years of CVCS and Subversion certainties to learn DVCS and Git. And although a lot of people see those as a huge leap forward, I can’t help thinking it’s still way too hard. Versioning is such a basic need, it shouldn’t require that much knowledge. Right now, whether it’s Subversion or Git (or Mercurial, or whatever), the problem is always the same for me: it’s just too low-level. Those systems are designed as if I needed to be a mechanic to drive my car. I don’t care about injectors, gearbox and all that stuff. All I want is to go faster or slower, turn left or right, and that’s about it. Now sure if I’m a mechanic, I can make my car perform much better, but if I just need to get from point A to point B, do you really think I will learn mechanics? Most people won’t. They will just walk there, or ride a bike. And that’s exactly what’s happening in too many companies: “manual versioning”, version numbers in file names, shared drives, even $harepoints, are just poor solutions to a real problem. We need versioning, but existing solutions have an unacceptable learning curve. They’re not smart enough, and they require us to be smart, even though that’s not our main purpose.

Even as a developer, sure I can understand such concepts, but I don’t want to learn what merge, pull, push, commit, branch or update mean. I want to start new projects, participate in existing projects, fix bugs, implement features, refactor my code. Whatever underlying system my company or team is using, whatever technologies I’m working with, my own workflow should not be influenced so much by the tools I use to keep track of my work and collaborate with my team. It should be transparent.

My point is: Git is a leap forward, but it’s a small one, and we need a giant one. We need a versioning system that implements workflows at a higher level, that abstracts away all those silly commands with similar names but different meanings. We need an abstraction layer that can work on top of existing lower-level tools like git, subversion and others, and that can be integrated seamlessly in development environments like IntelliJ Idea or Eclipse (sigh). Sure we will probably lose some power in the process, but we can leave it as an option.

In fact, we need to do with versioning what Maven has done to build lifecycle. Convention over configuration. What are the most common tasks we do on a daily basis:

  • start a new project
  • enter an existing project
  • start fixing a bug
  • start implementing a new feature
  • start refactoring some code
  • switch to another bugfix/feature/refactoring
  • complete a bugfix/feature/refactoring
  • share a bugfix/feature/refactoring with my team or with the world
  • what else?

And then let’s try to map those high-level tasks with lower-level command sequences. And let’s do it in such a way that I can easily change the underlying implementation, or reconfigure certain aspects of it. And why not add the possibility to define your own workflows for other things than traditional dev. In fact, to make things clearer, let’s just call git, subversion and other existing tools “versioning tools”, and let’s design a “collaboration framework”. Exactly like Maven is not a “build tool”, it’s a “build lifecycle framework”.

I’m just ranting out loud here, but what do you think?

Mac Runtimes, What a Mess!

First of all, let’s make things clear: I’ve been a very satisfied Mac user for the past 4 years or so, but I’m also a Java and a Flex developer, which means I have interests in all three of those technologies. And yes, I’m also a big fan of Steve Jobs, but despite all expectations, I try to be lucid about him and some of his weirdest choices/decisions/open letters ;o).

The problem I have at the moment is that, in the name of sensationalism, a lot of blogs post with titles like “Macs won’t have Flash anymore”, or “Java is dead on the Mac”, as if it was just an evil continuation of the “no Flash on iPhone/iPad” fuss that started at the beginning of this year. Now it’s certainly a great way to draw attention to those sites who only live thanks to advertisement, and hence number of visits. But let’s try to reestablish a few realities here.

First off, let’s talk about what everybody has at the back of their head when they think about Apple and runtimes: iOS. Yes, iOS doesn’t support any alternative runtime. In fact, besides Javascript, iOS doesn’t support any virtual machine. Flash and Java work on virtual machines and they’re not supported on iOS. There are 2 major reasons for that. The first one is performance, because a virtual machine, that is a software execution environment on top of a hardware one, will never be as performant as the native one. Despite all the optimization efforts that Adobe has done with Flash on mobiles, first experiences on Android tend to confirm that there’s still work to be done. Even though they have improved a lot in the past 3 years thanks to the iPhone impulse, mobile devices still run with very limited hardware capacities. And they still haven’t reached the point where they have a lot of free resources to spare, like personal computers have. So the official reason makes sense. But of course the less official reason is also important for Apple: iPhone’s number one sales argument is apps. When you think about it, it’s almost funny because when the first iPhone came out without an SDK, everybody complained about it, and then Steve Jobs answered that there was no use for a SDK. And obviously at that time, Apple was already working very hard on the App Store and the iPhone SDK. But when you know you have something huge in the pipeline, something that will make your device even more frightening to the competition, what is the best thing to say to the competition? “Don’t worry, this is just another one of our silly shiny gadgets that will just convince our existing fans”. And then a mere 18 months later, Apple comes out with not only an excellent SDK, but a whole new sales and distribution channel, and a marketing strategy that is based solely on all the apps your can install. I’m sure that there must have been a couple of WTF-moments at Nokia, RIM and others. So when your whole marketing strategy relies on your controlled and polished SDK and distribution channel, you have absolutely no interest in letting others in, be it J2ME crap (I’ve done J2ME development too, iark!) or the more threatening Adobe AIR. So let’s deal with it: no virtual machines on iOS, and whether we like it or not, it makes sense.

So are recent news just a continuation of that? Is Steve Jobs trying to eliminate all competition on the Mac too. NO! He’s not! It’s a completely different story!

Let’s start with Flash on the Macbook Air. Yes, the new Macbook Air doesn’t have Flash pre-installed. Actually, Safari does not have the Flash plugin preinstalled anymore. But nothing prevents you from installing it yourself. As nothing prevents you from installing Firefox and its Flash plugin as well. On iOS, it’s not pre-installed, and you can’t install it yourself. On MacOSX, from now on, it won’t be pre-installed but you will still be able to install it yourself. Huge difference! The Flash community has complained enough about the outdated version of the pre-installed Flash plugin. Of course Apple will not change their systems every time Adobe fixes a security or performance bug. So the best way to avoid any remanent hole, is to allow no hole at all by default. And if you need Flash, you just install the latest version and you’re good to go. That’s for the official reason. But as always there is… one more thing! One of the main marketing arguments for Flash is that, unlike any other cross-platform runtime, it’s installed on a crushing majority of machines, somewhere above 95% of them. But that is partly thanks to those integration deals that make Flash ship with every new PC or Mac, independently of the popularity of Flash as a development platform. Apple’s bet is that with the advent of HTML5, users will use the Flash plugin less and less often. But if they pre-install it, this drop in usage won’t reflect on Adobe’s marketing. Once again, whether we like it or not, it makes perfect sense for Apple. And it even makes sense to me: even if I’m a big Flash advocate, even if I think the HTML5 fuss is just oversold, I think Adobe has been a little too slow to react lately, as if they were resting on their dominance of the cross-platform runtime market. So everything that makes them fight harder to build a better development and runtime environment is good. And I’m sure they will fight. They just need to invest more in it. Mobile Flex development only in early 2012 (and that’s the first estimates, the ones that are always wrong) will just be too late for the show. So that’s it: no Flash plugin preinstalled in Macs means no Mac shipping with outdated security holes built-in and no built-in popularity bias either, which is good for competition. But nothing will prevent your from installing Flash yourself.

Let’s talk about Java now. When you read the news, you tend to feel like Apple’s war on competition is nothing personal against Adobe, that  it’s targeted at everyone else, that Java will be Steve’s next victim. But that’s just so untrue! First off, contrary to what happens with Flash, Apple never said that they would ship Macs without Java built-in. They just said that it would enter a pure maintenance phase and that they would stop supporting it… themselves! But once again, they won’t prevent anyone else to take over support for Java on the Mac. In fact, that’s probably why they took this decision: there was a time when Apple had their own interests in Java, when there was a Java-Cocoa bridge in the development environment, when Java was even a great way to make the Mac ecosystem richer, because a lot of developers would write their desktop applications in Java to support all platforms with a single code base. But of course, with the deprecation of Java-Cocoa bridge and the advent of the iPhone and what it means in terms of popularity for Objective-C and Cocoa native environment, Apple’s stake in Java has decreased dramatically. So much so that today, those who have the most interest in Java on the Mac are… those who support Java developers. And since Steve Jobs and Larry Ellison are known to be big friends, I’m sure Oracle and Apple are perfectly clear with who is going to take over. Maybe the community can help with Soy Latte and OpenJDK, but I can’t believe that Oracle won’t step up themselves, given the overwhelming Mac install base amongst java devs. And still, whatever the solution, Apple won’t prevent any one else to support Java and offer a Mac installation package for it.

So Flash and Java are not dead on the Mac! At least not based on existing statements and choices from Apple. But we can’t know what Steve has in mind, and I can’t help worrying about the end game of all this. Given the huge success of iOS, which makes perfect sense in the mobile world, I’m really afraid that Steve Jobs won’t know where to stop and will want to reproduce the same model on desktop. And I certainly don’t want that. I’m not ready for it yet. And I think a lot of people are not ready either, so if Apple moves too fast in this direction, they could loose a lot of customers in the process, especially if Steve Jobs starts this transition and then leaves this for others to deal with. But we’re not there yet. So please bloggers, keep your heads cold and please avoid feeding fear, uncertainty and doubt.

How To Introduce Yourself… I Mean Practically

For years, I’ve been using a very simple but very effective technique to introduce myself in job interviews, and I’ve always got some excellent feedback about it. I’m not talking about the content here, but the format. It can always be a bit tricky to introduce yourself without diving too much into irrelevant details, or losing yourself along the way, or boring the interviewer to death. To avoid all that, I’ve learnt this technique at Axen, but since Axen doesn’t exist anymore per se, I might as well share it with you guys, because it’s always a shame to miss a good recruitment because the candidate wasn’t clear enough during his/her interview. So here you go…

Continue reading How To Introduce Yourself… I Mean Practically

Adobe, SpringSource, Please Help us with Grails/Flex integration

I’ve been using Grails extensively for a year or so, and I love it, I really do. I even wrote a couple of plugins for it, including one for integrating Grails with Apple Push Notification Service. But since I’m always looking for productive ways to develop, I always thought that Grails and Flex were the best combination ever… until I hit the brick wall!

There’s a Grails Flex plugin, but it has 3 major issues:

  1. The Flex plugin has not been maintained for years, and it uses the old-fashioned way of integrating BlazeDS into Spring instead of the more modern, robust and easy to configure Spring BlazeDS integration library
  2. It doesn’t deal at all with authentication and authorization which is for me a critical issue in any remoting setup. And the Flex plugin doesn’t really offer a solution to that.
  3. The Flex plugin integrates BlazeDS3 and suggests you should mix your Flex sources with Grails project, which doesn’t make it easy to work on the Flex part using Flash Builder and its great data connectivity wizards.

Those are the 3 reasons why I’ve been working on the Grails BlazeDS plugin which works great with Grails up to version 1.2.x. Unfortunately I’m tackling some challenges with Grails 1.3. And even with Grails 1.2.x, there are still some limitations with Flash Builder, mainly due to the fact that

  • Flash Builder requires a standard WAR layout, which “grails run-app” doesn’t create
  • Flash Builder doesn’t like artifacts that Groovy adds to classes at compile time, so it’s not able to generate client-side stubs

So from a Grails/Flex integration standpoint, we end up being stuck between an old solution that is working but incomplete and not integrated in tools, and a more modern solution that does not work anymore and forces us to use some workarounds.

All the community needs to make this work is a little coordinated help from Adobe and SpringSource so that we can have:

  • a BlazeDS 4 + Spring BlazeDS 1.5 + Spring Security 3 integration plugin for Grails 1.3 and above
  • a data connectivity wizard that does not require a standard WAR layout and is capable of generating client stubs based on Groovy classes.

I’ve left a couple of messages on Grails mailing lists, Adobe forums and SpringSource forums, but so far, all my calls for help have remained unanswered. So if anyone is willing to help or support this ongoing initiative, it’ll be greatly appreciated. Just leave a comment if you need such a better Grails /Flex integration and maybe it will trigger a red light somewhere at Adobe and/or SpringSource. And if someone from Adobe or SpringSource is reading this, please help!

Apple Store: The Worst (Non-) Buying Experience Ever!

I feel like I’m just waking up from an awful nightmare. Actually “waking up” might not be the right expression since I haven’t slept in 30 hours but you get my point. Let me tell you my little story.

2 years ago, when the iPhone 3G came out in Belgium, I had been waiting for an iPhone for so long that I simply couldn’t help being there on the first day. So when Mobistar launched a small marketing stunt by starting selling the iPhone at midnight, I decided to wait in line. And I did. From 4pm the day before until I received the iPhone 3G number 50 for all Belgium at 2am in the morning. The experience was painful at the end, especially because I had totally forgotten to bring a chair. But overall it was very rewarding and I was very positively surprised by the way Mobistar had organized the whole thing.

Last year, I completely missed the iPhone 3GS launch so I had a few hard weeks trying to find one.

That’s why this year, for the iPhone 4, I decided to go wait in line in the biggest Apple Store in France, in Paris, at Carrousel du Louvre. Oh my! What a disappointment! Just to sum it up so you can imagine what mood I’m in: one sleepless night, more than 300 euros in train and parking tickets, 15 hours in line including 8 hours standing, hence 2 feet hurting like hell… and not one single iPhone 4.

I was there at 9pm yesterday. Everything started nice. I was only the tenth in line. I had just bought myself one of these very comfortable and robust camping chairs. I had my iPad and some WiFi. I enjoyed it. And then things progressively but rapidly went very wrong. In front of me, there was a bunch of Russian guys who started drinking uncontrollably, and since there was simply no organization whatsoever, nothing prevented their Russian friends to join them late in the night, without any respect for the guys who had been waiting here for long hours. Then the rumor started to spread that the Carrousel galleries would open at 4am exceptionally. So when 2 security guards approached the door, no barrier, no Apple guy, nothing or no one prevented the line to turn into a big compact crowd where last come became first served. And we waited there for nothing to happen, standing, from 4am to around 6am. Eventually the security guards ended up opening the door. In fact not THE door we were all anxiously waiting in front of. No! Too easy! Another door on the side of the gallery, resulting in a chaotic and unbelievable crowd movement that finished up the last bits of line order there was.

So it was around 6am when other security guards started to appear, and those guys obviously had no clue how to handle a crowd, let alone an international one (have you ever tried to reason with a drunk Russian guy?). They just yelled at us, ordered us to move backwards and then forwards again, a couple of times, and at 7 am we had yet another differently ordered “line”, standing. But at least the security guards managed to maintain some sort of discipline by filtering who could enter the queue right in the middle for some reason. An Estonian guy behind me successively introduced his wife and his girlfriend. Of course, once they were in the line, they couldn’t care less about the dude.

And then around 7:30am, guards started disappearing again, obviously called to greater ventures down in the galleries, and chaos came back until they started letting people in, in small groups, a little before 8am. We thought “that’s great, they’re letting people in at the rate the Apple Store can process their purchases.” There were around 150 people in front of me (remember, I was 10th in line at the beginning), so I figured I might be able to execute my plan and catch my train back at 9:25am. How foolish of me!

There was another line inside the gallery! So the small groups who were let in all started running in order to win a few precious ranks (remember, I had not slept in 24 hours at that time, very practical to run like crazy!). But wait, it gets worse, there was not one line inside the gallery. There were 2!!! One for us fools who hadn’t reserved our precious little one. And one for those who reserved it online and just came to pick it up. Wait! What? Pick it up! Why aren’t those guys just waiting at home for the postman to come by and bring them the precious little one in the comfort of their home? What the heck is this pick-up thing? And soon we realized that they were letting people inside the Apple Store in a proportion of 8-9  reservations for 1-2 people without reservation. Wait! What?! What the hell is the rationale about that? At most, reservation is supposed to guarantee that you will have one, not that you will have one before everyone else!

But wait, it gets funny too. Remember those proportions? I said nothing about the rate. According to our estimation, it took somewhere around 15 to 30 f***ing minutes for a blue-shirt-guy to process one customer. 30 minutes! So guess what happened? The line of reservations grew longer and longer with fake reservations, the line of non-reservations turned into yet another big chaotic pack, security guards kept yelling at us, ordering us to move backwards. Yes, backwards! All of that while the Apple store seemed to be able to process somewhere around 20 persons per hour. So the pack I was in moved 10 meters in 4 hours, I kept seeing people without reservations suddenly changing lines magically and getting out with 4 iphones at once. And yes, at 12pm, I gave up!

I decided my body had taken enough stress. I stepped back and realized that an iPhone was not worth that! Especially not a black one anyway! So I just left the queue, went back to the train station, bought another train ticket at an indecent price hoping that I would get back home as soon as possible to spit out this bad nightmare and forget everything about it.

And here we are. It’s 4pm. I don’t have any iPhone 4, I’m frustrated and I’m pissed. I’m so pissed at Apple right now. If someone from Apple is reading this, read it carefully! Not only am I a basic fanboy of yours, but I’m also an iPhone/iPad developer and my 2 modest apps on the App Store participate in the great ecosystem that allows you to sell all those magical devices. And even without all of that, I really expected from you a buying experience at least equal to the one I had with the little Mobistar 2 years ago. And in the end, no organization whatsoever, no one from Apple to handle the logistics in the queue late in the afternoon, no one to give clear and consistent instructions to those security guards, no communication about why things were so slow. And slow they were! And chaotic too. Several people fainted in the line, a lot of people cheated, everyone was pissed off to a point you can’t even imagine. Now let me tell you this and read my lips: if that’s the only possible outcome of your corporate ego going through the roof, if all you can do is treat your most loyal customers like this (check my recent purchase record), then I SUDDENLY FEEL LIKE BUYING AN ANDROID PHONE (and developing for it!). But you don’t care, right? Because so many people are buying it anyway…

I’m exhausted. I’m starving. I’m frustrated. And all I can do right now is spit it out on my blog and laugh at myself for being such an overly optimistic fanboy consumerist. And all I want to do is forget about this day. Apple, you just created the new worst day of my life so far as I can remember. And I don’t thank you for that.

WWDC 2010 Review

Still one session to attend about closures in Objective-C, and I’ll call it a week. A little bit of shopping this afternoon in order to spend my last dollars and I’ll be ready for take-off tomorrow afternoon. So it’s time for a little summary of this week.

Overall, it was my first WWDC and I’m very glad I did it, but I probably won’t do it again. San Francisco is definitely a very nice city, and seeing Steve in live, even from very far away in the audience was an interesting experience. I also learnt a few very interesting things and psychologically a conference like this always has the same side-effect on me: first I’m depressed and humbled by all the ambient intelligence, but then it motivates me a lot to move forward, learn and do something about it. So it has definitely been a very positive experience.

Now was it worth the budget I put in it? Continue reading WWDC 2010 Review

Grails/BlazeDS/Flex/iPhone Full Stack Part 2/3

In the previous episode, we built a simple Grails backend for the todolist application. In this installment, we will create a simple Flex 4 front-end for this backend.

The following assumes that you have already installed Flash Builder 4 (formerly known as Flex Builder), either in standalone mode or as an Eclipse plug-in.

Continue reading Grails/BlazeDS/Flex/iPhone Full Stack Part 2/3

Grails/BlazeDS/Flex/iPhone Full Stack Part1/3

A couple of years ago, I published an article on this blog entitled “Flex, Spring and BlazeDS: the full stack!” and this article became very popular. Actually it broke my daily visits record. Today I’m gonna try to break this record again.

In the last couple of years, I’ve worked a lot with Flex and Spring. But in my eternal quest for productivity and user experience, I discovered Grails. Based on the same ideas as Ruby on Rails or Django, it combines a dynamic language – Groovy – with the power of “convention over configuration” to make it possible to create web applications in no time, thus allowing you to spend more time on your user experience.

Of course it’s not the only thing that has changed since then. Flex 4 is now finally out in the open. BlazeDS 4 too. And Flash Builder is finally productive enough for me to use it… in combination with IntelliJ IDEA of course.

All those evolutions in my toolset needed to be integrated, so I ended up building a Grails plugin to do just that: Grails BlazeDS plugin. And since this plugin could not be officially released without a proper demonstration, here we are.

I prepared this tutorial for a BeJUG talk I gave last week. So I want to thank Stephan Janssen and the BeJUG for inviting me… and for staying with me without throwing vegetables at me, given all the failures I had during the live coding session. For those of you who were there: I clearly identified PermGen space as the guilty part responsible for all these blank screens. In fact, since Grails migrated from Jetty to Tomcat as their runtime server, default java memory settings are not enough anymore, so I always configure my projects for that, but of course, in live, I forgot…

Anyway. I’m going to publish this tutorial in three episodes, each one of them being accompanied by its very own screencast on Vimeo (damn Youtube and their 10-minute limit!). But I’ll also publish the tutorial transcript right here for those who want to go faster.

Important note: this tutorial covers the following set of technologies in the specified versions:

In particular, it seems that Grails 1.3 that was just released a couple of days ago breaks Grails BlazeDS plugin. I’ll update both my plugin and this tutorial when I can make them all work together again.

Continue reading Grails/BlazeDS/Flex/iPhone Full Stack Part1/3

Presentations

Just a quick note about past and future talks. Yesterday evening, I gave a presentation at Brussels’ Café Numérique to set a few facts straight about Flash and try to stop th FUD madness. It was very funny trolling in live. Excellent atmosphere. If you’re a Belgian geek (or you don’t want to be afraid of technologies anymore) that’s the place to be every Wednesday.

I’ll also give a talk for BeJUG on May 6th about my new favourite stack: Grails, BlazeDS, Flex and iPhone. Be sure to join the BeJUG and book your seat at least one week before the event.

betRway is Back!

To all my French-speaking readers… A tous mes lecteurs francophones, je viens de relancer le projet betRway avec un nouveau post sur betRway.com. N’hésitez pas à aller y faire un tour, à laisser vos commentaires et à bookmarker le site. Vous pouvez aussi suivre le projet sur Twitter.