<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\758211560\46blogName\75Tech+Tips,+Tricks+%26+Trivia\46publishMode\75PUBLISH_MODE_BLOGSPOT\46navbarType\75BLUE\46layoutType\75CLASSIC\46searchRoot\75http://mvark.blogspot.com/search\46blogLocale\75en\46v\0752\46homepageUrl\75http://mvark.blogspot.com/\46vt\75-5147029996388199615', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
A seasoned developer's little discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks

This Week I Learned - Week #81

Saturday, October 25, 2014
This Week I Learned -

- Google Design has open-sourced 750 glyphs as part of the Material Design system icons pack. The system icons contain icons commonly used across different apps, such as icons used for media playback, communication, content editing, connectivity, and so on. They're equally useful when building for the web, Android or iOS.

The Semantic Versioning specification is authored by Tom Preston-Werner, inventor of Gravatars and cofounder of GitHub. It proposes the following versioning strategy - given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards-compatible manner, and
PATCH version when you make backwards-compatible bug fixes.

- SRI International is the research and development company where Siri began before Apple bought the technology. - NYTimes

- 40% of Azure revenue today, comes from startups and ISV’s.

- The Geonames API can fetch all postal codes for a specified place

- Difference between Samurai and Ninja (from the book Secrets of the JavaScript Ninja):
Samurai and ninjas were both warriors excelling in the Japanese art of war, known for their bravery and cunning. Samurai wereelite soldiers, well-educated men who knew how to read and write as well as fight, and they were bound by a strict code of honor called Bushido (The Way of the Warrior), which was passed down orally from generation to generation, starting in the 10th century. Recruited from the aristocracy and upper classes, analagous to European knights, samurai went into battle in large formations, wearing elaborate armor and colorful dress meant to impress and intimidate. Ninjas were chosen for their martial arts skills rather than their social standing or education. Dressed in black and with their faces covered, they were sent on missions alone or in small groups to attack the enemy with subterfuge and stealth, using any tactics to assure success; their only code was one of secrecy.

- 83% of the winning candidates in the recent Haryana Assembly elections have assets over 1 crore - Times of India

- The rendering of songs in Carnatic music involves a feat of doing eight things simultaneously. These consist of -
 * continous adherence to shruti (the basic pitch)
 * mastery over laya (rhythm)
 * remembering accurately the sahitya (lyric)
 * understanding the meaning
 * playing the bhava (emotions)
 * having the correct pronunciation
 * a comprehension of the special features of the raga
 * the correct use of gamakas (ornamentation)
(excerpted from The Case of the Bonsai Manager)

- Wealth tax is not levied on productive assets such as mutual funds, fixed deposits, exchange-traded gold funds and savings bank account. If you have more than one house (not used for business purpose), and it has not been let out for a minimum of 300 days during the previous year, it will be considered for tax. Other unproductive assets such as in-hand cash of over Rs.50,000, vacant land and properties, cars, gold, silver, bullion, jewellery and so on, are considered for taxation. - Mint

- The three major e-commerce companies operating in India—Flipkart, Amazon and Snapdeal—all operate as marketplaces. That’s primarily because Indian law doesn’t allow FDI in e-commerce sites that sell directly to customers, but allows it in marketplaces that link sellers and buyers. The marketplaces also provide services such as payment, storage and delivery...Flipkart, Amazon and Snapdeal do actually have a significant say in deciding product prices as all the three sites finance part and, in some cases, the full amount of discounts offered by sellers albeit in an indirect manner...The indirect manner of funding discounts may pose another headache for state tax authorities, which are already struggling to understand the business models of e-commerce firms. WS Retail Services Pvt. Ltd, a seller on Flipkart, accounts for more than 75% of the site’s sales. For products sold by WS Retail, Flipkart doesn’t fund discounts. - Mint

- The seat layout on standard trains of Indian Railways
click image for enlarged view

Labels: ,

How my old technical books are helping me now

Thursday, October 23, 2014
I work (and surf the internet) standing up these days at home.
books can never go waste
I've found a good use for my old hard bound MS Press books for Microsoft Certification exams

Also see: JavaScript: The Good Parts - photo gag


Debugging Windows 8.1 Apps

Visual Studio 2013 has the ability to quickly debug a Windows 8.1 app even if it’s not your app.

Fiddler is a free tool for HTTP debugging of Windows 8.1 Apps
Notification after installing Fiddler on Windows 8.1
To enable traffic capture of even third party apps, the Win8 Config button has to be clicked.

Labels: ,

Notes from the MVA course Single Page Applications with jQuery or AngularJS

Wednesday, October 22, 2014
Dave Voyles and Stacey Mulcahy have delivered a 7-part roughly 5-hour video course on Single Page Applications with jQuery or AngularJS. Key points from that course:
- A single page application or SPA is a web application that fits on one page
- A SPA can redraw any part of the UI without refreshing the page
- They provide native-application like experience in the browser
- Data is seperated from the presentation
- Often includes templating, AJAX, routing
- Loads data & views on demand
- Examples - Twitter, email clients in the browser, Azure portal
- Challenges:
  ^ SEO considerations
  ^ Browser history
  ^ Requires JavaScript to be enabled
  ^ Potential memory leaks - must deal carefully with JavaScript
- Library vs Framework - A library has specific operations and it is usually organized into a class with specific functions (like image manipulation) while a framework defines the structural skeleton of an application - typically it is the abstract design with the base behavior in place.
- The simple code sample demonstrated in the course showing the same functionality built with jQuery and AngularJS separately, is available on Github
- The code sample makes calls to a quick-to-build Azure Mobile Services REST API to fetch and add information to a SQL Azure table without writing any server-side code.The endpoint can be restricted to be used by one or more specific domains (localhost allowed by default).

Labels: , , ,

JSONP Viewer

Tuesday, October 21, 2014
Firebug, the Firefox add-on offers the best view among commonly used browser developer tools to visualize the JSON feed provided by an API.
reviewing JSON in Firebug

However, all native browser Developer Tools show JSONP data as a blob of plain text that is hard to make sense of. JSON with Padding or JSONP's purpose is to circumvent the same-source policy limitations of XMLHttpRequest.

JSON Viewer is a free tool that can present JSONP data in a tree view thereby enabling easy analysis. There is a small additional step though before you can view.
JSON Viewer - Text tab

After you paste JSONP into the textarea in the Text tab, click on the Strip to {} option in the toolbar

Now when you click on the Viewer tab, the JSONP will be better readable
JSON Viewer - Viewer tab

Labels: , , ,