Posts

Showing posts from December, 2008

Book Review: Foods That Harm, Foods That Heal

Image
"Let food be your medicine and medicine be thy food" - Hippocrates It's comforting to know that food can also be preventive medicine. Foods That Harm, Foods That Heal - An A-Z Guide to Safe and Healthy Eating beautifully explains the benefits & bad effects of various vegetables, fruits & food sources. Written by experts and full of relevant images, this colorful book makes for interesting reading. Common diseases and the effects of various types of food on them are also discussed. All the topics are arranged alphabetically. This makes it great to use for future reference. The book has been written for an American audience. Although this does not diminish the value of the book's contents, I wish it was written in more general terms to suit a global audience. Being a vegetarian & foodie, I did not know about the health value & drawbacks of the food I've been eating all these years. I loved reading this book for all the practical knowledge it c...

HOW TO access web pages faster on a slow Internet connection

Image
Disable IFRAME based ads Disable Flash based ads . These ads suck up a lot of bandwidth. It's easy to enable/disable add-ons like the Flash plugin on newer versions of IE & Firefox. Note however that you will need Flash to be enabled to watch videos on YouTube or MyPopKorn.com (the site that gives you short summaries of long drawn Indian TV serials) YouTube provides many of its videos in multiple resolutions or quality levels. Consider lowering the video quality to the lowest available to make the video stream faster. If you like watching Flash based videos like those on YouTube, don't play it immediately but allow them to load completely (i.e till you see light red line at the end in progress indicator of the player). Disable images. This will take the fun out of browsing the Internet, so take this extreme step if pages download really slow. The Opera browser has a simple option to turn off images on a per page basis. From the menu, go to View > Images > No Im...

Pros & Cons of various C# Collection classes

The System.Collections and System.Collections.Specialized namespaces contain about a dozen Collection classes. How do you decide which one is optimal? This compilation of pros & cons of various C# Collection classes can help you decide. Also see: MCTS Self-Paced Training Kit (Exam 70-536): Microsoft .NET Framework 2.0 Application Development Foundation

State of Internet in India

As per stats released by The Internet Governance Forum, I ndia has 81 million Internet users . These figures however don't tally with other estimates . According to Akamai's quarterly State of the Internet report for Quarter 3 of 2008 , India has 26% on narrowband ( Check these tips for accessing web pages faster on a slow Internet connections . Also see: 6 Months of BSNL Broadband

HOW TO avoid the IE Information Bar during development

Image
If you have ever tried opening a web page that contains JavaScript directly instead of from your web server in newer versions of IE, you may have noticed the message "To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer" displayed in the Information Bar in Windows XP & Vista. There are three ways that I have found to avoid this - 1) You can turn off the Information Bar in Internet Explorer by lowering the default security settings. 2) In Internet Explorer, from the Tools menu, select Options and in the Internet Options dialog, select the Advanced tab. Scroll down until you see the Security options. Enable the checkbox option "Allow active content to run in files on My Computer". 3) Add the following Mark of the Web comment between the DOCTYPE and the HTML - <!-- saved from url=(0014)about:internet --> Read the excellent explanation on Mark on the Web on MSDN . "..manually...

Plain English Explanation for Non-Geeks

Explaining Internet terms like Podcasting, Phishing Scams, Social Media, Twitter, Blogs, Social Bookmarking, Social Networking, Wikis, RSS to non-geeks is not a easy job. Typically if people find something intimidating they may form a bad opinion about it & keep away. That's what happened to me in school with mathematics. Finding the right learning resources is the key. Seattle based Lee & Sachi LeFever of Common Craft have been producing roughly 3-minute videos that make complex ideas easy to understand. The videos on general topics are hosted on YouTube. Transcripts are also available. Their format of presentation is snappy, entertaining & so effective that they have been commissioned by companies like Microsoft & Google to develop custom educational videos for their products. Also see: Free ASP.NET & related videos

Learning Resources for Building High Performance Websites

I have high regard for Steve Souders & Peter-Paul Koch . Their knowledge and contributions to the Web Development community are exemplary. Steve is the man behind YSlow , a nifty tool that analyzes web pages and tells you why they're slow based on the rules for high performance web sites . Steve recently finished teaching a course on High Performance Web Sites at Stanford. He has graciously shared the material from the class on the class web site & also interesting guest lectures . All these resources are great fodder for web developers. As part of their course, the students studied popular websites to identify performance issues in them. Their findings confirm that websites that follow Performance best practices have a high YSlow Grade and load the fastest. Craigslist.org (YSlow Grade:96) & Windows Live (YSlow Grade:94) top their charts while Fox News Channel (YSlow Grade:24) & ESPN (YSlow Grade:28) are at the bottom. The Q&A from the Midterm Exam & ...

What is Stemming?

Stemming means matching on the "stem" (or root) of the word rather than the exact word. Many of the popular search engines support Stemming. For instance if you search for pet lemur dietary needs , search engines like Google & Live Search will also search for pet lemur diet needs , and other related variations of your terms.  Live Search now has a new feature that I think is a form of visual stemming. You can use images to find other images . Search in SharePoint also supports Stemming.

HOW TO find if your site is indexed by search engines

For most websites, much of their traffic is driven by search engines. To see if your site is listed on popular search engines like Google, Live Search and Yahoo Search, type site: followed by (without space) your website domain URL. Ofcourse, this technique can also be useful to search within a specific domain. All the above mentioned search engines provide tools for Webmasters to inform & manage the interaction: Google Webmaster Tools Live Search Webmaster Center Yahoo Site Explorer On a personal note, about 71% of visitors to my blog come through search engines. In this year it has garnered a modest 16,000 hits with about 35% of the visitors from US.  Related: Tools to monitor your website

Large ASP.NET websites - 1

Anything that represents customer hand-holding represents a failure of site design - Jim Buckmaster, Craigslist What does it take to run a large ASP.NET website that can have 30+ million hits a day (500 - 600 pages per second)? You would have to ask Markus Frind who single handedly runs PlentyOfFish, a hugely popular on-line dating website.  The stats & lessons ( via High Scalability ) about his site can be insightful to ASP.NET developers. Tech Stats: PlentyOfFish (POF) runs on ASP.NET, IIS, Akamai CDN, Foundry ServerIron Load Balancer PlentyOfFish gets 1.2 billion page views/month, and 500,000 average unique logins per day.  2 load balanced web servers with 2 Quad Core Intel Xeon X5355 @ 2.66Ghz), 8 Gigs of RAM (using about 800 MBs), 2 hard drives, runs Windows x64 Server 2003. 3 DB servers. No data on their configuration. Approaching 64,000 simultaneous connections and 2 million page views per hour. Internet connection is a 1Gbps line of which 200Mbps is used. 1 TB/day serving...

HOW TO implement AutoComplete with jQuery & ASP.NET

Image
Auto-completion of search terms is an AJAX feature popularized by Google that reduces typing by listing possible keywords as the user types. ASP.NET developers typically use the AutoComplete Extender that is the part of the ASP.NET AJAX Control Toolkit to plug it to a text box to implement auto-completion. There are other alternatives but one of the best options I've found is jQuery AutoComplete Plugin . jQuery is a lightweight JavaScript library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. It was released in January 2006 by John Resig, a JavaScript Evangelist for the Mozilla Corporation. Using the plugin is a no-brainer as the code sample will show. All the grunt work is done by the jQuery Autocomplete Plugin. Building & deploying an Autocomplete solution takes just a few minutes and hardly any lines of code. There are a various specialized jQuery Autocomplete Plugins that offer additional features th...

HOW TO avoid Spam Filters while emailing programmatically

Image
Spam filters are generally built into email clients, can be installed seperately or implemented on the server. Many popular spam filters utilize  Bayesian spam filtering besides other techniques to distinguish illegitimate spam email from legitimate email.  The process involves training the spam filter to identify spam words.  After training, the word probabilities (also known as likelihood functions) are used to compute the probability that an email with a particular set of words in it belongs to either category. Each word in the email contributes to the email's spam probability. This contribution is called the posterior probability and is computed using Bayes' theorem. Then, the email's spam probability is computed over all words in the email, and if the total exceeds a certain threshold (say 95%), the filter will mark the email as a spam. To prevent a programmatically sent email from landing in the Junk folder, we have to understand how spam filters operate . Using Spam...

HOW TO conditionally format entire row/s based on a cell's text value in Excel 2007

I found that Conditionally Formatting an entire row/s rather than a single cell and that too  based on a text value in a cell rather than a numeric value in Excel 2007 is not straight forward. After a bit of monkeying around I learnt you can also actually have multiple Formulas while specifying a Rule for Conditional Formatting. I jotted down the steps to do this with screen shots and posted them on my Code Gallery . If you know of a simpler or alternative way to Conditionally Format an entire row in Excel 2007, please let me know. Also see: HOW TO create an Excel 2007 Macro HOW TO create a Ribbon-less Excel 2003 UI in Excel 2007

SEO simplified

Undermining the exagerrated fears of some SEO consultants about all the changes happening at Google Search in recent times, randfish over at SEOmoz Blog says - SEO remains, at its core, remarkably similar to what it was in 2002: Make pages accessible Target with keywords that searchers employ Build content that users will find useful and valuable Earn editorial links from good sources The Search Engine Optimization Starter Guide  from Google has another nice advice - ..you should base your optimization decisions first and foremost on what's best for the visitors of your site. Also see - Google SEO resources

How To Copy Files between Virtual PC and Host PC

Image
With Virtual PC 2007 , you can run multiple operating systems (Guest OS - Windows 98/Me/2000/XP/Vista/2008, OS/2) on the same physical computer (Host OS - Windows Vista Business/Enterprise/Ultimate, Windows XP Pro/Tablet PC).  The biggest advantage of using Virtual PC 2007 is that you can test an application on multiple virtual machines instead of actual physical computers. You can even set up a test network , by installing VPC and then creating VMs for each server and workstation that you want on your test network. While working on a Virtual PC, you may sometimes need to access files from the host PC. Copying files from Virtual PC to the Host PC or vice versa is a cinch. Click on the Edit option in the menu & select Settings. A dialog box showing various settings & their current values. Choose Shared Folders in that list & in it's accompanying panel, click on the Share Folder... button. This opens another dialog box that lets you browse through the folders i...

India Stats

Image
India Today published a special issue titled "Transforming India Great Ideas.Great Minds" in October. It has thought provoking articles by India's best minds on ideas than can transform India and how they can be implemented. The articles contained some statistics about India - some interesting, some extremely shocking. Sample this - 72 was India’s rank in the 2007 transparency international’s global corruption perception index. Rs 883 cr - the amount of bribes paid by poor families in 2007 to access 11 public services, says a TII-CMS report. 69 per cent is the reservation in educational institutions in Tamil Nadu, the highest among all Indian states. 120 MPs in the Lok Sabha face criminal charges, though the law says that anyone sentenced to two years or more in jail is disqualified from contesting elections. 126 policemen per 1 lakh population. That is India’s manpower deficit compared to western ratios of 250-500 per 1 lakh. 8 - is the number of communal riots indepen...