Archive

What are FaceBookUpdate & GoogleUpdate?

Compared to architecting & releasing web applications, Windows Apps (client apps in general) needs more care. The main reason being if you detect any bugs or want to do any enhancements you can’t simply do the changes in your server and be done with it. You need to get the new binary to each one of the client machines and overnight you can’t get everyone to the new version. Look at Microsoft – they are unable to get everyone rid of Windows XP or IE 6.0 & upgrade to new versions. It is tribal knowledge in the industry that users prefer to be notified and asked for consent before upgrading. So most of the apps for Windows ship with an thin installer executable that checks for new version of the app from their server and prompts to download and install the new bits – think of the frequently appearing and annoying Adobe Flash Player and Adobe Acrobat upgrade prompts.

In this background I considered Google Chrome process of silent auto-upgrade to be an interesting exception. It appears Google Chrome is not alone in this, FaceBook is doing the same. Today when I happened to launch Windows Task Scheduler applet I noticed two tasks which were set to execute FaceBookUpdate.Exe at a regular frequency. My first instance was “Oh my god” my PC has got malware and how is it possible?. After few minutes of research I figured it out to be the new Skype-FaceBook video chat client bits. What I found interesting here is the close similarity in the name of the app and parameters between the FaceBook & Google Chrome tasks. Look for yourself on the images below, you will see how both follow the same naming convention for the file name, parameters and folders exactly.

facebookupdate.exe - the Skype Video Chat Client

GoogleUpdate.exe - Chrome Browser Update

War of words between Google & Microsoft on MS Office Collaboration

Two weeks back Google announced a product called “Google Cloud Connect for Microsoft Office” with the below video. This free product helps Microsoft Office (Windows application) users to collaborate (share, backup, simultaneously edit Word, Excel & PowerPoint).

Google Cloud Connect for Microsoft Office

Last week Microsoft has replied back in kind with the below video. Microsoft has been offering its own collaboration using its on-premise offering of Microsoft SharePoint Server or on the cloud with Office Live Workspaces (or SkyDrive) or SharePoint Online

Microsoft’s response to Google Cloud Connect

There have been many discussions on the Blogosphere why is Microsoft doing this, are they threatened or they are feeling comfortable to come out in open. Whichever is true I find this to be a renewed interest on improving the basic office productivity suite after a long time. It is going to be a good time for consumers like you & me.

What it takes to get a website off the ground?

Sometimes the best possible way to visualize something really complex is to see it as a graphic and have it printed on a huge poster. Few years back in one of the Microsoft Mix event, they released this super cool visualization of an illustration of the process of launching a web site. It was released into a website as well called “A website named Desire”, which made the huge poster available as a SilverLight  Application using Deep Zoom. It is super cool, check it out.

image

(I saw this few years back and today I was trying to find it. Few hours of Google & Bing search, I couldn’t find it. Then with some help from a friend, I found it back. This shows how much more work has to be done in Web Search)

Yahoo! showing Google favourite Icon in IE

Recently I came across a problem from one of my friends. Whenever he browses to Yahoo! in Internet Explorer it was showing Google’s favourite icon (Favicon) in browser address bar. He was confused. I then found the answer to the problem, which I am giving below.

When you navigate to a site, IE downloads the favicon and caches it in the temporary internet files folder, where the this favicon will be assigned a unique name and mapped to its URL. So for example, if you navigate to www.bing.com, IE will download the favicon from http://www.bing.com/favicon.ico and cache it as favicon[1].ico somewhere in the temporary internet files folder, and map it to http://www.bing.com/favicon.ico.

Now if you somehow remove this favicon file from the temporary internet files folder, without removing the mapping to its URL, then the cache entry http://www.bing.com/favicon.ico will point to a non-existent file. Now say you navigate to http://my.yahoo.com, and IE downloads the favicon from http://my.yahoo.com/favicon.ico to the SAME favicon[1].ico file in the temporary internet file folder, then the cache entry http://www.bing.com/favicon.ico will be mapping to the yahoo favicon.So the next time you go on http://www.bing.com, IE will query the cache and incorrectly think that the favicon for this site has already been downloaded and is available on file. It will load the favicon[1].ico for http://my.yahoo.com, and hence the wrong favicon will be displayed.

Ordinarily you cannot remove a file from the Temporary internet files folder without also removing the file’s mapping. But you can do this by running the del /s command in  command line or possibly by using 3rd party cache cleaning tools. Note that cleaning your temporary internet files folder through IE or the Internet Options Dialog will restore everything back to normal.

Internet Explorer Delete Temporary Internet Files

Building faster web sites

webpage-performance

There are lot of performance improving tips out there in the Internet on how to speed up web pages. Recently I came across these references and tools that will be useful.

  1. Steve Souders from Google presents "Even Faster Web sites"
  2. YSlow from Yahoo!. A firefox add-on that analyzes web pages and tells you why they’re slow based on the rules for high performance web sites
  3. More website optimization tips here
  4. Webpage performance analyzer here

Firefox Geode and W3C Geolocation

Mozilla in their upcoming Firefox 3.1 release is introducing an experimental feature “Geode“. Geode is about browser (and server) automatically deducing your location and provide appropriate location based information. Though Location-aware applications are present in Mobile Phones using Cell-Tower Triangulation or GPS, this is the first major effort to do something similar on the PCs.

Geode provides an early implementation of the W3C Geolocation specification and location information will be provided by one or more user selectable service providers and methods – GPS-based, WiFi-based, manual entry, etc. What I was curious is how they deduct location information using Wi-Fi. It seems they use a technology from a company called SkyHook, whose hybrid positioning system (XPS) is a software-only location solution that allows any mobile device with Wi-Fi, GPS or a cellular radio (GSM/CDMA) to determine its position with an accuracy of 10 to 20 meters. Click on the video below to see how it works – basically they are building huge database of Wi-Fi access points and correlating them with Latitude/Longitude information from other sources like GPS for each access point profiled.

Skyhook's hybrid positioning system (XPS) - How it works?

All these are transparent to developers and users, for developers it is just a Javascript call like the one shown below:

navigator.geolocation.getCurrentPosition(function(pos) {
  alert( pos.latitude + ", " + pos.longitude );
})

Before these initiatives web applications were limited to deducing user’s location based on your IP. Technology is not standing still with IP based deduction, earlier they were limited to US cities, now database are more complete and are able to identify cities world over including India.

Related links: ZoneInfo database, GeoNames

Cross browser Vector graphics

If you have tried to do a decent chart or graph or any line drawings in HTML/CSS you would have felt extremely frustrated, more so you want it to be cross-browser compatible. Though SVG and VML have been around for years, the support for them is not uniform between browsers. Recently in a newsletter from Sitepoint I came across Raphaël – a small JavaScript library (less than 19Kb in filesize) written by Dmitry Baranovskiy of Atlassian, that allows you to create and manipulate vector graphics in your web pages. It’s simple to use and supports Internet Explorer 6.0+, Safari 3.0+, Firefox 3.0+, and Opera 9.5+. Internally Raphaël uses VML in IE and SVG in the other browsers.

Raphaël is published under MIT License which basically allows you to use the code in both commercial and non-commercials applications and even redistribute freely (as in free beer).

CurrentSprocket

To do the above graph, you need to write only 30 lines of Javascript. Check it out.

Silverlight – Search Engine Friendly by Design

Last few days there has been buzz around Adobe’s announcement of collaboration with Google and Yahoo! to improve the ability of search engines to index Flash files better – which are normally .SWF binary files. Instead of coming with open XML based file formats Adobe has chosen to offer an "optimised" (basically a server component) version of Flash Player that sits on a search engine’s server and checks for Flash at the same time as HTML.

Compare this with Microsoft’s Silverlight. Silverlight applications are packaged in a XAP file (which are simply a zip) format and any static textual content is in the XAML files. XAML files are nothing more than a well-defined XML file, this means even today without any special API search engines can index Silverlight Applications. In addition Silverlight apps supports deep linking which is important for facilitating relevance, very much like HTML’s nested links concept. For more details see this post here by Microsoft’s Nikhil Kothari on how Silverlight by design is Search Engine friendly.

Anyways, this is a very important step that Adobe that has announced. Flash is currently the entrenched player in the RIA space having more than 95% of market share. This has resulted in enormous amount of content being out there in the Web in Flash file formats. These have been so far out of reach of Search Engines and any attempt by Adobe to make it reachable is welcome. And any competition here between Adobe and Microsoft is also a welcome one.

Basics that came up in a code review

Few weeks back I was with a developer doing a code-review for one of his application. The application was a Windows Forms Application written in C# that monitors several running jobs and reports on any event/failure found in the log file.

Many gaps came up in the review which made me thinking (me thinking is surprising isn’t it), hence this post. The abstractions in the form of frameworks and IDEs that are available today make programming definitely accessible but at what cost. Do they make a formal (structured) learning of programming unnecessary?. Are today’s engineers getting away by not following any coding disciplines like the one’s enforced by my mentor(s) and teachers when I learned programming. Before I continue this rattle and list the items let me clarify, I am not intending this post to be a comprehensive check list – it just happens to be the issues I noticed in this particular incident. I have grouped few of my findings in sections.

Reading a configuration file

  • When reading a configuration file (like .config/xml) to load values, validate whether the file exists. If file is not present either load default values and proceed  (or) exit gracefully. Having a simple try/catch  block doesn’t mean you have handled all exceptions and you no further work
  • Try not to read the entire file to memory. In .NET this will be for example using StreamReader.ReadToEnd method. Think about what will happen if you the file has been corrupted or wrongly replaced with a 10GB video file. You will crash the machine by running out of memory. In typical configuration files especially for your applications you can identify the maximum likely size which will be say few MBs. So in .NET try to use StreamReader.ReadLine for as many lines as you will need
  • Similarly don’t load the entire XML into XMLDOM (like by using XmlDocument) where it is not necessary. Instead try to use XmlReader which is a stream based XML processor and doesn’t take up memory (many times of the full XML filesize)

UI Related items

  • While designing design the work flow and the steps with the user of the application in mind. Think about the likely steps the user will follow. Do not design with your code flow as the steps. In this application this meant not having to select a configuration file and global settings screen as first step in the Tab order. Instead have the first screen after application launch as the one the user will use repeatedly

In an earlier project I gave the complete UI design specification in Visio format to a developer that avoided all the iterations and confusions. You can read about that in this earlier post.

Demand for SharePoint developers

In the last two to three quarters we are seeing a huge surge in SharePoint projects and as a result the demand of SharePoint developers is sky rocketing. Initially we were thinking this to be a local (India) phenomena but when I talk to many of my contacts in the industry worldwide and check out articles in the Internet, it turns out to be a worldwide phenomena.

Below are some random resources on SharePoint that might be useful for developers: