Introduction to C programming/Lectures/Introduction

From Wikiversity
Jump to navigation Jump to search

What is debugging?[edit | edit source]

Debugging is searching for mistakes in your program. No one is perfect, we all make mistakes. Despite having programmed for nearly a decade, I made several errors while writing the first few programs for this class. If you're going to program, you're going to need to learn to debug. This class will teach some basic debugging techniques and common mistakes along with the rest of the material. Don't treat this as a minor part of the class - you will generally spend more time debugging a program than you will writing it.

Software engineering[edit | edit source]

Software engineering is a set of habits and practices that help to make your code easier to read and understand. The easier your code is to understand, the fewer bugs it will have, and the easier they will be to find. It will also make it easier to maintain when you find a bug or want to add a new feature 6 months from now. Trust me, you won't remember how you wrote the code, no matter how much you think you will. Its always best to get into good habits early, so the class will try and teach you how you should do things, as well as just the syntax of the language. Remember, writing good code isn't just for yourself - it helps your coworkers and anyone else who ever has to work with your code.