CSCI-E26 Class 1 Outline in Pictures

Introductory Metaphor



Brief Summary of Course

A complete course in C programming (60%) and a good introduction to programming in Unix/Linux (30%), and small introduction to HTML and building interactive web sites (10%).

Expect you know programming pretty well. Not an intro to programming. Solid focus on skills and design.

Medium Demonstration of Unix Programming: Components and Connections
  1. The dataset derived from download from MBTA site in particular, from the Developers' site: http://www.mbta.com/rider_tools/developers/default.asp?id=21895.

  2. Things you might do with this list of events
    • clean it (find typos, missing data, format errors..)
    • analyze it: get stats and info
    • report: generate schedules
    • search : trip planning
    • webify : remote access to reports, stats, and searches

  3. 12 Specific Questions
    1. When do trains leave from Braintree going to Boston?
    2. What is the time of the earliest train from Ashland to Boston?
    3. How many trains stop at West Medford on a weekday?
    4. List the stations on the Fitchburg line.
    5. List all the lines in the system.
    6. List the train numbers of all trains passing through Beverly Depot.
    7. What station has the most trains on Sunday?
    8. Which line has the most stations?
    9. During what hour does the greatest number of trains arrive at South Station?
    10. When does the last train to Worcester leave Boston?
    11. What is the most common train stop time?
    12. What is the longest train trip (time, not distance) on the system?

  4. How would YOU answer these? How much time would it take?

  5. Here is the Unix/Linux approach: Tools and Connections
    • Some Tools for text processing:
      • grep
      • cut
      • sort
      • uniq
      • head
      • wc
    • A software tool is a special-purpose, generally useful program. Most software tools read input data, process it, and stream out results.
    • Two Techniques for Connecting Tools
      • Pipes: grep stn=salem sched | cut -d";" -f2
      • scripts

  6. We write our answer to question 1 as a script: train-times that takes two arguments: a station and a direction.

  7. To use Unix/Linux as a programming system, you need to learn to:
    • Use the existing tools
    • Connect connect tools using pipes and scripts (sh)
    • Write new tools to meet new needs ( C )

  8. To make Unix/Linux solutions available via the Web, you need to learn to:
    • Write basic HTML pages
    • write connectors between the HTML pages and tools
Detailed Description of Course

We go through the handout packet

Using Unix/Linux
login/logout
directories and files
    ls, mkdir, rmdir, cd, mv
files
    cat, more, rm, mv, cp
programs
i/o redir
IDE - vi/emacs, cc, gdb
Unix at home; Linux, BSD, live CD for Ubuntu
	
Web Access to Tools: Components and Connections

Problem: Put our train-times tool on the web
Solution: Write a User Interface, a Connector, a Tool