Wednesday, May 28, 2014

Some thoughts on newbie computer kids.

 

I was recently asked a question abut how and why for a script.  It seemed like a good example to attempt to address.

Computers DO NOT think.  I know all you new kids who are trying to be computer geeks, nerds and hackers may think that computers think.  They don't.  You must do the thinking for them.

Too often newbie kids just throw things at a script assuming the computer can figure out what they want.  It can't.  A computer can only do a few very primitive things. Her is the total range of capabilities thata computer can perform by component name:

1. adder
2. rotate/shift/test/jump
3. bus/register multiplxer
4. load from memory
5. store to memory
6. input (most input/output is actually load/store with interrupt)
7. output

You must tell the computer what to do with all of these components.  You must understand how a script causes a computer to perform these tasks.  TO make things easier programming languages are all designed around common elements.  Learning how these elements effect the execution of the program is the key to writing a program (script).

Here is a take at the question:

Why can't I get the largest value from this list with this code?
    
       list=1,2,3,4,5,6,7,1
       for each x in list
            largest = x
       next
       print x

Can you see the problem?

The computer is doing exactly what it was asked to do.  It has no idea of largest, smallest or anything.  We must tell it how to do that.

In programming and scripting we must have a good basic knowledge of how a computer works.  We must also know arithmetic, basic math and logic.  If you do not know or are not clear about any of these things then you must take the time to remedy this to be more than a tech who replaces parts by trial an error. Knowing how to navigate a GUI is not a sign of computer knowledge.  You are doing what the GUI designers made simple by writing millions of lines of code to create a GUI.

No comments:

Post a Comment