<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


HOW TO use a Google Spreadsheet as a read-only database for a web app

Friday, November 21, 2014
The data in a Google Spreadsheet can be accessed in JSON and JSONP format through a URL.  The trick is to extract the key from a spreadsheet's URL (the key looks something like this - 0AtMEoZDi5-pedElCS1lrVnp0Yk1vbFdPaUlOc3F3a2c) and place it in the position indicated in the below URL:

https://spreadsheets.google.com/feeds/list/KEY/od6/public/values?alt=json-in-script&callback= 

This approach can be useful when a limited number of people manage a database but when it has to be publicly viewed by users of a website. You can even use Google Spreadsheet formulas (like ImportXML()) to create dynamic values for a column.

So if you have data in a Google Spreadsheet whose schema is defined by the names in the first row,
it is possible to get that data as a JSON feed
and use it to programmatically display the list on a web page

Also see: Search all your ebooks with a keyword by putting them on Google Drive

Labels: , , ,

Notes from the MVA course "Fundamentals of Visual Studio Online"

Wednesday, November 19, 2014
The Microsoft Virtual Academy course Fundamentals of Visual Studio Online is a level 300 course that provides an high level overview of Visual Studio Online (VSO) in less than 2 hours. I wish it also dwelled a little on Process templates & covered best practices.
Notes from the course and elsewhere -

- Visual Studio Online is a cloud-based platform of tools and services that helps you plan, deploy and manage your application.

- VSO competes with Github.  GitHub lets developers work for free with public code repositories but there is a charge for those who want to work with private code repositories. It is possible to migrate a project from GitHub to Visual Studio Online

- VSO is free for the first five users and it is an included benefit for MSDN subscriptions.

- VSO offers cloud-hosted application lifecycle management (ALM) as a service. It provides TFS (centralized) and Git (decentralized) source control systems.

- Visual Studio Online isn't exactly TFS in the cloud. TFS was introduced in 2006 while Team Foundation Service was launched in 2012. Every few weeks, new features appear in VSO as the TFS product group wraps them up in their internal development iterations.

- The process template is what defines your workflow: what your work items are called, what states they go through as you work on them and other metadata. You can choose between three templates: Scrum, Agile and Capability Maturity Model Integration (CMMI).

If you’re an agile team, or you don’t have a particular process, choose between the Agile and Scrum templates. The biggest difference between the two is how they handle bugs and what name they use for backlog items. The Agile template treats bugs as tasks, while the Scrum template displays them on your backlog along with other backlog items. If you aren’t sure, stick with the Scrum template -it’s the default for a reason.

- Choosing the Scrum template doesn’t mean you have to do Scrum; it simply means you’ll see Scrum terminology used for work item types. Scrum refers to requirements as Product Backlog Items (PBIs) and the Agile template refers to them as User Stories.

- VSO works with non-VS IDEs as well

- Advantages of using VSO hosted build
  ~ Build doesn’t require custom installation of dependencies
  ~ One build at a time
  ~ Build takes < 1 hour to run
  ~ Build process uses < 75GB total storage
  ~ Build process doesn’t need administrator privileges

- Advantages of automating builds
  ~ Quick feedback
  ~ Consistency
  ~ Continuous integration
  ~ Continuous deployment

- VSO provides access to full-featured load testing as a service that runs on Microsoft infrastructure

- OpsHub VSO Migration Utility tool can be used migrate from on-premise TFS to VSO

- Free VSO monthly benefits include:
  ~ Automated hosted builds:60 minutes
  ~ Cloud load testing: 15000 virtual user minutes

- Visual Studio Online Application Insights collects rich operational, performance and customer usage information from your applications—whether they run on-premises, in Windows Azure, at third-party cloud providers, or in a hybrid manner across all three.

- Application Insights discovers dependencies, shows you when you’ve made new deployments and aggregates all of the performance information to give you the top 10 slowest parts of your application.

Labels: ,

Search all your ebooks with a keyword by putting them on Google Drive

Tuesday, November 18, 2014
If you research a lot and have a large collection of ebooks, you can search within those books first  before hitting the Web to search from external resources. If you upload these ebooks onto Google Drive, it will index the content for you. So when you have to search with a keyword, instead of searching each ebook individually you can use the search box within Google Drive.

Google Drive was able to fetch results for a specified keyword from an uploaded ebook, even though I didn't ask for it to "Convert text from PDF and image files to Google documents".

The "Convert text from PDF and image files to Google documents" feature only works PDF files less than 10MB in size.
I found it annoying that Google doesn't validate the file size immediately upon upload but rather accepts the upload & then informs that it cannot convert thereby wasting bandwidth.

Labels:

This Week I Learned - Week #84

Saturday, November 15, 2014
This Week I Learned:

The beta of Netscape version 6.0 was released almost three years after version 4.0 - an awfully long time in the Internet world. There never was a version 5.0.

- Python 3.0, also known as “Python 3000” or “Py3K”, is the first ever intentionally backwards incompatible Python release.

toastr jQuery notification plugin was simple to setup & deploy compared to iGrowl as it doesn't have too many dependencies. The CSS & JS files for toastr are available on CDN JS.

- The 219 million mobile-only users now make up close to 20% of Facebook's total user base.

- Facebook mobile advertising now represents 41% of its overall ad revenue.

- The Building Apps for Windows blog recommends optimizing apps to run on low memory phones, with 512MB or less, as these devices generate roughly 60% of phone downloads.

- The ISO-8601 Date format: YYYY-MM-DDTHH:mm:ss.sssZ is supported by JavaScript. It is endorsed by W3C, RFC3339 & XKCD. ISO8601 contains all the information to be understand by human and computer and does not relies on the beginning of the computer era (1970-1-1)

- According to a US Department of Agriculture report, 21% of food at the consumer level went uneaten.

- United States is the world's largest consumer and producer of beef.

- Americans eat a lot of meat but still spend just 11 percent of their income on food, less than people in many other countries.

- Millet ranks with buckwheat and quinoa as one of the great ancient grains. It is high in protein. It needs little water to grow and can withstand drought and extreme heat.

- Plasmodium, the parasitic protozoan that causes malaria manipulates the behavior of the host mosquito to become blood shy while it is developing and when it is ready to enter a human host, it drives the mosquito to become blood thirsty and foolhardy - National Geographic

- Among the top IT services providers in India, HCL Technologies is so far proving to be the most efficient when it comes to revenue productivity. In 2012-13, it employed 18,270 staff for every billion dollar in revenue. Infosys required 21,202 employees, Wipro 23,480 and TCS 23,810 for every $1 billion in the top line. Since the end of 2007, India's largest standalone BPO, Genpact, has reduced the number of employees needed to earn $1 billion in revenue by over 10,000 to 29,577. - Economic Times

- The Reserve Bank of India’s directive to Uber to change its payment method will lead to a 120X increase in its potential user base. By utilizing Paytm's wallet service, it can potentially reach out to 600 million people who have a bank account with net-banking facilities whereas earlier it was accessible to just five million Indians who own a credit card.

- There are 1.5 lakh autorickshaws in Greater Hyderabad

Labels: , ,

Transform JSON field names in feed to match FullCalendar jQuery plugin's Event object format

Thursday, November 13, 2014
FullCalendar jQuery plugin can help you show your own events in a calendar when the event data is in a specified format. If your JSON feed data follows a different schema, FullCalendar has a way for you to adapt the field names to match FullCalendar's Event object format.

The following snippet shows how a Azure Mobile Services generated data feed can have its field names modified so that it can be be hooked to FullCalendar. While you navigate across months in the calendar the relevant data will be pulled automatically.

Link to code snippet on Github Gist

In the snippet, start and end dates are UNIX-style dates. For the Azure Mobile Services endpoint to understand the date, it is converted to ISO 8601 format with the JavaScript Date object's toISOString() method.

Labels: ,

‹Older