Docsity

Design and Code Reviews - Introduction to Computing - Lecture Slides, Slides of Introduction to Computing

Partial preview of the text

Download Design and Code Reviews - Introduction to Computing - Lecture Slides and more Slides Introduction to Computing in PDF only on Docsity!

CS101 Introduction to Computing

Lecture 45

Review & Wrap-Up

During the last lecture we discussed Programming Methodology

  • We looked at a few effective programming practices that result in the development of correct programs with minimum effort
  • We also became familiar with testing & debugging

Readable programs are:

  • more readable
  • efficient enough

Design Guidelines

  • Break your code down into short and simple functions (e.g. take the 3 swap statements out from the last example and put them into a function of their own)
  • Do not use global variables

Guidelines for Developing Short Programs

  1. Read, understand the problem
  2. Do you have all the required data?

No: Get it Else assume it. State it explicitly

  1. Do the design
  2. Write test cases 7
  3. Write the code on a piece of paper
  4. Hand-check it
  5. Type it in
  6. Run & check it on test cases
  7. Errors? fix & redo 9
  8. Done!

Design & Code Reviews

  • Probably the most efficient way of improving the a program
  • Being humans, at time we see what is supposed to be there instead of what is actually there
  • Another pair of eyeballs may not have the same problem, especially if they are were not involved in building the design or code

Types of Errors

  • Syntax errors
  • Semantic errors
  • Run-time errors

Today’s Goal: (Review & Wrap-Up)

  • To review some of the interesting ideas that we discussed over the last 44 lectures
  • Please note that this lectures is not a comprehensive review, just a sampler!

13

What value do

computers bring?

fast

14

bored

storage

Progression of Computer Technology

  1. Mechanical computing
  2. Electro-mechanical
  3. Vacuum tube
  4. Transistor (the current state-of the-art)
  5. Quantum computing

Quantum Computers

  • Quantum computers may one day be millions of times more efficient than the current state-of-the- art computers …
  • as their quantum mechanical nature will allow them to examine all possible answers to a question, simultaneously

The Semantic Web

Whereas, today’s Web’s content is designed for humans to read; the Semantic Web’s content will be designed for computers to understand meaningfully

Internet: Network of Networks

20

  • A large number of networks, interconnected physically
  • Capable of communicating and sharing data with each other
  • From the user’s point view, Internet – a collection of interconnected networks – looks like a single, unified network