English Idiom in Unix: Directory Recursively

X

Xah Lee

There's a difference between working with a directory itself and
working with files inside it. Generally, if you copy or delete a
directory, you will want to recurse. But if you want to, for instance,
wipe out all files whose names end with a tilde, then you might want
to recurse and you might not. So it makes sense to offer the user a
choice, and if recursive action is the only one that makes sense, at
least acknowledge that the operation might take an arbitrarily long
time. (Ever done a recursive operation on / on a large file system?
Takes just a little bit longer than a non-recursive one under the same
circumstances...)

the context is this: In emacs directory manager (aka dired), when you
call dired-do-delete on a directory, emacs prompts, this way:
“Recursive delete of xx? (y or n)”

Xah
 
C

Chris Angelico

the context is this: In emacs directory manager (aka dired), when you
call dired-do-delete on a directory, emacs prompts, this way:
“Recursive delete of xx? (y or n)”

But in order to make your point (such as it is), you are ignoring the
fact that there are other uses of the term 'recurse' or 'recursive',
and consistency and clarity are important. I don't see emacs offering
me a chance to do a non-recursive delete; the only issue here seems to
be that it's explicit that it is going to destroy an entire branch of
the directory tree. If this is such a problem, grab the emacs sources
and change that string - it probably occurs in exactly one place in
the code. Voila! You now have The One True Perfect Emacs, the ultimate
text editor, because it no longer tells you that it's working
recursively.

*removes tongue from cheek after saying that last sentence*

Chris Angelico
 
R

Rikishi42

: It starts with the misconception (or should I say confusion?) between
: performing a recursive job and using a recursive tool to do it. And then it
: blazes off in these huge discusions about semantics to define a definition
: of an abstraction of a alleady theoretical problem.

And explaining the source of the misconception and the varying use
would be irrelevant?

It usually is, yes. And boring.
 
R

Rikishi42

[I agree with you Xah that recursion is a technical word that should not
be foisted onto lay users.]

I think that is a patronizing remark that under-estimates the
intelligence of lay people and over-estimates the difficulty of
understanding recursion.

Why would you presume this to be related to intelligence?
The point was not about being *able* to understand, but about *needing* to
understand in order to use.
 
S

Steven D'Aprano

[I agree with you Xah that recursion is a technical word that should
not be foisted onto lay users.]

I think that is a patronizing remark that under-estimates the
intelligence of lay people and over-estimates the difficulty of
understanding recursion.

Why would you presume this to be related to intelligence? The point was
not about being *able* to understand, but about *needing* to understand
in order to use.


Maybe they don't "need" to understand recursion. So what?

Recursion is a perfectly good English word, no more technical than
"accelerate" or "incinerate" or "dissolve" or "combustion". Do people
need to know the word "combustion" when they could say "burn" instead? Do
they need to know the words "microwave oven" when they could be saying
"invisible rays cooking thing"?

I wonder whether physicists insist that cars should have a "go faster
pedal" because ordinary people don't need to understand Newton's Laws of
Motion in order to drive cars?

Who are you to say that people shouldn't be exposed to words you deem
that they don't need to know?
 
X

Xah Lee

But in order to make your point (such as it is), you are ignoring the
fact that there are other uses of the term 'recurse' or 'recursive',
and consistency and clarity are important. I don't see emacs offering
me a chance to do a non-recursive delete; the only issue here seems to
be that it's explicit that it is going to destroy an entire branch of
the directory tree. If this is such a problem, grab the emacs sources
and change that string - it probably occurs in exactly one place in
the code. Voila! You now have The One True Perfect Emacs, the ultimate
text editor, because it no longer tells you that it's working
recursively.

*removes tongue from cheek after saying that last sentence*

Chris Angelico

why don't you file a bug report? In GNU Emacs 23.2, it's under the
Help menu. I suppose it's the same in other emacs distro.

Xah
 
C

Chris Angelico

why don't you file a bug report? In GNU Emacs 23.2, it's under the
Help menu. I suppose it's the same in other emacs distro.

Because I do not consider its behaviour to be errant. And I suspect
its main developers won't either. That's why I suggested you grab the
sources and make The Perfect Emacs.

Chris Angelico
 
R

Rikishi42

Maybe they don't "need" to understand recursion. So what?

I think you should read the earlier posts again, this is drifting so far
from what I intended.

What I mean is: I'm certain that over the years I've had more than one
person come to me and ask what 'Do you wish to delete this directory
recursively?' meant. BAut never have I been asked to explain what 'Do you
wish to delete this directory and it's subdirs/with all it's contents?'
meant. Never.

Recursion is a perfectly good English word, no more technical than
"accelerate" or "incinerate" or "dissolve" or "combustion". Do people
need to know the word "combustion" when they could say "burn" instead?

It wasn't about the word, but about the nature of the function. Besides, if
the chance exists of a confusion between a recursive job and the fact the
job is done using a recursive function... I would try staying away from the
expression.

Why not use 'delete a directory'. It's obvious the content gets binned, too.


Do you know many people who incinerate leaves and branches in their garden?
I burn them.

Do they need to know the words "microwave oven" when they could be saying
"invisible rays cooking thing"?

The word oven has existed for ages, microwave is just a name for the type of
oven. Not even a description, just a name.

I wonder whether physicists insist that cars should have a "go faster
pedal" because ordinary people don't need to understand Newton's Laws of
Motion in order to drive cars?

Gas pedal. Pedal was allraedy known when the car was invented. The simple
addition of gas solved that need. Oh, and it's break pedal, not
descellarator. (sp?)

Who are you to say that people shouldn't be exposed to words you deem
that they don't need to know?

I'm one of the 'people'. You say exposed to, I say bothered/bored with.

I have nothing against the use of a proper, precise term. And that word can
be a complex one with many, many sylables (seems to add value, somehow).

But I'm not an academic, so I don't admire the pedantic use of terms that
need to be explained to 'lay' people. Especially if there is a widespread,
usually shorter and much simpler one for it. A pointless effort if
pointless, even when comming from a physicist. :)
 
C

Chris Angelico

Why not use 'delete a directory'. It's obvious the content gets binned, too.

Which is why I raised the issue with regard to other operations.
Manipulating files matching a glob can be done recursively or
nonrecursively, and both make perfect sense.
Do you know many people who incinerate leaves and branches in their garden?
I burn them.

We used to incinerate ours (until we stopped using rapid exothermic
oxidation as a means of DECREFfing our garden waste). It's a cultural
thing, I guess.
The word oven has existed for ages, microwave is just a name for the typeof
oven. Not even a description, just a name.

It's funny how a single piece of jargon can go incredibly mainstream.
"Microwave" (with or without "oven" after it) is well known, but
plenty else remains obscure.
Gas pedal. Pedal was allraedy known when the car was invented. The simple
addition of gas solved that need. Oh, and it's break pedal, not
descellarator. (sp?)

Americans might call it a gas pedal. We call it an accelerator. You
don't have a "decelerator pedal" though, because it's more accurately
called a "brake pedal" because it controls the brakes.

Personally, I'm of the opinion that people *should* have some basic
understanding of Newton's laws before they take charge of a ton of
high-powered machinery. At very least, some basic comprehension of
kinetic energy, and the way a high speed train has a *LOT* of it.
Might result in drivers with a little more respect for trains and
trucks.
I'm one of the 'people'. You say exposed to, I say bothered/bored with.

I have nothing against the use of a proper, precise term. And that word can
be a complex one with many, many sylables (seems to add value, somehow).

But I'm not an academic, so I don't admire the pedantic use of terms that
need to be explained to 'lay' people. Especially if there is a widespread,
usually shorter and much simpler one for it. A pointless effort if
pointless, even when comming from a physicist.  :)

In any industry, you can find jargon in several different categories:

1) Terms that describe unique objects/effects/etc, where you would be
using a lengthy phrase otherwise (eg "URL")

2) Terms that are clearer or more precise than the less-jargonny
equivalents, but where you could get away with dodging jargon if you
wanted to (eg "recursive operation")

3) Words and phrases that have little value to an end user, but can be
used to show off your skill (eg "Network Destabilisation from Low
Voltage Fluorescent Lamp Spikes").

I would never apologise for using terms in the first category. Just
explain them (in a footnote if necessary) and expect people to be
accurate. The third category is mainly used for invoking Dummy Mode
(if you don't know what that is, google my example - it's vintage
BOFH), and should be avoided. It's the middle lot that are harder. Do
you use it and risk people not understanding, or avoid it and risk
people misunderstanding? Tough choice, especially since those who
misunderstand often won't know why.

If we forever aim to the stupidest of humans, the human race will get
stupider. If we forever aim way above people's heads, they won't
bother to communicate. An eternal dilemma.

Chris Angelico
 
X

Xah Lee

I think you should read the earlier posts again, this is drifting so far
from what I intended.

What I mean is: I'm certain that over the years I've had more than one
person come to me and ask what 'Do you wish to delete this directory
recursively?' meant. BAut never have I been asked to explain what 'Do you
wish to delete this directory and it's subdirs/with all it's contents?'
meant. Never.


It wasn't about the word, but about the nature of the function. Besides, if
the chance exists of a confusion between a recursive job and the fact the
job is done using a recursive function... I would try staying away from the
expression.  

Why not use 'delete a directory'. It's obvious the content gets binned, too.

Do you know many people who incinerate leaves and branches in their garden?
I burn them.


The word oven has existed for ages, microwave is just a name for the typeof
oven. Not even a description, just a name.


Gas pedal. Pedal was allraedy known when the car was invented. The simple
addition of gas solved that need. Oh, and it's break pedal, not
descellarator. (sp?)


I'm one of the 'people'. You say exposed to, I say bothered/bored with.

I have nothing against the use of a proper, precise term. And that word can
be a complex one with many, many sylables (seems to add value, somehow).

But I'm not an academic, so I don't admire the pedantic use of terms that
need to be explained to 'lay' people. Especially if there is a widespread,
usually shorter and much simpler one for it. A pointless effort if
pointless, even when comming from a physicist.  :)

very well said, Rikishi42.

this one is probably the most intelligent post in this thread.

Xah
 
T

Thorsten Kampe

* Rikishi42 (Wed, 25 May 2011 00:06:06 +0200)
I think you should read the earlier posts again, this is drifting so far
from what I intended.

What I mean is: I'm certain that over the years I've had more than one
person come to me and ask what 'Do you wish to delete this directory
recursively?' meant. BAut never have I been asked to explain what 'Do you
wish to delete this directory and it's subdirs/with all it's contents?'
meant. Never.

Naming something in the terms of its implementation details (in this
case recursion) is a classical WTF.

On the other hand, it's by far not the only WTF in Unix. For instance,
how often have you read "unlink" instead of "delete"? Or "directory"
instead of "folder", pointing out that "directory" is the correct term
because a directory is just a listing and does not "contain" the actual
files. Of course these implementation details will never matter to
anyone except under the rarest conditions.

Thorsten
 
X

Xah Lee

* Rikishi42 (Wed, 25 May 2011 00:06:06 +0200)














Naming something in the terms of its implementation details (in this
case recursion) is a classical WTF.

On the other hand, it's by far not the only WTF in Unix. For instance,
how often have you read "unlink" instead of "delete"? Or "directory"
instead of "folder", pointing out that "directory" is the correct term
because a directory is just a listing and does not "contain" the actual
files. Of course these implementation details will never matter to
anyone except under the rarest conditions.

Thorsten

well said.

half of posts in this thread are from idiots. just incredible, but
again, its newsgroups ... what am i thinking ...

Xah
 
C

Chris Angelico

well said.

half of posts in this thread are from idiots. just incredible, but
again, its newsgroups ... what am i thinking ...

 Xah

Thank you. As soon as we figure out which half of us you just publicly
insulted, we'll see about getting offended. Until then, thank you for
your contribution and please, have a nice day.

Chris Angelico
removing tongue from cheek
 
S

Steven D'Aprano

You miss my point. I am not desiring of a different emacs; you were the
one complaining about its shortcomings.

It's Xah Lee. Of course he misses your point. He refuses to stop spamming
newsgroups even after being banned by his ISP, and he refuses to listen
to any opinion that doesn't agree with his own. Everyone else is an idiot.
 
S

Steven D'Aprano

Naming something in the terms of its implementation details (in this
case recursion) is a classical WTF.

*If* that's true, it certainly doesn't seem to apply to real-world
objects. Think about the exceptions:

microwave oven
vacuum cleaner
oven fries
electric car
chain saw
flintlock rifle
air gun
vulcanised rubber
kerosene heater
aluminium foil
diamond saw
gas stove
wood stove
four-wheel drive car
incandescent light bulb
electric razor
unleaded petrol

to mention only a few.

Naming the thing after the implementation would often seem to be *good
advice*, not bad. We often do care about implementations. You really do
need to know whether the car you drive uses leaded or unleaded.

Being able to swap implementations without changing the interface is an
abstraction that doesn't apply all the time, in either code or real life.
 
S

Steven D'Aprano

I think you should read the earlier posts again, this is drifting so far
from what I intended.

What I mean is: I'm certain that over the years I've had more than one
person come to me and ask what 'Do you wish to delete this directory
recursively?' meant. BAut never have I been asked to explain what 'Do
you wish to delete this directory and it's subdirs/with all it's
contents?' meant. Never.

I know many people who have no idea what a directory is, let alone a
subdirectory, unless it's the phone directory. They're non-computer
users. Once they start using computers, they quickly work out what the
word means in context, or they ask and get told, and then they've learned
a new word and never need ask again. This is a good thing.

The idiom of "recursively delete" is no different. Of course some people
will have to learn a new term in order to make sense of it. So what?

Do you know many people who incinerate leaves and branches in their
garden? I burn them.

I know many people who incinerate leaves in an incinerator. Or at least
they used to, until the government here banned it. It might only have
been a 44 gallon drum with holes punched in the side, but they still
called it an incinerator.

I learned that word from my father, who left school at 14 to work in a
shoe shop. He isn't especially educated, doesn't read much beyond the
daily tabloid, and thinks Benny Hill is the height of wit. But he's not
an idiot and even at 72 is capable of learning new words.

The word oven has existed for ages, microwave is just a name for the
type of oven. Not even a description, just a name.

Why do you think they're called "microwave ovens" instead of "fizzbaz
ovens"? Could it possibly have something to do with the fact that they
cook with microwaves?

So not actually "just a name" at all. It's a jargon description of the
implementation of the oven.

Gas pedal. Pedal was allraedy known when the car was invented. The
simple addition of gas solved that need.

What's a gas pedal? Is that some strange American term for what most of
the English-speaking world knows as the accelerator? *wink*

Oh, and it's break pedal, not descellarator. (sp?)

That would be brake, and decelerator.

I'm one of the 'people'. You say exposed to, I say bothered/bored with.

You can't force people to learn new words, although you would be
surprised how even the most disinterested, lazy speaker manages to pick
up vocabulary without even being aware of it.

But nor do you have to pander to the slackers. They can learn the word,
or not, I don't care. If I'm writing for an audience of children, or
English as a second language, or the otherwise linguistically challenged,
I'll simplify my vocabulary appropriately. For everyone else, I'll use an
ordinary adult vocabulary, and that includes the word "recursion" or
"recursive". It's hardly technical jargon -- I've found a discussion of
gangsta rap that uses it. Even children understand the concept of
recursion (self-reference). People put it in comedies like Blazing
Saddles and Space Balls! How difficult is it to put a name to the concept?

I have nothing against the use of a proper, precise term. And that word
can be a complex one with many, many sylables (seems to add value,
somehow).

But I'm not an academic, so I don't admire the pedantic use of terms
that need to be explained to 'lay' people.

Pedantic... that's another one of those academic words that need to be
explained to lay people, isn't it? As is academic itself, and in fact
"lay people". Who uses "lay people" in conversation?

Conversation -- another one of those four syllable words that should be
avoided, since we have "talk". I don't remember that last time I've heard
Bazza or Jimbo say "I was on the Internet having a conversation on
Jabber", do you?

Oh, actually I do. So much for that argument.

widespread, usually shorter and much simpler one for it. A pointless
effort if pointless, even when comming from a physicist. :)

I think you *grossly* underestimate how many words people know,
particularly if you include so-called "passive vocabulary" (words people
can understand in context, but not define precisely). See, for example:

http://www.worldwidewords.org/articles/howmany.htm
 
T

Thorsten Kampe

* Steven D'Aprano (25 May 2011 21:59:58 GMT)
*If* that's true, it certainly doesn't seem to apply to real-world
objects. Think about the exceptions:

microwave oven
vacuum cleaner
oven fries
electric car
chain saw
flintlock rifle
air gun
vulcanised rubber
kerosene heater
aluminium foil
diamond saw
gas stove
wood stove
four-wheel drive car
incandescent light bulb
electric razor
unleaded petrol

to mention only a few.

Naming the thing after the implementation would often seem to be *good
advice*, not bad. We often do care about implementations. You really do
need to know whether the car you drive uses leaded or unleaded.

That's exactly the point. You don't need to know whether "include sub-
directories" was implemented recursively. It's absolutely pointless.

But not to digress, the /real/ problem with commands or idioms like "rm
-r" is /not/ their choice of option names but that they explain these
options in the exact same terms. No one would have a problem with "-r,
--recursive -- remove directories including all sub-directories" instead
of "-r, --recursive -- remove directories and their contents
recursively".

Thorsten
 
T

Thorsten Kampe

* Steven D'Aprano (25 May 2011 22:58:21 GMT)
I know many people who have no idea what a directory is, let alone a
subdirectory, unless it's the phone directory. They're non-computer
users. Once they start using computers, they quickly work out what the
word means in context, or they ask and get told, and then they've learned
a new word and never need ask again. This is a good thing.

The idiom of "recursively delete" is no different. Of course some people
will have to learn a new term in order to make sense of it. So what?

It's not just a "new term". It tries to describe something which could
be easily described in the terms of what is already known.

If someone has learned what a directory or folder is, you don't have to
explain what "include sub-folders" means. Instead of creating a new
mysterious term ("recursively delete"), you simply explain stuff by re-
using an already existing term. It's just that simple.

Thorsten
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,271
Latest member
BuyAtenaLabsCBD

Latest Threads

Top