Download presentation
Presentation is loading. Please wait.
Published byColin Fitzgerald Modified over 9 years ago
1
CS 1308 Computer Literacy and The Internet Software
2
From Hardware to Software We know what a computer looks like and how it works. We have looked at machine language programming. Low level (because it is more closely tied to the hardware) Now we need to look at a more reasonable way of programming. Why are we looking at programming? Chances are you will never write a program. It is very likely that at some point you will help gather requirements for somebody else as a expert in your area. The more you know about their process, the more help you can be in getting what you want.
3
How do we get the computer to help us? Write software. Figure out what problem we are trying to solve Often the hardest part! Solve the problem If you can’t solve the problem, you can’t tell a computer how to solve it. Ask questions Look for familiar things (patterns) Divide and conquer Create an algorithm from your solution Write the software Assume the low-level circuits and hardware work Test the software
4
Ask Questions... …to understand the problem What do I know about the problem? What is the information that I have to process in order the find the solution? What does the solution look like? What sort of special cases exist? How will I recognize that I have found the solution?
5
Look for Familiar Things You should never reinvent the wheel In computing, you see certain problems again and again in different guises A good programmer sees a task, or perhaps part of a task (a subtask), that has been solved before and plugs in the solution
6
Divide and Conquer Break up a large problem into smaller units that we can handle Applies the concept of abstraction The divide-and-conquer approach can be applied over and over again until each subtask is manageable
7
Algorithms Algorithm A set of instructions for solving a problem or subproblem in a finite amount of time using a finite amount of resources The instructions must be unambiguous
8
The Interactions Between Problem- Solving Phases
9
Sample Algorithm
10
Examples of computer languages The if statement allows the program to test the state of the program variables using a Boolean expression
11
Compilers Compiler A program that translates a high-level language program into machine code High-level languages provide a richer set of instructions that makes the programmer’s life even easier
12
Compilers Figure 8.1 Compilation process
13
When does the all the work happen? The coding and testing are the smallest parts of the software lifecycle. The longest is Maintenance. Software may take a year to write, but it may be out in the field for 10-20 years!
14
Review Computers need software You have to know what problem to solve and be able to solve it. We typically write programs in a “high level” language and use other programs to translate them into a specific machine language. Software will need updates and bug fixes for as long as it is being used. And that can be a long time.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.