tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cp -n diff



On Tue, 3 May 2011 23:57:26 +0200
Zafer Aydo?an <zafer%aydogan.de@localhost> wrote:

> Honestly, I don't see one valid argument in this thread so far
> apart from warm words.

I'm sure you were surprised by the fierce objections.  I was.  

The problem with TIMTOWTDI, as any Perl hacker will confirm, is that one
man's idiom is another man's line noise.  It's hard -- really! -- to
master all the options of the basic commands.  Redundancy only makes it
harder, without adding power.  

If that sounds too theoretical, consider reading a script and trying to
understand what it does.  You come across "cp -n".  It's not POSIX;
it's not even necessary.  Unless you know it came from FreeBSD, you
can't even be sure of the author's intention.  

Absent a specification, you can't know if NetBSD's cp(1) implements the
-n *exactly* the way FreeBSD did, or the way GNU did with -u.  If you
think I'm exaggerating, I ask you to consider the many meanings of
"file" and the fact that mount(8) supports 26 filesystems.  

Dijkstra said it better:

        A program is like a poem: you cannot write a poem without
writing it.  Yet people talk about programming as if it were a
production process and measure "programmer productivity" in terms of
"number of lines of code produced".  In so doing they book that number
on the wrong side of the ledger: We should always refer to "the number
of lines of code spent".

--jkl


Home | Main Index | Thread Index | Old Index