<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> <iframe src="http://www.blogger.com/navbar.g?targetBlogID=8211560&amp;blogName=Tech+Tips,+Tricks+%26+Trivia&amp;publishMode=PUBLISH_MODE_BLOGSPOT&amp;navbarType=BLUE&amp;layoutType=CLASSIC&amp;searchRoot=http://mvark.blogspot.com/search&amp;blogLocale=en_IN&amp;homepageUrl=http://mvark.blogspot.com/&amp;vt=-5147029996388199615" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="30px" width="100%" id="navbar-iframe" allowtransparency="true" title="Blogger Navigation and Search"></iframe> <div></div>

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


Usability Tips

Tuesday, March 31, 2009
Smashing Magazine offers 8 usability check-points you should be aware of -
  1. Avoid Pop-ups
  2. Don’t change users’ window size.
  3. Don’t use too small font sizes.
  4. Don’t have unclear link text.
  5. Avoid dead links.
  6. Have at most one animation per page.
  7. Make it easy to contact you.
  8. Open internal links in the same window.
The article explains how if your visitors don’t understand how they can get from point A to point B they won’t use your site.

Labels: ,

Free ASP.NET Charting Tools

Friday, March 27, 2009
Luckily for ASP.NET developers there are some cool free ASP.NET Charting Tools that are as good as the commercial ones.

1. Microsoft Chart controls -
Some interesting facts:
  • Microsoft acquired Dundas Data Visualization Intellectual Property in April 2007 and is integrating this technology in different Microsoft products.
  • New Chart and Gauge report items were already released as part of SQL Reporting Services 2008.
  • Microsoft Chart controls (ASP.NET and Windows Forms) was released at PDC 2008
  • Microsoft Chart control is based on Dundas Chart source code version 5.5
  • Microsoft Chart control is available as a separate installation for .NET Framework 3.5 SP1 and will be part of .NET Framework 4.0.
2. CarlosAg's WebChart  control  -
  • Supports 8 chart types
  • Can be used with WinForms & Web
3. Google Charts API
  • Includes a growing number of Image & Interactive chart types
  • API is URL based which means; no installation of any components is required
4. NPlot
5. FusionCharts Free
  • Flash-based
  • Provides 22 popular charts like Column, Line, Pie, Bar, Doughnut, Area, Stacked, Candlestick and Funnel Chart.
  • Charts partially support AJAX functionality.

(Last updated on 31-Mar-09)
To be continued...

Labels:

HOW TO create your own IE8 Accelerator

Thursday, March 26, 2009
Roughly a year after it has been in Beta, IE8 was released last week. It is more standards compliant than the versions before it. This is good news for web developers as they won't have to write browser specific code. IE8 also introduces new features like Accelerators and Web Slices that will surely interest web developers.

Accelerators are XML files that let you act on data in a web page by interacting with web services. It is more direct than using a search provider which again does not adapt to all scenarios. Accelerators appear in the context menu. Although it may look a little daunting at first, it is simple to create and deploy as it all it takes is filling up an XML template (borrowed from a MSDN code sample). The OpenService Accelerators Developer Guide explains what the elements & attributes of the Accelerator XML file mean.

I prefer previewing PDF & Word files in web pages that I surf instead of opening them directly. Google Search & GMail have a way to preview PDF & Word files as HTML but otherwise there is no direct way to view them as HTML. For such tasks, the Online Viewer from Samuraj Data has been my Man Friday. I've now created an Accelerator called "ViewAsHTML with Samuraj Data" that will convert a PDF or Word file link on a web page to HTML in a single step. I have jotted down the steps required to build this Accelerator in an article. Read it or install the Accelerator and try it out yourself. I would love to hear any feedback.

Labels: , ,

Free Programmable & Searchable Dictionaries

Wednesday, March 25, 2009
If you had to build a custom spell check functionality or something similar for your application, there are thankfully free Dictionaries in text and database format.
  1. FOLDOC is a searchable dictionary available as a text file and offered under the GNU Free Documentation License. You can use a database tool like SSIS to convert the dictionary into a database table & validate your words against it.
  2. WordNet from Princeton University is unencumbered for commercial use. ObjectGraph has a SQL Server database version of it.

Labels:

Reach out for the stars with WWT

Tuesday, March 24, 2009
If you are fond of astronomy, you shouldn't miss Microsoft Research's WorldWide Telescope (WWT)

The WorldWide Telescope (WWT) is a Web 2.0 visualization software environment that enables your computer to function as a virtual telescope—bringing together imagery from the best ground and space-based telescopes in the world for a seamless exploration of the universe

There is a Web-based version running on Silverlight and a Windows Client version to choose from.

Labels: ,

HOW TO perform mouse-like navigation with your keyboard

Monday, March 23, 2009
If ever your mouse stops working midway while working on your PC, the Mouse Keys feature can be a savior.

In Windows Vista, go to Control Panel, Ease of Access Center and in the second panel of the dialog box that opens up, you will find a section "Control the mouse with the keyboard". Select the check box that says "Turn on Mouse Keys" and then hit the Apply button at the bottom.

Now you can use the arrow keys in the numeric keypad of your keyboard to move the mouse around the screen.

Labels:

Accidental Discoveries

Saturday, March 21, 2009
Did you know Anesthesia, Iodine, Penicillin, the Telephone, Photography, Mauve Dye, Nylon, Vulcanized Rubber are all accidental discoveries? I enjoyed reading the funny stories behind them and this reminded me of how I ran into or discovered (if I may call it so as it is on a different note than the profound discoveries mentioned earlier) the cool "Generic Handler" feature introduced in ASP.NET 2.0. I have found the feature extremely useful.

They're equivalent to custom handlers in that they contain classes that fully implement IHttpHandler but they are a lot simpler to use. A Generic Handler has a .ASHX extension. It is like a .ASPX page but it doesn't render a complete HTML page. It can be used to dynamically return specific content.

So dear Reader, have you discovered any hidden gems like this that have benefitted you greatly?

Labels:

Web Platforms

Friday, March 20, 2009
Web Platform refers to an API or SDK provided to external developers by a product to build applications on.

Top 10 Web Platforms of 2008 is the tenth in the "Top 10" article series on web based products compiled by ReadWriteWeb -
  1. iPhone SDK
  2. OpenSocial, an open API framework from Google for social networks and websites
  3. Adobe AIR (Adobe Integrated Runtime)
  4. Twitter API
  5. Facebook Platform
  6. Android
  7. Amazon Web Services
  8. Live Mesh
  9. Fire Eagle
  10. Mozilla Weave
Also see: Web APIs galore

Labels:

HOW TO customize Search Engine results programmatically

Thursday, March 19, 2009
All the popular search engines offer APIs to programmatically access results. The Live Search API 2.0 reportedly serves more than 3 billion queries/month.

Google offers specialized searches like Local Search and Blog Search that narrow down the scope of results. These specific category search results can also be fetched through code as this WebMonkey article explains.

Trivia: WebMonkey has a funny way of representing the skill level required for understanding the article -

Labels: , , ,

HOW TO execute a SELECT query Without Column Names

Monday, March 16, 2009
A developer posted an unusual T-SQL question on an online Message Board I frequent. He wanted to know how to find a column's value without specifying the column name. I guessed syscolumns would be part of the puzzle and rather than construct the query I searched & found a complete working snippet by Kalman Toth. It gets the third, fourth and sixth columns of the Contact table (in SQL Server 2005's AdventureWorks database) without explicitly specifying the column names in the SELECT query -

use AdventureWorks
go
declare @SchemaName as sysname, @TableName as sysname
declare @Col3 as sysname, @Col4 as sysname, @Col6 as sysname
declare @SQLstring as nvarchar(512)
set @SchemaName = 'Person'
set @TableName = 'Contact'
select @Col3 = sc.name
from sys.objects as so inner join sys.syscolumns as sc
on so.object_id = sc.id
where so.name = @TableName and sc.colid = 3
select @Col4 = sc.name
from sys.objects as so inner join sys.syscolumns as sc
on so.object_id = sc.id
where so.name = @TableName and sc.colid = 4
select @Col6 = sc.name
from sys.objects as so inner join sys.syscolumns as sc
on so.object_id = sc.id
where so.name = @TableName and sc.colid = 6
select @SQLstring = 'SELECT ' + @Col3 + ',' + @Col4 + ',' + @Col6
+ 'FROM ' + @SchemaName+'.'+@TableName

-- select @SQLstring
exec sp_executesql @SQLstring
go

This goes on to show how sharing discoveries by using the right keywords can help fellow developers. Choosing unambiguous names & titles helps search engines to rank relevant links higher.

On a related note, I remember in the early years of C#, Google misunderstanding the context (like spell-checkers do) would exclude the "#" part possibly as part of sanitizing input

Also see:
HOW TO merge two HTML tables with Javascript
Can VS 2008 editions be installed side-by-side?

Labels: , ,

The History of Microsoft

Sunday, March 15, 2009
Bill Gates reminisces about the early years in 'The History of Microsoft'Channel 9 is running a series called "The History of Microsoft" that chronicles the struggles and successes of Microsoft covering a year per episode starting with it's inception in 1975 (the same year I was born). There is a new episode every Thursday with rare footage.

Labels: ,

IE8 Developer Tools Tips & Tricks - #6: Count links in a page

Friday, March 13, 2009
Google Webmaster Guidelines recommend keeping the links on a given page to a reasonable number (fewer than 100).

Matt Cutts explains that although not following "100 links" recommendation will not result in Google automatically considering the page to be spammy, it is a good idea to follow the guideline as it will provide a better user experience and ...

If you end up with hundreds of links on a page, Google might choose not to follow or to index all those links. At any rate, you’re dividing the PageRank of that page between hundreds of links, so each link is only going to pass along a minuscule amount of PageRank anyway.

So if you would like to follow the guideline, how to count links in web page?

IE8 Developer Tools generates a nice report with a numbered list of all the links in a page when you choose View > Link Report from the Developer Tools menu. Although earlier versions of IE Developer Tools/Toolbar had this Link Report feature, the links were not numbered.

Also see:
Google Browser Security Handbook
IE8 Developer Tools Tips & Tricks - #5: Find Link Paths

Labels: ,

HOW TO speed up a ASP.NET AJAX web app

Thursday, March 12, 2009
Just like making web pages cross-browser doesn't have a straight-forward solution, speeding up your ASP.NET AJAX based web application requires an understanding of it's internal aspects. Outlined below are some performance tips compiled from various sources -

Generic ASP.NET performance improvement tips that also strongly relate to ASP.NET AJAX -

To be continued...

Also see - HOW TO improve the front-end performance of a website

Labels: , ,

New Free ASP.NET Learning Resources

Wednesday, March 11, 2009
Kobe is a getting started resource kit on planning, architecting, and implementing Web 2.0 style apps and services using the Microsoft Web Platform.

(Kobe also is a prominent port city in Japan and the name of a popular American basketball player)

The new ASP.NET MVC framework is about to ship and Scott Guthrie's 185 page tutorial, which is part of an upcoming ASP.NET MVC book to be published by Wrox, is available as a free PDF download (14MB)

Labels: ,

Windows 7 will let users turn off Windows Features, IE

Tuesday, March 10, 2009
In December 2007, Opera filed an antitrust complaint with the European Commission against Microsoft to unbundle IE from Windows.

PPK asks a pertinent question -
Opera, how would an end user get the Internet to work on his shiny new unbundled Windows computer? Which icon does he click? Which program starts up? What else does the end user have to do?

The news now is that in Microsoft's Windows 7, users will be able to remove Internet Explorer 8, as well as several other Microsoft applications, from Windows 7.

Labels:

Beat the Recession with Tip Jar

Friday, March 06, 2009
Wikipedia has long leveraged the wisdom of crowds. Similarly Google's Tip Jar, probably built during some Googler's 20% time, gathers money-saving tips in one place and invites people to rank them in order of usefulness with the expectation that over time, the best and most useful tips will rise to the top.

StackOverflow, the programming Q & A site, is another such website that provides superior answers through a similar ranking system where users vote for best answers. StackOverflow also has an interesting reputation system.

Labels:

Geniuses

Wednesday, March 04, 2009
In the Forbes article "How to be a Genius", Scott Berkun mentions two personal attributes among two others that aspiring geniuses can take note of -
  • Be obsessed with work
  • Don't strive for fame in your own lifetime
An aggrieved reader sarcastically pointed out if being male should also be a criterion as no female names were mentioned in the article.

One of my all-time favorite scientists Marie Curie transcended superficial barriers of gender, language and country in pursuit of knowledge to make discoveries of far-reaching effect for mankind.

The New York Times obituary titled "Mme. Curie Is Dead; Martyr to Science" described Marie Curie thus:

Few persons contributed more to the general welfare of mankind and to the advancement of science than the modest, self-effacing woman whom the world knew as Mme. Curie. Her epoch-making discoveries of polonium and radium, the subsequent honors that were bestowed upon her--she was the only person to receive two Nobel prizes--and the fortunes that could have been hers had she wanted them did not change her mode of life. She remained a worker in the cause of science, preferring her laboratory to a great social place in the sun. The road which she and her husband had chosen she followed throughout her life, disdaining all pomp. And thus she not only conquered great secrets of science but the hearts of the people the world over.

Did you know she is the ONLY person to win Nobel Prizes in two different scientific fields, Physics (1903) and Chemistry (1911)?

I also find the works of Asimov and polymath Benjamin Franklin stupendous & very inspiring.

Dear Reader, whom do you consider a Genius?

Labels: ,

2 months of BigFlix

Sunday, March 01, 2009
Big FlixHere is my feedback on BigFlix, India's version of NetFlix, after subscribing to it for 2 months -
  1. It's nice that DVDs are home delivered generally in a day.
  2. You can place a pick-up request by phone or their website. Their Call Center initially used to work from 10:30 AM to 9 PM but now stays open between 10:30 AM to 7 PM. If you are using their website, you have to place a pick-up request before 7 AM the next day to get a DVD delivered next day.
  3. The movies you set with the highest priority may not be the ones you will receive. They have now modified the Queue page to show estimated waiting time.
  4. The quality of DVDs may not always be good. Popular movies prior to 2005 may not play well.
These are the movies from the BigFlix collection that I liked and recommend -
  1. Thank You For Smoking - A comedy about a much hated Tobacco lobbyist in America grappling with a divorce and job challenges. He goes on to impress his young son and salvage his career.
  2. The Pacifier - In this Disney movie, Vin Diesel is a Navy SEAL who solves a mystery while on an assignment to baby sit for naughty rebellious kids and also finally wins their affection.
  3. The Gods Must be Crazy - An unusual comedy set in Africa. I watched the trailer of the movie as a child and finally got to see the movie on DVD
  4. Kung Fu Panda - An animated family entertainer with a simple message & a lovable Kung Fu loving Panda.
  5. Manorama Six Feet Under - An unusual, gripping Bollywood thriller starring Abhay Deol, Sarika, Kulbhushan Kharbanda.
  6. Bend It Like Beckham - An optimistic story of how a British Indian Punjabi girl balances her love for football while withholding conservative family traditions.
  7. Planet Earth is a five part series on Nature that reveals many hidden secrets with some breath-taking footage. David Attenborough's charismatic narration makes this documentary even more engaging. A must for Nature lovers.
  8. Sacred Planet - This Disney documentary on Nature with some superb photography makes for great viewing. The commentary is insipid when compared to Planet Earth
  9. Mee Shreyobhilashi - Most Telugu movies thrive on escapism and vulgar dialogue. This movie tells a story well and delivers a universal message.
  10. Hyderabad Blues - An Indian Andhra NRI bachelor feels like a fish out of water after arriving in Hyderabad, his home city after 12 years but ends up getting married unexpectedly. Although amateurishly shot, Nagesh Kuknoor's trilingual film (English, Hindi and Telugu) is endearing as it sincerely tells a good story and breaks new ground for Indian cinema.

Labels: ,