Stuff that breaks when you move it
Mon Aug 3 15:04:48 CEST 2009
There's two kinds of stuff:
A) Stuff which doesn't break when you move it
B) Stuff which breaks when you move it
Type A includes:
zip files, PDF files, jpg files, mp3 files, ...
Type B includes:
Erlang, HTML files, DRM protected files, erlang beam files, ...
A good general principle is:
P-1 - "Stuff should not break if you move it to a new directory"
A is good B is bad.
# cd /usr/local/lib
# mv erlang globble
exec: 28: /usr/local/lib/erlang/erts-5.7.1/bin/erlexec: not found
Thus Erlang is in B.
But it doesn't have to be so - this is a bug not a feature
Note: 1) This problem (stuff breaking when you move it) is
a particular pain when you have to make something work
that depends upon several different components and each one
individually breaks when you move it.
2) Sometimes stuff cannot be moved to where the author wanted
you to move it to. So if you have not got admin rights
you *cannot* move your program to /bin (or whatever)
So lets add:
P-2: It should be possible to move stuff to *any*
directory in the file system to which you have write access
without breaking it.
And while we're on the subject:
P-3: We should be able to *remove* stuff without breaking
other stuff that is not dependent upon the stuff we have removed.
P-4: If we add stuff to the system and then remove it we should put
the system back to the state it was in before we added the
stuff that we removed. (Possibly we might change the state of the
system log to say that we have added and removed something,
but nothing else should happen)
Very little software obeys principles P-1 to P-4.
This is bad.
More information about the erlang-questions