December 17, 2013

Devyani khobragade's cheap and corrupt act

A very regrettable act by Indian diplomat Devyani khobragade in US. She was sent over as in Indian representative, her actions are supposed to reflect Indian values. What does she do over there?
She hired a maid from India on pretext of paying 4500 per month while she paid her meager amount of 600 per month.That right there shows her corrupt mind and cheapness of her character. She's at fault and should be punished irrespective of she being a woman or mother. Her defense is that she can't afford so much money for a nanny. You can't steal an iPad on the pretext of not having enough money, you just don't buy it.
I'm more saddened by the actions of government rather than her. The Indian government has been taking few steps in support of someone who has degraded Indian values as seeks help just because she's a woman and mother. She should be punished either by Indian or US government and she deserves it. The news channels have been asking for sympathy as she was kept with drug addicts; it's a jail and what else did she expect?
Consular immunity as shouted by our journalists and government is readily accessible on Wikipedia as such:
Consular immunity privileges are described in the Vienna Convention on Consular Relations of 1963 (VCCR).[1][2] Consular immunity offers protections similar to diplomatic immunity, but these protections are not as extensive, given the functional differences between consular and diplomatic officers. For example, consular officers are not accorded absolute immunity from a host country’s criminal jurisdiction, they may be tried for certain local crimes upon action by a local court, and are immune from local jurisdiction only in cases directly relating to consular functions.
Vienna convention consular immunity is provided at the following link:

July 28, 2013

HTML5 Web storage

Currently, these are the important forms of storage systems present in the browsers.
  • Cookies
  • Web Storage
  • Indexed database API
  • Web SQL Database

Cookies:
A very tiny amount of storage used by websites to store important information. Generally, this is used to store tracking or authentication data.
Examples are
Cookie to track user’s browsing habits by third-parties
Cookies to evaluate if the user has already been logged into website

Web storage:
It’s a simple mechanism to store larger amounts of data. The CURD operations are performed over a key/value persistence system. Also known as localStorage system.

Pros
  • Really simple API.
  • Already available in all major new browsers.
Cons
  • No query language, schemas, really nothing you'd normally call a database. So it wouldn't scale well where you need to impose organization on a larger data set.
  • They didn't put transactional safety into the standard. I don't think I can sleep at night with an app running that might have race conditions and then have the risk of corrupt data.
  • Closing an app would lose the entire data. Hence, this storage mechanism can’t be used for developing HTML5 based native apps.

Indexed Database (IDB) :
IndexedDB is an API for client-side storage of significant amounts of structured data and for high performance searches on this data using indexes. IndexedDB basically provides a simple flat-file database with hierarchical key/value persistence and basic indexing.
IndexedDB provides separate APIs for synchronous and asynchronous access. The synchronous API is intended to be used only inside of Web Workers but it isn't implemented by any browser yet. The asynchronous API works both within and without Web Workers.
Pros :
  • Pretty similar to NoSQL
Cons :
  • Not yet available in most new browsers.

Web SQL Database
Web Sql is basically sqlite embedded into the browser. It's one of the most useful form of HTML5 web storage.
Pros :
  • Fast and pretty feature-rich sql implementation (besides select/insert/update/delete, you can do joins, inner selects, etc).
  • Advantageous for developing ios and Android apps as the storage persists even after the application is closed.
Cons :
  • Available in Chrome and webkit-based browsers (Safari, etc.) but not Firefox or IE.
  • The W3C Working Group has put a hold on the standard since they say they want at least two independent implementations of the standard, and there's only one so far, since everybody is using sqlite.

Useful links