Book Review: JavaScript Step by Step

JavaScript Step by Step by Steve Suehring is a good "plain-English" book for beginners. Although it lacks both breadth & depth, it covers topics that are relevant to current client side Web development. Out of the 19 chapters, 3 are dedicated to AJAX. The author's explanation of HTTP headers & how they can be manipulated with the XMLHttpRequest object is pretty interesting.

I found a couple of sentences in the book ridiculous
Obtaining an MSDN account from Microsoft will give you access to legacy products, including older versions of Internet Explorer, so that you can see how your site reacts to a visit from Internet Explorer 4.

IE4? Should anyone go out to please someone with a IE4 browser?

addEventListener() is defined as a "cross-browser (except for Microsoft Windows Internet Explorer) event handler method"

Now, that's a funny definition of cross-browser - excluding the most popular of browsers.

IE4, by the way reminded me of the first Javascript book, I purchased way back in 2000 - Pure Javascript. It lists every method and property of Javascript objects available at that point of time. At over 1400 pages, the book is so bulky no one may have read it from first to last, probably not even it's proof readers - it had quite a lot of errors and some of the snippets didn't run. I however liked the idea of having all possible methods and properties for ready reference. W3Schools which I discovered much later has an exhaustive coverage of Javascript too with great samples(except maybe this IFrame scrolling example). It remains one of my favorite learning resources.
Read More

IE8 News

The IE Team has been conducting live chats every month since the first IE 8 Beta was released. As per news on the IE Blog, there will be one more public update of IE8 in the first quarter of 2009 and then a final release. 

Here is a compilation of some of the answers from the transcripts of the last two Chats that give a clue about what's coming -
  • IE8 does not support different skins. However, you can create a custom version of IE8 using Internet Explorer Administration Kit. You can find out more about IEAK and different customizations it supports in this blog post: http://blogs.msdn.com/ie/archive/2008/09/22/the-ie8-ieak.aspx
  • We definitely want to implement opacity in the future. However, in order to do it right, so that it works across all elements, is smart about gamma, etc., we needed to spend a large effort, so it's not making it in to IE8.
  • Beta 2 is considered feature-complete so we have no plans to add a large feature like download manager to IE8. IE8 does large file download and resumes downloads after lost connections to provide some of the value of a full download manager. and there are many third-party download managers you can use as well.
  • In IE8 beta2 we don't delete cookies and temp files created by 3rd party extensions and activeX controls. That probably explains why you are seeing some things left behind.
  • The bits we ship on Win7 vs. Vista vs. XP are virtually the same, but we do take advantage of specific features of each individual operating system.
  • Viewing pages in compatibility mode is essentially the same as viewing it in IE7 as far as CSS is concerned. There are some slight JavaScript differences between Compat Mode and actual IE7 though.
  • A typical release cycle includes beta and RC milestones prior to a RTM release.
  • Performance in the browser is high priority for us. We will be working on improving performance in all parts of the browser, including JS execution and DOM manipulation, up until final release. 
  • Beta 2 is essentially feature complete. There are a number of IE add-ons that do a great job of spell checking. Please check out http://www.ieaddons.com
Read More

Get Google Search results by SMS, talking to iPhone

Google has a cool new feature for India - Google SMS. You can send a search query by SMS & get back results by SMS without paying any premium charges. Considering that a majority of Indian mobile users don't have handsets that support Internet browsing, this should go well with tech savvy folks who need answers on the go. Let's say you wanted the dollar-rupee conversion rate, type 1$=?INR & send to 9-77-33-00000. The results will be delivered by a return SMS.




I just hope the app doesn't learn to talk back. Imagine, if it say's - What? You don't know that?
Read More

Tweaking Firefox configuration settings

In the past I've come across two great links on tweaking Firefox configuration settings, that I had to refer to yesterday again. 

The first one is about how to do automatic Windows Authentication with Firefox. If you have been trying out some local website that requires Windows Authentication in IE & Firefox, you may have noticed a login box asking for your credentials appearing only in Firefox. To turn that off, type about:config in the address bar, locate the Preference Name network.automatic-ntlm-auth.trusted-uris using the Filter option.

As mistyping anything in the configuration settings accidentally can harm the stability of your Firefox browser, you get the following funny warning in Firefox (click on the image below to see larger one) -


Double click on it & in the dialog box that opens enter it's string value as "localhost" or whatever is the website address that's pestering you.

It's not easy to understand all the about:config entries, so there are a couple of friendly visual editors to help you tweak the settings.

Also see:

Read More

Book Review - I. M. Wright's Hard Code

"I'm not opinionated, I'm always right" - spotted on a T-Shirt

The book "I. M. Wright's Hard Code" is a collection of 49 opinion columns from among the many originally written "for Microsoft software developers and their managers, though they were drawn from my (Eric's) 28 years of experience in the software industry with six different companies". The book talks about the "folklore, customs, cultures, tools, processes, and rules of thumb that allow us (Microsoft) to build and ship the most complex software in the world". It has tips, tricks, techniques & thoughts about people and project management. It offers food for thought to developers and the chain above that manages them. 

The author Eric Brechner is a software industry and Microsoft veteran. He talks through his alter ego I. M. Wright in a tone that makes you sit up & listen. You will love or hate I. M. Wright, but you can't ignore him.

I. M. Wright is ..
provactive  (""By now the Agile fanatics out there are screaming, "Use Agile methods!" Yeah, well try meeting weekly or monthly with 100 million customers. It's not as easy as it looks. I'm not saying it's a bad concept, I'm saying you're hallucinating""), 
controversial  ("Google: Serious threat or poor spelling?"), 
conceited ("At best, Google will be a niche player like Apple"), 
candid ("XP even suggests pair programming, but personally, I think that wastes resources (except for devs learning a new code base)"),
opinionated ("I still think the idea of Green Belts and Black Belts is goofy and that the methodology itself is recycled TQM and CQI.")
irreverant ("Is your PUM a bum?" PUM within MS is a Product Unit Manager whose role is equivalent to Group Manager or  Director)
but at the same time he is ..
discerning ("I was given a mind of my own, and I fully intend to use it. Not just at parties and social occasions but on every subject and dealing I have. Questioning why and understanding how are at the center of who I am.")
humorous  ("I've been busy dogfooding lately. It's an ideal diversion for masochists") and 
insightful  ("Agile methods work beautifully at the team level; formal methods work beautifully at the project level; and long-term strategic planning methods work beautifully at the product level"). He plays all the negative shades to drive home his message. I. M. Wright is like a football coach prodding the team out of complacency and motivating them when they are down.

The first six chapters dissect the software development process, the next three target people issues, and the last chapter critiques how the software business is run. Except for the last chapter that I found out of sync with the rest of the content, the rest are engaging & thought provoking.

If you want to sample some of the content before you read the book, you can find two of the chapters on MSDN and some of the author's columns on his blog.

It is not often that people who have been there and done that share their ideas & thoughts. This book is filled with nuggets of wisdom and some great geek talk. I enjoyed reading this book and recommend it to those interested in people and project management.
Read More
Google SEO resources

Google SEO resources

If you are keen about optimizing your website for search engines, Google has several resources - Webmaster Tools, Webmaster Help group, Webmaster Central Blog.

Ocassionally they also conduct free Chat sessions where Googlers share tips & tricks and also answer questions. Here is a sampler -

Suppose my website supports English and French. Should the English version of a particular page and the French version have different URLs? Any other best practices for multi-lingual site architecture?
Matt Cutts: If you can afford it, I would do domain.com and domain.fr. If that's not possible, I would consider doing en.domain.com and fr.domain.com. If that's not possible, then domain.com/en and domain.com/fr can work. In webmaster tools, you can geographically target a site (and I believe parts of a site such as r.domain.com), which will help as well.

Does inconsistent capitalization of URLs cause duplicate content issues and dilution of page rank? For example www.site.com/abc vs www.site.com/Abc. On Windows hosts, these are the same page, but are different pages on Unix hosts. JohnMu: Hi John, based on the existing standards, URLs are case-sensitive, so yes, these would be seen as separate URLs. Since the content on the URLs is the same, we'll generally recognize that and only keep one of them. However, we'd recommend that you try to keep all links going to one version of the URL. Keep in mind that this also applies to robots.txt files.

How often does your search algorithm change?
JohnMu: We change the algorithms all the time - last year we had over backlinks in Webmaster Tools

Do the verification codes for Webmaster Tools, Analytics, Apps for Domain have to remain intact after the first verification or can you just remove them once it's done?
Wysz: I can only speak for Webmaster Tools, but we do recheck for those codes periodically to make sure you are still the site owner. So you'll want to leave that code in place as long as you want to use Webmaster Tools.

We had a great site that was very popular with lots of original content, but we had to switch to a new CMS (new shared IP) AND new domain - traffic tanked! I need help!!! Any suggestions?JohnMu: I'd recomemend making sure that all old URLs 301 redirect to the new ones. Also, it can take a bit of time for a change like this to be completely processed, so sometimes you just need to be a bit patient (and continue working on your new site). If it absolutely doesn't come back, it might be that we're just ranking the new site where we'd be ranking the old one as well. Alternately, you might want to start a thread in the Google Webmaster Help groups, where the folks there can take a look at your site in particular, since these kinds of changes involve steps that are unique to your site.


They have also compiled a compact guide titled Search Engine Optimization Starter Guide, listing some best practices.
Read More
Silverlight 2 FAQ

Silverlight 2 FAQ

Some answers from the Silverlight 2 FAQ that I found insightful -

What is in Silverlight 1 that is not in Silverlight 2?
Nothing. Silverlight 2 is a full superset of Silverlight 1.0. It is 100% compatible with Silverlight 1.0 applications and provides more powerful features and functionality. Silverlight 1.0 applications even benefit from improvements in media playback and performance characteristics of Silverlight 2 without any additional changes needed.

When would a customer use Silverlight instead of ASP.NET AJAX?
ASP.NET AJAX and Silverlight are designed to be complementary technologies. Because Silverlight can talk to any AJAX application, both client-side and server-side, customers can enhance existing ASP.NET or ASP.NET AJAX applications by integrating Silverlight media experiences and RIAs into their Web applications. Conversely, ASP.NET AJAX can additionally be used to control Silverlight-based visualization of data or the delivery of rich experiences.

When would a customer use Silverlight versus Windows Presentation
Foundation (WPF)?Microsoft recommends targeting the Windows Presentation Foundation (WPF) when building rich, immersive applications and experiences that can take full advantage of the Windows platform, including hardware acceleration, peripheral access, etc. Silverlight is meant be used for broad reach, interactive media content and browser-based rich interactive and high-performance applications and experiences.

Will Silverlight support HD quality?
Yes, Silverlight supports 720p HD quality today. However, performance varies depending on the capabilities of the individual PC.

Which platforms and browsers will Silverlight 2 support?
Silverlight will support all major browsers on both Mac OS X, Linux and on Windows. Particular care is being taken to account for differences in platform and browser capabilities to ensure a consistent experience including experiences on Firefox, Safari, and Internet Explorer.
Read More
My favorite Foxit Reader keyboard shortcuts

My favorite Foxit Reader keyboard shortcuts

Foxit Reader is a free, lean (just 2.55 MB) PDF reader that I have been using for more than a couple of years. Although Adobe started it all, I find it's Adobe Reader unwieldy. Being lazy I generally prefer keyboard shortcuts instead of accessing things with the mouse although it takes a little effort to memorize. Over the years, I've found myself using the following Foxit Reader (Version 2.3) shortcuts often -

ShortcutCommand
Alt+2Full Screen
Alt+3Hand Tool
Alt+6Select Text
Alt+9Text Viewer
Ctrl+-Zoom Out
Ctrl++Zoom In
Ctrl+1Actual Size
Ctrl+2Fit Page
Ctrl+3Fit Width
Ctrl+FFind
F3Find Next
Ctrl+Shift+HAuto Scroll
Ctrl+Shift+NGo to Page
F11Reverse View
F9Toggle Menu bar


I found the Auto Scroll and Text Viewer features unusual & interesting.

When you activate Auto Scroll, Foxit Reader will automatically scroll the pages of the PDF file. What's more you can enable the Full Screen option while it auto scrolls. I got a chance to try this out while browsing the amazing photos in the book Blue Planet Run in PDF format.

If a PDF page has images & text, the Text Viewer option will pick just the text. This may ocassionally be useful when you find the font type or images on the page disturbing & you want to focus only on text. This doesn't however match the new Google feature of extracting text in an image in a PDF file.

Also see: Keyboard shortcuts common to Firefox & IE 8 (Beta 2)
Read More

Dreamspark in India

For students aspiring for a career in the software industry or those who are passionate about building software, this should be great news. Microsoft is giving away the latest developer and designer tools that normally cost hundreds of dollars at no charge to verified students through its DreamSpark program. DreamSpark was so far restricted to a few countries. The goodies include the following -

  • Visual Studio 2008 & 2005, Professional Edition
  • SQL Server 2008 & 2005, Developer Edition
  • Windows Server 2008 & 2003, Standard Edition
  • Virtual PC 2007
  • Expression Studio
  • XNA Game Studio 2.0
  • 12-month free Academic membership in the XNA Creators Club

This offering for students is much better than what they can expect out of open-source tools.

These tools are available both online as well as offline on DVD through NIIT, Aptech and Hughes Net Fusion Centers in several towns & cities across India.

My first brush with computers was more than a decade ago when I was in college. All we got was clunky Unix terminals. I graduated later to a 8086 PC but never owned a PC till several years after I finished college. A 8086 PC at that time cost over a lakh (or $2000). For many, it was also hard & expensive to find the right learning resources for picking up tech skills.

Fast forward to 2008, you can get a decent assembled PC & an annual Broadband Internet subscription for about Rs.20,000 ($400). Relatively speaking, students of this age have abundant learning resources including the Internet. The Internet (with a good Broadband connection) is a great leveller. It throws open a treasure of knowledge and ideas, making it immaterial in which part of the world you live. There are also helpful communities on a variety of computer technology to seek help from. The DreamSpark program is a great complement to all those resources.

Students enthusiastic about Computer Science and technology hobbyists may never have it so good.

Read More

IE Special issue of Code Magazine

IE 8 is the most standards compliant and feature-packed version of IE that is currently in Beta. If you are a web developer, you owe it to yourself to know how the changes will impact what you are currently building. Getting conversant with the new version can also help you plan for your future releases.

To stay updated on IE developments, the IE Blog is the best resource. It was recently announced there that folks in the IE Team have authored articles for a special issue of Code Focus magazine. It is a available as a PDF file (7.2MB) & there are some interesting articles in it. Go grab it.


Read More
Free tools to generate screenshots

Free tools to generate screenshots

If you are not satisfied with the kind of screenshots you can generate with the PrintScreen button & MS Paint, you should evaluate these free tools that offer you a lot more options -
  • Cropper is a lightweight screen capture utility written in C# with a lot of nifty features. It is available from Codeplex and the download size is 270KB. You can not just save the screenshots in JPG, PNG formats but also as Animated Gif & AVI using Cropper plugins.
  • Snipping Tool which comes with Windows Vista is accessible from the Accessories section. With this you can "snip" a full-screen window or a particular window or extract portions in a rectangular or free-form format and save it as a GIF, JPG, PNG or HTML file. It also allows you to do other simple manipulations to the image like highlighting & writing on it.
  • Paint.NET is a free image and photo editing software that has been drawing rave reviews. You can do more complicated manipulations to your screenshot with this. The downloadable executable in compressed format is 1.53MB.

Also see - Windows Developer Power Tools - Most Loved

Read More

IE Developer Tools Tips & Tricks - #2: Script Console

One of my favorite features in Firefox is the Error Console in the Tools menu. It's a Developer feature inherited from Netscape that has been enhanced over the years. Whenever a page has a Javascript error, the precise error message with line number in the source code shows up in the Error Console. When you click on the error message, you can jump to the exact line in the source.

IE 8 (Beta 2) introduces a similar Console under the Script tab in Developer Tools. To invoke this hit F12 (for Developer Tools), CTRL + 3 (to jump to the Script tab which is third in the tab list) and then CTRL + ALT + I to go to the Console window.

You can also choose to see only Script Errors.

Also see:
Developer Tools: Keyboard Shortcuts

Read More