Tuesday, March 13, 2007


Applications and the Difficulties of Portability?



I'm a software developer who writes a lot of freeware utilities in C/C++ which are all cross platform and work well. Lately some of my users have been pestering me to stop wasting precious development time supporting minority OSs like Linux, and get more work done for the majority — the Windows users. Now many of my utilities are simple tools that perform various operations on files such as compression or rearranging. I've also made a few frontends for them using the excellent Qt library to allow the user to select a file and process using a simple GUI. In dozens of applications I wrote, most of them several thousand lines long, I haven't written a single conditional for any particular OS. When I release, I just compile each app for all the OSs I have access to and post them on my website. I barely expend any effort at all to achieve portability. So the question I have to ask is: Why do the masses perceive portability as something that requires effort and a waste of time?

Most applications don't do anything fancy or need to talk to devices and therefor there is no need to do anything special other than compile them on a particular OS to run on that OS. So why are there so many simple apps using native APIs to do simple things like file reading instead of the standard ones? Why are we projecting an image that one must go out of their way or switch to a different language in order to achieve portability?

2 comments:

insane coder said...

Just wanted to say I originally wrote this somewhere else and decided to paste it on my blog.

Also note this is referring specifically to applications. When one writes a library, one has to analyze each OS, and make a proper interface to wrap to them all as cleanly as possible.

L3thal said...

yeah , why would people think so , because they have no idea that a single statment could be compiled successfuly on multiple platforms and not just one, sad but true :)