Search blog.co.uk

Archives for: August 2008

The late Helen Mary Bradley

by cc0028 @ 2008-08-10 - 21:08:27

I realise with a shock that I have not noted here my mother's passing, on the 4th May this year - the same day on which my father died fourteen years ago.  She had been admitted to hospital with back pains, but her condition was not considered to be serious and she was looking forward to coming home.

On the 3rd I asked my sister if I should go up to Sheffied to help, but Jane thought everything would be fine and we all relaxed.  Jane said she'd visited mum in hospital that evening and left when she went to sleep.  The following morning she rang to say that mum never woke up.  As ways to go, it probably tops the list.

Perhaps later I'll have more to say.


 
 

Install issues - harder than you think

by cc0028 @ 2008-08-10 - 20:39:24

Some recent email correspondence has set me thinking about different software installation policies: in particular the differences between Windows and Linux.

All software platforms face a problem when it comes to installing new software.  How do you ensure that each program that you install has all the resources that it will require?  For example, if you install a Java application it will need a Java virtual machine to run on.  At a somewhat deeper level, applications will need particular code libraries that provide functions that the application needs.  Jargon?  OK, so let's try and make the problem a bit more concrete.

The problem is that all programs have some dependencies - some external bits of code that they depend upon in order to run.  "No code is an island complete unto itself", you might say (if you were an Elizabethan metaphysical poet).  So how do Windows and Linux try to solve the problem of dependencies.

If I write a Windows program, I will make calls to code stored in Windows code libraries.  These are the things that will, for example, paint the visual elements like buttons and list boxes in my application.  Because it's a Windows program, I can be pretty sure that those libraries will be present (and in the standard locations) so I probably won't have a problem; although I might have to produce different executables for different versions of Windows.

But supposing I want something a bit more esoteric, like XML support.  I can't guarantee that the necessary XML support is going to be present on all the machines onto which my application might be installed.  So what do I do?  In the Windows world, the answer seems to be that I package up everything I need (Java VM, XML support etc etc) and install it all, whether it's needed or not.  The alternative is to search for the required libraries and only install the ones not present.  However, if I do that, what happens if the user updates the library?  The updated version may not be compatible with my application and so my application will break.  What happens if the user uninstalls the program that installed the library?  Will the library be deleted too?

In the Windows world, the only safe way of doing things seems to be to supply everything your program needs with the program, regardless of whether this means that the user finishes up with umpteen Java VMs and umpteen identical XML libraries or not.

I should add that .NET is making this less critical, because it allows what they call side-by-side installation, but it is still pretty inefficient in my view in terms of ensuring that the minimum amount of software necessary for the proper functioning of all installed software is present.

Linux installations take a completely different approach.  Most Linux distributions install software via some sort of package management system.  What this means is that you ask the package manager to download and install the software from a repository.

The package manager maintains a database of all installed software and their dependencies.  When you try to install something from a repository, the package manager will check the database to see if you have all the necessary external libraries etc, if not, it will try to find the necessary components in the repositories to which you subscribe and will check that it won't break anything else by installing them.  If it can satisfy all the dependencies without breaking anything, it will ask for your permission to install the extra libraries and, once it has permission, will do the installation for you.

If the package manager can't resolve the necessary dependencies it will tell you what the problems are and present you with some choices of strategy for solving the problems: which may mean uninstalling some incompatible software that you already have on your system.  But the choice is yours and you are in control.

Of course you can, if you must, install stuff directly on a Linux box, but then you become responsible for maintaining the dependencies.  Generally speaking this is not a good idea.  It is something you will do only if no package exists for the software you want to install: an increasingly rare eventuality.

I've heard Windows-oriented people remark that the Linux installation system is more complex than the Windows system.  This is true: but to my mind there is a perfectly good reason for this complexity.  It is to prevent the kinds of problems that can occur on Windows boxes - either of bloat, or of incompatibilities.  And it is also true that almost all Linux installations can be carried out without the slightest problem - so the amount of extra complexity is minimal.  Things only get complex when dependency problems arise.  Something I for one am glad to be told about, since it puts me in charge of what goes on my machine and how any resulting problems are resolved.

But then, I'm biased ...

Footer

The content of this website belongs to a private person, blog.co.uk is not responsible for the content of this website.