Step 1
Introduction to Programming
The language of the whole degree. Every other course builds on the habit you form here: breaking a problem into steps.
- Video course
- Video course: CS50x (Harvard)
- Variables and types
- Conditionals and loops
- Functions
- Arrays and strings
- Memory and pointers
- File I/O
- Debugging
Why it matters
Which language your school teaches (C, Python, Java) matters less than learning to break a problem into small steps a computer can follow. The habits you form here, such as naming variables well, splitting code into functions and reading errors, pay off in every course for four years.
What to know
- Variables, types and expressions: how a value is stored in memory.
- Controlling flow with conditionals and loops; why infinite loops happen.
- Writing functions: parameters, return values, scope.
- Arrays and strings; if you study C, pointers and memory addresses.
- Reading from and writing to files.
- Using a debugger: stepping through code and watching variables.
Practice and projects
- Solve 5-10 small exercises after every topic; reading is not enough, you have to type it.
- Write a small console app at the end of the term: a grade calculator, hangman, a simple inventory tracker.
- Keep your code in Git and push it to GitHub; make it a habit from day one.
Common mistakes
- Copying code and moving on once it runs. If you cannot close it and rewrite it yourself, you have not learned it.
- Changing code at random without reading the error message.
- Writing the whole program as one long main function.