More Computerese


Objectives

 

Recall: we're using the term computerese to mean all the non-programming related skills you need on your computer, like making and changing directories, to be successful in getting your programs done.

Up to this point you are proficient in:

All of these were described in Module 0 of Unit-0.

Our goal in this module is to go a little further, and mention some more useful computerese.

Ultimately, the goal is to become more productive.


More pico commands

 

As our programs start getting larger, it will be slow to move around text in pico using just the arrows. Here are some commands worth trying for longer programs

 


Use two windows

 

Thus far, in the edit-compile-execute process, we've gotten out of the editor and then compiled.

The problem is, if there's a compiler or execution error, we get back into the editor and repeat.

To make the repeated process more efficient:

  • Open two terminal windows. The second one can be opened from the File menu of the first. Try it.

  • Once you have the second one opened, go to the same directory. Now you can edit in one window (keeping pico. open) and compile/execute in the other.
 


Wildcards

 

Go back to your Module-4 directory where you wrote all your exercise code.

In that directory, type ls to get a list of files.

Because you compiled many files, you'll see both .java and .class files.

Now type ls *.java at the command line. You will see only the java files.

The "*" is called a wildcard. The "*" says "any characters" can be substituted here.

You can see this work differently by typing ls *.j* which will match any file name that fits the pattern:

  • Any string of characters before the dot.
  • A j after the dot.
  • Any string of characters that follow the j.

Why is this useful? If you want to move all your java files, or delete all your .class files, you can use wildcards.


© 2017, Rahul Simha