Book summary: Why Nations Fail

Why Nations Fail The bookĀ is a good read on why some nations are rich today while others are poor. While the bookĀ Breakout NationsĀ provides useful information on the current situation in many countries, Why Nations Fail offers valuableĀ historical lessons on critical aspects of economy and politics that have shaped countries around the world. The theme of this book includes: Inclusive vs. Extractive Economic and Political Institutions The Myth of Geography/Culture Path-dependence of the Past Centralization of Power Creative Destruction Critical Junctures Defending Prosperity

Mac OS: App Translocation and Android Studio updates failure

I installed Android Studio via homebrew ā€œbrew cask install android-studioā€ as a part of my automated Mac OS setup. Recently, Android Studio prompted me that an update is available. When I accepted to update, it failed with an error ā€œStudio does not have write access to /private/var/folders/wt/rjv6_wcn4f97_2nth7fqftqh0000gn/T/AppTranslocation/19A80F28-865B-41FC-AA87-B8E43C826FCB/d/Android Studio.app/Contents. Please run it by a privileged user to update.ā€ ThisĀ error was confusing; I was running Android Studio as myself, a nonprivileged user and the same user owned this directory....

Cross-language bridge error handling: JS-to-Java Example

All languages have certain semantics for dealing with error cases. C deals with them by setting error codes. Java deals with them by throwing exceptions. JavaScript deals with them by throwing exceptions as well but unlike Java, it does have any concept of checked Exceptions. The JS interpreter just stops. And this has some interesting implications in hybrid scenarios like a Webview based app. Consider a simple Android app where most of the code is in JavaScript but is making a request to Java layer....

Book summary: Made to Stick by Chip Heath and Dan Heath

The book is aimed at anyone who has an idea to convey and is trying to ensure that what they are trying to communicate sticks with their audience. Proverbs and folklores survive while corporate marketing material does not.

Testing resumable uploads

The core idea behind resumable upload is straightforward if you are uploading a big file, then you are going to encounter users in the network conditions where they cannot upload the file in a single network session. The client-side code, to avoid restarting the file upload from the beginning, must figure out what portion of the file was uploadedĀ and ā€œresumeā€ the upload of the rest. How to do resumable upload Before starting the upload, send a unique ID generated from the file contents to the server like MD-5 or SHA-256....

falls_cover3

Kauai (Hawaii) in 5 days

Kauai is the nature island of Hawaiā€™i. It is smaller thanĀ Big IslandĀ and way less developed than Oahu. Kauai is more about hikes and waterfalls than watersports.

Antelope Canyon

A trip to Antelope Canyon

Antelope Canyon is probably the most photographed canyon in the world. Located in the Navajo Indian preservation, only guided tours are permitted. We took a trip to Antelope Canyon Tours.

How to speed up HTML5 videos

Some video streaming websites like YouTube provides an option for speeding up/slowing down videos; some donā€™t. The trick is simple, find out the Video object via Js 1 document.querySelector("video") and then set its playbackRate property to the desired value Js 1 document.querySelector("video").playbackRate = 2.0; // For 2X speed-up These changes have to be made in the Developer console in Chrome or Browser console in Firefox.

French Laundry

A vegetarian lunch at French Laundry

For the uninitiated, French Laundry isĀ one of the best restaurants in the world. I got a chance to try the tasting menu. IĀ had a vegetarian, orĀ to be precise, a lacto-vegetarianĀ (milk and cheese but not eggs) meal here. The restaurant looks nondescript from the outside, and it is easy to miss it while driving. It was an 8-10 course meal, depending on how you count a course. Portion sizes were small but delicious. And there was a gap of about 15-20 mins before each serving. So, a commitment of 3-4 hours for the full course.

Architecting Android apps for emerging markets

This is a long post. It covers several decisions like API version, distribution beyond play store, UI & network performance, and minimizing RAM, disk, and battery usage.