> tr -cs A-Za-z '\n' |
> tr A-Z a-z |
> sort |
> uniq -c |
> sort -rn |
> sed ${1}q
>
> This is real genius.
Not genius. Experience. In the Bentley/Knuth/McIlroy paper I said,
"[Old] Unix hands know instinctively how to solve this one in a jiffy."
While that is certainly true, the script was informed by my having
written "spell", which itself was an elaboration of a model
pioneered by Steve Johnson. By 1986, when BKM was published,
the lore was baked in: word-processing scripts in a similar
vein were stock in trade.
A very early exercise of this sort was Dennis Ritchie's
enumeration of anagrams in the unabridged Merriam-Webster.
Since the word list barely fit on the tiny disk of the time,
the job entailed unimaginable marshalling of resources. I
was mightily impressed then, and still am.
Doug
On Thu, May 4, 2017 at 7:14 PM, Larry McVoy <lm(a)mcvoy.com> wrote:
> some of those Berkeley flags (not specifically for cat, but almost
> certainly including those for cat) were really quite useful.
​Amen!!! I think that this is key point. What is in good taste or good
style? Doug's distain for the results of:
less --help | wc
is found in bad design, a poor user interface, little fore thought, *etc.*
Most of what is there has been added over Eric Scheinbrood's
original more(1)
I do not believe are used that often, but some of them are of course, and
you can not tell who uses what!! So how do you decide what get rid of?
How do you learn what people really need -- IMO: much of that is
* experience *and this thing we call 'good taste.' As opposed to what I
think happened with less(1) and many others similar programs (programmers
peeing on the code because they code and the source was available -- I can
add this feature to it and I think it is cool. As opposed to asking,
what do really get and not having a 'master builder' arbitrating or vetting
things).
The problem we have is that we don't yet have a way of defining good taste.
One might suggest that it takes years of civilization and also that
tastes do change over time. Pike's minimalistic view (which I think is
taken to the extreme in the joke about automobile dashboard on Brian
Kernighan's car) sets the bar to one end and probably one of the reason why
UNIX had a bad reputation, certainly by non-computer scientists, when it
first appeared as being difficult. Another extreme is systems that put in
you a box and never let you do anything but what we told you do; which I
find just as frighten and frustration builds there when I use them.
Clearly systems that are so noisy that can not find what really want, or
need is another dimension of the same bad design. So what to do? [more in
a minute...]
Larry is right. Many of the 'features' added to UNIX (and Linux) over time
have been and *are useful*. Small and simple as it was (and I really
admire Ken, Dennis and the Team for its creation), but in 2017 I really
don't want to run the Sixth Edition for my day to day work anymore - which
I happily did in 1977. But the problem is, as we got 'unlimited address
space' of 32 and 64 bits, and more room for more 'useful' things, we also
got a great deal of rubbish and waste. I am interpreting Doug's point
about less --help | wc is that is that are so many thorns and weeds, it
hard to see to see the flowers in the garden.
I'd like to observe that is that most college courses in CS I have seen
talk about how to construct a programs, algorithms, structures - i.e. the
mechanics of some operation. But this discussion is about the human
element. What we feel is good or bad and how it related to how to use
the program.
I think about my friends that have degrees in literature, art and
architecture. In all cases, they spend a lot of time examining past
examples, of good and bad - and thinking and discussing what makes them so.
I'm actually happy to see it was Professor McIlroy that is one of the
folks taking a stand on current craziness. I think this is only going to
get better if a new crop of students that have been trained in 'good
taste.' So, I wonder do any of the schools like Darthmouth and the like
teach courses that study 'style' and taste in CS. Yes, it is a young
field but we have been around long enough that we do a body of work good
and bad to consider.
I think there is a book or two and a few lectures in there somewhere.
Thoughts?
Clem
> From: Michael Kjörling <michael(a)kjorling.se>
> To: tuhs(a)minnie.tuhs.org
> Subject: Re: [TUHS] Discuss of style and design of computer programs
> from a user stand point
> Message-ID: <20170506091857.GE12539(a)yeono.kjorling.se>
> Content-Type: text/plain; charset=utf-8
>
> I would actually take that one step further: When you are writing
> code, you are _first and foremost_ communicating with whatever human
> will need to read or modify the code later. That human might be you, a
> colleague, or the violent psychopath who knows both where you live and
> where your little kids go to school (might as well be you). You should
> strive to write the code accordingly, _even if_ the odds of the threat
> ever materializing are slim at most. Style matters a lot, there.
>
Interesting, I was going to say about the same thing about the violent psychopath
who has to maintain your code after you leave. When I lectured at UCSD or was
giving talks on style for ViaSat I always said the same thing:
Whatever you write, the fellow who is going to wind up maintaining it is a known
axe killer, now released from prison, completely reformed. He learned computer
programming on MS/DOS 3.1 and a slightly broken version of Pascal. He will be
given your home phone number and address so if he has any questions about the
code you wrote he can get in contact with you.
This always got a few chuckles. I then pointed out that whenever anyone gets code
that someone else wrote, the recipient always thinks that they can ‘clean up’ what
is there because the original author clearly doesn’t understand what proper code
looks like.
Over time, I’ve learned that everyone has a style when writing code, just like handwriting
and given enough time, I can spot who the author of a block of code is just from the
indenting, placement of ( and ) around a statement and other small traits.
What makes good code is the ability to convey the meaning of the algorithm
from the original author to all those who come after. Sometimes even the most
unusual code can be quite clear, while the most cleanly formatted and commented
code can be opaque to all.
David
> tr -cs A-Za-z '\n' |
> tr A-Z a-z |
> sort |
> uniq -c |
> sort -rn |
> sed ${1}q
>
> This is real genius.
Not genius. Experience. In the Bentley/Knuth/McIlroy paper I said,
"[Old] Unix hands know instinctively how to solve this one in a jiffy."
While that is certainly true, the script was informed by my having
written "spell", which itself was an elaboration of a model
pioneered by Steve Johnson. By 1986, when BKM was published,
the lore was baked in: word-processing scripts in a similar
vein were stock in trade.
A very early exercise of this sort was Dennis Ritchie's
enumeration of anagrams in the unabridged Merriam-Webster.
Since the word list barely fit on the tiny disk of the time,
the job entailed unimaginable marshalling of resources. I
was mightily impressed then, and still am.
Doug
On 3 May 2017 at 09:09, Arthur Krewat <krewat(a)kilonet.net> wrote:
> Not to mention, you can cat multiple files - as in concatenate :)
Along these lines, who said "Cat went to Berkely, came back waving flags."
N.
> I believe I was the last person to modify the Linux man page macros.
> Their current maintainer is not the kind of groff expert to whom it
> would occur to modify them; it would work as well to ask me questions
Question #1. Which tmac file to they use? If it's not in the groff
package, where can it be found?
Doug
OK, I recall a note dmr wrote probably in the late 70s/early 80s when folks
at UCB had (iirc) extended the symbol name size in C programs to
essentially unlimited. This followed on (iirc) file names going beyond 14
characters.
The rough outline was that dmr was calling out the revisions for being too
general, and the phrase "BSD sins" sticks in my head (sins as a verb).
I'm reminded of this by something that happened with some interns recently,
as they wanted to make something immensely complex to cover a case that
basically never happened. I was trying to point out that you can go
overboard on that sort of thing, and it would have been nice to have such a
quote handy -- anyone else remember it?
ron
There you go:
http://harmful.cat-v.org/cat-v/
Em 2 de mai de 2017 17:29, "Diomidis Spinellis" <dds(a)aueb.gr> escreveu:
On 02/05/2017 19:11, Steve Johnson wrote:
> I recall a paper Dennis wrote (maybe more like a note) that was titled
> echo -c considered harmful
> (I think it was -c). It decried the tendency, now completely out of
> control, for everybody and their dog to piddle on perfectly good code
> just because it's "open".
>
There's definitely Rob Pike's talk "UNIX Style, or cat -v Considered
Harmful", which he delivered at the 1983 Usenix Association Conference and
Software Tools USers Group Summer Conference. Unfortunately, I can't find
it online. It's interesting that the talk's date is now closer to the
birth of Unix than to the present.
Diomidis
I'm this close to figuring out how to get netbsd to work on fs-uae with
no prior amiga experience. Searching around the English Amiga Users's
board for clues, I found a guide on downloading and installing Amix.
Complete with amix download links. Haven't tried it myself -I'm still
working on my bsd tangent. But for anyone interested:
http://eab.abime.net/showthread.php?t=86480