Category Archives: Developer

MSDOS.NET

(Backdated Post: 25/08/2000)

Being April 1st, it is appropriate for this post.

In late 2000 when the Microsoft world was going crazy on announcement .NET, it was .NET everything everywhere. Within the Microsoft user groups at that time, the joke used to be, anyone trespassing any Microsoft building in Redmond will be renamed as *.NET. So I would be called Venkat.NET if I was spotted by a Microsoft Product manager.

In this background during Microsoft Tech Ed 2000 India, in the organizing team we had to manage a 15 minute empty slot in the schedule. We couldn’t leave it free. We needed all the attendees to be in one hall, so that we could get the main hall ready without hindrance. And that was slot I used unravel for the first and only time anywhere in the world – Microsoft DOS.NET, the DOS operating system being upgraded beyond anyone’s imagination.

optimizing for performance, availability with msdos.net

msdos.net - dir outputs XML, Batch files exposed as COM+ objects, complete multi-threading & object pooling capability in MSDOS

Doing this session was fun, everyone enjoyed, yes the audience too like the spoof and laughed at it. It’s a different story that many years after this session Microsoft did re-architect and reimagine the humble command line to integrate with .NET when they released PowerShell.

Password Expiry setting in Windows 7

I know that you can configure the password expiry (how long before user is prompted to reset their password) for an user in Windows Server Active Directory for all Domain Users. But how about for a standalone Windows 7 alone machine. I have got “Windows 7” installed in my Home Desktop (iMac) through Parallels. I use Windows7  for writing this blog with Windows Live Writer and for doing my mails with Outlook 2013 (which I find much better than the Outlook 2010 for Mac OS). Windows OS kept prompting me to change password every other month and I got bored of it. Though it is a good security habit to change password, in this case, it is lessor of a concern for me than convenience.

I couldn’t find the option in the usual Control Panel – User Accounts Applet. I tried firing up the Local Users and Groups snap-in for MMC console through Start-Run (lusrmgr.msc) but since this for Windows 7 Home Premium I was told that feature is not available.

Local Users and Groups snap-in for MMC (lusrmgr.msc) not present in Windows 7 Home Premium

After some searching I found this Microsoft Answers article on the command I can use to control the Password Aging parameter. To do it, launch CMD.EXE in elevated mode (Run as Administrator) and run this command: net accounts /maxpwage:unlimited

Problem solved. Now I am not prompted anymore to change password in Windows 7 Home Premium.

Clipper Programming Language

I have written earlier about my first experience with FoxBase & Clipper here & it is no secret I love the Clipper platform.

During my Engineering college days (1992-96) I spent many days reading Rick Spence’s Clipper Programming Guide (2nd Edition, Version 5) and Clipper 5.2 Power Programming Guide. I knew every page & its contents in Rick Spence’s books than any of my engineering syllabus textbooks. In the Clipper Summer ‘87/88 (or earlier) versions I liked the in-built features  that made Data management straightforward and the simple syntax (like Display, Input controls) in the programming language. But as I wrote more complex applications, code-reuse became difficult and time taken to write increased, so implementing some Object Orientation was made necessary. That’s where Clipper 5.2 with its OOPS features (in-built and through 3rd party plug-ins) came as a blessing; and Rick Spence made the whole thing palatable and understandable. As a matter of fact, after I read Rick Spence’s Clipper 5.2, is when I read fully Bjarne Stroustrup’s book on C++.

So why I am writing all this today, a friend of mine called me today and said he had got an enquiry for a MNC asking him to do a week long course on Clipper. What Clipper, do people still use it?. It seems so. That triggered my short trip in memory lane and in the evening when I came home, I searched my attic and found my 3 books on Clipper (shown below).

Clipper Summer 88 & Clipper 5.2 Rick Spence

Shown above: Clipper Summer ‘88 Manual; Clipper Programming Guide 2nd Edition Version 5 by Rick Spence, Clipper 5.2 Power Programmer’s Guide by Rick Spence.

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.