Abhishek Bhatnagar

My views and experiences in the dual-natured worlds of open source and nonprofit

Is DOCX really an open standard?

It is hard to believe that even in 2012 we still struggle with standards as common as those of documents, presentations and spreadsheets. The de facto formats of these of course are those used by Microsoft Office (docx, pptx, xlsx (collectively called OpenXML or OOXML)), which causes a growing number of Libre and Open Office users such as myself much chagrin.

Like everyone else, the majority of office files I receive in my inbox belong to one of the OOXML category, and invariably as I edit and return the document to the owner, they complain that I have in some way corrupted or changed the elements within because of my choice of software, which is usually true. Then they berate me for being using “crappy” open source software and in one case, for being an “anti-Microsoft hippy”.

Let’s be clear, I am not an anti-Microsoft hippy. Like many of you, I run Linux and under a normal scenario, do not have access to Windows, so running MS Office is really not an option available. Even if it were, I would detest having to pay for it. So for the simple reason of including myself and the millions of others who use the various open office suites out there, I request that you stop using OOXML formats, at least until Microsoft truly supports them in MS Office.

I’ve been angrily told before that OOXML or OpenXML is indeed an Open Format, which is technically correct. But there’s more to the story than that, if there weren’t, Libre and Open Office would have built perfect support for it a long time ago. They realize that not fully supporting Microsoft formats is one of the key repellers to new users for their base, so they would not not implement OOXML by choice.

The real reason that these software do not fully support OOXML is because there is a difference between the OOXML specification, and OOXML implementation in MS Office. To understand why, you have to familiarize yourself with three key identifiers:

  • ECMA 376
  • ISO/IEC 29500 Transitional
  • ISO/IEC 29500 Strict

ECMA is a private international standards organization much like the better known ISO. The difference between the two is that ECMA is made out of companies, and while ISO is made out of countries. There is certainly a need for both them in the technology market.

ISO along with another consortium called OASIS adopted the ODF (Open Document Format) back in 2006 to solve the document standardization crisis. This is the format that is used by Libre and Open office, along with most other open office suites. Such a format becoming successful would of course threaten Microsoft's already established monopoly in the Document market, which at the time ran on closed formats such as doc, ppt, and xls. So in 2007, they decided to create their own open standard with ECMA called OpenXML or OOXML, otherwise known as ECMA-376. This was the new “XML based” replacement for ODF, which of course seemed unnecessary to ISO and was initially rejected. But with the use of some muscle muscle, Microsoft got the proposal fast-tracked in ISO even though reportedly 20 out of the 30 countries involved were not interested in passing it. This however didn’t stop the ISO secretariat Lisa Rachjel from pushing it through anyway after deciding “to move Open XML forward after consulting with staff at the International Technology Task Force”.

So ISO had a new incoming standard, but specific clauses of it still met resistance. To solve this problem, it was proposed that OOXML be split into two sub-standards, namely ISO 29500 Transitional, and ISO 29500 Strict. The Strict version was that which was accepted by ISO, and the Transitional version was fairly granted to Microsoft to allow them to slowly curb out older features from the closed source days. Nothing wrong with this, its only fair to their users.

However, the problem arose when Microsoft decided not to fully implement the Strict version of the standard in Office 2010. As published my Microsoft here and stated by Wikipedia here:

Microsoft Office 2010 provides read support for ECMA-376, read/write support for ISO/IEC 29500 Transitional, and read support for ISO/IEC 29500 Strict.

What this means is that when you save a document in MS Office 2010 or prior in any of the ‘X’ formats, you are not saving them in the advertised OpenXML format. This document will hence NOT be properly readable by other software such as Libre and Open Office and they will make changes to the document when they are opened and saved within them. The problem hence lies with the former, not the latter.

But, to be fair, we should note that we have been promised full ODF support in the upcoming Office 15. Alex Brown has an excellent post on this subject with more details about the gap between the promises Microsoft made in 2008 to what they actually delivered in 2010. Hopefully they won’t follow suit and actually keep their promises this time. I am actually genuinely excited to find out.

Lately there has been a shift towards the usage of PDF, especially when it comes to documents that do not need to be edited such as resumes, essays, and reports. The reason for the change of course is an organic realization that PDF is a no-bullshit format works consistently and predictably across all platforms. While PDF is not exactly an open format, Adobe does provide free and consistent specifications for all to implement it as they please. If you are an MS Office user and also have been a part of the great PDF shift, you too have something to gain from the true open implementation of OOXML.

I would still prefer to see ODF win the battle, but if this happens, then at least their will be much fewer reasons to complain. Plus, Libre Office developers won’t be jerked around as much in trying to play catch up to an always moving target.

Anyway in the meanwhile, please save your documents in ODF when you use Microsoft Office.

How to buy a road bike

Buying a road bike as a beginner can be quite the daunting task. You’ll likely see bikes available to you starting at $60, going all the way into the $1000s with seemingly little differences between them. But even the smallest of parts do make a difference on a bike and should be considered carefully. The following is my experience of going through that beginner phase and some lessons that I can offer from it. If you’re a beginner, it might help you not make some mistakes that I did.

My first roadie was a Sears Free Spirit 10-speeder with a shiny and sleek looking frame. When I bought it, I didn’t know what I was buying and was attracted by the low cost and what seemed to be a good condition. My advice to you: don’t buy a Free Sprit bike!

The Free Spirit brand was founded in the 60s (I think) and has been ubiquitous around North America since. You’ll find 100s of these bikes on Craigslist for very low prices; they look attractive and stylish (have a vintage look to them), but are utterly crappy contraptions. To be sure, the Free Spirit brand applies to a wide swath of bikes some of which are better than others, but they are department store grade and were always meant more for show than a good ride.

I rode mine for over a year with my typical route being 25ks including many steep up-hills. Needless to say, I did not enjoy those rides very much, and it almost ruined biking for me. I ended up using the bike more so on flatter surfaces with predictable routes. Here as I learned slowly were the specific problems with the Free Spirit:

Avoid those things. Seriously!

If you go for vintage bike, you are still likely to meet stem shifters and extension levers, but just make sure they have quality derailleurs, like Shimano 600 (Ultegra on new bikes), 150, Exage, or other higher-end models. This makes a huge difference in the overall efficiency of your bike.

My current bike is not a vintage, but not exactly a new-order bike either. It’s a Giant Kronos touring bike. By no means the best, but certainly good. It has a CroMoly frame (23 lbs for the whole bike) with Shimano RSX derailleurs (again, not the best, but good). The brakes are double-pivoted as opposed to cantilever – this is not such a big deal for normal city riding, but if you find yourself on wide roads with fast moving cars often, try and upgrade to the former.

The Kronos is an absolute treat to ride when compared to the Free Spirit. It glides effortlessly on flat roads and makes going uphill extremely easy. I do the same path as before in literally half the time now.

Moral of the story: don’t buy Free Spirit bikes.

Raspberry Pi as a mobile computer

Since acquiring a Raspberry Pi a few weeks ago, I’ve been spreading the good word about this awesome device in my social circle, but lots of people it seems are unsure as to what its importance is. At a Sentinel Project meeting recently, we had a bit of discussion on this, and I thought it would be a good idea to record some of what transpired here.

Data Crunchers vs Social Connectors
Today, people use their computers primarily for Email, Facebook, Reddit and Twitter. So much so that our operating systems have been entirely redesigned to put these features at their forefront. However this is divergent from the original connotation of the word ‘computing’ which applies to machines that are good at data crunching as opposed to solving problems of connectivity. With smartphones, we have brought these latter kinds of computers into the era of mobile computing, but not the former. Raspberry Pi helps us do just that.

iPhones, Androids and Blackberries
The three best known smartphone operating systems today all do essentially the same thing. They give us access to email, text messages, BBMs, and other various social media outlets. But they still follow a very simplistic “one app at a time” model, and hardly allow for much complexity in their usage. To be sure, the three do it in a different way from one another, and I like to put these differences like this: iPhones are to Android what Blackberries are to iPhones. Meaning that in the smartphone-ness hierarchy, the order starts at Android and ends at Blackberry. I have a feeling several of you will agree with me about Blackberries, but let’s consider why I am giving the iPhone a shaft here.

iPhones are notoriously closed devices that without jail breaking are owned as much by Apple as the person who paid for one. A key example of how they limit their users can be seen in the challenges that Mozilla faces in getting Firefox to run on iOS. Right now, if you go to the AppStore and search for Firefox, you’ll have to download “Firefox Home”, which is nothing more than a front-end to Firefox that gives you access to your bookmarks, and browsing history. Firefox normally runs on a layout engine called Gecko, but since iOS devices do not allow execution of any 3rd party interpreters, Gecko is not allowed to run on these devices. This excludes iOS from running anything more than apps that Apple approves, and hardly makes them worthy of the title “mobile computers”.

Android devices tend to do better in this department, but still are forced to follow a standard OSGi style activity life cycle.

Raspberry Pi
So what are those amongst us who wish to use mobile computers for untethered data crunching to do? Well, Canonical’s Ubuntu for Android program, which will allow high end Android devices to utilize one core to run Ubuntu Desktop edition is likely to help. But this project is far from being released, and will ultimately apply to expensive devices.

And this is where devices like Raspberry Pi come in. By giving us access to a free and open hardware that costs a pittance of smartphones, and can be run off 4 to 6 AA batteries, users and developers are free to write their applications in an unrestricted environment. The founders of this device created it primarily for use in Education, but what they’ve given the world is a true mobile computer that can do more than just run apps.

This phase of mobile computing is still in its infancy, but there’s nothing quite like an open environment to foster growth. I am sure that soon climate scientists, construction workers, zoologists, educators, rock climbers, geologists and others will find applications in devices like these that smartphones cannot handle. The world is already looking forward to an Arm processor revolution, but devices like Raspberry Pi will ensure that there will also be an application revolution for such devices.

For organizations like the Sentinel Project which seek the use of technology to solve humanitarian problems, Raspberry Pi is a boon.

97th Anniversary of the Armenian Genocide

April 23, 2012 marked the 97th Anniversary of the Armenian Genocide. That week myself and my colleague from The Sentinel Project, Elizabeth Kellett got to attend the Toronto Armenian Community’s commemoration of the event.

Elizabeth has written a detailed post about the event here, give it a read. I’ll be covering a bit more about Turkey’s denial of this genocide and the dangers of it soon.

White Paper: A Case for the use of UAVs in Civil Conflicts

Download PDF

Getting started with Raspberry Pi

Unless you live on Mars, you’ve probably heard of Raspberry Pi by now. I was one of the lucky 1000 who got dibs on the first batch of these, and mine shipped in four days ago. With the off chance that you are indeed a Martian, I’ll do a brief introduction to the project here.

If you already have yours, and just want to get it running, skip to the Making It Work section

Introduction

The Raspberry Pi Foundation is a non-profit based in Cambridge, UK with a stated goal to “promote the study of computer science and related topics, especially at school level, and to put the fun back into learning computing”. They used Broadcom’s BCM2835 system on a chip which contains

  • the ARM1176JZF-S 700 MHz processor
  • a GPU
  • 256MB RAM

In case you’re wondering, that’s exactly what a ‘system on a chip’ is – a chip that contains the basic components that are usually part of computers systems, such as a processor, RAM, ROM, etc. Using this design along with an SD Card for a hard drive, they produced a Model A and a Model B.

The differences between the two are the following:

Model A Model B
Cost $25 $35
USB Ports 1 2
Network None Ethernet
Power Rating 500mA 700mA

They started selling ‘Model B’ first, and here is what mine looks like. I have placed it next to an Arduino duemilanove for comparison of size.

Raspberry Pi (top) with Arduino Duemilanove (bottom)

Making it Work
All that comes in the box is a Raspi, and two pages to help you get started. You need to append this with

  • a power source
  • an SD Card (or SDHC)

The Power Source needs to be 5V and at least 700mA for Model B (500mA for Model A) with a micro-USB end. If you have an Android, Blackberry or Nokia phone, you’re probably in luck because your phone charger is likely to work. In 2010, GSMA got industry leaders to agree on standardization of cell phone chargers. Everyone agreed, but some companied have yet to implement this. Anyway, in general, be sure to pick a 5V adapter with at least a 700mA rating. Current, as opposed to voltage, in pulled in as needed, so your power source could even be 1A or 20A, and work properly, as long as your voltage is correct.

The SD card requires at least 4GB of space, but should probably be a minimum of 8GB. It needs to have the operating system pre-installed on it, and hence you need to prep it. I followed the excellent guide here to get mine running. You should download the actual OS from RaspberryPi’s download page. Your options are:

  • Debian Squeeze – recommended for now
  • Arch Linux ARM
  • QtonPi
  • Fedora 14 Remix – soon to be the recommended OS, but still buggy

Once you have the SD card done, you’re good to go. Hookup your power, HDMI or Composite, Network (optional), USB keyboard/mouse (I use a wireless port, so one USB), and hit the power button on your socket. After 3 seconds, you should see a Linux boot screen. Once you login, type ‘startx’ to start X and see a GUI.

And there you have it, a computer with a powerful GPU the size of a credit card all for $35. The Raspberry Pi Foundation sees an application of their product in education, especially in the third world. While that is absolutely likely, it has several other applications as well.

I personally intend on using it as the brain of the Quadcopter I’m working on with Chris Tuckwood.

A Year of Open Source: My Review

I just recently completed a whole year of working as an open source developer. I worked on various projects including Mozilla Firefox, EGit, JGit, SQLite, and NexJ Express. The following is a brief history of this process, followed by the lessons I have learned from it. Feel free to skip to the final section, because the rest is just about my personal experience.

Pre-History

I first flirted with the idea of ‘open source’ back in the good ol’ days of Windows XP with software like Azureus. I didn’t really understand what it was or meant, but just remember enjoying the fact that it came with no malware, or trial versions.

But it was in 2004 that I seriously started dabbling with open source software, when I started using Ubuntu. Ubuntu was new, cool and hip – Canonical has done an awesome job of making that the case. In this environment, I came face to face with terms like ‘contribute’, ‘report bugs’, ‘community’, and so on, on a daily basis. Eager to see what it all meant, I did some reading on Wikipedia and got on my way trying to contribute to some of the software that I used: Geany, Gnome, Rhythmbox. But I failed. I had no idea what a patch was, and I had no idea how to get started. The reason, as I discovered later, was because I was not using the right tools.

Summer at Red Hat

Them came last year, when I got an internship at Red Hat Canada. Here I was assigned to the Eclipse Team under which I got to work with some brilliant people. I started to work on the projects EGit and JGit, about which I have blogged before. Doing so, I got to learn some of the tools of the trade: irc, git, and github.

These three tools helped me immensely, I now had 24/7 tech support through irc, had loads of code available to read and follow through iterations, and had the freedom to experiment with code without the fear of breaking anything. These tools are very important to the functioning of an open source community, and I was finally beginning to see that.

DPS909

Then in September, with the resumption of school, I was naturally tempted when I saw a course available to me called ‘Topics in Open Source Development’ with Professor David Humphrey. This course turned out to be amazing. We spent the first few weeks in class discussing what ‘open source’ meant and how it stacked up to the competition. We watched and discussed Revolution OS, a documentary I recommend for all. We also read and discussed Eric Raymond’s seminal The Cathedral and the Bazaar.

I think the latter had a greater impact on me. While the documentary was great and gave you a good perspective of the history of the open source movement, The Cathedral and the Bazaar teaches you some of its fundamentals in an abstract way. I was extremely grateful for having read this.

At this time, we also read some common open source licenses, like MIT, BSD and GPL, and compared them to common proprietary licenses such as Microsoft’s EULA, or Apple’s various agreements. Most memorably, Dave recommended we listen to some of the more dramatic phrases in these licenses as read by master thespian Richard Dreyfuss.

More to the coding side of this course, we walked through some Mozilla Firefox code in class, adn had a talk with Mozilla co-founder Mike Shaver on how to get started as a MozDev. We read through a spec sheet Google had put out on the Mouse Lock API (now called Pointer Lock) and started to work on it. I personally wrote some Mochitests for it, but largely continued working on EGit and JGit from the summer.

DPS911

In the Winter semester, I continued with DPS911, the follow-up to DPS909, a more “project” oriented course. This semester, I made myself more familiar with Firefox code, and worked on three bugs for it.

Bug Blog # of patches
705234 Inconsistent use of “full screen” across Firefox code 3
620164 nsTheoraState::MaxKeyframeOffset doesn’t need to use MulOverflow 4
500784 Video/audio files over 2GBs in size are unseekable 1

I also continued working on EGit and JGit and released the following patches for these:

  1. Egit – Work on CleanCommand – (5 tries, 2 abandons and counting as seen here)
  2. Egit – CleanCommand Selector Dialog
Lessons
Anyway, this post is becoming much longer than I thought it would be, so I’ll bring it to a close with a few of the important lessons I have learned in this past year.

  1. Use the tools available to you: git[hub], irc, twitter, blogs!

    These are key! Being in an open source community means being in a virtual community. You have to make yourself heard and accessible in that space. If you simply release code with GPL stamped on it and tell no one, no one is going to use your code.

  2. No Code Dumping

    As an open source provider, do not work behind closed doors and then one day dump all your code outside and call it open source. Maybe you could get away with it if you are Google, maybe; but a big part of ‘open source’ is building a community. You can’t build a community with code dumping.

  3. What is open source software worth?

    In early 2011, the company I worked with was having a brain storming session to search for solutions to its telephony problems. While tossing out ideas, I mentioned an open source stack that could be used. The moment I did this, the person sitting next to me, a self-proclaimed “big business” type, turned to me and said.

    The problem with Open Source is that, with it you get what you pay for.

    The implication was that since one acquires open source software for free, that it worth must also be nothing. I won’t go into details of the two meanings of the word ‘free’ in this context (Gratis and Libre), but I’ll simply point out that studies have shown that the Linux Kernel is worth over €1 billion. I have seen other sources cite that Fedora is worth over $10 billion. So no, free does not mean worthless.

  4. The Open Source community does not owe you anything

    I came across a beautiful quote on the Apache Jakarta project’s website which stated this quite eloquently:

    If you see something wrong [in an open source project] and do nothing about it, the opensource system hasnt failed you, *you* have failed the opensource system.

    It is important to note that this does not only apply to developers, but also to bug-testers (ie users), writers, designers, etc. There are many types of open source contributors, not just programmers.

Anyway, I’ve been going on for a while so I’ll end this now, but on the whole, I am very grateful to Dave Humphrey and Red Hat for teaching me skills that I hold dear, and will help me as a programmer through out my career, I’m sure.

Saying goodbye to DPS911

I’m at the final leg of DPS911 (an Open Source course that I am doing right now), and was accumulating my final thoughts for it. In the process, I came across a great quote from the Apache Jakarta project about the open source spirit that I just couldn’t resist posting:

If you see something wrong [in an open source project] and do nothing about it, the opensource system hasnt failed you, *you* have failed the opensource system.

Great stuff.

Anyway, I’ll be right back with that update.

Building a Quadcopter: Part 2

Continuing from here, this is Part 2 of the ‘Building a Quadcopter’ series.

In the last post, my friend and I had built most of the quadcopter frame, and were awaiting parts from the store. As of now, we have the frame built. Most of the parts have shipped in as well.

This is what was on that parts list:

Click to see a close-up

  • Battery – Turnigy nano-tech 2200mah 3S 35~70C Lipo Pack
  • HobbyKing Multi-Rotor Control Board V2.1
  • Motors (4) – Turnigy D2836/8 1100KV Brushless Outrunner Motor
  • Electronic Stoppers (one for each motor) – Turnigy AE-30A Brushless ESC
  • 10-inch props – remember to get 2 clockwise and 2 anti-clockwise
  • Receiver and Transmitter – HobbyKing HK6DF 2.4Ghz FHSS 6Ch Tx & Rx
  • Connectors/Cables

Electrical Work

The control board is not necessary. It comes with some gyros that provide information to the ESCs and motors for stabilization purposes. You could instead use Arduino with some firmware – that’s our plan for the second one anyway.

Here is what the connection order looks like. You will of course have to multiply the ESCs and Motors with 4, as well the Receiver to Board connections.

Connection Hierarchy

Frame Work

We still had to drill holes in the frame for the bolts.

Drilling holes for bolts

The cutting became so loud, that we had to move outdoors.

Outdoors

After creating mount braces for the motors, we ended up with the following. Now all that remains is connecting all the wires, and then we should be good to go.

Current State

3 more reasons why Mozilla and Firefox are awesome

(In no particular order)

  1. Boot to Gecko
  2. Gecko, the “engine” behind Firefox probably lags behind WebKit in some metrics, but certainly not innovation. The B2G project will allow Gecko to run like an operating system, hopefully providing a more free and truly open alternative to AndroidOS. It might also open the door for other platforms (like Eclipse) to start taking themselves more seriously and finding more applications for themselves.

  3. BrowserQuest
  4. To demonstrate the power of HTML5 and WebSockets, Mozilla created BrowserQuest, a multiplayer retro-style adventure game. Try it. I finished it in 20 minutes, and I wish there was more.

    Flash still has some abilities that HTML5 and its related technologies don’t, but BrowserQuest is an excellent implementation of its growing powers. In keeping with the open tradition, its source is provided on GitHub.

  5. Tilt
  6. Firefox 11 introduced this tool that allows you to visualize and inspect the DOM in 3D. Somehow it brings a very intuitive sense to understanding the layout of a web page. I’m sure it will bring much needed relief to Web Developers working with floats and positions.

    Tilt is as implementation of WebGL (supported by Mozilla), so if your computer is little older (like mine), things might lag just a bit. To access it, go to Tools > Web Developer > Inspect. At the bottom right of the inspect view, you should see a button saying ’3D’. That’s it!


    All three of these projects speak to the larger innovative nature of Mozilla. I am amongst those of the belief that it is made possible by its open nature. Firefox’s growth was key in the evolution of “Web 2.0″, and even today Mozilla leads the development of open technologies and standards.

    If they weren’t around, I’m sure the Internet would look very different today than it really is.

Follow

Get every new post delivered to your Inbox.