
Insights on Software Project Requirements and Design Challenges
Discover key insights from Chapter 2 of CS 428 on software engineering, exploring the impact of unstable requirements, costly requirement errors, missing requirements, and the challenges in transitioning from requirements to design. Gain valuable knowledge on how proactive requirements reviews and customer involvement early in the development lifecycle can mitigate project risks and complexity.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
CS 428 Facts & Fallacies of Software Engineering (Chapter 2) Winter 2024 Bruce F. Webster
Chapter 2: About the Life Cycle Section 1: Requirements #23: One of the two most common causes of runaway projects is unstable requirements. Most projects that spin out of control were never in control in the first place. Customers/users aren t really sure of what problem they want solved or how specifically to solve it; when they saw a solution, they didn t like it. We want it to be just like the old system, but better. Original focus was on strict requirements tracing and management; still popular today (in theory) but actual practice requires feedback and flexibility. Agile/XP grew out of the effort to work with the customers continuously. Sometimes it works, sometimes it doesn t. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 2
Chapter 2, Section 1: Requirements #24: Requirement errors are the most expensive to fix when found during production but the cheapest to fix early in development. What could have been corrected for almost nothing early on becomes far more difficult to correct later. (Pages & rotating headlines) Again, what is needed is proactive requirements reviews, preferably with actual/representative customers and users, early in the life cycle Everyone acknowledges the problem, but there is little agreement on the best solution CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 3
Chapter 2, Section 1: Requirements #25: Missing requirements are the hardest requirement errors to correct. Failure to elicit requirement through analysis and customer/user interviews. Without knowing the full scope of the desired solution, you may make architecture and design decisions that block or hinder the missing requirements, thus requiring more extensive rework to accommodate them. Plus, remember the 25%/100% rule: 25% increase in problem complexity => 100% increase in solution complexity. The most persistent software errors those that escape the testing process and persist into the production version of the software are errors of omitted logic. Missing requirements result in omitted logic. It is difficult to test for something that isn t there. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 4
Chapter 2, Section 2: Design #26: When moving from requirements to design, there is an explosion of derived requirements (the requirements for a particular design solution) caused by the complexity of the solution process. The list of these design requirements is often 50x [not 50% but 50 times] longer than the list of original requirements. These are requirements tied to our intended solution in other words, in order to implement requirement X, we have a long list of specific implementation requirements. This is a major factor behind the 25% problem => 100% solution complexity issue. This requirements explosion is part of the reason that it is difficult to implement requirements traceability , even though everyone agrees that it is desirable to do so. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 5
Chapter 2, Section 2: Design #27: There is seldom one best design solution to a software problem. Key words are one and best there are usually multiple solutions, and a subset of them may be equally desirable. In a room full of top software designers, if any two of them agree, that s a majority. Bill Curtis Studies to attempt to build a design toolkit found instead that the design process is opportunistic i.e., discovering/inventing a novel solution. This is also an inherent limitation on component/automated software creation they may provide a functioning solution, but it s almost never going to be the only one, and it s unlikely to be the best (or even acceptable). CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 6
Chapter 2, Section 2: Design #28: Design is a complex, iterative process. The initial design solution will likely be wrong and certainly not optimal. Solving the hard parts first will help to going back and revising the overall design approach. Design work tends to be heuristic [ seeking to discover ], trial-and-error. Design work tends to be mental sometimes without even writing/typing/drawing anything because of the rate at which we consider, evaluate, and then reject or modify possible design approaches. For problems of substance, the XP/AD approaches harbor serious dangers. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 7
Chapter 2, Section 3: Coding #29: Programmers shift from design to coding when the problem is decomposed to a level of primitives that the coder has mastered. If the coder is not the same person as the designer, the designer s primitives are unlikely to match the coder s primitives, and trouble will result. It s easy to implement your own design. It s a lot harder to (correctly) implement someone else s design. This can be true whether the design is too high-level or too low-level. This, by the way, is one of the major pitfalls in separation of designers and coders (cf. outsourced/offshore development). CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 8
Chapter 2, Section 3: Coding #30: COBOL is a very bad language, but all the others (for business data processing) are so much worse. Most of you will never write a single line of COBOL (or FORTRAN or PL/1 or APL). Yet there are 20 billion lines of COBOL in production, with over 1 billion new lines of COBOL written each year. At some point, most of you will find yourselves working in a language that you consider bad, obsolete, even archaic, at some point or another. The fact that C is among the top 5 most widely used programming languages speaks volumes as to how some languages come and go and others live on forever. Be prepared to use languages that you don t want to or never thought you would. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 9
Chapter 2, Section 4: Error Removal #31: Error removal is the most time-consuming phase of the life cycle. Brooks: 50% of the total schedule, whether you plan for that or not. Glass: 40% of the total schedule (and cites others who say 30%). BUT: management never allows even 30% (much less 50%) of the schedule for error removal. They tend to see it on the order of 10% to 20%, if that much. Hence, so many projects are over schedule, and many never stabilize at all. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 10
Chapter 2, Section 5: Testing #32: Software that a typical programmers believes to be thoroughly tested has often had only about 55%-60% of its logic paths executed. Automated support can raise that to 85%- 90%. It is nearly impossible to test 100% of the logic paths. Testing is an act of compromise, and it is vital to make the proper compromise choices. Most significant software products are released with errors [both known and unknown] remaining in them. Too many organizations are unwilling to invest the time, money, and staffing in doing even minimal structural testing. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 11
Chapter 2, Section 5: Testing #33: Even 100% test coverage would not be adequate. About 35% of software defects come from missing logic paths and another 40% from execution of a unique combination of logic paths. These will not be caught by 100% coverage. Errors of omission: the logic to perform a required task is not in the program. Errors of combination: the error appears only when a specific combinations of logic paths (a specific program state) occurs Problem: program state space can be astronomical (billions of unique states, etc.) CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 12
Chapter 2, Section 5: Testing #34: It is nearly impossible to do a good job of error removal without tools. Debuggers are commonly used, but others, such as coverage analyzers, are not. Near-universal lack of respect for SQA in organizations Front-end processes (analysis, architecture, design) are more visible and technically easy to understand Back-end work (including testing) is grubby and technically hard to understand Thus management tends to focus resources and prestige on front-end processes and to short- change back-end work Most testing is (wrongly) done at the end of the life cycle, when the schedule pressures are most intense, and therefore time (and tools) to do things right are not permitted. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 13
Chapter 2, Section 5: Testing #35: Test automation rarely is. That is, certain testing processes can and should be automated. But there is a lot of the testing activity that cannot be automated. Again, test automation was seen for years as another silver bullet Test automation tools are necessary but not sufficient Testing aspects that require human effort and judgment include: What should be tested, and how (processes, tools, etc.) Creation of test plans/cases and analysis of their collective results Evaluation of reported defects, including prioritization, assignment, deferral Making changes to the entire testing process (and personnel) based on results to date CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 14
Chapter 2, Section 5: Testing #36: Programmer-created built-in debug code is an important supplement to testing tools. Classic #IF _DEBUG_ bracked code that prints incoming and outgoing parameters, dumps intermediate values, traces flow of control, etc. Still one of the best and fastest ways of screening for and tracking down errors Some IDEs/debuggers make this not strictly necessary, yet I often find it faster than setting breakpoints, stepping through code, etc. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 15
Chapter 2, Section 6: Reviews and Inspections #37: Rigorous inspection can remove up to 90% of errors from a software product before the first test case is run. Why don t we do this more often? It s tedious It can be embarrassing It ties up multiple people at a time when you may face serious schedule pressures Management doesn t understand its value and so discourages it Simple version (via Tom Affinito): at the end of the day, grab another developer and do a 15-minute walkthrough of all the code changes you made that day Also: one of the best debugging techniques is to drag someone else over and start explaining the bug and what you ve looked at so far. #38: In spite of the benefits of rigorous inspections, they cannot and should not replace testing. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 16
Chapter 2, Section 6: Reviews and Inspections CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 17
Chapter 2, Section 6: Reviews and Inspections #39: Post-delivery reviews ( retrospectives or post-mortems ) are important. But most organizations don t do them. Why? Good question. To protect the guilty. To avoid embarrassment. Because everyone is being rushed onto a new project. Management doesn t want to learn what it needs to change in its approach. The wisdom of the software field is not increasing. Actually, I think we have lots of captured wisdom in books and articles. The problem is: nobody reads them, and when they do, they don t want to believe them. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 18
Chapter 2, Section 6: Reviews and Inspections #40: Peer [design/code] reviews are both technical and sociological. Paying attention to one without the other is a recipe for disaster. Face it: it s hard to expose our work to others for criticism. Also, programmers are known for having healthy egos. Sometimes, too healthy. The pain of having our code reviewed and critiqued by our peers is a significant discouragement to frequent and thorough code reviews. A few suggestions: Don t have (non-technical) managers or unprepared engineers attend. Have the review leader be someone other than the code s author. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 19
Chapter 2, Section 7: Maintenance #41: Maintenance typically consumes 40% to 80% (60% average) of software costs. Therefore, it is probably the most important life cycle phase of software. Also, large organizations can spent 50% to 80% of their entire IT budget on maintenance Yet it is often given low priority and attention Old hardware becomes obsolete; old software goes into production every night. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 20
Chapter 2, Section 7: Maintenance #42: Enhancement is responsible for roughly 60% of software maintenance costs. Error correction is roughly 17%. Therefore, software maintenance is largely about adding new features to old software, not fixing it. The 60/60 rule: 60% of software s dollar is spent on maintenance, and 60% of that maintenance is enhancement. Enhancing old software is, therefore, a big deal. And it represents roughly 1/3rd(36%) of software s total budget. 17% on fixings bugs 18% on adaptive maintenance (getting software to work as environment changes) 5% on preventive maintenance/refactor (paying down technical debt) CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 21
Chapter 2, Section 7: Maintenance #43: Maintenance is a solution, not a problem Must like SQA, maintenance is sort of a second-class domain Yet with proper investment of personnel, time, and tools, maintenance often becomes a far less expensive and less risky option than wholesale replacement Maintenance of existing systems can also avoid the I hate change roadblock But upper management often succumbs to the lure of the new car smell CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 22
Chapter 2, Section 7: Maintenance #44: In examining the tasks of software development vs software maintenance, most of the [lifecycle] tasks are the same except for the additional maintenance task of understanding the existing product. This task consumes roughly 30% of of the total maintenance time and is the dominant maintenance activity. Thus it is possible to claim that maintenance is a more difficult task than development. Key challenge: design a solution within the context of the existing product s design. Key challenge: figuring out what exploration and tradeoffs led to the current design. Key challenge: finding out that the current design can t support the proposed design. Cf. Webster, Controlling IT Costs: Using a Maintenance Architect [link] CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 23
Chapter 2, Section 7: Maintenance #45: Better software engineering leads to more maintenance, not less. The better a given system is designed and built, the longer it will stay in production. The better a given system is designed and built, the easier it is to modify. Therefore, a well-designed and well-built system will require more maintenance in terms of enhancements and lifespan than a bad one. CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 24
Assignments for this week By midnight on Saturday (03/16) Team status report #7 is due Individual code review due Team up with someone else on your project and spent at least 30 minutes reviewing their source code By start of next class period (03/18): Read Facts & Fallacies of Software Engineering, chapter 3 Keep reading Webster #6 In-progress demo on 03/25 (two weeks) Midterm on 04/01 (three weeks) Final demos on 04/15 (five weeks) CS 428 - WINTER 2024 MONDAYS, 3:00 5:30 PM BRUCE F. WEBSTER 03/11/2024 25