Software Design. Outline Announcements: –Homework I on web Friday –Starting Friday, Wed. and Fri. lectures will meet in ACCEL “Green” Room in Carpenter.

Slides:



Advertisements
Similar presentations
CHAPTER 1 SOFTWARE DEVELOPMENT. 2 Goals of software development Aspects of software quality Development life cycle models Basic concepts of algorithm.
Advertisements

Software Design Designer clothes?. Outline Announcements: –Homework I on web, due Wed., 5PM by –Starting Friday, Wed. and Fri. lectures will meet.
Computers Are Your Future
Programming Logic and Design Fourth Edition, Introductory
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Object-Oriented Analysis and Design
CIS 404: Survey and Use of Software Libraries for Scientific Computing Andrew Pershing 3134 Snee Hall
CS350/550 Software Engineering Lecture 1. Class Work The main part of the class is a practical software engineering project, in teams of 3-5 people There.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
CIS 401: Applied Scientific Computing with MATLAB Andrew Pershing 3134 Snee Hall
Understanding the Mainline Logical Flow Through a Program (continued)
COBOL for the 21 st Century Stern, Stern, Ley Chapter 1 INTRODUCTION TO STRUCTURED PROGRAM DESIGN IN COBOL.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 3P. 1Winter Quarter Structured Engineering.
1 Chapter 2 Problem Solving Techniques INTRODUCTION 2.2 PROBLEM SOLVING 2.3 USING COMPUTERS IN PROBLEM SOLVING : THE SOFTWARE DEVELOPMENT METHOD.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 3P. 1Winter Quarter Structured Engineering.
Software Development Concepts ITEC Software Development Software Development refers to all that is involved between the conception of the desired.
Introduction to High-Level Language Programming
Python Mini-Course University of Oklahoma Department of Psychology Day 1 – Lesson 2 Fundamentals of Programming Languages 4/5/09 Python Mini-Course: Day.
Program development & programming languages Chapter 13.
Structured COBOL Programming, Stern & Stern, 9th edition
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
The NetBeans IDE CSIS 3701: Advanced Object Oriented Programming.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Outline Announcements: –Homework I on web, due Fri., 5PM by –Small error on homework –Wed and Fri in ACCEL, Attendance required –LAST DAY TO ADD/DROP!
CS 403: Development of Scientific Computing Programs Andrew Pershing 3134 Snee Hall
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
Problem Solving using the Science of Computing MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
240-Current Research Easily Extensible Systems, Octave, Input Formats, SOA.
Computing and SE II Chapter 9: Design Methods and Design Models Er-Yu Ding Software Institute, NJU.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
Programming and Languages
The Software Development Process
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 3P. 1Winter Quarter Structured Engineering Problem Solving and Logic.
Data Structures Using C++ 2E
EGR 115 Introduction to Computing for Engineers Branching & Program Design – Part 1 Monday 29 Sept 2014 EGR 115 Introduction to Computing for Engineers.
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
Input Output Garbage In, Garbage Out. Outline Announcements: –Homework III: due Today. by 5, by Discuss on Friday. –Homework IV: on web, due following.
The Hashemite University Computer Engineering Department
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
Outline Announcements: –HW I key online this afternoon –HW II due Friday –Sign up to discuss projects Debugging Testging for correctness.
CMSC 2021 Software Development. CMSC 2022 Software Development Life Cycle Five phases: –Analysis –Design –Implementation –Testing –Maintenance.
Programming. In your own words, explain what an algorithm is, and give an example of how people use algorithms every day.
CIS 401: Applied Scientific Computing with MATLAB Andrew Pershing 3134 Snee Hall
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
CIS 403: Development of Scientific Computing Programs Andrew Pershing 3134 Snee Hall
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Part of the Mathematics glossary: An algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem. The word derives from the name.
OCR A Level F453: High level languages Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented,
Development Environment
Programming Languages
Lecture 1 Introduction Richard Gesick.
CSCI-235 Micro-Computer Applications
Part 3 Design What does design mean in different fields?
Introduction CSE 1310 – Introduction to Computers and Programming
Chapter 1 Introduction(1.1)
Language Issues Misunderstimated? Sublimable? Hopefuller?
Chapter 2- Visual Basic Schneider
ICT Gaming Lesson 2.
Advanced Programing practices
Presentation transcript:

Software Design

Outline Announcements: –Homework I on web Friday –Starting Friday, Wed. and Fri. lectures will meet in ACCEL “Green” Room in Carpenter –Today(Wed.) we will meet in 314 Hollister ACCEL is closed! Updated Syllabus The Design process Importance of good design Design techniques

General Development Development is the process by which things get made (e.g. engineering) The development process is different depending on the product –driven by cost, complexity, and reliability considerations

General Development Building a house –architects/engineers create detailed blueprints –general contractor organizes groups of workers for specific tasks foundation walls, windows & doors electrical plumbing interior finishing –Good design is important because it is costly to rebuild (materials, time) –Good management is important to avoid having workers sitting idle

General Development Making a movie –Producer hires writers, director, actors and lines up investors –screenwriter creates script –director plans shoots from the script choose locations, organize personnel, timeline –movie is filmed –movie is edited and released Movies require lots of (expensive) people, so it is critical that time is used efficiently

Development Process I 1. Create a text file containing commands in some language 2. Pass the file to the compiler 3. Run the executable

Development Process II 1.Design: What will the program (or modification) do? How will it work? 2.Specification--formal statements of what code will do 3.Prototyping--a “proof-of-concept” version. Simple version written in an interpreted language (Matlab, Python) 4.Implementation: write the code 5.Build: Get it to compile and run a) Debug I: find and fix syntax errors b) Debug II: find and fix semantic errors (testing) 6.Improve performance through tuning or re-design

Development Process II (typical) 1. Start writing code, design=rewrite 2. Compile 3. Debug, debug, debug

Importance of Design in Scientific Software Development Despite our lowly status, we are paid for scientific results, not time spent hacking PositionBase SalaryHourly undergrad0-$3500 (summer)$0-7.29/hr grad$15K/year$8.33/hr post. doc.$32K/yr$15.62/hr assist. prof.$60K/yr$31.25/hr Arnold$30million for 24x80 hr weeks $15,625/hr

Importance of Design in Scientific Software Development Even though our wages are low, good design is important for scientific programming –Reduces time spent debugging –Makes code easier to use (more people citing your work) –Makes code easier to extend (better luck next time) –Makes code easier to describe to colleagues

Definition of Design The design process will lead to a description of what your program will do and how it is organized. Some important questions to answer –How will you get data in and out of your program? –What tasks must your program perform? –How will data flow through your program?

Good Design An important characteristic of good design is modularity –Code should be divided into simple pieces (subroutines, method), each solving a specific task –Related pieces should be grouped together in a single file (module, class) Object oriented languages (Java, C++) are inherently modular

Design Techniques Flow charts –Visual representation of your program –This should be at a high-level Universal Modeling Language (UML) –Industry-standard for design and management of object oriented development –Specifies several diagram types--each one takes a different view of a project

Stealing from UML Industrial UML-systems are overkill for most scientific problems, but we can borrow some useful views of our programs –Class Diagram--describe an object’s fields (data) and methods (functions) –State Diagram--describe how an object’s state (data) changes

Stealing from UML Class Diagrams –Box with three regions: name, fields (data), methods (subroutines) fields methods

Stealing from UML State Diagrams –Start state (), named states (ovals), end state (  ) –Connect with arrows –Diagrams can branch when conditions are satisfied (if-then-else) Soaking Normal Rinsing Spinning Delicate Check Settings Set to delicate Normal

Iterative Refinement Iterative refinement is an important design technique –Takes a top-down view –Enforces modularity Iterative refinement is a 3 step process 1. Describe--what will your program/subroutine do? 2. Divide--what are the essential tasks? 3. Repeat--subdivide tasks if possible.

Iterative Refinement I.Do Laundry A.Wash B.Dry C.Fold

A.Wash 1.Get clothes 2.Place in washer 3.Configure washer 4.Start B.Dry 1.Move from washer to dryer 2.Configure dryer 3.Start C.Fold 1.Remove from dryer 2.If (shirt) then a. Fold shirt else b. Fold pants Do Laundry

Main Point of Design –Think before you code!

Model Problem: Advection- Diffusion-Reaction in 1D Related equations occur in many fields –Fluid flow in atmosphere, ocean, lakes, universe –Biological development –Chemistry –Ecology

RAD This is not a math class, nor is it a course on numerical methods. Focus on the big picture (what we’re doing, what the components are) rather than on the details Total Change Advection Diffusion Local Change Or Growth =+ +

Numerical Solution We start with an initial distribution of C over the interval [0 1] Divide [0 1] into discrete points separated by dx C(x,t+dt) will depend on C(x), C(x-dx), & C(x+dx) I’ve placed a full derivation of the model problem on the web site x C(x,t) C(x,t+dt)

Numerical Solution We have a system of n linear equations with n unknowns (C 1, C 2,…, C n ) In linear algebra, we write this as a matrix problem: –A t *C t+1 =f t –Where f t depends on C t, u, and reaction data A t depends on k There are many ways to solve these problems

Designing RAD1 1.Get C0, u, k, dt,t, T, m, L (dx=L/(m-1)) from user 2.Build matrix A using k, dt, dx 3.Build RHS vector f using u, k, and reaction data 4.Solve A*C=b for C 5.t=t+dt 6.If(t<T) a)Copy C=C0 b)Change u and k if needed c)Repeat 2-6 Else d) Output C and quit

Designing RAD1D State diagram Get Inputs Build RHS t=t+dt Output C Build A t<T t>=T Solve AC=RHS