Collaborative Design Fundamentals for Software Engineers Iv
Total Page:16
File Type:pdf, Size:1020Kb
A.HAMILTON-WRIGHT,K.RAYMOND ANDD.A.STACEY COLLABORATIVEDESIGN FUNDAMENTALSFOR SOFTWAREENGINEERS ONLINE TEXT FOR CIS*2250: SOFTWAREDESIGNII UNIVERSITYOFGUELPH,SCHOOLOFCOMPUTERSCIENCE Copyright © 2020 A. Hamilton-Wright, K. Raymond and D.A. Stacey published by university of guelph, school of computer science https://qemg.uoguelph.ca/cis2250book Provided under a Creative Commons Attribution-NonCommercial-NoDerivatives license. https://creativecommons.org/licenses/by-nc-nd/4.0/ First printing, July 2020 Contents 1 Introduction to the Course 1 1.1 What is Software Design? 1 1.1.1 Concept Maps of the Main Concepts in the Course 1 1.1.2 Other Tools and Tips for Success 3 1.1.3 Goals for the Semester 3 1.2 Course Logistics 4 1.2.1 Lectures 4 1.2.2 Labs 4 1.2.3 Readings 5 1.2.4 Design Challenges 5 1.2.5 Team Project 6 1.3 Getting Prepared for the Term 6 1.4 Review Questions 7 1.5 Review Questions - Chapter 1: Introduction to the course 7 I Initial Organization 9 2 Pair Programming 13 2.1 What is Pair Programming? 13 2.2 Why Pair Programming? 13 2.3 The Pair Programming Protocol 14 2.3.1 Pair Programming: Stage 1 14 2.3.2 Pair Programming: Stage 2 14 collaborative design fundamentals for software engineers iv 2.4 The Partners in Pair Programming 14 2.4.1 The Pilot (Driver) 15 2.4.2 The Co-pilot 15 2.5 Using Pair Programming for the Team Project 15 2.6 Pair Programming Hints 16 2.6.1 Let the pilot have time to type 16 2.6.2 Start your pairing session by establishing a few rules and guidelines for behaviour 16 2.6.3 There will be disagreements 16 2.6.4 If your partner is not listening then take action! 17 2.6.5 Ask questions 17 2.6.6 Be considerate 17 2.6.7 Practice test-driven development 18 2.7 Pair Programming Problem Partner Types 18 2.7.1 The Cowboy 18 2.7.2 The Strong, Silent Type 19 2.7.3 The Passenger 19 2.7.4 The Party Animal 20 2.7.5 The Ghost 20 2.8 Summary 21 2.9 Questions - Chapter 2: Pair Programming 21 3 Scripting Languages, and in particular, Perl 23 3.1 Scripting Languages – Choosing The Right Tool for the Right Job 23 3.2 Compiler versus Interpreters 23 3.3 Dynamic Typing 23 3.4 Memory Management 24 3.5 Object-Oriented Design 24 3.6 Data Structures 24 3.7 What is Perl? 24 3.8 Script Syntax 25 3.8.1 Basic Syntax 25 3.8.2 Variables 25 3.8.3 Perl Functions 26 3.8.4 Scalars 28 3.8.5 Strings 28 collaborative design fundamentals for software engineers v 3.9 Perl on the Internet 29 3.9.1 Tutorials 29 3.9.2 Using Google to Answer Questions 29 3.9.3 Perl Code to Help You Learn Perl 29 3.10 Analyzing and Evaluating Perl Code 31 3.10.1 What is Perl::Critic? 31 3.10.2 Using the Perl::Critic Website 31 3.10.3 Severity Levels 31 3.11 Questions - Chapter 3: Perl Programming 34 II Understanding our Resources 37 4 Reading Text Based Files 39 4.1 Types of Files 39 4.1.1 ASCII and/or Unicode 39 4.2 Reading Text Files 40 4.2.1 Text file Organization 41 4.2.2 Reading a file 41 4.3 Reading a file in perl 41 4.4 BOM (Byte Order Mark) 42 4.5 Questions - Chapter 4: Reading Text Based Files 43 5 Self-study Seminar Preparation: Reading with a Purpose 45 5.1 What is Reading with a Purpose? 45 5.2 How to Read with a Purpose 45 5.2.1 Example: Excerpt from Data Finds Data by Jonas and Sokol 47 5.2.2 After Reading 49 5.3 How to Read an Article: Key Steps 50 5.3.1 Have a purpose 50 5.3.2 Make notes 50 5.3.3 Organize your notes after you finish the article 50 5.3.4 Do some background research 50 5.3.5 Re-read the article 50 5.3.6 Critically evaluate what you have read 50 collaborative design fundamentals for software engineers vi 5.4 Critical Evaluation: Questions to ask about an article 51 5.4.1 What is this article about? (What is its “thesis?”) 51 5.4.2 What is the contribution? (What new thing does this article contribute to the world?) 51 5.4.3 What is its value? (How important is it to have this new thing?) 51 5.4.4 How do the authors evaluate their contribution? (How do they show that what they have done is of value?) 52 5.4.5 What questions do you have after having read this article? 52 5.5 Checklist for Reading Articles 53 6 Reading Code 55 6.1 Purpose or Goal 55 6.2 Who are you? 55 6.3 Reading Techniques 56 6.3.1 What’s in a Name? 56 6.3.2 Loops 56 6.3.3 Branching – reading if statements 57 6.3.4 Libraries and Modules 57 6.4 Modularity 58 6.5 Problem Areas 58 6.6 Example Checklist of Issues in the C Language 58 6.7 How to Approach Reading Code 60 6.7.1 Don’t just be passive! 60 6.8 Questions - Chapter 6: Reading Code 61 7 Code Review 63 7.1 Objectives 63 7.2 Benefits 63 7.3 Logistics of a Code Review 64 7.4 Code Ownership 64 7.5 Pitfalls to Avoid 64 7.6 Checklist for a Code Review 65 7.7 Questions - Chapter 7: Code Review 65 collaborative design fundamentals for software engineers vii III Design as an Intentional Activity 67 8 Design: What makes it sing, and what makes it stink? 69 8.1 Defining Design 69 8.1.1 What makes design good? 69 8.1.2 What makes design bad? 70 8.2 Bad Design 71 8.2.1 An Example of Bad Design – The Remote Control 71 8.2.2 Historical Design Artifacts 74 8.2.3 Sometimes Awkward is Good 76 8.2.4 Making Observations 77 8.2.5 Give us a Clue! 78 8.2.6 Do We Really Need a Clue! 80 8.2.7 Who needs standards? 80 8.2.8 Working for Everyone 81 8.2.9 Working under Bad Conditions 82 8.2.10 Recipe for disaster. 83 8.2.11 Listen to the user 83 8.2.12 I’ll see you to the door 84 8.3 Good Design 90 8.3.1 What is Good Design? 90 8.3.2 Principles of Good Design 90 8.4 Questions - Chapter 8: Design: What makes it sing, and what makes it stink? 92 9 Data Design 93 9.0.1 Definitions 93 9.1 Characteristics of Data 93 9.1.1 Size 94 9.1.2 Latency 95 9.1.3 Age / Timeliness 95 9.1.4 Location 95 9.1.5 Importance / Value 95 collaborative design fundamentals for software engineers viii 9.1.6 Accuracy 96 9.1.7 Verifiable 96 9.1.8 Accessible 96 9.1.9 Usefulness (Utility) 96 9.2 Data Design Problem Solving: Data Encoding 96 9.2.1 Smaller Storage Requirements 97 9.2.2 Eliminate or reduce data entry errors 97 9.2.3 Easier to check for errors 98 9.2.4 Easier to Accommodate Change 98 9.2.5 More Robust 99 9.3 Questions - Chapter 9: Data Design 100 IV Working Together As Designers 101 10 Group (Team) Work 103 10.1 Product Owner: 103 10.2 Team Leader/Project Manager: 104 10.3 Process Co-Ordinator/SCRUM Master: 104 10.4 Architect/Conceptual Interaction Lead: 104 10.5 Communication Officer/Documentation Lead: 104 10.6 Quality Assurance/Testability Lead: 105 10.7 Archivist/Revision Control Master: 105 10.8 Activities that Span All Roles 105 10.8.1 Writing the notes from each meeting: 105 10.8.2 Writing the code itself: 105 10.9 Team Work: How to make things go (well) 107 10.9.1 Don’t wait for disaster! 107 10.9.2 Integrated Goals are Key 107 10.9.3 Share the Load, Share the Learning 108 10.9.4 Take Individual Responsibility 109 10.9.5 The Whole Thing is Important 109 collaborative design fundamentals for software engineers ix 10.9.6 You are Not A Mindless Cog 110 10.9.7 You are Still Not A Mindless Cog 110 10.9.8 Don’t Be Complicit 111 10.9.9 You Have to Be There for Your Team 111 10.9.10 Evaluations are Important 111 10.9.11 Evaluations You Don’t Like Are Still Evaluations 112 10.9.12 Documentation is Key 113 10.9.13 We are Not Mindless Coders 113 10.9.14 Don’t Put the Dead in Deadline 113 10.9.15 It’s Important to Work Together 114 10.10Strategies for Success 114 10.11Questions - Chapter 10: Group (Team) Work 114 11 Agile Software Development 117 11.1 Software Development Methodologies 117 11.1.1 Software Development Lifecycles Examples 117 11.2 Agile Manifesto 118 11.2.1 Principles of the Manifesto 118 11.3 Extreme Programming 118 11.4 Scrum 119 11.4.1 What is Scrum? 119 11.4.2 Scrum And The People: Primary Scrum Roles 120 11.4.3 Scrum and its Activities 120 11.4.4 Scrum and its Artifacts 120 11.4.5 Backlogs 121 11.5 The Sprint 121 11.5.1 Daily Scrums 122 11.5.2 Using the Backlogs 123 11.5.3 Keeping Track – Using a Scrum Board 125 11.5.4 Scrum Task Board Components 125 11.5.5 Burndown Charts 126 collaborative design fundamentals for software engineers x 11.6 Test First 128 11.7 Refactoring 128 11.7.1 Refactoring Examples 128 11.7.2 Refactor Mercilessly 129 11.8 Scrum: The Important Ideas 129 11.9 Questions - Chapter 11 129 12 Problem Solving 131 12.1 Problem Solving is a Four Step Process 131 12.1.1 Understand the problem/current situation 131 12.1.2 Identify the cause(s) of the problem 131 12.1.3 Develop an effective and efficient action plan 132 12.1.4 Execute the plan, analyze its effectiveness and modify it until the problem is solved 132 12.2 Checklists 132 12.2.1 What is a Checklist? 132 12.2.2 What is on a Checklist? 132 12.2.3 Benefits of Checklists 133 12.3 What is Debugging? 134 12.3.1 Studying Debugging 134 12.3.2 How to Debug Software using the Debugging Cycle 134 12.3.3 Code Complete’s Devil’s Guide 134 12.3.4 Good Debugging Strategies 135 12.3.5 Errors To Look For 135 12.3.6 Debugging To Do List 135 12.3.7 Debugging Hints 136 12.4 Questions - Chapter 12 136 13 Project Management 137 13.1 Project Management Basics 137 13.1.1 Make sure that everyone can contribute to the project 137 13.1.2 Learn how to have productive meetings 138 collaborative design fundamentals for software engineers xi 13.1.3 Learn how to make decisions 138 13.1.4 Make Lists 138 13.1.5 Manage Transitions Within Your Process 138 13.1.6 Manage Team Morale 138 13.1.7 Real Management Starts When Things Go Wrong 139 13.1.8 Gold Plating Is A Sign Of Management Failure 139 13.2 Agile Project Management Principles 139 13.2.1 Scheduling 139 13.2.2 Iterations 139 13.3 Questions - Chapter 13: