CS 1308 Computer Literacy and The Internet Software.
-
Upload
colin-fitzgerald -
Category
Documents
-
view
216 -
download
0
Transcript of CS 1308 Computer Literacy and The Internet Software.
CS 1308 Computer Literacy and The Internet
Software
From Hardware to SoftwareWe 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.
How do we get the computer to help us?
Write software.Figure out what problem we are trying to
solveOften the hardest part!
Solve the problemIf you can’t solve the problem, you can’t tell a computer
how to solve it.Ask questionsLook for familiar things (patterns)Divide and conquer
Create an algorithm from your solutionWrite the software
Assume the low-level circuits and hardware workTest the software
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?
Look for Familiar ThingsYou should never reinvent the wheelIn computing, you see certain problems
again and again in different guisesA good programmer sees a task,
or perhaps part of a task (a subtask), that has been solved before and plugs in the solution
Divide and ConquerBreak 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
AlgorithmsAlgorithm 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
The Interactions Between Problem-Solving Phases
Sample Algorithm
Examples of computer languagesThe if statement allows the program to test the
state of the program variables using a Boolean expression
CompilersCompiler 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
Compilers
Figure 8.1 Compilation process
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!
ReviewComputers need softwareYou 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.