What Would You Do if I Sang Out of Tune?

The first step towards proficiency is research. So grab a pen(cil) and some paper and let's get rolling. I know that may seem a bit archaic, but the physical act of writing enhances retention. You can use a text file if you wish, but the link between typing in information and retention is significantly weaker.

Figure it Out

Before getting into the internal help systems, I want to touch a bit on culture, perspective and learning in the broader scope. In this grand, adventurous life, as some point, the realization sets in that no one else is responsible for you attaining what you want. Everything that you attain is some combination of hard work, talent, and luck. I am firmly conviced that 75% of this is the hard work aspect, the next 20% is the skills and latent ability you posess, the last 5% percent is randomness. The most nifty part of this is that 'natural talent' is squarely planted in that 5% of randomness. The skill here is increased by hard work. Keep this in mind as you run through whatever tutorials, roadblocks, and frustrations you face. Keep going. I suffer from random crippling self doubts and depression. The only way out is to keep moving. If I get bogged down in the thoughts of all the things I don't know, I lose steam, fast. Sometimes this results in less than optimal results. The key lies in working throuh it. Remembering that you are just as capable of developing the skills as the next person.

In addition to delving deep and building grit to stick through the lean times, you need to develop a love of wanting to understand; wamting to be right so much that you are always ready to admit when you are wrong; being willing to take a better path when it appears. Things change rapidly and it is tough to stay on top of everything. This also means that you want to understand, to know the answer not just know where the answer used to be stored. In the age of everything, everywhere, all the time, this has become a less popular opinion. I am ok with that. I ask that you reread the previous section again, and reframe understanding in the context of being responsible for your own success. You don't want to depend on other's knowledge for your success. This knowledge is part of that skillset you are working so hard to build. How much less efficient would you be if you had to manually translate every word every time you wanted to read something, and then build the intent, context, and any implications. You have a massive storage and analysis tool hanging out north of your neck, use it.

Ask a Better Question, Get a Better Answer
-OR-
Eric S. Raymond is NOT Your Personal Helpdesk

In one of the best works on how to ask questions, Eric has compiled a lot of good information on doing due diligence before wasting others' time, framing questions to extract the actual data you want, and responding to queries. Reading it and implimenting the search methodologies contained therein wil put you on a good path and heading in the right direction. I will take it a bit further in the context of what I am trying to do here.

  • Write down the ultimate goal
  • Write down a plan of attack in the smallest pieces possible
  • Identify any parts you already know how to complete and knock those out
  • Pick one of the items left and see if you can break it into any smaller pieces. If you cannot, start researching through the following:
    • Personal Notes
    • General Web Search
    • System Help
    • Books in Your Collection
  • TAKE COPIOUS NOTES!
  • Use these notes to compose when asking your question
  • Sleep on it, or at least walk away for an hour or so
  • Review the question and see if you see any alternate possibile angles of attack. If so, reframe the goal/step and see if you can break it into smaller pieces
  • If you are well and truly stumped, fire away

Digging In, to Dig Out

In bash, the primary sources for help are from the commands themselves (help), manpages (man), and the infodoc reader (info). For starters, if you type help at the prompt you will get a list of the shell's built-in commands. If you type help plus any of these commands you will see a usage statement. The next layer to look through is manpages. These are often identical to the usage statement but cover a broader set of topics. The main functionality of man is provided by info as well. I prefer this method because if available, infodocs provide greater detail and better examples. If infodocs are not available, the info command will display manpages instead by default.

To start learning about info:
  info info
To learn more than you ever wanted to know about bash:
  info bash

What to Do if I Ain't Got a Clue

This is all well and good, but what if you don't know the name of the command that you are trying to run? You have some general idea what you want it to do, but no idea what a bunch of folks 30 years ago thought would be obvious, or funny, or however they decided to name the nifty application which they wrote. This is where manpages really shine. To search through the manpage repository in the system, pass it the -k flag.

  termux@amelia
  ~: man -k search
  apropos, whatis(1) - search manual page databases
  bzgrep, bzegrep, bzfgrep(1) - search possibly bzip2 compressed files for a regular expression
  find(1) - search for files in a directory hierarchy
  git-bisect(1) - Use binary search to find the commit that introduced a bug
  xzgrep, lzegrep, lzfgrep, lzgrep, xzegrep, xzfgrep(1) - search compressed files for a regular expression
  zgrep(1) - search possibly compressed files for a regular expression
  zipgrep(1, 1L) - search files in a ZIP archive for lines matching a pattern
  ares_search(3) - Initiate a DNS query with domain search
  Pod::Simple::Search(3) - find POD documents in directory trees
  Search::Dict(3) - look - search for key in dictionary file
  

These are all of the instances of manpages that contain the word search. If you are ever stuck you can ask man if there is anything close to what you mean to do. If you have a space in your search term, either enclose the whole thing 'like this' or each term will be searched for separately.

Manpage Sections

See the (number) following the results listed above? There are a few (1)s a couple of (3)s and one (1L). These are the section of the manpage collection that the response was found in. These have historcal standards, but may vary from system to system. To see what you have on your system, try:

  man man
  

Scroll down to the -s parameter. This section covers which sections are available on your system and what they are used for. It will also detail how the application will handle instances where a requested page appears in more than one section.

This should give you a good bit to read and play with in the nest little while. If you make it through all of info info and info bash (or more likely get a headache trying to reach the end of info info) you might want to play around with vimtutor.

73s and hug your knees,
Arlo

Useful Commands:

  • help
  • info
  • man
  • vimtutor

Comments

Popular posts from this blog

It Helps Her on Her Way, Gets Her Through Her Busy Day

More Projects than Good Sense