Voice Interfaces: The Missing User Interaction Element

Apple Siri, Google Now, Amazon Echo, and Microsoft Cortana have garnered a lot of press lately. But one thing which is still missing out is voice-native user experience. Let me illustrate that with the evolution of user experience on touchscreens. When they first came out, there was a stylus, and that’s it. It was an inferior version of the mouse-keyboard-monitor trio. Then some fantastic interactions were invented. Interactions like double tap to zoom, multi-finger rotation, swipe to like/dislike, pull down to refresh, long-press for options, and a Swype keyboard. All of these were native to a touchscreen-based environment. Porting them back to a mouse-keyboard-monitor trio was of limited utility at based and useless at worst.

Cruelty to animals

What’s not cruel Burning bee hives (homes) of billions of bees for extracting the honey they spent their life gathering Raising hens, in millions, solely for their eggs & meat Slitting throats of millions of animals and let them bleed to death ( halal) Skinning millions of cows for their leather Impregnating millions of cows repeatedly for milk Selective breeding of millions of Turkeys, so that, they provide more meat but are too heavy to survive Neutering thousands of dogs and cats, so that, they can be used as pets Boiling shrimps alive for food Killing deer and bears in the name of population control during the hunting season What’s cruel Whatever happened at the Tiger Temple

Tabs vs spaces for code indentation

One argument which some people might give in favor of using tabs is that it allows the viewer to decide how the code should appear to them. And hence, it separates the logic (indentation) from its appearance. The biggest flaw in that argument is that it renders the concept of line length limits meaningless. Line length limits and the associated rules of wrapping bring a good structure to the code. Someone looking at a piece of code with 3-levels of nesting and tab-length set to 8 will see a very different line length from someone using a tab-length of 2. Always expand tabs. ...

File size should always be of "long" type

Java 1 2 3 int getTextFileSize(String fileName) { return (int) (new File(BASE_DIR, fileName).length(); // WRONG } A 32-bit signed int can deal with ~2GB worth of data. And if your code is not going to deal with files larger than 2GB, why worry? But what if someone wants to use the same code for a video file some day? Or What if someone writes another code to iterate over all the files in the BASE_DIR directory? Most likely they will be inclined to use int for the final sum as well. Adding integers in most languages results in int and automatic overflows into a negative number (and even worse, back to a positive number). The caller code might think that BASE_DIR does not exist. Therefore, the best future-proofing is to never have file size stored as an integer. Even, Android platform got it wrong with StatFs#getBlockSize and corrected it by adding StatFs#getBlockSizeLong. ...

Google I/O 2016: Android notes

General Multitasking - multi-window mode and picture-in-picture mode. This includes the ability to launch window in adjacent activity, and drag and drop between activities. Notifications - Custom quick settings tile for an activity Multi-locale - users can specify locale beyond their primary locale ScopedDirectoryAccess for the shared storage New file-level encryption mode (as opposed to block-level encryption) and the corresponding Direct Boot Java 8, Jack, and ndk support in Gradle GCC deprecated in favor of Clang TechTalk on Image size/compression PNG - Get image down to 256-bit palette (if possible) or compress them using Zopfli. Test the difference with butteraugli Convert PNG to Vector drawable using Potrace. Vector drawable are natively supported on Android 5.0 and above. Use compat to use them on the older versions. Or generate PNG for the older versions (not recommended) WebP is another option (Note: Speaker failed to mention that WebP is natively supported only on Android). Avoid JPEGs. They are usually larger in size.

Great By Choice by Jim Collins

Book summary: Great By Choice by Jim Collins

The book compares a set of 10 pairs of companies over a timeframe of over 20 years to demonstrate what choices the same companies make to become great. The great ones (10Xers) were not led by visionaries, they were not more innovative, they did not try to move too fast, and they were not luckier ones either.

My rm -rf moment

Yes, it did happen, and no, I am not stupid enough to execute rm -rf *. It was a bit more convoluted than that. I was trying to prepare a customized SD card image for the Android emulator. The fastest way to do that was to mount the SD card on my GNU/Linux machine and modify the files. The files on the SD card have root as the owner. Therefore, the easiest way to maintain a clean state was to make all modifications using sudo. My script included a command rm -r ${base_dir}/${old_file}. While executing the script, due to an error, both the variables were not set. It took me a few hours to recover; I never committed the broken script, so, I did not harm anyone else. But since then, my bash scripts have always included set -o nounset. ...

Thailand Tiger Temple

Thailand in 4 Days

Day 1 Post-immigration clearance at about 6 PM, I took the Airlink Train to go to Patpong market. One can try a wide variety of local cuisines or a Thai body or facial massage there. There are tons of stalls selling unbranded goods of all variety. Overall, a good start the journey. From there, I headed to Khao San road which is the backpacker’s paradise of Bangkok. The area is on party 24-hours a day. I did some window shopping and felt that goods being sold on Bangkok streets were significantly expensive than Amazon and Dollar Tree in the US. I stayed at Rainbow Hostel at the end of Khao San road to avoid the noise during the sleep time. The place was good but not great. Thailand, just like India uses water in the toilets, if you are a westerner who has never used water before then carry your own toilet paper around. ...

Why KBB overprices cars

KBB is used in the US for estimating the value of a used car before buying/selling it. While helping friends buy used cars, I felt that it always overvalued the car. I feel there is an anchoring effect in play here. A car owner (seller) feels happier checking the value of their car since it is being reported higher than what they expect. This provides a nice room for providing a discount for converting the buyer. A buyer, especially a first-time one, would feel happier since they are getting a discount on the KBB value. If instead KBB rightly priced the cars, it would leave no room for negotiation, leading to lower conversions. Thus, despite having no direct incentives, KBB would be inclined towards overvaluation. I wonder if the same thing applies for home-buying sites like Zillow and Trulia. ...

Rohtak Riots

Background Rohtak is a small district 50 miles (80 km) west of the Indian capital of New Delhi. The city is also known as the Jat heartland for its dominant Jat population. The second biggest community in the district is [Hindu] Punjabis who migrated to Haryana after the Islamic state of Pakistan was carved out of India in 1947. The Punjabis are primarily businessmen and live in the urban areas. They, notably, run the largest wholesale cloth market of Asia known as Shori market. The Jats primarily constitute the agrarian society and dominate the public institutions. The traumatic memories of 1947 have kept Punjabis suspicious of Indian National Congress (“Congress”) and hence, their love for nationalist BJP is well known. The Congress is the Grand Old Party of India and hence, is deeply entrenched in the Jat social institutional bodies, namely, the Khap Panchayats and educational institutions. The Jats’ love for the nation and hence, joining the Indian army is well-known. The nationalist spirit is implicit in the culture of the city district. So much so that while Congress leaders outside Haryana support anti-India rallies while the Congress leaders in Haryana fight court battles for the right to display Indian flags. ...