05 July 2009

Why the GPL turns away many contributors

Interesting article that points out how the GPL turns away many contributors, since people are more likely to contribute to a project if they can reuse their work in any project of their choice.
The popular Subversion source control system’s liberal license enabled Sofa, a commercial software business to contribute value to the community with its extremely polished, award-winning client application. Meanwhile, the newly popular distributed source control systems presents three major choices: git, Mercurial, and Bazaar. All are restricted by the GPL-license, and therefore none is likely to inspire development of a Versions-caliber client.
GPL is for people who are either ideologues or don't want commercial vendors to profit by building on their work, while failing to realize that they add value in areas that may be important to users but where the open-source community sucks, like UI design.

How many buttons should a phone have?

Apple's genius of simplicity gave us a phone with just one physical button. Whereas the Android phones have many more:


This set me thinking -- what's the right number of buttons for a touch-screen phone to have?

We obviously need a home button, for multiple reasons: returning to the home screen is something we do all the time, and you want to do it at one shot rather than backing out from a deep hierarchy step by step. Also, you need at least one button controlled by the OS, to move out of a hung app.

The back button that Android phones have is also useful, because that's also a frequently performed action, for which a hardware button helps, and you wouldn't want each app to express the same idea in slightly different ways. And, importantly, Android lets you move from one screen to another without regard to what apps they are part of. For instance, from Email, you can click on Attach to launch Gallery, then click on an image or video to see it full-screen. Pressing back takes to the gallery view, and pressing back again takes you back to email. Since each app controls the screen entirely without regard to the context in which it's invoked, you need a physical back button to transition between screens without regard to which apps they are from. I always find it jarring that on the iPhone, if you're deep within an app, you can progressively come out of the hierarchy by tapping the button at the top-left, but only till you reach the app's main screen. The system should not enforce such a strong separation between apps -- going back is a general action that makes sense from the main screen of an app, and between apps as in the Android example above.

I hate the menu key on Android phones. Better to put the actions right there on the screen where the user can see it. The first hour or so of using Android was very frustrating to me, since I seemed stuck, with no way to navigate out of the current screen. In addition to having a smoother learning curve, or rather none at all, putting the actions on screen saves one button press — the set of available actions isn't hidden from you till then.

Some actions are so frequently used that putting them one level of indirection away is plain wrong, in that it takes the user more clicks to do the same task. If there are too many actions to show on screen at once, take the user to a second screen. Which is what the menu is, to some extent — you see only content on screen, till you press the menu button, at which point you see navigation. It would be more intelligent to mix and match content and navigation, showing the most important ones from each, and take the user to a second screen with additional content and actions.

Unfortunately, it looks like most Android phones will be stuck with a menu button, for compatibility and other reasons.

Then, Android has the green and red buttons, to make a call and to end it. Not being a heavy phone user, I would prefer on-screen keys for these. Having fewer buttons reduces the cognitive load and makes the phone easier to use as a data device.

Update: The same goes for the trackball. It's just not needed. I have fat fingers, and I click on links in web pages without trouble. The trackball makes it slightly harder for developers because widgets should now handle a touch mode (where there's no focus) and a non-touch mode.

01 July 2009

JSON is beautiful

It's human-readable rather than binary, is concise and doesn't make you blind like XML does, and maps cleanly into programming language data structures like arrays and dictionaries. In fact, it's defined as a subset of one (Javascript) and is code as well as data.

XML is a depressing example of the momentum of standardization, when a second-rate choice is made.

Hope it becomes a universal communication and data interchange format.

Once binary JSON is defined, the performance issue goes away, too.

04 February 2009

Year of Linux on the Desktop


2020 will definitely be the year of Linux on the desktop.

30 October 2008

Debit and Credit Card Security

Some random thoughts on how you might design more secure Debit or Credit cards, some of them obvious:
  1. Support alphanumeric passphrases rather than pathetic PINs. Force this on the banks by passing a law that does not hold the account owner liable for PIN misuse for a month when a card is stolen.
  2. Require a PIN for every transaction . Yes, a shopkeeper can have a malicious card reader that stores the password, but this at least guards against casual pick-pockets.
  3. Use one PIN for purchases made on the card, and another at the ATM. That way, a malicious card reader at a shop enables the shopkeeper to make purchases on my behalf, but not withdraw cash directly.
  4. Have an option for the bank to send me an SMS and email for every transaction so that in the event of a fraud, I'm notified in seconds.
  5. Allow me to use ATMs without physically carrying the card. Instead I can enter a password. If I don't carry my debit card all the time, that's less of a risk.
  6. Many people use a credit card in addition to a debit card because it's safer, in that you can dispute a fradulent transaction more easily and, even if it's resolved to your favor, you don't have to pay the money first and get it back later, like with a debit card. Because of this, people carry a debit and a credit card, which is less secure than carrying only one card. Eliminate this by saying that if the bank gives X days to report a fradulent credit card transaction, it should give at least the same time for the owner to report a fradulent debit card transaction. And, as soon as you dispute a transaction, the bank must immediately and automatically refund the money while it resolves the dispute, after which it might withdraw the money again. With this, many people won't have to carry their credit cards every day.

Function Argument Passing

Javascript's function argument passing is nice. Every function has an implicit variable named arguments that holds all the arguments, and the function declaration is only a shorthand. To look at it differently, with varargs and optional parameters, a function in effect takes a single argument which is a hashtable (or list, if keyword arguments are not supported). If every function takes the same single argument, why make the programmer declare it? Define an implicit variable named arguments. Then what do you put in the space traditionally used for function arguments? That can become a shortcut, so that you can access an argument by its name rather than as arguments.name.

22 September 2008

iPhone: The Dream Ends

Apple rejects another app, this time a Gmail client for "duplicating functionality". Never mind that it offers a better Gmail experience than the bulitin mail client -- conversations, archiving, starring, etc. Previously, Apple rejected a podcast download app, and the tethering application NetShare that lets you use your iPhone as a modem. As Harry McCracken put it, "Way back when, if software distribution for the Mac had been handled via a Mac App Store with a don’t-duplicate-Apple-products policy, Photoshop might have been refused distribution on the grounds that it was too similar to MacPaint."

Looks like my open-source friends were right -- in a world where everybody is either incompetent or untrustworthy, having a single gatekeeper is crippling. The iPhone isn't a platform but Apple's playground where you play on Apple's terms. It's the perfect example of Treacherous Computing, where your computing device is controlled not by you but by others for their own ends.

I no longer see any point in buying an iPhone, let alone programming it. Android's openness should provide a refreshing alternative to the iPoliceState.

Disclaimer: I work for Google.

18 September 2008

WiFi Stupidity in India

So the imbeclies running the show in India want to outlaw open Wi-Fi. This ignores the view that open WiFi may be a good way to get internet access to a large number of people in a poor country. And why should every user get his own DSL line? It's just a waste of resources.

Not to mention that this does nothing to stop terrorist attacks. Meanwhile, the terrorists will just use a phone booth or a postal mailbox. Why is it that every political system seems to be controlled by jackasses?

17 September 2008

Fuck You, Big Content

So our elected thugs are enacting a draconian legislation that, depending on whom you ask, mandates ISP filtering, turning off internet access for pirates, interfere with fair use, further erode privacy on the internet, and so forth. And all this is being done in secret, with no draft of the proposed legislation till it's signed by the various countries. As if the existing anti-circumvention laws - that effectively say that you're not the owner of a device that you paid for - are not enough. Here's a big Fuck You from my side, Big Content. Your obselete business models won't last long, even if you bribe the goons holding public office. The internet is basically a mechanism to move bits from one place to another, and enacting laws to stop this will be as useful as commanding the river to stop flowing.

Perhaps we'll end up with a repeat of the Prohibition where people will show the finger to the government and do what they want. As Larry Lessig so eloquently puts it, we can't kill the instinct the technology produces, we can only criminalize it, and there's a whole generation that rejects the very notion of copyright, and believes the law is nothing more than an ass to be ignored. No law that goes against what a large number of people want to do has a chance. Copyright is doomed in the medium to long term.

13 September 2008

iPhone: Think Again

The worst-case scenario plays out with the iPhone: Apple rejects an application because it competes with the desktop version of iTunes. John Gruber writes:
If you only find out at the end of the development process that your app has been rejected — not for a technical problem that you can address but because Apple deems the entire concept to be out of bounds — then who is going to put serious time and talent into an iPhone app?
...
Let’s be clear: forbidding “duplication of functionality” is forbidding competition. The point of competition is to do the same thing, but better.
Fraser Speirs, developer of Exposure, the highly regarded Flickr client for the iPhone, writes:

I will never write another iPhone application for the App Store as currently constituted.
...
You have to wonder if Apple wants the App Store to be a museum of poorly-designed nibware written by dilettante Mac OS X/iPhone OS switcher-developers and hobbyist students.
The whole point of the iPhone is that, in addition to having a first-rate browser, it's the first serious application platform. Earlier phones were just phones, but the iPhone is a computer that lets you install applications to do whatever you want to do. An iPhone with a crippled application market is far less useful.