290 likes | 400 Views
Explore the systematic study of computing systems, algorithms, programming, and software engineering. Learn about the importance of testing, verification, and implementing methods. Discover relevant areas like data structures, computation limits, and artificial intelligence models.
E N D
What is Computer Science? • The systematic study of computing systems and computation. The body of knowledge resulting from this discipline contains theories for understanding computing systems and methods; design methodology, algorithms, and tools; methods for the testing of concepts; methods of analysis and verification; and knowledge representation and implementation. • Source: http://www.hpcc.gov/pubs/blue94/section.6.html • Closer to Mathematics than other sciences • Math is declarative • CS is imperative CS1 - CS and Software Development
Euclid • Was a mathematician • Developed a systematic method for computing the GCD • Did not consider how his method could be implemented • Did not reason about the properties that an implementation might exhibit CS1 - CS and Software Development
Augusta Ada Byron • Was a Computer Scientist • Studied methods of computing (Babbage’s analytical engine) • Reasoned about the implementations and their properties CS1 - CS and Software Development
Areas of Computer Science • Some areas in computer science include: • Fundamental algorithm concepts • Computer organization (“von Neumann”) • Programming • Data structures and abstraction • Limits of computability • Operating systems and security • Distributed computing and networks • Models in artificial intelligence • File and database systems • Parallel computation • Note that programming is only one of these topics areas. CS1 - CS and Software Development
Approaches to Teaching CS • Breadth first • Cover several topic areas • Not covered in depth • Depth first • Concentrate on one topic area • Where do CS1/2/3 fall? • Depth first • Study of programming CS1 - CS and Software Development
Computer Engineering • Focus on the hardware • Not just assembly of pre-made components • Machine level, bit-head sort of work • Programming is done in C, or assembly language. • Might write a device driver or small OS • You “talk” to the hardware CS1 - CS and Software Development
The Other Three • Think about a car… • There are people who design and build cars • There are people who maintain cars and keep them running smoothly • There are people who use cars to solve problems • Delivery Company, Race Car Driver, you … CS1 - CS and Software Development
Information Technology • Primary focus is applying computing technology to solve problems • User-oriented • Craft Solutions using existing technology • In the Car example • Automotive Mechanics • Computing Example • Design and implement a web site CS1 - CS and Software Development
Computer Science • Study the science of computing • Programming • Algorithms • Theory • In the Car example • Develop more efficient engines • Computing Example • Design and build a web browser CS1 - CS and Software Development
Software Engineering • How to engineer software • Programming “in the large” • Process • Verification • In the car example • Build an engine that will work for 200,000 miles • Computing Example • Build an extendable web browser within 24 months CS1 - CS and Software Development
Code Size CS1 - CS and Software Development
Size Categories CS1 - CS and Software Development
Disasters • 7 deaths of cancer patients were due to overdoses of radiation resulting from a race condition in the Therac-25 software. • On June 4, 1996 an unmanned Ariane 5 rocket launched by the European Space Agency exploded just forty seconds after its lift-off. The destroyed rocket and its cargo were valued at $500 million. It turned out that the cause of the failure was a software error in the inertial reference system. • The 1988 shooting down of the airbus 320 by the US Vicennes was attributed to the cryptic and misleading output displayed by the tracking software. • An Iraqi scud missile hit Dhahran barracks, leaving 28 dead and 98 wounded. The incoming missile was not detected by the patriot defenses, whose clock had drifted .36 seconds during the 4-day continuous siege. CS1 - CS and Software Development
So What Does All This Mean? • Seat of your pants programming may work here, but it won’t cut it in industry!! • There is an urgent need to • Understand computation • Develop techniques to build and manage large software systems • Test and verify that software works correctly • This is part of what software development is all about CS1 - CS and Software Development
The Software Life Cycle • Requirements or analysis • Determine and spell out the details of the problem • Design • Determine how to solve the problem • Coding • Testing • Verify that the program solves the problem • Verify that the requirements have been satisfied • Maintenance CS1 - CS and Software Development
Waterfall Model Requirements/Analysis Design Coding Testing Maintenance CS1 - CS and Software Development
Documents • The work done in each stage is typically summarized in a document • Requirements document • A description of what the customers and users expect the system to do • Specifications • A detail description of how the software system will behave • Design • A description of the various components in the system and how they will interact CS1 - CS and Software Development
Testing • What does it mean to say a program is correct? • That it satisfies the requirements • Testing verifies that the program behaves as stated in the requirements • Note that incorrect, or incomplete requirements could result in an incorrect program CS1 - CS and Software Development
Debugging • Debugging is not testing • When testing you are trying to verify that the software meets the requirements • When debugging you are trying to correct an error • If you are debugging, your software is broken!! • Bugs don’t crawl into your program – you put them there – THEY ARE ERRORS!! CS1 - CS and Software Development
The First Bug CS1 - CS and Software Development
Testing is Not Easy • It is hard to come up with good test cases • The goal of testing is to find errors • Testing can never prove the absence of errors • Testing requires you to assume that you will find errors in your code CS1 - CS and Software Development
Types of Testing • Unit Test • The testing of individual routines and modules but not whole systems • System Test • The testing of the entire system, or a significant portion of it CS1 - CS and Software Development
Test Cases • Equivalence Partitioning • A good test case covers a large part of the possible input • Error guessing • Developing test cases based on where you think the errors will occur • Boundary Analysis • Write tests that exercise the boundary conditions CS1 - CS and Software Development
Data • Classes of bad data • Too little data • Too much data • The wrong kind of data • The wrong size of data • Classes of good data • Nominal cases • Maximum/Minimal normal CS1 - CS and Software Development
Show Me the Requirements • Requirements can come in many forms • Formal requirements document • Here this is a homework assignment • Module, function, class, method specifications • Pseudo-code • Logic specifications • Functional specification CS1 - CS and Software Development
RULE #1 • You must test every piece of code that you write for this course • If you want help from me or any of the TAs you must show test code first CS1 - CS and Software Development
RULE #2 • Don’t be afraid to write throw away code • When testing you will probably write code that will never “see the light of day” • You should write lots of small programs to test and that allow you to experiment with programming CS1 - CS and Software Development
RULE #3 • Always take baby steps • Start a task by picking the smallest easiest portion to do first • Test what you write before you move on to tackle another task • Always try to build on the simple parts that you know work correctly CS1 - CS and Software Development
RULE #4 • Don’t re-invent the wheel • Before writing anything – check to see if it has already been written (by you or someone else) • Feel free to re-use code (anything I post is yours to use) BUT MAKE SURE YOU CREDIT THE SOURCE CS1 - CS and Software Development