Ever since I switched to Linux years and years ago (and since then, to OS X), I’ve been carrying around a .profile script to configure my shell environment. The other day, I was browsing Ars Technica when I found a poster who had a very nice script in his prompt to add GIT info to his PS1 variable. Since I mostly use Subversion, I knew I had to adapt it but someone already did all the work! Let’s recap. My prompt usually looks like this:
user@computer ~/Documents/LCMM/Site/lcmm/trunk
That’s pretty good, but what if you could have SVN info when in a local repository. Here’s what I’ve got now:
user@computer ~/Documents/LCMM/Site/lcmm/trunk
SVN => [trunk:92]$
This gives me not only the local path, but also the current SVN path and the revision of the current directory. Of course, once you’re got that you can imagine other improvements that could be done here. To do that, here’s what I did. First, I downloaded this script on GitHub and placed it in /usr/local/bin (put it anywhere you want, it doesn’t matter).
Next, edit your bash init script (.profile for example) and add:
source /usr/local/bin/__svn_ps1.sh
export PS1="\u@\h \w \`__svn_ps1\`\$ "
That’s it. Pretty neat trick that could be adapted to anything else really. It works because the function returns either SVN info or nothing at all if this is not a local SVN repository.
Anytime there’s a discussion these days about the iPhone and its competitors, Flash is usually mentioned early on in the discussion along with Multitasking. Today I want to address Flash because it’s something I strongly believe we need to kill. The topic came to me last week when the news came out that Adobe was blocking the adoption of HTML5. We still don’t have all the details there, but it did remind me of my hatred for Flash in general.
Flash is a weird product. On the one hand, it did things very well. When Macromedia (now Adobe) introduced it in 1996, they managed to make it so ubiquitous that it now has 98%+ install base. That’s quite the achievement.
On the other hand, Flash is terrible and that’s something most people agree with except perhaps for Flash designers. It’s being used today mainly for 3 things : video streaming/playback, entire or parts of web sites and banner ads.
It’s too bad Web standards are so slow to be adopted because for video streaming, there’s already a much better solution than Flash. Youtube, UStream and many others are (slowly) moving to it as more and more browsers are supporting it. Of course, as always, Internet Explorer will be the one slowing us down for this. For Web sites, the “new” technologies like the latest revisions of Javascript and DOM scripting can absolutely compete with Flash.
There are 3 major problems with Flash. Let’s review:
First, the flash player is very poorly implemented on OS X and Linux. Performance is terrible and it sucks battery life out of your laptop in record time since it pegs the CPU to 100% in seconds. That makes it inappropriate for things like cellphones in my opinion. If you visit a site with banner ads and a few flash movies, does this means you will lose 20-30% of your battery life in minutes?
As a second issue, I would point out that the flash authoring app is way too pricy. In a world where everything gets pirated, it may not seem like a big deal, but Flash, unlike Visual Studio from Microsoft and XCode from Apple has no free versions for people at home to play with. Coupled with Adobe’s usual upgrade routine every 18 months, it make Flash to be extremely expensive.
The third problem is that Flash is controlled by one company. That company decides if the Mac OS X version will be performing well. That company alone decides when a new version is released.
Add to these 3 problems the fact that many Flash websites are terribly designed and would be hard to see on a smaller screen and that these sites are usually badly (if at all) indexed in search engines and you start to understand why Apple is refusing to include it on the iPhone.
Because of all this, I’m actually happy Apple is doing this. It has forced some sites to reconsider the use of Flash and I hope it’s a trend that will continue.
Hopefully more companies will be bullish like Apple and take a stand.

Oratoire St-Jospeph in Montreal
Since the very beginning, technology has always brought about a fierce need, in many of us, to defend and protect our choices — our favorite tools. Be it Vi versus Emacs, open source versus closed source, Mac versus Windows or XBox versus Playstation, there’s no escaping it : visiting an online forum or starting a discussion with anyone just about guarantees that an argument will ensue. And you would think these would largely be done by teens, but even a discussion between a group of adults usually ends in an argument.
It’s a phenomenon I’ve never quite understood even if I will readily admit that I spent years doing exactly that. I used to think that anyone not using Linux was just plain wrong. These days, I still have preferences when it comes to my text editor of choice (Textmate and vi) or my OS of choice (OS X), but I’ve taken a decision long ago to stop arguing and just accept that at the end of day, it’s always about a personal preference and when it comes to personal preference, there really is no right or wrong answer.
The real question though, is why. Why do we feel the need to defend our choices that much? It’s especially funny when you consider people are defending giants like Apple, Microsoft or Sony and accusing the other of being evil, wrong or incapable of doing a good product. If there are anyone out there who don’t need help defending themselves, it’s companies like these with tens of thousands of employees and billions in revenue.
It’s too bad because what we’re losing is not just a possibility to have interesting discussions online (although that would be nice) but all these “wars” (among not companies or products but by the fans) really only serves one purpose : slowing doing innovation and confusing the less experienced who are often intimidated when asking a question online. Do a test: ask if you can play online on your XBox 360 and within a few responses you’ll have people suggesting a PS3 because it’s free. A few more posts after those and you’ll have a argument for several pages about which one is better.
My solution to all this? It really pained me when I realized what I had started doing, but I now almost never say again too negative about any piece of technology or company. There’s just no point to it. Some will applaud you, some will explain to you just how stupid you are.
It’s too bad we can’t agree to disagree. The Web would be such a better place.
It really is quite ironic. In an age where we tweet 20 times a day and we have micro statuses on many other sites, never before has there been a bigger need for a real, full-sized blog. At least for me, the 140 characters limit is both a blessing and a curse. It gets me to publish everyday, but it’s hard to express a view or an opinion in one sentence. Hopefully this blog will allow me to complete my thoughts without resorting to using multiple tweets which I think completely defeats the purpose and design of Twitter.
If you’re seeing this as it launches, you’re looking a temporary wordpress design that I chose mostly because if fulfilled 2 basic needs : it looked OK and it worked. The full site, including my lifestream is coming in a few days. I’m building a new theme, complete with new widgets to do it and I’ll be blogging about my experiences using the WordPress API in the next few days.
Thanks for reading and I’ll see you soon.
EDIT: Scratch that, site is now online for all to see and admire. Well Ok, maybe not admire.