Download presentation
Presentation is loading. Please wait.
Published byBrook Washington Modified over 9 years ago
1
Computer Programming I An Introduction to the art and science of programming with C++
2
Some thoughts on Programming 1.The Human Race does not yet know how to program. 2.When the failures occur, (and they occur 75% of the time!) they occur because of a failure to control complexity. 3.Programming is both an art and a science. 4.Most software projects fail. The odds of failure rise sharply with how hard it is for one person to keep track of what is going on. The more people you have, and the longer it is expected to take, the worse your odds are.
3
Some thoughts on Programming 5When we start a project we inevitably do not know as much as we will learn. Therefore we will make decisions that in hindsight would be better being changed. Plan ahead. 6In software more than any other field, it is absolutely madness to assume. 7That which is not automated does not reliably happen. 8Expect the worst - don't always think that the user's input will be nice, clean, and tidy.
4
Some thoughts on Programming 9Programming is about finding patterns. 10If debugging is the process of removing bugs, then programming must be the process of putting them in.
5
Programming Languages What is a programming language? Compiled vs. Interpreted High-Level vs. Low-Level Programming languages Binary Code Assembly Language C
6
Programming Languages C++ Java Other Languages?
7
Tools of the trade Text Editor Source Control System Compiler Linker (for some languages) Interpreter (for some languages) Runtime systems (for some languages)
8
The Role of Abstraction in Programming The computer knows only 1’s and 0’s This is a lie. The computer doesn’t even know what a 1 or 0 is The computer has transistors that can have one of two voltages. At bottom, all software comes down to occurrences of those two voltages. There is nothing else.
9
The Role of Abstraction in Programming So if a computer doesn’t understand a 1 or 0, it certainly doesn’t understand its processors instructions, that is to say assembly language. It needs a program called an assembler to turn it into binary code. Similarly, a computer doesn’t understand C code. It needs a compiler to compile it to assembly code or directly to binary code. Moving up in abstraction from C brings us to C++
10
C++ Bjarne Stroustrup Bjarne Stroustrup created C++ in 1985Bjarne Stroustrup C++ is a general purpose programming language with a bias towards systems programming that: is a better C supports data abstraction supports object-oriented programming supports generic programming.
11
C++ - What is object oriented programming Procedural Programming Object Oriented Functional Programming
12
Roles for Programmers Code Designer Code Writer – (programmer, developer) Code Tester Writing large, complex software requires many people working together
13
Code This course concentrate on the role of writing code. Churning out correct, maintainable, flexible, clean, fast code. Correct – above all, the code must do what you want it to do Time passes, things change, and code needs to be modified. Your code has to be written in a way that it will be easily modifiable
14
Code So your code needs to be modifiable. To be modifiable, code needs to be flexible and maintainable. To be flexible and maintainable, code needs to be clean and clear. Finally, a program needs to run as fast as it needs to run. This depends very much on the type of application
15
Next Week Beginning to write C++ code
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.