<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 #67

Sunday, July 20, 2014
This Week I Learned:

  • The most common form of scaling in the cloud is horizontal—adding additional compute instances that allow a Web application to run simultaneously on multiple Web servers (instances). Taking the necessary steps to ensure your Web application is stateless is probably the most meaningful task during the development of a Web application. The ability to safely run across multiple Web server instances, with no concerns about user state, data corruption or functional correctness, is one of the most important factors in scaling a Web application. - MSDN Magazine
  • The normal Web and Business editions of Azure SQL Database have a limit of 180 concurrent requests.
  • Web Storage (which includes sessionStorage & localStorage) can provide up to 2MB and 5MB of key/value storage  per domain whereas a cookie can store only text up to a size of 4KB (20 per domain). You can view the contents of localStorage with the help of browser Developer Tools. 
  • Some parts of DuckDuckGo are open source.
  • Google will now indicate when a page listed in its search results won’t load properly on your device.
  • Project Zero is a group of top Google security researchers with the sole mission of tracking down and neutering the most insidious security flaws in the world’s software. Those secret hackable bugs, known in the security industry as “zero-day” vulnerabilities, are exploited by criminals, state-sponsored hackers and intelligence agencies in their spying operations. By tasking its researchers to drag them into the light, Google hopes to get those spy-friendly flaws fixed. - Wired One of the team member's title is 'Troublemaker'.
  • In the 2014 World Cup, the Germans were the tallest with an average height of 1.86 m & heaviest weighing 79.35 kilos on average. - Gramener
  • The Germans, 2014 Football Word Cup winners, studied themselves and the competition closely – they improved their ball handling time from 3.4 secs to 1.1 secs - Gramener
  • Microsoft has 6,500 employees in India and a total worldwide strength of 1,26,000.
  • It is a requirement at GlobalLogic, a Silicon Valley-based company founded by four Indians which specializes in outsourced product development (OPD) and focuses on R&D services, that each of its top executives, even those heading marketing functions, is an engineer. - Forbes India
  • One third of world's extreme poor are in India according to a UN Study
  • Around 72 lakh vehicle owners in the newly formed state of Telangana will need to change their vehicle license plates to display the new code - The Hindu
  • Dr Naresh Trehan (68), a recipient of the Padma Bhushan and the Padma Shri, has a 55% stake in Medanta (a 1,250-bed hospital built on a 43-acre plot) whose net worth is Rs 785 crore.  His first business initiative was the Escorts Heart Institute (later acquired by Fortis) in New Delhi, which he helped establish in 1988. - Forbes India
  • Costa Rica does not have an army.
  • "It's surprising how hard we'll work when the work is done just for ourselves." - Bill Watterson, creator of Calvin and Hobbes, who works for personal fulfillment.

Labels: , ,

HOW TO block font, CSS & JavaScript files so as to view plain text web pages

Saturday, July 19, 2014
If you're a fan of minimalism and want the web pages your frequently visit without the bells and whistles that make use of large CSS & JavaScript files sucking up the bandwidth that you pay for, the are a few ways to block those CSS & JavaScript files:

1. Use Google Mobilizer to let it show you just the text of a web page with or without images. To make it easier to use, you can configure Google Mobilizer to work like a search provider in Chrome. You can then assign a letter like M to this app, so that you can type M in the Chrome address bar/omnibox & then the type the URL you would like to see via Google Mobilizer.

2. Use the browser's Developer Tools to disable CSS and JavaScript. This has to be done each time you visit a website and it is not quite convenient unless you're a developer who likes tinkering with the dependent files that the original web page needs.

On Firefox, the simplest way is via the menu command View > Page Style > No Style.

3. Use AdBlock or Adblock Plus, both are free browser Extensions. By default AdBlock (which works in Chrome & Safari.) blocks ads but it you can have it block any other resources that are part of web page like CSS or JavaScript files.

To block a specific CSS or JavaScript file, click on the AdBlock icon between the address bar and the wrench in Chrome. In the page that lists all the resources needed by the web page, block the files that you don't want to be downloaded when the web page loads for that domain as well as for all domains (if is is a third-party external file that are commonly used)

When you install the AdBlock Chrome Extension there is an alert that it will access your data and browsing activity.


The AdBlock documentation informs that "the notice you see about having access to your history and website data is automatically generated because AdBlock runs on every tab.  Rest assured it doesn't look at your private data!"  

Labels: , ,

What can you do with your MSDN Azure free benefits?

Friday, July 18, 2014

All MSDN subscribers receive monthly credits for Azure services. The benefits vary according to the type of MSDN Subscription. There are so many things with a MSDN Subscription that it is easy to miss that this benefit exists.

So what can you do with these MSDN Azure free benefits?

I wish the Azure documentation answered this long back. I was happy to see a promotional web page that clearly mentioned the ways to use MSDN credits. It detected from my IP address that I'm from India and even showed me the value of the benefits in Indian Rupees.
Things you can do with $100 or Rs. 6100 per month of Azure Credits




Scott Guthrie estimated that 90 percent of MSDN subscribers would be able to cover all of their dev/test costs through the benefits without any additional charges to their company, involvement from their IT department or need for a credit card number.

I plan to compile ideas that I hear or read about on ways to put the benefits to good use:
  • Friction free creation of virtual machine based development/test environments using Windows Server, IIS, SQL as well as servers such as SharePoint or BizTalk. MSDN users can now install MSDN servers and Visual Studio software into Azure.
  • Creation of large scale environments to be used for scalability/load test scenarios.
  • Provide instances of Visual Studio workstations running in the cloud.
  • Provide a sandbox environment for QA/UAT testing.
  • Provide instances of virtual machines for the use of training / evaluation of new servers and tools.

Labels:

Client-Side Storage Options for Web Applications

Tuesday, July 15, 2014
There are at least 10 ways to persist user state in an ASP.NET application.

There are also client-side storage options:
  • Cookies - useful for storing text up to a size of 4KB. Most browsers allow 20 per domain
  • Web Storage (includes sessionStorage & localStorage) - most browser implementations give you between 2MB and 5MB of key/value storage  per domain.
  • Indexed DB - is also a key/value store but it allows persistence of JavaScript objects unlike Web Storage which allows only (UTF-16) strings.
  • FileSystem API - supported by Chrome 27+, Opera 15+ and Blackberry 10

Out of these only the first 2 more types - Cookies and Web Storage, are supported by all modern browsers. You can consider using the other two if your application does not need to be cross-browser.

Cookies and Web Storage can be valuable in some scenarios but the biggest drawback with client-side storage options is that the data is not truly persistent as the user can nuke it at any time.

Moreover, like cookies, Web Storage can be blocked. In Chrome, you have to click the Wrench and choose Options, go to the Under the Hood tab, select Content Settings, and choose the Block any sites from setting data option:


Labels:

Book Review: A Bank For The Buck: The Story Of HDFC Bank

Sunday, July 13, 2014
Tamal Bandyopadhyay's A Bank For The Buck: The Story Of HDFC Bank informs as well as entertains. To his credit, the author has made a serious topic like banking and setting up of a bank read like a piece of fiction. The background information for the characters and plots in the story also tell the story of contemporary India. Packed with facts, anecdotes and trivia, the book is engaging. Sample these -

By one estimate, the value of gold with Indian households could be as much as Rs28 trillion, 50% of fixed deposits in the Indian banking system in June 2012
...before founding HDFC, his (Deepak Parekh's) uncle, Hasmukh-bhai, had headed ICICI, the development finance institution that spawned ICICI Bank.
HDFC Bank learns patiently from the experiences of others before it steps into a new business, whereas ICICI Bank loves playing the pioneer. The ICICI Bank stock is volatile; HDFC shares are range-bound. The same applies to earnings. ICICI Bank is often unpredictable, both surprisingly and shockingly. HDFC Bank is monotonously predictable on most financial parameters.
C.N.Ram, the bank's technology head, showed off the automated teller machines (ATMs) to (Finance Minister, Manmohan) Singh and (then RBI Governor C.) Rangarajan, who had been his professors at the Indian Institute of Management, Ahmedabad (IIM-A).
Both (Nandan Nilekani, then head of marketing and sales at Infosys and Vinod Yennemadi) are from the same community -  Chitrapur Saraswat, a community that originally hailed from Kashmir and moved south. There are only about 25,000 of them across the world.
Deepak loves Beck's and Heineken beer with his Sunday lunches. His evening preference is Johnnie Walker's Blue Label.
..Amrita (Aditya Puri's daughter) would act in Anil Kapoor's Aisha along with Sonam Kapoor, Mukesh Bhatt's crime thriller Blood Money and UTV's Kai Po Che!

HDFC Bank is currently the fifth largest bank in India by assets. It is the largest bank in India by market capitalization (as of 24 February 2014) and it has scaled these heights in a relatively shorter time than its competitors.  The book starts with how Deepak Parekh convinces Aditya Puri, then the CEO of Citibank, Malaysia to start a bank from scratch. Giving up a better paying job, Aditya Puri took up the Managing Director role and utilized his wide network of relationships to build a strong core team which was instrumental in the success of HDFC Bank. He is now the longest-serving head of any bank in the country.

I found it annoying that the author uses first names after the initial reference to a person. There were several times when I had to find the first reference to understand which person he was talking about.

I hope there are more books like these written for people who don't regularly read the financial newspapers and magazines.

Labels: ,

‹Older