Chapter 9: Implementation

Slides:



Advertisements
Similar presentations
Code Correctness, Readability, Maintainability Svetlin Nakov Telerik Corporation
Advertisements

Unit 6 Assignment 2 Chris Boardley.
Transition from C to C++ …and a Review of Basic Problem Solving.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
The Pseudocode Programming Process Chapter 9. Outline  Introduction  Design the routine.  Code the routine.  Check the code.  Clean up loose ends.
Software Engineering and Design Principles Chapter 1.
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 4.0.
Objects First With Java A Practical Introduction Using BlueJ Designing object-oriented programs How to write code in a way that is easily understandable,
© 2005 by Prentice Hall Chapter 5 Maintaining Information Systems Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph.
COMP205 Comparative Programming Languages Part 1: Introduction to programming languages Lecture 3: Managing and reducing complexity, program processing.
Chapter 1 Principles of Programming and Software Engineering.
Chapter 1 Program Design
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Chapter 16 Maintaining Information Systems
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 18 Maintaining.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
Introduction to High-Level Language Programming
Refactoring Lecture 5 CIS 6101 Software Processes and Metrics.
1 EECS 231 ADVANCED PROGRAMMING. 2 Staff Instructor Vana Doufexi Ford Building, 2133 Sheridan, #2-229 Teaching Assistant.
1 Shawlands Academy Higher Computing Software Development Unit.
1 Software Construction Software Construction Chapter 1.
System Analysis and Design
Design-Making Projects Work (Chapter7) n Large Projects u Design often distinct from analysis or coding u Project takes weeks, months or years to create.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
Chapter 25 Formal Methods Formal methods Specify program using math Develop program using math Prove program matches specification using.
© 2006 ITT Educational Services Inc. System Analysis for Software Engineers: Unit 3 Slide 1 Chapter 16 Maintaining Information Systems.
SE: CHAPTER 7 Writing The Program
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
COMP 121 Week 1: Testing and Debugging. Testing Program testing can be used to show the presence of bugs, but never to show their absence! ~ Edsger Dijkstra.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 18 Maintaining.
Software Engineering CS3003 Lecture 4 Code bad smells and refactoring.
The Software Development Process
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
1 CS 211 Computer Programming II. 2 Staff Instructor Vana Doufexi Ford Building, 2133 Sheridan, #2-229 Teaching Assistant.
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
1 COS 260 DAY 14 Tony Gauvin. 2 Agenda Questions? 6 th Mini quiz graded  Oct 29 –Chapter 6 Assignment 4 will be posted later Today –First two problems.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Objects First With Java A Practical Introduction Using BlueJ Designing classes How to write classes in a way that they are easily understandable, maintainable.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Chapter 16 Maintaining Information Systems. Objectives:  Explain and contrast four types of system maintenance.  Describe factors affecting maintenance.
The PLA Model: On the Combination of Product-Line Analyses 강태준.
1 Week 8 Software Engineering Fall Term 2015 Marymount University School of Business Administration Professor Suydam.
Implementation Topics Describe –Characteristics of good implementations –Best practices to achieve them Understand role of comments Learn debugging techniques.
School of Business Administration
Principles of Programming & Software Engineering
Software Engineering Spring Term 2017 Marymount University
Advanced Computer Systems
Software Construction
Chapter 18 Maintaining Information Systems
Working with Java.
Testing Tutorial 7.
Algorithms II Software Development Life-Cycle.
Lecture 1 Introduction Richard Gesick.
Principles of Programming and Software Engineering
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Chapter 15 Debugging.
Software Construction
Coding Concepts (Basics)
Software Construction
Unit 6 Assignment 2 Chris Boardley.
Chapter 1 Introduction(1.1)
Programming Logic and Design Fourth Edition, Comprehensive
Chapter 15 Debugging.
Maintaining Information Systems (SAD- 18)
Software Construction
Chapter 16 Maintaining Information Systems
Software Construction
Chapter 18 Maintaining Information Systems
Software Construction
Presentation transcript:

Chapter 9: Implementation

Implementation Topics Describe Characteristics of good implementations Best practices to achieve them Understand role of comments Learn debugging techniques Analyze refactoring

Introduction Implementation: transforming detailed design into valid program Detailed design may be done as part of implementation Faster Less cohesive and less organized Writing code, unit testing, debugging, configuration management

Good implementations Readability Maintainability Performance Traceability Correctness Completeness Other issues: Relative importance ? Tradeoffs ?

Coding guidelines Organization-specific Important for consistency Programmers can get used to them easily Usually mandate: Indenting, formatting Naming conventions (for files, variables etc) Language features to use or avoid

Style issues - I Be consistent and highlight meaning Naming Convey meaning Be consistent Warning: If you can’t think of a good name chances are you don’t understand or the design can be improved Multicultural issues

Style issues - II Separating words, capitalization c_uses_this_style JavaUsesThisOne Indentation and Spacing Function/Method size When is it too big ? When to break ? File naming Error prone constructs

Comments Types: Keep up to date !! Repeat of the code Explanation of the code Marker in the code Summary of the code Description of the code intent External references Keep up to date !!

Debugging Locating and fixing errors in code. Errors noticed by testing, inspection, use. Four phases Stabilization (reproduction) Localization Correction Verification

Debugging II Heuristics: Tools Some routines will have many errors Routines with an error tend to have more New code tends to have more error Particular ones: languages, parts, coders Tools Code comparators Extended checkers (lint) Interactive debuggers Special libraries Others: Profilers, pre/post conditions, test coverage

Assertions Pre-condition: condition your module requires in order to work Post-condition: condition that should be true if your module worked Assertion: Executable statement that checks a condition and produces an error if it is not met Assertions supported by many languages

Performance optimization Performance tradeoffs Readability ? Maintainability ? Correctness is usually more important Profiler: runs a program and calculates how much time it spends on each part Cost-benefit analysis Measure before ‘optimizing’

Refactoring Improving your code style without affecting its behavior Bad Smells Duplicated code Long method Large class Switch statement Feature envy Intimacy Refactorings Extract method Substitute algorithm Move method Extract class