Tuesday, July 15, 2008

WinDirStat

Even if you have a hard disk with hundreds of GBs, you will run out of space soon. At that time you want to see what is taking most of the space. Using Windows Explorer and going to each folder is a time consuming job. Several years back I got introduced to a tool called "Tree Size" that displays chart like bars against each folder so that you can easily see the usage. Today I found a free tool to do the same thing better - WinDirStat. Apart from bars, it displays a beautiful squarisish picture of the usage based on file types. Check it out.

 
Saturday, July 12, 2008

n Spite of the Gods

The other day in a dinner conversation the topic was on how India has a nation has grown in spite of everything - Corruption, Inefficient bureaucracy and all the differences. That's when this book came up "In Spite of the Gods: The Strange Rise of Modern India by Edward Luce". I bought the book immediately and I finished reading it during my travel now.

The book is an excellent work done by Mr.Edward Luce, who is a journalist with Financial Times. During his various assignments he had worked in London, New Delhi and now in Washington. Mr.Luce  is best suited to do this book because of his long stay in India, his wife being an Indian and finally he being a Britisher (lot of things in India are still colonial hangovers). Without these background he couldn't have done such a wonderful job.

Mr.Luce finely balances a westerner viewpoint and Indian insight in a lucid manner - you don't see contradictions anywhere. Many things about India is puzzling to understand even for Indians, and many times you have to go back to long gone history to truly understand. For doing this Mr.Luce start with detail of larger than life figure of 3 modern day Indians - Mahatma Gandhi, Jawaharlal Nehru and BR Ambedkar. People who know India know that North India is very different from South India and so on., so Mr.Luce seems to have done extensive travel to report both sides.

I was happy to read about the good things he talks about the work of my state (Tamilnadu) government. I learned many things from the book about India that I didn't know before or haven't seen it that way. One observation I really liked is Mr.Luce's case on how several welfare programs in India like anti-poor program, literacy programs, free power, labour laws which are all created with good intentions are not effective because of the very bureaucracy that is created to run it.  Mr.Luce talks with ease of both India's strength and weakness.

If you are an Indian or someone interested about India, this is a must read book. Thank you Mr.Luce.

 
Friday, July 11, 2008

vista-license-expiry

Few weeks back I had a strange problem, my Vista installation kept saying it is going to expire in 11 days. If you see the above image of the Control Panel-Systems says Windows is Activated. So I was puzzled, how can something that is activated can expire. Strangely the same error kept coming in few other machines in our office. 

After several hours with Microsoft PSS on phone, they diagnosed the issue in my machine to be a time-bombed SP1. Since I was in the beta program of SP1, I had downloaded the RTM of SP1 from Connect which was time-bombed. The safe way is to get SP1 through Windows Update or Microsoft Downloads.

I uninstalled this SP1, installed a fresh one from download.microsoft.com; now my machine is fine. I had trouble with installing Windows Search 4.0, which also got resolved after the fresh SP1 install.

 
Friday, July 04, 2008

Following Microsoft's retiring of Windows XP on 30th June, there has been lot of talk on the Internet on how Windows XP is better Windows Vista. I love Windows Vista and I have been using it from Beta days. I will never even dream of going back to XP. Why?.

  • The UAC prompts are certainly annoying, needs to be turned off for a "Developer" machine which is what I did in my Work PC. I have it ON in my Home PC and Laptop and it works great in both machines. It gives me confidence that no rogue application can harm my PC or data
  • The Visual Aero interface certainly makes the user experience more pleasing. After all you are starring at your PC for more than 8 hours a day, so why not have some pleasing effects in it
  • Last and the most important for me is the integrated Search. With the new Windows Desktop Search 4.0 which made search in Vista faster, I cannot think of going back to Windows XP. The convenience of searching from Start button or in any Explorer Windows is a sure productivity gain

If you are wondering why am I talking about Vista here which is not connected to the title of this post, answer is in the next paragraph.

Microsoft rightfully abandoned the original Windows XP code and started Vista (internally called Refreshed the code) from the more stable Windows Server 2003 code base (as reported few years back in WSJ). Now few critics of Vista are asking Microsoft to scrap Vista code-base and to start a new Windows OS from scratch - something like basing it on MinWin kernel. Within "Techies" there is always an urge to do everything from scratch - this is one of the never ending arguments in Software industry. Is it good to keep patching a code/application (or) to bite the bullet, scrap the code and rewrite from scratch. I believe there is no single correct answer for this and it depends on the parameters.  But the question keeps coming up in daily situations. To answer that read Joel Spolsky's post back from 2000 - I don't agree with many of his recent posts but this post is a master-piece and a must read for all developers.

 
Thursday, July 03, 2008

Last weekend while doing some room cleaning, I came across an old photo album (you remember those chemically processed photos from photo studios). It was the photographs of my first USA trip in 1999. I selected few of them and uploaded it to my online album. You can see me "younger" than today and without spectacles :-).

(Below) With Actress Ramba in Frankfurt Airport (1999)
 
(Below) With Actor Vijay in Frankfurt Airport (1999)
 
  (Top) In 1999 in New York with World Trade Center (Twin Towers) behind me in the horizon

(Top) In 1999 in New York on top of the World Trade Center (Twin Towers) observation deck

BTW, I don't know Actor Vijay or Actress Ramba in person. Just happened to get out from the business class together with them and I requested them for a quick "snap". Fortunately I remembered to carry my pocket camera in my backpack then (of course, nowadays every one has a Mobile Phone with Camera).

 
Thursday, July 03, 2008

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.

 
Wednesday, July 02, 2008

Recently I received a report on the vision of Tamilnadu Government for how the business climate should be in year 2025 in the state. The report was a joint work by CII (Confederation of Indian Industries) and Tamilnadu Government (TN Gov). 

tamilnadu-state-industry-in

I saw one interesting statistics that stood out among the report's many pages. It was the number of days it takes to start a business in Tamilnadu (to a large extend it is same across India) - it is currently a whooping "41" days. I was not surprised, since I run my own business for last 10 years and have been through these hurdles of bureaucracy many times.

Most recently I had to do this (starting a business) once more, this time for my family business and it took me nearly 5 to 6 weeks. At this time we still we have VAT registration pending. To be fair, few days out of this was due to my end delays as well.

  1. We started with registering the new "Private Limited" (Limited Liability Company)  with Registrar of Companies (RoC). For this the first step is to get name clearance (name of the company shouldn't be conflicting with the said/unsaid guidelines or with other existing businesses). This took some time.
  2. Then comes the actual registration which involved multiple iterations of submission of our MoA and AoA (Memorandum of Articles and Article of Association). Each time we had to take a print, sign the paper, scan it, then digitally sign it and then upload it as a PDF file to the site. Once approved, you need to follow this by a hard-copy submission(sometimes they may ask for the hard-copy for each iteration as well) of the documents.  Once this is done.
  3. First board meeting and resolutions to be passed
  4. Followed by getting an Income Tax PAN Number
  5. Then comes opening of a Bank Account
  6. Then comes applying for Service Tax Number or TIN (Tamilnadu VAT Number) and CST (Central Sales Tax). The choice between Service Tax and Sales Tax registration is depending on the nature of your business.

After all this only you can start your functioning. There will be more steps if you are involved in manufacturing, which depending on the industry has various other registration formalities. Compare all this is the time it took to open a business in USA - we opened our 100% subsidiary sitting from India in less than few days through the help of a CPA locally in India - everything happened through online. I remember reading that New Zealand, Canada and Australia with USA tops for the shortest days required to open a business. For information on doing businesses around the world, see this world bank funded site.

With the above experience I should say it is definitely commendable of Tamilnadu Government to even dream a "2" day timescale for this by 2025.

 
Tuesday, July 01, 2008

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.

 
Tuesday, June 24, 2008

According to Taxman in India, from 1st June 2008 (after this year Union Budget was passed) a licensed software like Adobe Photoshop or Microsoft Office is both a Service and a Product. While world over taxes are being simplified, streamlined and modernized keeping pace to technology - in India our Finance Ministry has proven its fondness for complicating existing laws and getting into legal word tangles. This is in spite of record tax collections in the last few years, this year TDS (with holding tax) collection were up by a whopping 60% from last year. 

While change of classification of software may seem insignificant it has real impact on the tax that a consumer/business is charged while buying a software package. Earlier all Packaged Software/License were treated as a sale of product and charged VAT @ 4% to 12% (varied by state). Now all software are treated as a services as well. It is not reclassified from Product to Service but classified to be both - strange is India's tax laws!. The industry is suffering for the last few weeks with all major dealers and distributors waiting for some clarity from government as this change will result in a tax of 24% on licensed (legal) software, which is absurd. In India Service Tax is Central (Federal) subject, VAT is State subject - so both don't want to clarify this situation.

This week I couldn't buy a software that I needed because of this issue. My regular dealer refused to give me a quotation for few products that I wanted because of this legal mess. He said in his 25 years of being in the business this is the first time he has stopped billing for over 3 weeks. What is even more strange is that none of the software industry bodies are vocally raising this issue to the government - may be they feel the government has no ears to serious issues like these, they are busy listening to the daily threats from the left parties :-)

 
Monday, June 23, 2008

The other day I wanted to password protect for privacy a word document before emailing it. I came across 3 different features in Word that are related to security and it was confusing at first. It took me sometime and few web searches to figure it out. Though the features can be accessed from the Ribbon they are spread over different places. It is much easier to access them from one place - which is the Office Button on the Left Hand Top corner, then selecting the "Prepare" option as shown below.

WORD2007 PREPARE MENU

1. Digital Signature: This requires you buying a Digital (SSL) certificate from a Third Party costing around USD 90 per year before you can do anything useful. Signing with this gives it legal validity in countries that support it. Any changes made to the document after the signing, breaks the signature. This way it validates the integrity of a document (as long the signature is present, the document hasn't been tampered). It doesn't offer any significant privacy benefits.

2. Restrict Permission: This uses the Microsoft IRM (Information Rights Management) service. Using this with a Windows Live ID (Free) or a IRM Server running in your company, you can assign permissions and access level to the document.  With the Windows Live ID feature, the recipients need not be in your corporate network, it will as long as they have a Hotmail ID (Live ID).

3. Encrypt Document: This is a simple password protect feature. Assign a password and then only people with the password can open the document. 

All the above three features are present in Excel and PowerPoint 2007 as well.

 
Saturday, June 21, 2008

XO2 LAPTOP

The other day on the Internet I saw the above photos of the next version of One Laptop Per Child Program. What struck me very interesting was the absence of Keyboard (hence absence of mechanical failures) and the ability for two children to share it at the same time - very valuable in developing countries and for play. You have a touch-screen that works as a keyboard - hopefully doing Non-English language with this Virtual Keyboard will be supported and native.

 
Friday, June 20, 2008

how to be anexpert

The original blog post from which I took the above chart is from here. It talks about how any one at any age with learning and practice can become an Expert. A nice piece to read and think about.

 
Friday, June 20, 2008

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:

 
Sunday, June 15, 2008

One of the compelling reasons I tell customers and friends for upgrading from Windows XP to Windows Vista is the extremely easy to use yet powerful backup feature. All it takes is three clicks to backup your entire computer to a removable USB storage or DVDs. You can backup a partition or folders to another partition. And the entire backup procedure for few hundred gigabytes of files takes less than an hour the first time itself, after that the incremental backup get done in minutes. The best part is that the backup is stored in VHD (Virtual PC format) format, which is a fully documented and free to use file specification. This means even if Microsoft restore utility is unable to open the VHD file, some 3rd party utility may be able to open it. I have been using the backup feature for nearly a year and I am very pleased with it. Recently when I had trouble with Windows in my Home PC, I restored my backup that was taken few months back - the entire restore process worked flawlessly and my Windows installation was good as new.  Windows Vista Back up files or your entire computer

Today before I did a routine backup of my Home PC, I wanted to clear some space in the external USB drive. I deleted all the previous backup files in the drive. Then I ran the complete back up. Unfortunately after several minutes the backup utility failed with the following strange error.

The backup did not complete successfully. An error occurred. The following information might help you resolve the error:
The system cannot find the file specified. (0x80070002)

I tried doing Vista Disk cleanup, no use. Doing few Internet searches with the error number 0x80070002 I found a forum post that talked to clean up registry keys in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList that pointed to orphan profile paths. I checked that, in my case all the profiles had correct paths. So that was not the problem. Then one of the forum post talked about running Chkdsk on the drives, I did that. Rebooted the machine. Tried the backup again, this time it went smoothly.

Now my love is back for the Vista Backup tool. I just wish Microsoft wrote the backup utility a little bit more tolerant or instructive error messages for handling these occasions.

 
Sunday, June 15, 2008

An Inconvenient Truth (Al Gore)Though I purchased this DVD a year ago (at a steep price @ Rs.499)  I didn't get the time to watch it till now. Today being a Sunday and free from any work luckily I had the time to watch the movie "An Inconvenient Truth" made by Former Vice President Al Gore. I didn't know Al Gore was such a powerful speaker, he was amazing on stage - I have noted down few presentation tips from his speech. He seems to have come out as a more powerful person after his dramatic hair-splitting loss of the US Presidency to George W Bush in 2000.

The movie is brief and runs only for about 90 minutes and it is completely on a presentation given by Al Gore with clippings in between. Since enough has been said about this movie and global warming, all I will say - this is a very compelling movie for the cause of reducing our effects on environment. I pledge to start doing my small baby steps on this from today.

 
Friday, June 13, 2008

I came across this brilliant site called "Geonames.org" - a Geographical database for download free of charge containing over eight million geographical names. The site allows you to search for any city or place or postal code and the best part is all of this is also available through a number of webservices and a daily database export. This can be useful while you are developing a website and have to get input of a city or determine a place in a transaction.

Check out these examples:

  1. Chennai
  2. 600017 (Postal Code in India)

GeoNames was founded by Marc Wick. Marc is a self-employed software engineer living in Switzerland. Thanks to Marc Wick & the other volunteers of the site.

 
Sunday, June 01, 2008

Common Aldrop Model (shown here in Brass) I was in Bangalore the other day, there I saw a different type of Aldrop used to lock the main gate in one of the house - don't ask me why I noticed it!.

Normally the Aldrops (which are bolt latches with a provision for putting a padlock) will be vertical and you lift the handle and move it sideways (mostly right hand side to open) with the padlock in vertical orientation. This one that I saw was oriented differently - you lifted the latch up and down vertically with the padlock in horizontal (lying down) position. Thinking hard with my little brain I couldn't figure out the advantage of this model - please post in the comments if you know the advantage.

DIFFERENT TYPE OF AN ALDROP (GATE LATCH)

While writing this post I had to find out the name of this device, I was wondering whether to call it Gate Latch or Bolt Latch or Gate Bolt. After few searches I found an item in Amazon with the name "Aldrop", then after few more searches confirmed that this is how it is called in India.

 
Saturday, May 31, 2008

Today I came to Bangalore for a meeting. Having heard the horrifying stories of travel from city to the new airport at Devanahali I got booked by train. I should have left by Shadapti Express leaving Chennai at 5:30PM yesterday, but due to last minute business meetings I reached Chennai Central station late. I was in the platform only at 5:32PM, by then all I could see was the last bogie with a giant "X" mark as seen in Bollywood movies. I had to avoid the glaring look of a porter in the platform at me. Missing the train, I travelled today by flight from Chennai to Bangalore and return.

BENGALURU INTERNATIONAL AIRPORT DEPARTURE AREA

After long delays, several false starts and Protests against closing the old Airport, the New Airport at Devanahali was built by a consortium of Siemens (Germany), Zurich Airport & L&T finally opened itself on May 24, 2008. The old HAL Airport was certainly brimming out of capacity and facilities, Bangalore certainly took a long time in getting a new airport. Is the long wait worth it?. Overall "Yes", but several things could have been done better.

  • For one, a Metro (Train) facility should have been planned and executed which could have provided convenient connectivity from City to Airport. Without a train link the new airport is putting pressure on the already crowded Makkri Circle Area and Bangalore-Hyderabad National Highway. For me it took 75 minutes in the morning (9AM) today to reach Jeevan bhimanagar from the new Airport and while returning in the evening (5PM) took me nearly 90 minutes. I was told by the taxi driver that 90 minutes in the evening is good, it had taken him two days before over 2 Hours (120 Minutes) to get to Airport.
  • Second, the waiting area and facilities in the departure terminal could have been better, at this moment they are very basic and ordinary. For example as the photograph below shows there is hardly 30-40 chairs for people to sit in each gate. Certainly each gate will have a flight capacity of over 100 passengers on average, so it was more crowded than the old airport. The lack of facilities at the gate made me wonder whether Siemens wanted to recreate in Bangalore Airport, the same poor facilities that you will find in Frankfurt Airport. The last time while transit to USA I was in Frankfurt Airport and I could get to buy only a Bagel and a Donut to eat - I couldn't even find a Pizza outlet.

 BENGALURU INTERNATIONAL AIRPORT - GATES

The best mode of transport to and from new airport seems to be the  A/C Buses (Vayu Vajra) run by BMTC. It costs about Rs.150 for travelling from Old Airport area to New Airport. To know more about Bengaluru Airport you can go to the official website, which unfortunately seems to be down at this moment.

BIALAirport.com Official Website Down

 
Friday, May 23, 2008

Last few days I had a firewall issue in my desktop that made web browsing irregular. It was a peculiar problem, I was able to browse few sites like Google, Vishwak.COM but not others. I had to keep running the same diagnostic commands many times to take values to be sent to my support team. Finally I ended up writing this handy tool that copies to clipboard diagnostic informations from IPConfig, Tracert, Ping & WebGet commands. This information can be used for further investigation or email to support. I also added features to FlushDNS, Renew IP & Turn Auto Tuning (Vista and Windows Server 2008) OFF/ON.

diagnose tool screenshot

While developing the tool over two half-a-days I learnt quite a few APIs and a bit of C# coding. This included how to call a console command like IPCONFIG /ALL and capture the output to a string from a C# application, get the Internet Explorer Proxy settings, Call Network Properties applet, create an install with VS 2008 & how to paste a code snippet in WLW.

   1: private string DoConsoleAndCapture(string sInput)
   2: {
   3:  
   4: string sOutput = "";