Welcome to CSCI N201 / Informatics I112
The purpose of this course is to provide you with a comprehensive
understanding of the tools and problem-solving methodologies related
to computer programming. Our primary focus will be underlying
problem-solving and information-gathering techniques. The lecture will
discuss general concepts and syntax, whereas the lab will focus upon
implementation and practice.
Fall 2006 Information
Instructor:
Andy Harris, email
aharris@cs.iupui.edu
I'm in my office (SL 280) Tuesday and Thursday mornings from 11:00
until 12:00 or email me for another appointment.
Email is the best way to reach me. Phone messages are not usually
recieved in time.
Schedule
Lecture: TR 9:00 SL 247
Informatics Students
CSCI N201 is cross-listed with Informatics I112 (Basic tools
Informatics- Program/DB Concepts.) N201 and I112 are the same
course, with the same instructor, and meet at the same time.
Online videos
Online videos are available for most topics in this course. If you
must miss a class or need some review, these are a great reference.
However, you are responsible for the material covered in the lectures
you are scheduled to attend. Updates or changes may have occurred
between the taping and the actual class session.
You can find these materials at
http://wally.cs.iupui.edu/n201/.
Syllabus
Please look over the official syllabus at
http://www.cs.iupui.edu/servicecourses/n201.html
Problem-Solving
Here's some links to potentially useful materials on problem-solving
techniques:
Background, History, and Fundamentals of Computing
Machine Language Materials
Miracle
JavaScript
Functions
Data
Python Notes
Relational Databases
Python and SQL
- dvd.sql
SQL code for th DVD database we did in class
- SQLite in Python
A program demonstrating data access in Python
- APSW
Another Python / SQLite wrapper. pysqlite seems to be down
- APSW Demo
Connecting Python to SQLite with APSW library
Server-side programming in Python
Setting up a practice session
To use Python as a CGI environment, first you need to set up your
system. Fortunately, everything you need is supplied with
Python. Here's the steps to practice on your Windows machine...
- Open a DOS shell. Use start menu-run and type "command" in the
box. (note it's the older "command" you should use, because "cmd"
doesn't seem to work if Python is installed in the program files
directory.)
- Navigate to the directory you want to use as a web root with cd
commands.
- Start the built-in python server with this command:
python -m CGIHTTPServer
- Keep the resulting DOS window open. It will provide feedback,
especially if there are errors in your code
- Point a web browser to localhost:8000 You should see a list of
the files in your current directory
- Create your CGI programs in a directory called cgi-bin directly
under the main web root
Example CGI programs
Note these programs are not currently operational on this server -
they are simply source code. Copy them to your own cgi-bin directory
and run under your own server to test.
- hiCGI.py
Hello world done in CGI and python
- askName.html
HTML page that interacts with sayHi.py. View source to
see how page is organized with form and inputs
- sayHI.py
Retrieves data from askName.html and reports it back.
- questionAndAnswer.py
A program that creates its own form if necessary
- dvd.db
The SQLite database used in previous examples. Used to
demonstrate cgi and sql combined
- CGI_DB.py
Use a cgi script to interact with an SQL database