CECS 5100

Survey of Educational Computer Languages

Fall 2003

Need a free MP3 Player to listen to these clips ?


Audio Segments and Illustrations #2
  • Overview of Operators
    Audio (2.7M 5:54)

  • Basic Programming -- Key Concepts/Defs

      1. Objects (and intro to concepts)
        "Black Box" designed for specific task
        Input, Process, Output
        Method = something you can do with an object
        Property = Value you fetch from an object
        Event = Condition that triggers the object
        Audio (3.1M 6min 46sec)

      2. Flow
        order of events your program takes
        Simple programs don't need to be planned
        Complex programs _require_ planning
        Audio (1.1M 2min 26sec)

      3. Routine
        self-contained code segment that does a base action
        Make them logical in concept -- more on this later
        Audio (1.3M 2min 58sec)

      4. Variables
        - holding area of information (mailbox)
        - can be static or changing
        - "Loose typing" content of variable is not tightly controlled
        Audio (1.4M 3min 10sec)

      5. Expressions
        - list of steps JS follows to complete a task
        example: total = 1 + 1
        Audio (588k 1min 15sec)

      6. Strings / Numeric
        - Strings are sequences of alpha or num characters (1234abcd)
        - Concatination is the combing of Strings. (1234 + greg = 1234greg)
        - Numeric values are only numbers (0-9)
        Audio (652k 1min 24sec)

      7. Conditional Statements
        - forks and flow control
        - If this then that or else this
        Audio (192k 24sec)

      8. Looping
        - Repeats something based on a condition
        Audio (236k 30secs)

      9. Parameters and Arguments
        - parameter is data that is needed to carry out a task
        "any valid number"
        - arguments is the actual data
        "123456"
        Audio (416k 53sec)

      10. Entities and Instructions
        - 'entities' referes to JS objects, methods, properties, functions, and events
        - 'instruction' refers to one or more commands given to JS to execute (commands or command lines)
        Audio (916k 1min 57sec)

  • Using NoteTab & Basic HTML
    Audio (4.6M 10mins 4sec)
      - Basic HTML Structure
      	  <HTML>
      	  <HEAD>
      	     <TITLE></TITLE>
      	  </HEAD>
      	
      	  <BODY>
      	    Text Here
      	  </BODY>
      	  </HTML>
      	

      - Embedded Tags
      <> are used for embedded tags
      <> </> start and end tags
      - Comments

      		<!--    -->

      HTML is a document-layout and hyperlink-specification language it defines syntax and placement of special, embedded directions that are not displayed by the browser. Tells the browser how to display the contents of the document, including text, images, and other support media.

  • Order of Precedence (p. 201-202)
    Audio (896k 1:54)

  • Arrays (p. 245, 289)
    Audio (4.8M 10:38)

  • Tools: WinSCP and Putty
    Audio (928k 1:59)
    1. PuttySSH (http://www.chiark.greenend.org.uk/~sgtatham/putty)
    2. WinSCP (http://winscp.vse.cz/eng)
    3. Mac OSX Users try: Fugu and your terminal program using the ssh command (enter 'man ssh' for details).

  • Creating the test.php page and uploading it
    Audio (1.5M 3:25)

    1. Create the following HTML using NoteTab and save the file as test.php.
        <html>
        <head>
        <title>PHP TEST</title>
        </head>
        
        <body>
        <p>This is an HTML Line</p>
        <?php
          echo "
        <p>This is a PHP line</p>";
           phpinfo();
        ?>
        </body>
        </html>
        

    2. Accessing Host Server using WinSCP
      1. Run winscp3
      2. Press New and in the login window enter the following information.
        1. elm.cecs.unt.edu
        2. Account is your last name.
        3. password was set by you in class. If you lose your password, send me an e-mail and I can reset it.
        4. You must select SFTP for the connection to work.

      3. Press Login

      4. WinScp should ask you to confirm the system as secure. Press YES.

      5. You will now get the WinSCP file transfer screen.

        The left window contains the files on your computer. The right window contains the files on the remote site - your account on elm.cecs.unt.edu. All files for this course will be placed inside the public_html directory.
      6. Double click on public_html in the right window

      7. Using the left window, find the file you created in the first steps - test.php

      8. Drag the file from the left window into the right window -- this will copy the file to the remote system.

      9. To access the page, open a browser and enter a URL. For my account, it is http://elm.cecs.unt.edu/~gjones/test.php. This is is how to access my index page under the directory public_html in my unix account. Replace my account name 'gjones' with your account name to get access to your html files.
        Note: The following audio uses a different system name.
        Audio (272k 0:35)

      10. If you receive an error about the file not being able to be read or found, then check the permissions of the file. Right click on test.php in the right window and be sure that read (r) is set for all groups. Try to access the file again.

      11. To create a home page, create a index.html file and place it inside the public_html directory. I can access mine with the following URL http://elm.cecs.unt.edu/~gjones/index.html.

    3. Unix commands - available under PuttySH
      1. ls Audio (1.1M 2:32)
        [gjones@elm gjones]$ ls
        cgi public_html test.html test.pl
      2. ls -lag
        [gjones@saturn gjones]$ ls -lag
        total 48
        drwxr-x--x  4 gjones  gjones  4096 Sep 26 08:55 .
        drwxr-xr-x 30 root    root    4096 Sep 26 08:11 ..
        -rw-------  1 gjones  gjones   953 Sep 27 05:48 .bash_history
        -rw-r--r--  1 gjones  gjones    24 Sep 23 05:28 .bash_logout
        -rw-r--r--  1 gjones  gjones   191 Sep 23 05:28 .bash_profile
        -rw-r--r--  1 gjones  gjones   124 Sep 23 05:28 .bashrc
        -rw-r--r--  1 gjones  gjones   854 Sep 23 05:28 .emacs
        -rw-r--r--  1 gjones  gjones   118 Sep 23 05:28 .gtkrc
        drwxr-xr-x  3 gjones  gjones  4096 Sep 23 05:28 .kde
        drwxr-xr-x  2 gjones  root    4096 Sep 26 04:16 public_html
        -rw-r--r--  1 root    root      44 Sep 23 06:09 test.html
        
      3. cd Audio (504k 1:04)
        [gjones@elm gjones]$ cd public_html
        [gjones@elm public_html]$ cd ..
        [gjones@elm gjones]$
        
      4. chmod Audio (444k 0:57)
        chmod a+rx test.pl
        
      5. man Audio (204k 0:26)
        man chmod
        
    4. Three important things to remember
      1. Remember where you are uploading your files.
      2. Permissions
      3. Remember which file you are working on.
      Audio (808k 1:43)