Posts

Showing posts from February, 2010

What's in Google's secret PageRank sauce?

Image
That's something some governments may start investigating as well. While going through an article by SEOmoz's Rand Fishkin, I came across a pie chart that shows components of Google's Ranking Algorithm as perceived by 72 SEO experts -   -o- As I've been increasingly blogging about things other than Web Development, I felt it would be more appropriate to rename the blog title to Tech Tips, Tricks & Trivia . I will probably start referring to it with the moniker T4   :-)

HOW TO open a PDF or Word .DOC file within the browser

I have seen this uncommon question come up on the Forums on how to make a PDF or a Word document show up within a browser rather than having that file open up in a separate window through Adobe Reader or MS Word (as the case may be). I realized while trying out Google Viewer that it can be used programmatically in your own pages to force  a .PDF or .DOC link to show up within the browser. Moreover with this technique, it does not also matter if the end user has a PDF or Word document viewer installed on his comp . Here is how Google Viewer typically works. The URL of the .PDF or .doc file to be opened within the browser has to be passed to Google Viewer as a querystring value - http://docs.google.com/viewer?url= http://www.hud.gov/buying/checklist.pdf Suffixing an absolute URL of a PDF or Word document as a querystring value does the trick. Update (4/Feb/2013):  Google Docs/Drive viewer currently helps you preview over 16 different file types , so this trick can be extended to

Crowdsource your supplemental learning with Stack Overflow

Image
I feel participating in technical Forums aids as a supplemental learning tool as you get to know about other developers real-life scenarios. Understanding these experiences & their resolutions can be  helpful in avoiding pitfalls & learning about best practices. For instance, did you know that the popular JavaScript Frame Buster code that prevents other sites from "framing" your site within an iframe can itself be busted. In a relatively short time, Stack Overflow has become one of the most popular technical Forums (16 million hits a month, with currently over 0.5 million questions in all) on the Web. One of it's interesting features is that participants can vote questions and answers up or down and edit questions and answers in a wiki fashion. The best questions & answers cascade to the top based on votes. An active & open-minded community of users ensure frivolous questions and answers are voted out. You can also gain deep insight on some topics from g

View math calculation results directly in Firefox Search bar

Image
I noticed something cool while trying out unit conversion (806333 KB = ? GB) with Google in the Firefox Search bar. I found that you don't even have to hit enter to open up the Google search page to view the result. As soon as I finished typing GB, I got the result as an auto-suggestion. This also works for mathematical calculations. I was using Firefox 3.0. I saw the auto suggestion list similarly with the result in Chrome's Omnibox as well but didn't see this happening with the Search bars in Opera 9.6 or Safari 3 (on Windows) or IE 8

Google Guide

Image
The freely download-able Google Guide (pdf) had been lying in my ebook collection for a long time and I finally got to browse through it this weekend. Considering the guide was compiled in around 2005, it had some stale info but it is still useful and I would recommend Google Guide to newbies getting started with search engines. I learnt some interesting facts & tips from it - * You can prefix a "-" sign infront of a search operator to negate it's effect" Google Buzz" -site:google.com * You can find synonyms by preceding the term with a "~" tilde. This takes you beyond the automatic stemming that Google already performs * You can specify that results contain numbers in a range by specifying two numbers, separated by two periods, with no spaces. recumbent bicycle $250..$1000 * Since Google's servers are typically faster than many web servers, you can often access a page's cached version faster than the page itself. This is hel

HOW TO programmatically create Dynamic Icons in a jiffy

Image
"A mind is like a parachute. It doesn't work if it is not open." — Frank Zappa   U ser Experience (UX) is more important today than ever, as users are getting more discerning & pampered by choices. Delivering functionality is not enough, the look and feel of an application is important as well to improve the effectiveness of an application. Google Charts Tools now let's you generate dynamic icons in the same way that you can generate pie charts, heat maps etc. Dynamic icons let you merge info programmatically retrieved from data sources with image templates. So for instance, instead of showing a message that the last day for paying a bill is the next day (after querying the database) on a Dashboard, you could make the reminder look more dramatic by having the message in a Post-it note - The above image has been constructed programmatically by specifying the message as a querystring parameter using the Chart API - http://chart.apis.google.com/chart? chst

A Product is as good as it's Documentation & Community Support

I feel, the success of any product relies heavily on the documentation available for it & it's helpfulness to developers. If there is an active community around it that collaborates through Forums, it can boost the confidence of neophytes working with it & take the product to greater heights. Sometimes the documentation contributed by community members is more effective than the original documentation which is generally provided as a formality & cloaked in jargon. The following are some examples of independent contributions that I have benefited from - Mikesdotnetting's multi-part series on ITextSharp . The open-source PDF library creator Bruno's documentation is good as well. Kevin Gao's Visual SourceSafe (VSS) Tutorial The "An Extensive Examination of .." series on various .NET topics by Scott Mitchell Dave Wanta's very comprehensive FAQs on the System.Web.Mail & System.Net.Mail namespaces related to emailing (to be continued...

MVP Open Day

Image
I was at the MVP Open Day 2010 hosted by Microsoft in Hyderabad last month. (Pic from MVP Suthep's Flickr collection ) It was a great opportunity to meet over a 100 MVPs from India, Nepal, Sri Lanka, Singapore, Malaysia, Thailand & Vietnam & hear about some of the new things Microsoft is coming up with. More of my photos coming up soon... Also see: MS MVP Authors from India

Tina Seelig's Insights on Life, Leadership

Having got to know that Stanford University lectures are available through iTunes , I checked one last weekend in which the very accomplished Tina Seelig, Executive Director for the Stanford Technology Ventures Program, provides insights on life, leadership, and the little things that make a big difference in an entrepreneurial setting . In her talk, she lists 10 things she wish she knew when she was 20 - Every problem is an opportunity for a creative solution. Bigger the problem, bigger the opportunity. The harder you work, the luckier you get Find the intersection between your interests, your skills & the Market. Passions are not sufficient. Try lots of things, keep what works You don't have to wait to be anointed. Don't wait to be empowered. It's a small world, don't burn bridges You can do it all, but not at the same time. Know & regularly reassess your priorities. It's the little things that matter most When you are on a team, the key is makin

My favorite Chrome Extensions

As a Web developer at heart, I have a fascination for browsers.  I have the 5 popular browsers - IE, Firefox, Safari, Opera & Chrome, installed on both my home & work PCs mostly to look out for cross-browser issues. I like exploring browser features in all of them. Years ago, I was overjoyed when I discovered the "View Selection Source" option in the Firefox context menu. This is a unique built-in feature that let's you view rendered source of a desired portion of a web page . It's a great help while troubleshooting web page issues. As of 5 February 2010, Chrome which has been in circulation for over a year has become the third most widely used browser . Browser Extensions are a great way to add more features and functionality to the browser. Extensions work specifically on browsers that support it. Firefox probably has the most available among browsers. Starting with version 4, Google Chrome (for Windows) supports Extensions. The extension gallery beta was

Explaining Technology in Plain English

Image
I f you have a tough time explaining computer topics to your parents, you can leave the job to the Common Craft folks. In fact, even regulars can benefit from watching their videos for their simple explanations. The enterprising pair of Lee & Sachi LeFever have been doing a great job of producing short educational videos on technology topics "in Plain English" & sharing it with the world for free (for non-commercial use). They have a unique style of explaining complex topics in a light-hearted way. So interesting is their format that Microsoft & Google , among other biggies, have engaged them to shoot videos for their products . Also see: History of Microsoft HOW TO add subtitles to YouTube videos

Invalid Product Key?

"I often tell my people that I do not know which areas I belong to, and I just reckon myself to be a trouble shooter." - Ji-Rong Wen, Microsoft Research I t would scare anyone for a minute (or more) when they find that expensive software they have purchased and started to install, asks for a product or license key number and then spews out a warning "Invalid Product Key" after they type out the typically alpha-numeric set of cryptic characters. This often happens because the font used for printing the keys is sometimes misleading. Sometimes "B" is mistaken for "8" and "O" (capital "o") with "0" (zero). So the next time you come across this warning, verify if misinterpretation of the character due to the font type is not the issue before letting panic strike. If this happens for a Microsoft product, check these troubleshooting tips & try the phone activation method . The classic book on Programming guidelin

More online storage options - Upload ANY file to Google Docs

It has been long rumored that Google has a plan to provide an online storage service called GDrive. Last month's announcement that you can upload (almost) any file of upto 1GB , brings a long standing expectation to fruition in a way. Although the free total storage limit of 1GB pales in comparision to Microsoft Sydrive's limit of a whooping 25GB, it's noteworthy that Google Docs allows very large files of upto 1GB size to be uploaded at one go . Skydrive limits the maximum size per file to 50MB. The above mentioned announcement also casually uses the word cloud (note the lower-case "c") in the title of the post as if the technology was already ubiqutous. The Cloud is probably what makes this scheme feasible. Folks needing storage beyond the free quota of 1GB can purchase storage for $0.25 per GB per year. I guess we can expect the Cloud vendor wars to get hotter this year. Also see - Say Goodbye to Privacy Google Docs Spreadsheet Size Limits

HOW TO perform a HTTP 301 & 302 redirect using IIS

Google ran a SEO quiz using Google Docs a few weeks back and the answers are now online . Developers building a public-facing website can benefit from learning tricks of the SEO trade as it can significantly boost traffic to their site. This area also needs continual learning as new things emerge frequently. One of the question there was about how to move a site to a new domain name while retaining it's original search engine ratings.  The preferred way is to permanently redirect traffic using a HTTP 301 (permanent) redirect as this will inform search engines to update their index with the resource’s new location. If the change is going to be short term such as a special page that is seasonal, a 302 (temporary) redirect would be a better choice. I never had a chance to try this out but implementing this in IIS 7 or older versions is pretty easy. This can also be done programmatically - private void Page_Load(object sender, System.EventArgs e) { Response.Status = "3

Building blazing fast Web pages

E veryone loves fast loading pages but building such pages requires care & implementing best practices. Some best practices only provide minor benefits but when put together the performance gain is significant. Steve Souders, the author of "High Performance Web Sites", who champions the cause of building faster Web pages & thereby a better Web, shares 3 new tricks to speed up loading web pages - Specify a Character Set at the very top of your HTML document - Browsers take a performance hit of varying severity when you fail to specify it . A META tag specifying the charset should ideally be the first element inside the HEAD tag. Minify HTML Minimize HTTP Request Size - If the total size of the request headers exceed one packet (~1500 bytes), a roundtrip is required just to submit the request thereby hurting performance. These "rules" are now part of Google's YSlow clone, Page Speed 1.6 Beta Firefox plugin Also see: What is "domain shard

HOW TO prefix zeroes before a variable length number in Excel

Image
E xcel usually eats up any zeroes prefixed to a number that you type. So what if you explicitly needed them? For a fixed length number, you have to use the option Format Cells after right-clicking the cell or range that you want to impose a number format upon. In the dialog box that opens go to to the Number tab, pick the Custom option & specify the number format. If you wanted the number 8217 or any 4 digit number to have 5 zeroes prefixed before it, you would have to specify the number format as 000000000 so that it shows up as 000008217. The trick here is to know what the meta-characters in the format mean. Browsing through the generally good documentation by F1-ing, I did not find a format to handle variable length numbers for the scenario just described. I got a solution from a MS Knowledgebase article , which is to use the format "00000"# . The double quotes in the number format helps us prefix the desired number of zeroes before a variable length number. Rel