Pages

Simple Simon

README

Ponder the following epigraphs presented by Donald Ervin Knuth in volume one of The Art of Computer Programming as you say hello to Patrick Joseph McGovern’s brain quest, which Edmund C. Berkeley’s book Giant Brains; or, Machines That Think inspired.

CHAPTER ONE
BASIC CONCEPTS
Many persons who are not conversant with mathematical studies
imagine that because the business of [Babbage’s Analytical Engine] is to
give its results in numerical notation, the nature of its processes must
consequently be arithmetical and numerical, rather than algebraical and
analytical. This is an error. The engine can arrange and combine its
numerical quantities exactly as if they were letters or any other general
symbols; and in fact it might bring out its results in algebraic notation,
were provisions made accordingly.

— AGUSTA ADA, Countess of Lovelace (1843)

Practice yourself for heaven’s sake, in little things;
and thence proceed to greater.

— EPICTETUS (Discourses IV.i)

See Also

Patience

Simple Simon
by Mr. Spurgeon

There was a small computer,
It was so very little.
It did hardly anything,
With each twist and twiddle.

Coders were always getting mad,
And the devices they got hot.
But Simple Simon plugged along
And wrote this little jot.

Have patience. Have patience.
Don't be so awfully greedy.
When you get, too greedy,
It only makes you needy.

Remember! Remember!
That you were little too.
And think of all the times
When others had to spoon-feed you.

When computers got much bigger,
They caused a lot of trouble.
Forgetting they were just machines,
They learned things on the double.

They crashed. Things burned.
  They made a web.
With humans they'd collide.
'Till one day Simon's father
took the CPU aside.

Have patience. Have patience.
Don't be so awfully greedy.
When you get, too greedy,
It only makes you needy.

Remember! Remember!
That you are little too.
And think of all ones and noughts
That tell you what to do.

As you can well imagine
There's a moral to this tale:
Some of you may find yourself
Being driven by your tail.

So if you step inside a box
And let it drive for you,
Think about Simple Simon
As you start to stew.

[Final Refrain]

Have patience. Have patience.
Don't be so awfully greedy.
When you get, too greedy,
It only makes you needy.

Remember! Remember!
That you are little too.
And think of all the bits and bytes
That tell .. you .. what .. to .. do!

Code

Q&A

Notes

Exercises

  1. Learn about about Simon the computer and Simon’s designer, Edmund Berkeley.
    1. Read http://history-computer.com/ModernComputer/Personal/Simon.html.
    2. Read http://history.computer.org/pioneers/berkeley.html
    3. Read https://en.wikipedia.org/wiki/Simon_(computer).
    4. Read https://en.wikipedia.org/wiki/Edmund_Berkeley.
  2. BONUS: Peruse Edmund Berkeley’s book, Giant Brains, or Machines That Think.
  3. Familiarize yourself with the source code that makes up this MESS.
    1. On a computer that has a Java Development Kit (JDK) installed, create a directory called Simple.
    2. Compile and execute the program defined by the source code labeled Simon10Help.java.
      1. Copy the Simon10Help.java source code from this MESS and paste it into a text editor such as Notepad.
      2. Save the code to a file named Simon10Help.java in the Simple directory, which you just created.
      3. Using a command-line utility such as PowerShell, change directories if necessary so that you are in the Simple directory, and compile the Simon10Help.java code using the javac compiler:
        javac Simon10Help.java
      4. Assuming you are still in the Simple directory, execute the main method using the following command. (Get comfortable using the -classpath option with the java command. You may need to use the -classpath option when working with files that components of a Java package.)
        java -classpath .. Simon10Help
      5. Run the program by using other class names besides Simon10Help as arguments to the java interpreter. How many different starting points (i.e. classes with main methods) are there in the file?
      6. Try to understand what the output of the Simon10Help.java program is telling you.
    3. Compile execute the program Simon10.java. Execute the program by passing a variety of command-line arguments to the java interpreter including the ones shown below. How do specific argument values affect the behavior of the program?
      • 0
      • 00
      • 000
      • 012
      • 112
      • 321012 0123210
    4. Use the javadoc utility to create HTML documentation for the code stored in the files you have compiled. Study the documentation produced carefully, especially the index file(s). Hint:
      javadoc *.java
    5. Try to compile and execute Simon10Tests.java. What does this program do?