Firefox OS App day at London

I signed up for the event with a mix of curiosity and laziness--an event that starts at 8.30 AM on a Saturday is not something that routinely manages to excite me as I sort of prefer to live week-ends at a slow pace, but the idea of building software for mobile with open technologies and maybe a minimum set of changes/additions really excites me, so I finally managed to reach out the shiny new Mozilla office in St. Martin's Lane in time.

On the way there, I was treated to a beautiful blue almost cloudless sky, and magnificent views of the sun over the buildings in St. James's Park. It was the prelude to a great day!

Sun over St. James's Park Entering the office I immediately felt the good vibes--and no they weren't playing any music (yet)! But there were lots of posters of past Mozilla campaigns (remember the old galactic retrofuturistic Firefox 4 images by Steven Olds?), positive slogans and all the sort of imagery for which Mozilla is known and loved. I had already forgotten the fact that it was Saturday and I hadn't slept my usual 8 hours, and had also started to think how I would build my hack-demo for the day. But that would be once the mandatory introductions to Firefox OS were done!

A short while after, the host put a couple of presentation-videos about Mozilla and Firefox OS. I'm a bit ambivalent with regards to playing videos to an audience, but it was OK as they were relatively short. Still, I'd say that if you've brought people together, talk to them, don't press play!

Then it was the time for the always entertaining Chris Heilmann, to whom I had said "hi" earlier. I have been following him in Google Plus for a long time and it was sort of weird meeting him face to face, as he totally looks like his avatar! I quite enjoyed Chris' talk; it was quite similar to one he gave a bit ago for the Hacker News London user group, but it was great seeing him live anyway.

Then it was the time for the writer of Firefox OS documentation to give us a quick tour about the Firefox OS app fundamentals. I'm deeply ashamed to admit that I don't remember his name, and didn't take any notes so I can't credit him for his talk or the great coffee he brewed for me later on, as I was a bit impressed by the pro-espresso maker at the office. So if he reads this, please accept my apologies!

Finally Mounir Lamouri jumped on stage (albeit metaphorically, because there was no step over which to jump whatsoever), and showed us real working code. He was a bit hardcore, as he seemed to be rebuilding the simulator each time he changed something in the example app, but I think that's because he was getting the app "flashed" as a stock app in the simulator. I also liked that he was using Linux, Gnome 3 and Vim! :-)

After this, there was the lunch break, when I managed to ask Mounir a couple of questions about getting access to the live camera feed with Firefox OS (I think you can guess where I am heading). Sadly it doesn't seem there's support for much more than picking static images (yet).

I also had the opportunity to speak to Benjamin Ellis and another (anonymous) nice guy who was sitting in front of me during the talks. A bit after, we were joined by Christian and also Razvan Caliman, who made a nice app demonstration at the end of the day too.

And then we went straight to... HACK HACK HACK HACK as the timetable described. It was ages, no, make it years, since I last joined any sort of hackathon or partycoding event, so it was fun to experiment that hack-it-on-time-for-the-deadline feeling again. The YAGNI spirit whispering to my ear, I went ahead and discarded reimplementing many features from my original Android RegExpert game in order to get something that worked in Firefox OS ready for the demo time.

After having developed for Android I must say that the Firefox experience is LOOOOOOOOOOOOOOOVEEEEEEEELY. The simulator installs quickly, and launches really fast too. To give you an idea of how lightweight it is, I'll just say that I have been coding all afternoon, and when I left Mozilla's office I still had more than 30% of battery in my laptop. REALLY IMPRESSIVE.

I cloned Robert Nyman's Firefox OS boilerplate app and once I ensured it worked with the simulator, I created a new folder, fired up the local server from there (using the python -m SimpleHTTPServer trick), and started building my own app by using the boilerplate app as an example for file structure, required files such as the manifest, JavaScript events, etc. It was way less painful than I expected; actually, it was a pleasure to be able to build so much stuff in a little amount of code and time. HTML+CSS+JS make for such a powerful productive toolset that each time I looked at the original Java source I was feeling more horrified: did I really lose so much time back then? Did I really have to write custom components when I can get the same output with a couple of lines of CSS? And so on and so on...

I had a working very, very early pre-pre-alpha of the game about 2 hours later. I then added some sounds and nifty things such as a progress bar. I am even surprised by the relatively clean code in the ProgressBar component. Here's it in instacode form, haha!

Progress Bar code

I tried uploading my app to my server but apparently there's some sort of firewall at Mozilla preventing me from accessing my site host with my non-standard port, so I had to demo using my computer. It took us a bit of time to set up the screen (one would think that this would be a solved problem by 2013...), but we got it sorted out and I could demo my little prototype. I think I did what I always do in these cases: get super nervous, speak super fast and fail to communicate half of the message, boohh! But apparently people liked the game, so the suffering was worth it! :-)

Here's me presenting the alpha:

reg expert demo

With thanks to Mark Coggins for the photo!

There were so many interesting presentations, ranging from the super useful to the deliriously funny, but I was sort of tired at that point and my peak of energy had already been reached, so I can only distinctively remember a couple of them: the Anger Management app by Ruth John (just so silly that it's awesome) and the currency calculator for Romanian banks by Razvan, the latter being an app that solved a real problem (namely how to find the bank that gave you the best exchange rate in Romania), and I also liked how he gave a short introduction describing the problem before diving into the app presentation proper. Oh, and I just remembered there was also an app that would wake you up when you reached your train stop, so you could use the train time for sleeping instead of worrying about not alighting in time!

After the presentations were over we networked a bit more but I was a bit exhausted so I decided to head home, tired but in quite high spirits--just as like in the old demoscene days: already planning what I would build with my newly acquired knowledge! ;-)

I'll spare you the alpha version of the game and let you know when a beta is ready if you don't mind! Meanwhile, I'll let you admire the little present they gave the presenters--a USB key in the shape of a Mozilla Marketplace bag. I also got that sticker which I still don't know where to stick, and a t-shirt, but it is not in the picture. The tea and teacake were my own treat for not being a coward and presenting something, haha!

Tea, tea cake, usb key, firefox sticker