Sunday, August 17, 2008

Going forward with Backward compatibility

As programmers we've all had days when we get caught out by the "compatibility factor". The client's requirements state that the product needs to support every single version of the target OS created so far and shouldn't misbehave when the next version releases. So, we add in that little statement that go with each release note that says – "Product Testing on Microsoft Windows 3.x, 9.x, NT, 200x etc." When a bug is reported in a particular OS, and your Project manager questions your very existence, you can't help it but say - "I wasn't born when Windows 3.x existed and don't know what the next version will be like". At the end of the day, when you sit around with your team thinking on the "Howtos", its sometimes becomes a conclusion that the language/script in which coding has been done refuses to be backward compatible.

Recently, I got caught out using the simple "getURL" in Flash. After AS 3.0, I haven't really done much with the real basics. I had to use it since the functionality targeted Flash version was 7.0. Now, I couldn't be doing something wrong with getURL.. it flows with my blood! So, I ventured out into the net and found:

Adobe Technote: http://www.adobe.com/go/50c1cf38

The solution didn't work either. I didn't have enough time to work on it and things came to the crunch. There were only two ways to solve the problem for local testing:

  1. Change the "local playback security" setting to "Access network only".
  2. Add the domain path to my Flash player's security settings panel.

I opted for the first method. Anyway there weren't any external files that I was loading. So, it was mission: accomplished. But, there have been times when it took more time to solve a single backward compatibility/forward compatibility issue than code a whole module in. Like, for example, there was this product that we were working on which used a particular font. Please note that the product itself was made during the era of Chengiz Khan, and, we were just creating a minor version upgrade for some of the functionality, we didn't really have the time to work on porting the entire code to a new generation platform. Hence, we suffered quite a bit. The problem was simple – Windows Vista refused to accept installation of an older version of the font that we needed to use. Yep, it was a default OS packaged font. The impact would be mis-alignment of text almost everywhere in the product. It is something we never though would happen. It did! Murphy was right!

The gurus of the business say that it would be better to use the new and throw the old out of the window. The reality is.. we still need 'em old clothes and it needs to fit us perfectly!