1

iPhone Tech Talk

Posted by admin on Oct 25, 2008 in Apple & Mac OS X, Internet

Last wednesday, I took a day off work to attend the iPhone Tech Talk in Paris. Apple had reserved a couple auditoriums at Université Paris 5 (école de médicine), kind of a weird place for a tech event to happen. Nonetheless, the event was pretty interesting (I unfortunately cannot talk about what happened there, because it is under a NDA). Although, I can say that almost all information giving can be obtained by signing up for free access to the iPhone SDK (then you need a 99$/year subscription if you actually want to submit to the app store).

Now that the iPhone SDK NDA is lifted, I can talk freely about my experience using the tools provided by Apple in building my first app. As of today, my app was downloaded by over 35000 people in the 65 countries where there is an Apple iTunes store. Of course, the majority of the people who downloaded it are from France. I think that I will open source the code on Google Code pretty soon. There are still tons of things I need to improve in this app, but it’s pretty usable for something I wrote in a few days. I received dozens of e-mails suggesting improvements and thanking me for the app. Open sourcing it will simplify contributions and improvements.

The most painful thing about the current iPhone SDK (I’m talking about version 2.1 here), is that Apple does not provide an official framework for mapping. Developers submitting to the the app store cannot rely on the UI components that are used in the official “Maps” app. On the one hand, Apple is strongly encouraging developers to build there app using the standard components they provided and base their UI designs on patterns seen in the Apple-provided apps (iPod, Stocks, Address Book etc…), but they are seriously affecting the overall quality of map-based apps by not providing a clean, fast, simple API for mapping. Most developers had to reinvent the wheel by implementing their own mapping component. For instance, my app uses a Google Code project that basically uses a UIWebKit (a web browser component) to call the Javascript Google Maps API, this is a pretty lousy, slow and inefficient way of showing a map…. but the GMaps license prevents people from calling the map tiles directly. Another project came out recently, this one actually tries to create a full blown Cocoa-based map component by using royalty free base maps (the old MS Virtual Earth tiles or OpenStreetMap). These basemaps look pretty crappy when compared to GMaps, but at least they’re free.

The most exciting thing that Apple did recently is definitely the opening of an official, Apple-sanctioned, developers forum. I hope that developers who feel the same way I do about maps will let Apple know about it.

 
2

Java’s Achilles heel

Posted by admin on Apr 20, 2008 in Apple & Mac OS X, Internet, Techno

Many aspects of the Java platform have improved tremendously over the past years. Sun has always focused a lot of energy around improving “business” features. Hopefully, they’ve recently diverted their focus on Desktop issues. In this regard, they’ve adressed performance (Hotspot compiler, refreshed OpenGL / DirectX based Java 2D pipelines), data binding (JSR-295), Swing Application Framework (JSR-296), new look-and-feel (Nimbus) etc… One area where most developers agree that Java is still lagging behind the hip / trendy frameworks (Flex, AIR, .NET 3.0, Silverlight…) is definitely video !

The way I see it, Java’s main advantage is the overall consistency and cleanliness of its APIs, which makes it an ideal academic language and encourages high quality object-oriented designs. After all, it’s not about the programming language itself… even though I generally find Java source code sexier than other languages.

Last summer, when I started working on the mini multitouch table project, I got up to speed with the state of video in Java. I realized that the Java Media Framework hasn’t been updated in ages and its APIs feel pretty old by today’s standards. On the Mac OS X platform, Apple willingly dropped support of the Quicktime for Java bindings, which currently forces Java developers to rely on very very old Quicktime interfaces, that do not benefit from the major Quicktime overhaul made in Tiger (10.4). I’m refering to full access to the features of newer codecs (H.264) and high performance capture interfaces (QTKit).

A few days ago, I attended a couple of the final project (projet synthèse) presentations by students of my university. A friend of mine, François Caron, presented his implementation of an error correcting codec for live H.264 broadcasting (such as live TV feed or mobile videoconferencing). Let me point out that it is a lot more challenging to do error correction in these contexts as you don’t have access to pixels in next frames when correcting the current frame…. unless you buffer the data, which is totally unacceptable for videoconferencing. François implemented a new optional feature available for RTP packets (RFC3984) which allows to specify the decoding order of the macroblocks (top-to-bottom order VS checkered pattern). The benefit is that if, for instance 50% of RTP packets are dropped (or delayed) you still have a lot more chance to have a nicely scattered set of pixels in the buffer. This allows you to apply bilinear interpolation between the macroblocks of the checkered pattern for spatial error correction. Also this increases chances to have more good pixels from previous frames when doing temporal error correction. As I’ve always wanted to experiment more with H.264 in general, I started looking for alternatives to JMF.

FFMpeg, GStreamer and VLC are pretty much de facto open source libraries for C/C++ video development. I was pleased to see that all of them have wrappers for Java: JVLC, FMJ/FFMpeg, GStreamer-Java. The level of support and quality of most of these abstraction is pretty crappy though….

Obviously there is still a lot of work to do and I hope that Sun and Apple will sort this out soon (hint: Java One 2008 is in two weeks). In the meantime, I’ll have to resume learning Objective C and refresh my C++… in any case it’ll be useful to do some more useful iPhone SDK hacking.

 
0

Multitouch: the state of the union.

Posted by admin on Mar 20, 2008 in Apple & Mac OS X, Techno

A couple of days ago, Steve ended the dreadful 6 months wait after he announced that Apple was going to provide a full blown iPhone / iPod Touch SDK. Needless to say that I was among the people who caused the Apple Developer Connection servers to collapse by desperately trying to gain access to the sign-up page for the program. I was really impressed by the announcement and the general quality of the SDK that I got to experience.

Although, I was a bit sad to see that they still havent’ ironed out the issue of providing a clean object-oriented abstraction for multitouch gestures. That has been the source of my nightmares for the past year or so ;-)
Sometime before the iPhone came out last year, I was working on a small scale multitouch project involving the use of dot-matrix LEDs (see Jeff Han’s site to understand what I’m talking about). Unfortunately, I never got around to make it work since it required a deep understanding of microcontrollers and low level electronic circuits timings. I initially wanted to create a cheap reconfigurable multitouch USB device by lighting up specific LEDs designating “soft” sliders and switches. In the meantime, Yamaha came out with the Tenori-On, a musical synthetizer that also uses a grid of LEDs. I’m not sure that actually sensing touch using the technique demonstrated by Han and carefully described in this Carnegie Mellon paper.

Now, I ruminated many times over this problem of abstracting multitouch gestures, especially during the time I worked on my infrared LED-based mini multitouch table project last summer. I still wasn’t satisfied with my design until I saw the GestureMatch sample code provided by Apple with the SDK. Eureka ! The missing piece of the puzzle to complete the abstraction was basically there, in code form ! They are using cubic and quadratic Bezier curves to store the information and they use some geometry to check if the path closely fits the parameters of the curve. It is pretty rough and incomplete code, but seeing how this code works is enough to get ideas flowing in my head on how to generalize and add direction and timing support.

 
2

Mac OS X UNIX geekery aka. fun with Darwin

Posted by admin on Jul 7, 2007 in Apple & Mac OS X, Techno, Whatever

I thought I’d share some of my favorite UNIX commands (no, not the stuff for beginners), stuff I use almost everyday on OS X. Some of these commands are in POSIX, but a lot are Darwin / OS X specific (they are the other reason why I think OS X is cool, besides what Steve’s reality distortion field says).

Display ARP cache (useful to get MAC addresses of devices):
arp -a
Flush local DNS resolver cache:
lookupd -flushcache
Browse the LAN for multicast DNS (aka. Bonjour / RendezVous):
mDNS -B _daap._tcp local.
Useful alias to scan 802.11 networks with Apple Airport:
alias ap=”/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport”
Update locate database:
sudo /usr/libexec/locate.updatedb
Quick grep to search through all files under a directory hierachy:
grep -ri “super regexp” ~/Documents/ (for instance)
Spotlight live metadata find:
mdfind -live [PATTERN]
built-in image manipulation tool based on Quartz (replaces ImageMagick when you don’t have it):
sips RTFManpage
ping broadcast address is always useful to find IPs and MACs of devices on the subnet:
ping 192.168.1.255 (for instance)
Dynamically resize partitions (great to prepare Macintel for triple boot):
diskutil resizeVolume RTFManpage
Darwin substitute for sed, powerful text manipulation, format conversion etc… (handles RTF, HTML etc…):
textutil RTFManpage
Darwin’s super intelligent launch command ;-) :
open [somefile]
Trigger interactive screen capture:
screencapture -i
Launch Apple software update:
softwareupdate -l
Interactively manage your OS X Keychain:
security -i
Use OS X text-to-speech:
say -v “Bad News” “Mac OS X Leopard is gonna come out only in October of two thousand seven!”
read magic bytes of any file:
file [somefile]

This is a work in progress. I’ll probably add more stuff in the next few days / weeks.

 
2

Building Scalable Web Sites

Posted by admin on Jun 20, 2006 in Apple & Mac OS X, Internet, Techno

I got this brand new book written by Cal Henderson, Flickr’s lead engineer. Cal has a great tongue-in-cheek writing style, which makes reading deep Web applications architectural discussions a pleasure.

The book mostly concentrates on architecture, so it’s really not a programming book. It covers hot topics such as version control systems, i18n, Web apps security (XSS, SQL injection …), e-mail services, APIs … There is a nice chapter covering “Scaling Web applications” : load balancing, replication, caching etc… As this comes from one Flickr’s clever minds, it has a Web 2.0 feeling (APIs, lightweight architectures…), which I like a lot.

Over the last year, working for Flickr really became my dream job … still got one year before I get the ring !

 
0

Une p’tite tasse de café libre ?

Posted by admin on May 16, 2006 in Apple & Mac OS X, Internet, Techno

Sun Microsystems a annoncé, tel que les rumeurs le laissant entendre, son plan de rendre d’ouvrir le code source de Java.

“We will open source Java, we just need to figure out how,” said Green, referring to his desire to foster Java specifications and reference platforms compatibility along with the openness. [1]

Cette déclaration est très intéressante et on peut supposer que Sun envisage d’employer le modèle de la “cathédrale” (i.e. Eric Raymond’s “The Cathedral and The Bazaar”). Lors de la même journée de la conférence annuelle JavaOne, Simon Phiips a déclaré qu’il n’y avait désormais aucune limitation pour l’inclusion de la Java Virtual Machine de Sun au sein des distributions GNU/Linux.

Communiqué de presse PR

 
4

Une potion magique pour vos sites Web !

Posted by admin on Apr 3, 2006 in Apple & Mac OS X, Internet

J’ai reçu aujourd’hui une invitation à utiliser la version bêta publique de WebElixir.

Il s’agit d’un correcteur orthographique et syntaxique pour le Web. Ainsi, vous pouvez lui demander de balayer votre blogue à la recherche de coquilles, ou d’erreurs syntaxiques, et ce, tant en Français qu’en Anglais. L’outil est très simple d’utilisation et permet également de vérifier les liens brisés. J’ai grande confiance en ce logiciel puisqu’il est créé par la même société qui produit l’excellent logiciel Antidote Prisme : Druide Informatique. Le bêta public permet de balayer 20 pages ou 100 000 mots, ce qui permet d’avoir une idée des capacités de la bête. La version pro est offerte selon une échelle de coût variable en fonction du nombre de sites et des fonctionnalités que vous désirez utiliser.

Hourra pour l’ingéniosité québécoise!

WebElixir en action !
WebElixir en action !

 
3

Picture featured on ifoAppleStore

Posted by admin on Jan 2, 2006 in Apple & Mac OS X, Internet, Photography

One of the pictures I took at the Apple Store in Boston two weeks ago, released under Creative Commons license on Flickr, has been reused by ifoAppleStore (just look at the bottom of the page). It pretty nice to see that CC works ! I mean, I like to take pictures and I know I can’t make any money of this, but it’s cool to have some recognition with a little tag at the bottom of the photo stating “francois @ edito.qc.ca”. This page was featured in a BusinessWeek article also. That shows how Flickr tags work pretty well (As of Jan. 2th, it appears I’m the only one that posted a photo with the “ipodexpress” tag).

 
2

All aboard ! For Ruby On Rails 1.0 !

Posted by admin on Dec 14, 2005 in Apple & Mac OS X, Internet

w00t ! What a nice Christmas gift, Ruby On Rails 1.0 just came out. And they have a bunch of übercool new demo movies. Just have a look at the demo for implementing a ROR controller that pulls data from the Flicrk API service using AJAX ! To top it off they even use some cool effects à la script.aculo.us !

 
0

Flic, Flickr, Flock

Posted by admin on Nov 25, 2005 in Apple & Mac OS X, Internet

The social software wave is really starting to catch on … introducing Flock, a social Web browser. It is based on the Firefox engine, it provides enhanced feed aggregation, a powerful blog editor (you can drag and drop anything from the Web and jump start a fresh blog post), a Flickr bar to stay in touch with your contacts’ latest shots, a nice little star button to post your del.icio.us bookmarks and a clean and refreshing Mac-like interface. It’s in beta right now, but it worth looking at it ….

Copyright © 2010 Edito.qc.ca All rights reserved. Theme by Laptop Geek.