14
CS 1308 Computer Literacy and The Internet Software

CS 1308 Computer Literacy and The Internet Software

Embed Size (px)

Citation preview

Page 1: CS 1308 Computer Literacy and The Internet Software

CS 1308 Computer Literacy and The Internet

Software

Page 2: 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.

Page 3: CS 1308 Computer Literacy and The Internet Software

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

Page 4: CS 1308 Computer Literacy and The Internet 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?

Page 5: CS 1308 Computer Literacy and The Internet Software

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

Page 6: CS 1308 Computer Literacy and The Internet Software

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

Page 7: CS 1308 Computer Literacy and The Internet Software

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

Page 8: CS 1308 Computer Literacy and The Internet Software

The Interactions Between Problem-Solving Phases

Page 9: CS 1308 Computer Literacy and The Internet Software

Sample Algorithm

Page 10: CS 1308 Computer Literacy and The Internet Software

Examples of computer languagesThe if statement allows the program to test the

state of the program variables using a Boolean expression

Page 11: CS 1308 Computer Literacy and The Internet Software

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

Page 12: CS 1308 Computer Literacy and The Internet Software

Compilers

Figure 8.1 Compilation process

Page 13: CS 1308 Computer Literacy and The Internet Software

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!

Page 14: CS 1308 Computer Literacy and The Internet Software

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.