Page 1 of 2

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 01:16
by GarryRicketson
by pylkko » p.s imagine if you had not memorized the times tables in primary school. You'd be looking up 6 x 8 on google
I was going to comment, but changed my mind, but then when I saw this:
by pendrachken » I'm in my late 30's and never memorized the times table.
And decided to go ahead, there really are quite a few people that do not
know even the basic times tables, 1 thru 10,...for what ever reasons.
I think it is important, but in these days with calculators, maybe it isn't.
Any way here is something to help people memorize them, if they want to.

Image

Often I do have to do a search, example " What is the Linux command to "do this or that task" ? (where is says "this or that task" , would be a description of the task in question),.... another example, a new user might have to ask
"what is the linux command to list directories ? " or
"what is the linux command to multiply " ?
You can use 'bc' to do math, including multiply,

Code: Select all

 man bc 
BC(1) General Commands Manual BC(1)
NAME
bc - arbitrary-precision arithmetic language and calculator
SYNOPSIS
bc [-cl] [-e expression] [file ...]
DESCRIPTION
bc is an interactive processor for a language which resembles C but
provides unlimited precision arithmetic. It takes input from any
expressions on the command line and any files given, then reads the
standard input.
For example:

Code: Select all

$ bc
573 * 4
2292
2292 * 5789
13268388
13268388 / 5789
2292
quit
Of course with time, one starts
to remember the commands they use the most, some people would have to
do a search to find the right command for a task more often then others, it all
depends on their memory and how many commands they are all ready familiar
with, ......Now that I understand the question better............

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 07:26
by pylkko
pendrachken wrote:
pylkko wrote:My opinion is that while most people think that medieval rote memorizing techniques are boring a quaint... that they have their uses in some places in life. For example, when you have to look up the command sequence for tar every time and you use it often. You just end up loosing a lot of time and "flow" from your work searching for stuff like that...
Edit: word missing from sentence
and p.s imagine if you had not memorized the times tables in primary school. You'd be looking up 6 x 8 on google. But since you did memorize that, now you have it for life. Why stop doing this in adulthood?

I'm in my late 30's and never memorized the times table. Seems pretty pointless to me actually, I can just do the quick mental calculations in my head. I've also passed college algebra and statistics classes, with a few calculus classes soon to be taken too.

Code: Select all

6*8 ---> 8*2*3 = 48

if you need to break it down more:

8+8 = 16 : 16+16 = 32 : 32 + 16 = 48
No need for rote memorization of some stupid table when chaining a few dead simple calculations can be done in just as short of time. Or you could just use a calculator...


Saves brain space for the equations and such that actually matter.
I think you missed the point entirely. Nobody needs to memorize anything. But it is something that can be done and works remarkably well. Anybody can remember a shopping list of any length with the method of loci, but anynody can use their time to write it on paper or even install some pointless app on a smart phone for that purpose. Some people claim cognitive health benefits from using your memory often but AFAIK the scientific literature is inconclusive.

And memorizing is something that is quite widely used in areas where people want to be able not spend effort on finding basic things, for example in medical schools and hospitals all around the world. Of course, when you are in front of a computer, looking up things is relatively easy. Also it does not make sense to memorize everything. It is an optimizing problem, i.e it make sense to memorize something when the total effort spent is less than the total cumulative effort of looking up over and over again. But I still believe that people too easily dismiss the usefulness of the methods just because they have negative personal feelings towards them.

I find your 'mental calculation' example really unconvincing. That you use emotiomally loaded term 'stupid tables' indicates to me that you are not addressing the issue rationally. What you suggest definetly does not 'save brain space'.. it makes something auyomatic and fast into something slow,effortful, and error prone.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 08:57
by alan stone
What was the question again? :oops:

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 11:07
by phenest
dasein wrote:... I can offer a general answer to the underlying philosophical question.

All. The. Damn. Time.
I agree. Also I think that would be the answer from anyone who uses the CLI regardless of how often.

If you're looking for some constructive tips:
1. Make a BASH alias If you using common flags with your command:

Code: Select all

alias diff='\diff -rupN'
As you can see, the alias can have the same name as the command. Aliases can be put in the ~/.bashrc file.

2. Copy some frequently viewed man pages to a text file:

Code: Select all

man ffmpeg > ffmpeg.man
I find it easier to open large man pages this way, especially when the command has a lot of parameters.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 11:35
by kedaha
annadane wrote:How often do you have to look up the command for something?
I don't use commands for my desktop computer and laptop beyond updating since I set them up and configured them long ago.
I use the command line via ssh to do LAMP server administration and I'm familiar with the basic commands.
annadane wrote:And how much do you have memorized so you don't have to?
I'm able to find my way around the file system and do file operations using the command line but I always check them from my own records or from the 'net. I've memorized the basic commands but of course I have to look up the more complicated ones. I am able to do some other stuff like backporting packages though.
The worse thing for me is logins and passwords; I often end up having different passwords on my home computer and the one at work and on my memory stick. :?

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 12:12
by edbarx
It depends on what command and whether I use it frequently.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 14:28
by dasein
pylkko wrote:It is an optimizing problem, i.e it make sense to memorize something when the total effort spent is less than the total cumulative effort of looking up over and over again.
Could not have said it better myself. Though I would add a condition where the effort spent pays back in other ways, as well. (Example: rote memorization of the alphabet, in exchange for the ability to read)

Like software development, it's all about how big a payback and how fast.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 15:09
by pendrachken
pylkko wrote:
I find your 'mental calculation' example really unconvincing. That you use emotiomally loaded term 'stupid tables' indicates to me that you are not addressing the issue rationally. What you suggest definetly does not 'save brain space'.. it makes something auyomatic and fast into something slow,effortful, and error prone.
Relying on memory is more error prone than basic math, since basic math can't change. Memorizing some random table IS stupid, especially when most people won't bother to learn how the table is put together in the first place. There is absolutely no reason to memorize a whole table when by simply knowing how it was put together you can put together the small portion you need at the time. Doing simple calculations to reach the answer also becomes automatic, eventually you will get almost instantaneous answers because you will do the calculations so fast you barely even think of them. Zero effort needed, and at least I can check my math as I go instead of hoping that I haven't mis-remembered something, after all, I have personally witnessed Ph.D math professors mess up some really basic stuff from memory.... humans have fallible memories.


Chaining the small calculations to actually put the piece you want is not only just as fast as rote memorization for all intents and purposes, but actually helps out tremendously in higher level mathematics. In higher level math you must break larger problems down into simple easy to work with pieces. In algebra for example, you can't just memorize every single number for when you want to get a number in an equation out from under a square root, you have to actually know square root properties and break the problem down into isolating different pieces of the problem at different steps.

Besides what I already said, as an interesting side note, the way I do it follows the UNIX philosophy: Use multiple small commands chained together to create something larger than the sum of its parts.


As for how "ineffective" it is, there are more than a few buildings that have been standing for the last 17 years that had the steel made with this method, by me, that argue otherwise. Again, being able to break down a problem into small pieces and see how they are put together helps out with projects you are working on. It's pretty easy to see how a whole building will be put together if you think of it like putting lego blocks together to make something, and you don't even have to learn and train yourself how to do it if you don't rely on rote memorization.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 15:24
by edbarx
Relying on memory is more error prone than basic math, since basic math can't change.
But recalling basic math is using memory which is more error prone. I think, this is a vicious cycle: recalling from memory is important AND understanding is also important, if not more. Some people may argue, the if not more is questionable, as normally, people do tasks mechanically.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 21:04
by cpoakes
In my bash history, 500 lines spanning what appears to be the last 36-48 hours there are 1 apropos requests and 7 man page requests:

Code: Select all

man xdg-open
man dpkg-query
man apt-file
man feh
apropos column
man column
man col
man cut
suggesting I generally know commands but can't remember all the options. But that's why God created man pages. On second thought, it was Dennis Ritchie and Ken Thompson.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 21:39
by dasein
cpoakes wrote:But that's why God created man pages. On second thought, it was Dennis Ritchie and Ken Thompson.
Dennis Ritchie is god. :razz:

Re: How often do you have to look up the command for somethi

Posted: 2016-12-18 22:17
by phenest
edbarx wrote:
Relying on memory is more error prone than basic math, since basic math can't change.
But recalling basic math is using memory which is more error prone.
But math can be calculated, sort of like error correction.

Unlike man pages which cannot be calculated.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-19 08:18
by edbarx
Please, consider my post as playing with words. I do not mean to be a nuisance.
phenest wrote:But math can be calculated, sort of like error correction.
But, recalling the relevant math concepts requires memory. It is like a double edged sword: both memory and understanding are important.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-19 22:09
by cpoakes
dasein wrote:
cpoakes wrote:But that's why God created man pages. On second thought, it was Dennis Ritchie and Ken Thompson.
Dennis Ritchie is god. :razz:
Dennis Ritchie, Ken Thompson, Brian Kernighan - a holy trinity.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-20 06:55
by edbarx
Dennis Ritchie, Ken Thompson, Brian Kernighan - a holy trinity.
Brian Kerningham reminds me of a C language book in which I was shocked to read that a negative number like -1 is smaller than -10. When I mentioned this unacceptable error in a text book intended for post-secondary school students, I was presented with the illogical argument that the modulus of -10 is bigger than the modulus of -1 although the modulus does not define the sign of a number. Others argumented that even complex numbers, that is, numbers of the form a + ib, where a and b are real numbers and i is the imaginary square root of -1, have a magnetude! Imaginary numbers are NOT orderable which means magnetudes do not make sense logically. Finding the modulus of a complex number as it appears on an Argand diagram, is not finding its magnetude, but the length of the line that should appear on an Argand diagram.

Re: How often do you have to look up the command for somethi

Posted: 2016-12-20 10:25
by swirler
I've scheduled periodic backups (cronjobs) of my .bash_history file and grep through them when I can't remember a command I know I've used already.

I've also seen people appending some sort of tag to a command in order to recall it quickly, maybe something like

Code: Select all

ls -laF --group-directories-first #dir
the idea being that just typing #dir after hitting CTRL+R would bring up the command - of course it's kinda useless with a short command like the example above, but I find it useful with longer ones.