Hacker News new | ask | show | jobs
by serbuvlad 568 days ago
If it occurs often enough, yes!

The human brain finds unexpected or weird words a lot more memorable than expected words.

grep is better than find "find-regular-expression"

awk is better than "execute-command-on-regular-expression"

perl has nothing to do with pearls

If it's a common command, concept, function, etc. that appears in may places, give it an odd name!

Document it thoroughly!

And don't go overboard. When everything is special, nothing is, with the added disadvantage that nothing is "readable" either.

3 comments

> grep is better than find "find-regular-expression"

I'm not sure if you are familiar with where grep came from, but in short it is an abbreviation of a command in the original UNIX text editor: g/re/p - g for global command, re standing for your search query and p for print to screen or teletype. In that way, it is nothing more than an anachronism that would have been immediately obvious to anyone working in a UNIX environment at the time.

AWK and Perl are just programming languages. I think they have made up names because programming languages are singular entities, but have too many characteristics to condense into a short name. That's different from a function, which in conventional style does exactly one thing with only one or two characteristics and so can have a 'short' and descriptive name a few words long.

I don't disagree with your argument, but I wanted to point out that the examples you gave were made-up names out of tradition or necessity, not because they were intentionally designed to be memorable.

Choosing the name grep because it is easily recognizable as coming from the command it is inspired by is literally "intentionally designed to be memorable".
I have a lot of conversations like "There's a technique called 'secure computation', which confusingly is not just computation that is secure", "They're building affordable housing, which confusingly is not housing that is affordable", "I was on a cross-country flight, which confusingly is not a flight that crosses the country". Using a different word entirely can avoid that problem
The UK government defines 'affordable housing' as that which is available for at least 20% below the local market rate. Cross-country flights, at least where I'm from, do indeed cross the country on one axis or very nearly so.

Is it not just the computer world which is the odd one out in coming up with needlessly confusing names?

No, it's not just the computer world.

Affordable housing where I live is a specific thing. Below-market-rate housing purchaseable/rentable with specific income requirements. Some number of units in new builds are usually required to meet this requirement. Your example sounds similar, it is also specifically defined and not just housing that is affordable but rather it meets specific requirements.

A cross-country flight to a pilot licence is a flight that goes greater than 50 nautical miles one-way. During flight training you need some number of these so you talk about them a lot during that training and it's mentioned a lot in the regulations.

And as I guess you're aware secure computation is also a term of art in CS for a specific thing.

I'm sure every field has terms of art that overlap with things whose words don't precisely describe. A chef's knife is a specific shape/class of knife, not any knife used by a chef. Law is full of them. There is a wealth of examples.

Thank you; I appreciate the explanation. I suppose the cross-country flight is so named as to preclude student pilots flying around and around in small circles to qualify?
I don't know why it's named that way but you need some number of cross-country flights and hours because there are skills that you pick up doing that (several kinds of navigation, fuel management, weather management, flight planning, map reading, etc) that you wouldn't by flying in circles or by spending time in the pattern (looped takeoffs and landings, which you do also need to do a fair amount of but builds a separate set of skills)
"cross-country" has a similar meaning in many contexts, skiing, biking, planes, running, etc. I believe it was originally coined in running and then extended to other pursuits. The 'country' part of the term comes from the sense that means "non-urban land" rather than "geopolitical state".
I regularly cannot remember if its "grep" or "greb". Never had this issue with Windows' "findstr".
It's not "findstring"? I'd never remember that.
The 'p' is for print.