Now, we have all of the pieces of a computational solution for a problem: abstract the problem into more convenient pieces, take those pieces and model the problem, show how to compute a solution via an algorithm, and evaluate the complexity of our algorithm and problem. But notice there no programming is actually necessary. As I've noted, programming is the act of translating an algorithm into precise enough language that a machine can execute it.
One can argue that we don't actually need to learn programming to learn computer science. In fact, this course exists: it's called CMSC 27200 Theory of Algorithms. Of course, if we tried to make an introductory CS course with no programming, I imagine most of you would drop the class in the middle of the first lecture.
We teach programming as part of introductory computer science not just because programming is a useful skill, but because it's a good way to learn the other parts of computer science. Imagine, for instance, that there was a machine in math that could tell you immediately whether your solutions or proofs were correct and you got the chance to fix them before submitting them for grading. You'd be a lot more effective at learning math by getting immediate feedback.
It turns out that machine already exists—it's called a computer.
One of the main things that we'll be doing in this class is programming. I mentioned earlier that algorithms are really just constructive proofs and if a program is just a very specific instance of an algorithm, what's the difference between a proof and a program? It turns out there really isn't one!
This idea of formalizing and encoding proofs into something that even a machine could execute was a question that was being explored as early as the early 20th century. It's this question that ultimately led to the first results in computer science in the 1930s. Notice that all of this happens well before computers as we know them existed.
We call the algorithm translated into instructions that a computer can understand a program—the act of creating a program is programming. To learn how to program, we also need to learn at least one programming language and if we want to run our programs on a real computer, we will unfortunately have to learn how to use computers and various tools.
This extra trickiness is one reason why computer science classes often seem difficult. Is it computer science really that tricky? Maybe, maybe not. But we often don't separate computer science (which we talked about last class) with programming (which we didn't really talk about now). So that's really two things that we're trying to learn. Add to this the laundry list of tools that are needed to program and an entire programming language and suddenly, it makes sense that there's going to be a bit of a learning curve because we're really dealing with at least three different things.
Our language of choice is Python (specifically, Python 3). Python is a language created by Guido van Rossum in the early 90s. It is in wide use today, with a reputation for being quick to pick up and pleasant to read. It is also fairly general and many of the concepts used can be applied to other languages.
Another tool we'll be using is a version control system. This will be one of the ways you manage assignments and submission. Broadly, a version control system is for managing versions of your code. For our purposes, this means tracking and managing changes.
Version control systems are extremely useful tools for keeping track of changes and managing large projects where multiple people will simulatneously be working on parts of it. While they were developed for managing software projects, version control systems can be used to manage many other kinds of projects where being able to track changes and manage concurrent work by multiple people is necessary.
There are many version control systems out there (Subversion, CVS, Perforce, etc.). We will be using git, originally authored by a guy named Linus Torvalds. It is available for download on all of the major platforms at git-scm.com. git is currently the most popular and widespread VCS in use. In addition to being used almost everywhere nowadays, it will be used in many future CS courses here.