HOW TO monitor performance and availability status of  public APIs & websites

HOW TO monitor performance and availability status of public APIs & websites

If you use Public APIs (like Bing Search, Google Maps APIs) in your applications, it helps to be aware of performance and availability issues that those services may face.

Thankfully, there are some free tools that monitor popular APIs & websites -
Also see:
How LARGE websites manage performance & scalability
Read More

India ranks fourth in Internet usage

Deepak Shenoy informs that as per Telecom Regulatory Authority of India (TRAI) data, India has nearly 10 million Broadband connections in India (not just users).


As per current TRAI norms, a broadband connection should have a speed of 256 kbps.


According to World Bank data, only 4.5% of the total Indian population has access to the Internet (as of 2008) while the world average is 24%


India is however, the fourth-largest country in terms of internet users and is turning out to be an important market.

Also see:
Browser Usage Stats for India
Read More

Discover patterns with Wordle

Wordle is a fun web application for generating “word clouds” from text that you provide. It can also be considered a “information visualization” or a text-analytics tool.

The clouds give greater prominence to words that appear more frequently in the source text. You can tweak your clouds with different fonts, layouts, and color schemes. The images you create with Wordle are yours to use however you like. You can print them out, or save them to the Wordle gallery to share with your friends.

Wordle is implemented as a Java applet. It’s popularity can be gauged by the fact that its users have over 2,000,000 word clouds to  Wordle's public gallery.

The tool’s creator Jonathan Feinberg built it while he was at IBM Research and he now works for Google. He has authored a chapter for the book Beautiful Visualization, where he explains how Wordle came to be & how it works.

Below is the “tag cloud” of labels/tags (click to enlarge) that I’ve used on my blog, created with Wordle’s “advanced” interface.
Read More

jQuery on CDN - Usage Stats

Dave Ward has done an informal study on the top 200,000 sites identified by Alexa to find which of those sites use a public jQuery CDN. His findings:
  • 47 of the Alexa top 1,000 include a Google CDN reference.
  • 99 of the Alexa top 2,000 reference jQuery on the Google CDN.
  • 6,953 of the top 200,000 sites include a script reference to some version of jQuery hosted on Google’s CDN.
  • 989 of the Alexa top 200,000 sites reference jQuery UI on the Google CDN.
Dave recommends keeping your site’s CDN reference updated to the latest compatible version of jQuery for more performance gains. This is because popular sites generally upgrade to the latest stable version & sites must reference exactly the same CDN URL in order to obtain the cross-site caching benefit.

Google CDN hosts:

Microsoft Ajax CDN hosts:

(details as of Sep, 2010)

As per the BuiltWith.com website (which tracks technology usage trends), nearly 37% of the top 10,000 sites currently use jQuery in any form (not just from the CDN)


Also see:
jQuery Tips, Tricks, Trivia
Web apps in less than 10 KB
Popular JavaScript apps dissected
Read More
Your digital camera can land you in trouble

Your digital camera can land you in trouble

Some "smart" digicams can store location data in the photos you shoot. When you publish these photographs on public websites, this information can get into wrong hands.

Computer World explains how -
..the Exchangeable Image File format (EXIF) specification adds metadata to common JPG and TIFF image files. Along with a thumbnail image of the photo, EXIF data stores details about aperture, shutter speed, focal length, metering mode, and ISO settings....There's also room for other information, such as the camera's make, model, and registration number, and in some cases, location data.


...many newer digital cameras and mobile phone cameras have built-in GPS receivers. The geotagging features in these newer devices are integrated and seamless, and your EXIF files may store latitude, longitude, time (in the form of Coordinated Universal Time or UTC readings), and even altitude data (which can be helpful for reconstructing a family vacation on a map).


..once you start pulling on the thread of information contained in a geotagged image, a single photo can reveal a whole trove of personal data--far more than you might think.


Fortunately, smartphones and cameras let you turn off the photo geotagging feature.

Also see:
Face Detection & Tagging
Digital Photography Tips & Tricks
Read More
Using ASP.NET? You MUST read this

Using ASP.NET? You MUST read this

A security vulnerability (dubbed as 'Padding Oracle' Crypto Attack) has been identified in ASP.NET.

Scott Guthrie has a detailed blog post that you must read & implement the advice in it to keep your ASP.NET applications safe. Excerpts -


This vulnerability exists in all versions of ASP.NET

...all versions of ASP.NET are affected, including ASP.NET MVC.

An attacker using this vulnerability can request and download files within an ASP.NET Application like the web.config file (which often contains sensitive data).

At attacker exploiting this vulnerability can also decrypt data sent to the client in an encrypted state (like ViewState data within a page).

..it also impacts Sharepoint.

This vulnerability impacts ASP.NET resources (not just ASPX pages).  You shouldn't need to make any changes to the custom error pages of IIS.

When we issue a patch the workaround won't be required.  The workaround right now is a temporary one that can be used until the patch is available to prevent the attack that has been publicly demonstrated. 
There are lots of different platform matrixes and localization languages to build/test/verify which is why producing a patch with high confidence enough to deploy automatically across millions of machines takes a bit of time to get right.


Wikipedia definitions of computer security jargon being used in discussions -

Vulnerability is the intersection of three elements: a system susceptibility or flaw, attacker access to the flaw, and attacker capability to exploit the flaw.

An exploit (from the same word in the French language, meaning "achievement", or "accomplishment") is a piece of software, a chunk of data, or sequence of commands that take advantage of a bug, glitch or vulnerability in order to cause unintended or unanticipated behavior to occur on computer software, hardware, or something electronic (usually computerised). This frequently includes such things as gaining control of a computer system or allowing privilege escalation or a denial of service attack.

A zero-day (or zero-hour or day zero) attack or threat is a computer threat that tries to exploit computer application vulnerabilities that are unknown to others or undisclosed to the software developer.

Related links:
* StackOverflow: How serious is this new ASP.NET security vulnerability and how can I workaround it?
* Forum discussing this security vulnerability on the official ASP.NET website
* 'Padding Oracle' Crypto Attack Affects Millions of ASP.NET Apps
* Discussion on Y Combinator Hacker News
Read More
AJAX is like steriods for web apps

AJAX is like steriods for web apps

An ever increasing number of web apps are utilizing AJAX to deliver an addictive user experience. Here's a list of apps/mash-ups I like that leverage AJAX -

* YouTube Instant Messaging - developed by Stanford University student, Feross Aboukhadijeh, this is a predictive search results feature for YouTube that is inspired from Google Instant. This has in turn inspired Google Maps Instant.

* Google Scribe - This Google Labs product provides autocomplete suggestions while you type, like the free desktop tool PhraseExpress After you install & activate the Scribe bookmarklet, it will start offering suggestions to complete sentences whenever you type within textareas or textboxes in any site.

work in progress...
Read More

Think Mobile First

Summary of the advice from the "Rethinking the Mobile Web" presentation on developing for the mobile web -

1. mobile first
2. use well structured, meaningful markup
3. the absence of support for @media queries is in fact the first @media query...
4. progressively enhance using JavaScript and @media queries
5. adapt content (especially images) appropriately for each device
6. compress content where possible, and don’t include unnecessary data

This very creative presentation has floored even the inimitable PPK so much that he wants you to learn it by heart.

A slide from Bryan Rieger's presentation

Read More

See what Google is suggesting - II

I don't how Google's auto suggest algorithm works exactly but if it shows the most queried results matching the initial keywords without filtering those with negative connotations, its a time to worry, especially for parents & teachers. What impact can it have on teenagers & younger kids?

SafeSearch screens only for sites that contain explicit sexual content leaving other sensitive topics.


Displaying an auto-suggestion like "how to hack gmail password" when a teenager begins typing "how to" is sure to misdirect innocent minds & put ideas into their head. Autocomplete is on by default & disabling this under Preferences is the alternative for those who are concerned.

Thank God, a suggestion like "how to make a bomb" (returns 81,700,000 results in 0.05 seconds, BTW) doesn't feature in the suggestion list...yet.

Also see:
See what Google is suggesting
Look what Google Goggles visual search can do
Read More

HOW TO prevent 3rd-party browser extensions from being installed in IE

There can be some sneaky programs that install not just what they explicitly claim to do but also things like toolbars & add-ons within IE. As most people agree to a software publisher's Terms & Conditions without reading them, they may have deviously add a line that says one of your kidney & your PC are their property.

These add-ons known as browser helper objects may contain flaws such as buffer overruns which impact Internet Explorer's performance or stability.

If you wanted to play safe & prevent any 3rd-party browser extensions from being installed at all in IE8, there is a setting, I came across on IEBlog, that you can use.

Open GPEdit.msc (Local Group Policy Editor) using the Run option in XP or the Search bar in the Start menu. Open Administrative Templates > Windows Components > Internet Explorer > Internet Control Panel > Advanced Page, and set the policy "Allow 3rd-party browser extensions" to DISABLED.


Under the Internet Explorer category referred above, there are a whole lot of other settings that you can also configure. For instance, there is a setting there to "Turn on menu by default". Before you change the setting, you can also read a detailed explanation about that setting.

Also see:
HOW TO disable automatic META tag refresh/redirect through your browser
Read More

15 years of Internet Explorer

Last month, Internet Explorer turned 15. Here's a timeline of IE releases based on excerpts from seattlepi's article on the history of IE -


IE1 was born when Microsoft got a license from Spyglass Inc. for the source code of Mosaic -- the first graphical Web browser technology. Microsoft launched IE1 in August 1995 as part of the Windows 95 Plus! pack, a $49 add-on for the landmark operating system.

IE2 came in November 1995, and by April 1996 it also was available for Windows NT, Windows 3.1 and Macintosh. Users could buy it as part of the Internet Starter Kit for Windows, which cost $20.


It wasn't until Internet Explorer 3.0, in August 1996, that Microsoft introduced the "blue E" logo we all know now.

IE4 was the Big Mama. Released in September 1997, Microsoft soon bundled it with Windows 98 -- a practice that took IE's market share from less than 20 percent in late 1997 to about 60 percent by 1999.

IE4 introduced Microsoft's Trident layout engine, which is still in use today in Internet Explorer.

Microsoft continued to eat away at Netscape's usage with Internet Explorer 5.0, which was officially released in March 1999 and was another major player in United States v. Microsoft.

IE6 shipped with Windows XP in 2001.

Microsoft itself has since likened the 9-year-old browser to old, spoiled milk, urging users to upgrade to the current version, Internet Explorer 8.

Internet Explorer 7, though it represented a big leap for Microsoft's browser, wasn't as widely used as IE6. Launched in October 2006, it included tabbed browsing, support for RSS and protection against phishing -- features popularized by rival Mozilla's Firefox.

By the time Microsoft released Internet Explorer 8 in March 2009, Chrome was on its second version and had a market share of about 2 percent.

The beta of Internet Explorer 9 is expected on September 15, 2010.

Related:
A Brief History of the Web
The History of Microsoft
Read More
Microsoft SharedView - free document & screen sharing software

Microsoft SharedView - free document & screen sharing software

SharedView lets you connect, share, review, and update documents with up to 15 people in a session in real time. Anyone can share, and the person sharing can give control to anyone else as long as they have  downloaded the current release of this program.

Audio support is not currently available, so a telelphone call or an instant messaging program that supports Voice over IP (VoIP) can be used.

Microsoft SharedView & Dimdim are yet to be listed on Wikipedia's article on comparison of remote desktop software.
Read More

HOW TO perform mouse actions with the keyboard

Computer hardware can go wrong anytime. If your mouse ever conks out, your keyboard can turn a saviour. Mouse Keys is an accessibility feature present in a various Windows versions that can let you control the mouse pointer with the keyboard.

You can press left ALT + left SHIFT + NUMLOCK keyboard shortcut to turn on or off  this feature. Once activated, the Mouse Keys icon will appear on the taskbar. You can then navigate in different directions using the numeric keypad's arrow keys. If it feels too slow at first, that's because most of us use the mouse so extensively that it makes us handicapped without it.

As this Microsoft Support article informs almost all keys in the numeric keyboard can mimic some feature of the mouse

  • Press the 5 key for a single mouse click and the plus sign key (+) for a double-click.


  • To drag an object, place the pointer on the object and press the INSERT key to begin dragging. Press DELETE to release the object.


  • To drag an object, place the pointer on the object and press the INSERT key to begin dragging. Press DELETE to release the object. 

  • By memorizing & practising these keyboard shortcuts alongwith those of popular applications, you may be able to improve your productivity & possibly dazzle those around you with your keyboard skills.
    Read More

    HOW TO dynamically generate a Word document with custom header & footer

    Way back in 2004, a project I was working on required a web page to be exported as a Word document (.DOC). Without relying on any components, I utilized the Office XML & HTML technique to implement this feature. I posted my sample on CodeProject to seek feedback. Over the years, I've received some generous comments & feature requests. Many wanted to know how to add a header & footer to the dynamically generated Word document.

    With the help of the Microsoft Office HTML and XML Reference, I devised a hack to add a lacklustre header and/or footer. Some folks wanted to customize the contents of the header & footer but when they tried with my hack that offered limited functionality, the header/footer text showed up in the document body to their annoyance. This July, an ingenious developer posted a hack that can overcome this problem, in the Comments section of my CodeProject article. His practical workaround was to pack the duplicating header/footer text inside a table & push it off the page's dimensions with CSS.



    For those interested, I adapted his VB.NET snippet into a complete sample in C#. Instead of using a ASP.NET webform as I did in the original code sample in the article, I have used a Generic Handler (.ASHX) to dynamically generate a Word document as it is more suitable for this purpose.

    <%@ WebHandler Language="C#" Class="Handler" %>


    using System;
    using System.Web;
    using System.Text;

    public class Handler : IHttpHandler
    {
    public void ProcessRequest(HttpContext context)
    {
    StringBuilder sbTop = new System.Text.StringBuilder();
    sbTop.Append(@"
    <html
    xmlns:o='urn:schemas-microsoft-com:office:office'
    xmlns:w='urn:schemas-microsoft-com:office:word'
    xmlns='http://www.w3.org/TR/REC-html40'>
    <head><title></title>

    <!--[if gte mso 9]>
    <xml>
    <w:WordDocument>
    <w:View>Print</w:View>
    <w:Zoom>90</w:Zoom>
    <w:DoNotOptimizeForBrowser/>
    </w:WordDocument>
    </xml>
    <![endif]-->


    <style>
    p.MsoFooter, li.MsoFooter, div.MsoFooter
    {
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    tab-stops:center 3.0in right 6.0in;
    font-size:12.0pt;
    }
    <style>

    <!-- /* Style Definitions */

    @page Section1
    {
    size:8.5in 11.0in;
    margin:1.0in 1.25in 1.0in 1.25in ;
    mso-header-margin:.5in;
    mso-header:h1;
    mso-footer: f1;
    mso-footer-margin:.5in;
    }


    div.Section1
    {
    page:Section1;
    }

    table#hrdftrtbl
    {
    margin:0in 0in 0in 9in;
    }
    -->
    </style></head>

    <body lang=EN-US style='tab-interval:.5in'>
    <div class=Section1>
    <h1>Time and tide wait for none</h1>
    The quick brown fox jumps over the lazy dog
    ...
    ...


    <table id='hrdftrtbl' border='1' cellspacing='0' cellpadding='0'>
    <tr><td>
    <div style='mso-element:header' id=h1 >
    <p class=MsoHeader style='text-align:center'>Confidential</p>
    </div>
    </td>
    <td>
    <div style='mso-element:footer' id=f1>
    <p class=MsoFooter>Draft
    <span style=mso-tab-count:2'></span><span style='mso-field-code:"" PAGE ""'></span>
    of <span style='mso-field-code:"" NUMPAGES ""'></span></p></div>
    /td></tr>
    </table>
    </body></html>
    ");

    string strBody = sbTop.ToString();
    context.Response.AppendHeader("Content-Type", "application/msword");
    context.Response.AppendHeader("Content-disposition", "attachment; filename=HeaderFooter.doc");
    context.Response.Write(strBody);
    }


    public bool IsReusable
    {
    get
    {
    return false;
    }
    }
    }

    To clearly understand the code you would have to download the Microsoft Office HTML and XML Reference which is in .CHM format (as there is no online version of it) & look up the exact meanings of custom CSS properties.

    Related links:

    HOW TO implement "Download as Word/Excel" functionality through a web page
    HOW TO send an email with a Word or Excel file attachment built on the fly
    HOW TO generate a Word document dynamically with user submitted text formatted with Free Text Box
    Read More