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

Slides:



Advertisements
Similar presentations
VCE SD Theory Slideshows By Mark Kelly Vceit.com Debugging Techniques.
Advertisements

Code Correctness, Readability, Maintainability Svetlin Nakov Telerik Corporation
Unit 6 Assignment 2 Chris Boardley.
Transition from C to C++ …and a Review of Basic Problem Solving.
Chapter 1. The Phases of Software Development. Data Structure 2 Chapter outline  Objectives  Use Javadoc to write a method’s complete specification.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
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,
Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 2: Your First Program.
© 2005 by Prentice Hall Chapter 5 Maintaining Information Systems Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph.
Introduction to Refactoring Excerpted from ‘What is Refactoring?’ by William C. Wake and Refactoring: Improving the Design of Existing Code by Martin Fowler.
COMP205 Comparative Programming Languages Part 1: Introduction to programming languages Lecture 3: Managing and reducing complexity, program processing.
Fall 2007CS 2251 Software Engineering Intro. Fall 2007CS 2252 Topics Software challenge Life-cycle models Design Issues Documentation Abstraction.
Chapter 1 Principles of Programming and Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Chapter 16 Maintaining Information Systems
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
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
Simple Program Design Third Edition A Step-by-Step Approach
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
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.
Software Testing and Maintenance 1 Code Review  Introduction  How to Conduct Code Review  Practical Tips  Tool Support  Summary.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Software Engineering CS3003 Lecture 4 Code bad smells and refactoring.
The Software Development Process
Designing Classes. Software changes Software is not like a novel that is written once and then remains unchanged. Software is extended, corrected, maintained,
PROGRAMMING GUIDELINES. SYLISTIC GUIDELINES  Meaningful names for identifiers Identifiers identify different parts of C++ programs. Identifiers should.
© 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.
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.
Chapter 2 Principles of Programming and Software Engineering.
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.
School of Business Administration
Principles of Programming & Software Engineering
Software Engineering Spring Term 2017 Marymount University
Advanced Computer Systems
Software Construction
Software Testing.
Working with Java.
Algorithms II Software Development Life-Cycle.
Lecture 1 Introduction Richard Gesick.
Chapter - 8 Implementation.
Principles of Programming and Software Engineering
The Pseudocode Programming Process
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
© 2015 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 15 Debugging.
Coding Concepts (Basics)
Unit 6 Assignment 2 Chris Boardley.
Chapter 1 Introduction(1.1)
Chapter 15 Debugging.
Maintaining Information Systems (SAD- 18)
Chapter 16 Maintaining Information Systems
Chapter 9: Implementation
Presentation transcript:

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: –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: –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