[Hampshire] What do you think?

Top Page

Reply to this message
Author: Stephen Davies
Date:  
To: Hampshire LUG Discussion List
Subject: [Hampshire] What do you think?
Fellow Lug members, I would welcome comments on the following.

The Linux Application Developers Quandary or is it really a Nightmare


Linux distributions such as Ubuntu are making great strides in removing
the need to do even quite advanced configuration operations via the
command line and utilities like ‘vi’ (and even ‘emacs’ for those so
inclined). Some would like to banish the bash command terminal to the
same prominence the DOS Command window has on Windows Systems. i.e.
buried away in All Programs-Accessories along with Windows Explorer,
Notepad and Calculator to name but a few.

That is all fine and dandy for the majority of key/core applications
that are already included in a distributions repository. In the case of
someone starting out to develop a new application that needs both a
daemon that uses one or more configuration files and an application
controller(to edit the configuration files) do they:-
1) Develop a command line only controller for V1.00
2) Develop a GUI only controller for V1.00
3) Both of the above
4) Non of the above and rely on users being able to use vi/emacs etc

With application complexity increasing and the number of configurable
parameters or even command line switches and options the task facing
anyone who wants to develop a viable front-end for the application is
considerable and forever increasing.

Consider the following two cases.

Properties files, manual edits and CVS

Properties files (or as the used to be called ‘ini files’) are in my
opinion are real PITA. That said, they are a million times better than
the Windows Registry.
As everything in Linux/Unix is a file and the majority of these files
are plain text there is a great temptation to edit them manually
especially if you are remotely logged into the system over a slow
connection and using the GUI is not practicable.
Once you have done that there is a danger that the changes you make will
not be picked up by the GUI application. This particularly applies to
comments. Nice and helpful as they are, how many GUI’s distributed in a
standard Linux Distro today can handle comments.
It is good practice to comment any changes so that the next person who
comes along to fix the problem you edit has just caused can know who did
what, when & why to the file. Yep, the version history strikes back. How
many GUI’s give you the opportunity to add a new bit oh version history
to the file? Not many I’d be willing to guess.
Then comes CVS (or something similar). We all know that it is good
practice to use CVS/SVN/git or some commercial package to store those
ultra critical files in so that when your system goes down in a heap of
flames (it does happen) you can pull everything out of your Source
Control System and deploy it on the new system knowing that it is the
latest version.
Some of these systems add comments into the file showing the checkin
date/time & user. This is great for auditing purposes but we are back to
the problem, how does the GUI handle comments. Again, the answer is not
very well.

Command line option applicability

With some applications that have a plethora of command line options the
is often some which will not work together or worse still, are ignored
completely if they are placed after another option of the command line.

How is the GUI Developer going to easily, reliably code up the rules for
the GUI so that the application has a better then 50/50 chance of doing
what the user wants when if gets kicked off?
Estimating the number of test cases to ensure that the test coverage
could be a daunting operation and without a decent tool to actually do
the manual application of GUI operation it could be almost impossible.
Note, I have not even considered the coding of the GUI at this stage.
Just writing down the rules will probably show up actual inconsistencies
in the documentation (assuming there is something more than a ‘man’
page) and how the application actually works. Adding an AI rules engine
may be the only way to go for some complex applications.

One company I work with has done this for one of their applications
already so it is not just some crystal ball gazing. The costs of
maintaining the GUP have since dropped by more than 50% and from that
experience, they are considering doing it for more applications. Note,
this is not anything you will find buried in dome Debian repository
somewhere and will cost you more money than most LUG users will earn in
a year.



If we take the two cases outlined above it is not hard to see that many
projects have made the decision (either consciously or not) to take the
easy way out and not handle comments etc or dynamically edit the options
presented on the GUI if they would make the execution of the command fail.

Clearly this is not ideal practice and it is going to take a sea change
in attitude by developers to achieve this even on a small percentage of
key application in Linux but if the goal of doing away with the command
line is to be achieved then I think that this change is essential and
long overdue.

The ideal state would be that the GUI did the following:-
1) I can do EVERYTHING via the GUI that I can with vi or emacs
2) I can be sure that the options I select using the GUI will work and
not be rejected due to some illegal syntax or combination of options.

The $64,000 question is: Can this ever be achieved?

Remember, even Windows does not have a GUI option which will let you do
the following:-

ipconfig/release

But then would a ‘Joe SixPack’ user ever want to do this when the advice
coming down the phone to them will be ‘please reboot your system’.

Conclusions.

While the ambitions of those who want to relegate the command line to
history are very laudable, there are many cases where it is the only
place to get the job done and done with certainty.
In addition to that, until Linux does not use any shell scripts on
startup/shutdown the command line will be an essential for developers,
sysadmins and even users (at times). I don’t think that reliance upon
scripts will be removed anytime soon after all, we don’t want the mess
that is the Windows Registry re-invented do we?