Intro to Programming
Lecture Notes, Friday September 6 2002
- Computer Basics
(Just so we're all on the same page.)
- Layers:
hardware - CPU, memory, disk, monitor, network connections
software - OS, services, system deamons, user applications
- Files - basic unit of data , various types (.jpg, .mpeg, .txt, ...)
- Discuss directories and distributed files systems (internet) briefly.
- Programs do things to files - display them, pump them
through a speaker, help the user create them, and so on.
- Most programs require files of a specific type. (Discuss examples.)
- Users interact with computers in two broad ways: GUI, and Command Line
- GUI - Graphical User Interface - buttons, mouse, pictures ...
fairly sophisticated (
- Command Line - primitive, powerful
- Similar to the difference between a comic book and a novel.
- The Command Line
See my Command Line Tutorial
- Programming - what is it, various languages
- recipes
- levels of abstraction: assembly .. C .. Java
- C, Java, Perl, Python, Lisp, ...
- Getting Help
Don't underestimate "ask google". Example: type "Java tutorial".
Walk through my files on akbar with a browser, while it's out.
- First Java Program
"HelloWorld.java" on akbar.marlboro.edu, using pico.
See page 26 of text.
- compile vs run
- comments
- debugging - compile time (syntax) vs run time (logic, hard to find)
- indentation, braces, and all that
- Same thing on laptop, TextPad, DOS command line
- next week: start Java language details
- types
- variables
- arithmetic
- methods