Structured Programming

Section A

Week 1 - Week 4

Section A introduces the programming through Scratch and tools we will be using to write C programs. The programming language, Scratch, makes it easy to learn the basic programming constructs. Scratch programming uses drag and drop to click together programs. The results of these programs are immediately visible. The pieces you click together in Scratch are the same pieces C uses. The lectures will show you the C equivalents to Scratch.

Section B

Week 5 - Week 9

Section B sets you on your journey to learn C. You will write a relatively large program based on a sequence of tests. By concentrating on the same program over the course of the section, you will see the importance of writing readable code. By the end of the section, you will know all of the elements of the C language as well as the tools for writing and compiling C program: nano, gcc, and make.

Section C

Week 10 - Week 13

Section C consolidates what you have learned in the first two sections by having you work as a team to build a program. Your team will work just as team in industry work. In addition, your team members will give you a community in which you can get your questions answered. If you have a questions, chances are that someone in your team can answer it. If no in your team can answer it, please ask it in class because chances are that none of your classmates can answer it.


Structured Programming may be the most important class you take in college. If you are going to study science, and, increasingly, social science and humanities, you will need to write programs. Scientists use computers to work out the implications of complex models. Social Scientists use statistical program and databases statistics to evaluate their theories. Even in the Humanities, the advent of the World Wide Web and digital libraries has made programming an important skill.

If you plan to be a Computer Scientist, programming will be a major activity for the rest of your life. Even though programming is not the same thing as Computer Science, it is its foundation. If you plan to go into the IT industry, again programming will color everything you do. If you plan to teach Computer Science or IT, yet again, you will spend much of your time programming to keep up with changes. Programs are the primary product of the IT industry; they are the data for academic research; and they are what we teach students to do. Regardless of whether you plan to work in industry, academic research, or teaching, you will need to program well.

Like riding a bicycle, you learn programming by programming. Programmers have learned many things over the decades they have been programming, and this class will cover these things. But understanding comes from doing, not remembering. The labs, not the lessons, give you real knowledge. In the labs, the information presented in the lectures will be put into action. Two hours a week is little enough time to exercise all of the information from the lessons, so you will need to use the computers outside of class.

By the end of this class you will be able to write C programs and contribute to projects written in C. More importantly, you will enter the community of programmers. At some point in your career, you will need another language, which you can learn from its community. The community keeps its answers on the Web, but finding these answers takes skill. Moreover, if asked appropriately, skilled programmers give specific answers, knowing they will need to ask someday. You will learn to ask appropriate questions of the Web, your teachers, your classmates, and, ultimately, yourself is the most important skill you will learned here. that will support your throughout your career.

As you learn how to program and how to interact with the community of programmers, you will also learn a new set of technologies. If you are familiar with computers, your familiarity is probably with the Windows operating system. We will be using Linux, a Unix-like operating system and the tools: nano, gcc, make, and git. We will use the command-line interface, where you type in the command and its parameters. Learning to use this operating system and its tools will teach you much about how computers work, because it gives full access to its capabilities unmediated by a graphical user interface. It is not for the faint-of-heart, but it is for programmers.

The class will be challenging, but you can do it. It will require great effort and substantial time outside class, but nothing worthwhile comes without effort. I hope that by the end you will love programming as much as I do.

- Nat

Inspirational Articles

  • What is Code by Paul Ford is the best description I have read about computer programming. It not only give you a sense of what goes on, but also a sense of the people involved.
  • What’s Next in Computing? by Chris Dixon is the best outline of what the the next phase in computer development may be. His descriptions of the three previous changes is spot on.
  • How Do You Learn To Code by Roshan Choxi gives some very good tips about learning to program based on the authors personal recollections. His experience is similar to mine. Of greatest importance: focus on habits not on goals.

Access to Unix Computers

You will need to be able to work on Unix computers from home in this class. The lab sessions are provided to review the work you have done at home to provide feedback and evaluate it. Your marks on the practical portion of this course will be determined by these review. Do not turn in programs others have written as your own. It is very obvious when you do. Also, if you give your program to other students it is hard to tell the true author of the work.

You will be given an AWS account on which you can work. In addition, we recommend that you install Unix on your computer. Cygwin is the easiest way to do this. You may also install Ubuntu as a dual-boot operating system if you feel adventurous. If you install Unix on your computer you may access your AWS account using ssh as you will from the lab computers. You may also access your AWS account using the Putty terminal program.

  • Install the Putty terminal and log in to AWS This is probably the simplest way to access Unix from home. I have set up a server on Amazon Web Services that is running Ubuntu. You can log on to this server and use it. The terminal will work the same way the terminal work in the lab, but you will not have access to the GUI elements. You will need to have me set up an account for you.
  • Install Cygwin Cygwin is the set of programs that make up user level access to Unix running as windows program. You can run the bash shell as a windows program. It works the same way the terminal in the lab works, but you will not have access to the GUI features you have in the lab. You will need to install Cygwin first, then install it the following packages:
    • nano
    • make
    • gcc
    • git
    • CUnit
    • unzip
    • wget

    I have also written step by step instructions on setting up Cygwin

  • Dual Boot Windows and Ubuntu\ This is probably the most difficult route, but the system you will run will be exactly the same one you have in the lab. As with Cygwin you will need to install the tools we use. To do this use apt-get. Since apt-get requires root privileges, you will also need to use sudo. For example, to install nano type sudo apt-get nano.

    You will need to install the following programs:

    • nano
    • make
    • gcc
    • git
    • CUnit