Learn to Program: Crafting Quality Code

Not all programs are created equal.  In this course, we'll focus on writing quality code that runs correctly and efficiently.  We'll design, code and validate our programs and learn how to compare programs that are addressing the same task.

About The Course

Most programs are used for years and are worked on by many people. Having programs that are easy to understand is essential, in the same way that a well-organized essay is far easier to follow than a disorganized one. We’ll show you an approach that helps to break down problems into smaller tasks that are easier to both solve and read.
 
This design approach also makes it more straightforward to find and fix flaws. You'll be introduced to the tools that professional programmers use; they're called "testing" and "debugging".
 
For most complex problems, there are many programs that solve them. Some are inherently slower than others. You'll learn how to read two programs and compare them for efficiency.

Frequently Asked Questions

  • Will I get a Statement of Accomplishment after completing this class?

    Yes. Students who successfully complete the class will receive a Statement of Accomplishment signed by the instructor.

  • Can I do this course if I don’t know anything about programming?

    No, we expect this course to be taken by people who have some Python programming experience, such as “Learn To Program: The Fundamentals”.

  • Is there a textbook?

    Yes. We will provide more information about the book in early March.

  • What resources will I need for this class?

    We use the freely-available Python 3 and the IDLE development environment (which comes with Python 3). The download is available here: http://www.python.org/download/. Download the most recent release of Python 3.

Recommended Background

This course assumes “Learn To Program: The Fundamentals”, or similar background.  You should be comfortable with these topics in Python 3:

  • Function definition, function call, method call
  • Types: bool, int, float, str, list, dict, tuple
  • Control structures: if, for, while
  • File reading and writing
You should also be familiar with the function design recipe, the Python visualizer, the IDLE debugger, and from Learn To Program: The Fundamentals.  If you did not take LTP1, please register, visit the class archive, and review at least these videos:

Week 1:
  • Python and Computer Memory
  • Variables
Week 2:
  • Docstrings and Function help
  • Function Design Recipe
  • Visualizing Function Calls
Week 3:
  • Functions, Variables, and the Call Stack
Week 4:
  • IDLE's Debugger
Week 5:
  • Mutability and Aliasing