Week 12 Class 23 Tue Nov 10 Posted: Nov 10
Announcements
No New Rules
The questions I receive about Project 3 TDD are almost always in the form of general, written hypotheses, such as:
From these rules, it looks like whenever both a URL and a hash are provided, the URL should take priority in determining the final attribute values. And if the disk filename conflicts with either of those, does the priority system always override it? I want to verify whether this hierarchy is intended to be absolute across all inputs.
What is happening is that students are trying to state explanations/new rules. This, in general, is not useful. We already have the rules. We do not need an annotated version. Besides, I have to work to understand what you really mean, and I am often unsure that I understand correctly.
What I rarely get is a test case where the student wants to know if they have the correct output.
This is useful. I can answer this easily.
This applies to much more than this problem. Instead of asking if your wordy, difficult-to-understand interpretation is correct, create the test and ask about that. We already have the problem of difficult-to-understand original rules. Don't make it worse.
Mock Clock III
360000? or 3600? These are magic numbers, i.e., numeric literals whose meaning is not clear from the code. In a large project, how would I remember this? What I can easily understand is:
So why not use this formula? Why did I see people using a calculator for this. The C++ compiler (and the compiler for almost any real language) can compute this at compile time. Why not take advantage of this?
Why is this important? Because we need to find things in our code. And if you were looking for 100 hours, you would search for the value 100. And when you use cryptic things such as 360000, that doesn't work. Write the program as much as possible using concepts from the problem domain. This includes naming, literal values, strings, etc. Here is an adapted example from the Linux kernel:
So write these clearly as factors. Let the compiler do the math.
Redirecting an Output Stream
Testing the output of code to std::cout (standard output) or std::cerr (standard error) is not immediately testable in a unit test. We need to "grab" this output and store it in a std::string so we can verify the result. The way to do this is to redirect the output to a string. The following program is an example of how to do that:
Class
Unless stated otherwise, all exercises are due by 4 pm on Wed Nov 11
In this exercise, you will go through a workflow to perform a refactoring. The overall process includes:
There is no report or uploaded notes. The following workflow must be followed to receive credit. Use the exact commit messages as shown.
main, you are going to work on the branch issuen where n is the issue number, e.g., if the issue number is 1 then the branch name is issue1. First, make sure you are in the branch main. Then, create the branch:
Branches can be created via GitHub. However, please create this branch via the command line.length() definition to the new method size(). Successfully build the program. Once done, commit using the commit message:
Push your changes to GitHub.size() and length() do the same thing. Now, change length() (the old method) to call size() (the new method). The definition of length() should only have the call to size(). Note that you must pass along the parameters and handle any return statements. Once done, commit using the commit message:
Push your changes to GitHub.length() with a call to method size(). Again, this must be done one call at a time. After each change, compile, build, and run successfully. Commit each time using the commit message:
Push your changes to GitHublength() in ToDoList.cpp. Compile, build, and run successfully. Once done, commit using the commit message:
Push your changes to GitHubAt this point, the refactoring is complete.
Create a pull request at GitHub. You want to pull from the issue branch into the branch main.
Accept the pull request at GitHub. Typically, this would be done by another team member, but in this case, you can accept your pull request.
Switch to the main branch in your cloned repository and pull the changes. The rename should appear in the code on the main branch.
main.Week 11 Class 22 Thu Nov 05 Posted: Nov 05
Announcements
Exercise 49: Project 3 Feedback 2 Check for two rules implemented.
Overall observations:
addAttribute() per attribute, e.g., only one call to addAttribute("filename", /* ... */).else'sClass
Exercise 51: Team Mock Clock III
In this course, we try to balance two goals: helping you learn the concepts clearly and giving you experience with how real software development is done. In this exercise, some parts are designed to feel closer to real-world practice:
Other parts of the exercise are included mainly for learning purposes:
Unless stated otherwise, all exercises are due by 4 pm on Fri Nov 06
If you haven't completed the previous Mock Clock exercise, do so before completing this one.
A team member created an issue in your repository. You have been asked to add a test for this issue. Go to the Issues for your repository at GitHub and read it.
Record In your notes, explain why you cannot practically write a test for this issue without using dependency inversion.
dip. Verify that you are on the correct branch.git commands you entered. Order does not matter, and you don't have to repeat them.Clock in the files Issue2Clock.hpp and Issue2Clock.cpp, and a test program in the file SessionIssue2Test.cpp. You will need to add these files so that Git will version control them:
Do not commit yet.There is a pull request for the branch dip that has an updated version of CMakeLists.txt that knows about the SessionIssue2Test files. At GitHub, accept that pull request. You will then need to git pull to see the changes in your clone repository in the branch dip.
assert(false) with a return. Make sure the test builds and runs, but it will fail.Commit your work with the commit message:
As you work on this branch, record a list of git commands you entered. Order does not matter, and you don't have to repeat them.
Repeat the Session Testing with DIP, but this time on the branch mock. Note the following:
mockCommit your work with the commit message:
Week 11 Class 21 Tue Nov 03 Posted: Nov 03
Announcements
Exercise 46: Project 3 Feedback 1
The feedback for this exercise (and your first commit to Project 3: Code Analysis TDD) is in the feedback branch of your repository with scores in Brightspace.
Just a clarification: if you receive a 10 / 10 on this exercise, it does not mean you get 100% on that part of the project. It means that you followed the procedure. See the feedback branch to see if I noticed any other issues.
Also, further exercises for the progressive due dates may not provide feedback on the commit messages, content of the commit, etc. Only on the number of test cases, which should equate to the number of rules implemented.
If I pointed out issues in the GitHub feedback, you can fix those in separate commits, using the commit message that starts with "Fix".
General Comments:
formatAnalysisXML()). Use of find(), or substring checking is not part of the test case. Do not make your test case have more complexity (i.e., number of conditions) than your implementationunit.addAttribute(), for every unique attribute.Think before every commit:
Class
Unless stated otherwise, all exercises are due by 4 pm on Wed Nov 04
The article How to Write a Git Commit Message has guidance on commit messages in general and Git projects specifically. Especially note the 7 rules. As the writeup mentions, these ideas are not new.
A message with only a subject line is adequate for our projects. The rules that only concern the subject are:
Make sure to use these guidelines as you implement any projects or exercises.
If you haven't completed Exercise 45: Team Mock Clock, do so before completing this one. Notes from this are due at the end of class.
After that, answer the following questions. Use a couple of sentences (at least) for each of them.
main direct testingdip Using DIP (Dependency Inversion Principle)mock Using a mock objectmain direct testingdip Using DIP (Dependency Inversion Principle)mock Using a mock objectmain), dip, and mock is the best answer. There can be multiple answers:These questions can be answered after class and are due by 4 pm on Wed Nov 04. Upload a new document with these answers added to your notes for today.
Week 10 Class 20 Thu Oct 29 Posted: Oct 29
Announcements
Use the git command line
git are not stablegit often have unintuitive semanticsgit can get you into troublegit are limited in functionalitygit are limitedgit command line is stable and powerfulgit command line when you have a problemYou are Computer Science students, many of which will become Software Engineers. Learn your tools. git is your tool. Features in IDEs will come and go.
Class
Exercise 44: sortTDD
Continue to code along in class (or later on) to the sortTDD example. sortTDD Invitation Link
Class example: sort-tdd-f26-020
Unless stated otherwise, all exercises are due by 4 pm on Fri Oct 30
The following exercise demonstrates different approaches for testing a Session class. The Session class manages activities over a period of time and then generates a report that includes the session's duration. The session details are not included here, only the reported session length.
Each approach is on a different branch:
main - Session testing without DIP (Dependency Inversion Principle)dip - Session testing with DIPmock - Session testing with DIP using mock objectsTo see what branch you are on, use the git command:
To switch to another branch, e.g., dip, use the git command:
To see what files are on that branch, use the bash command:
Spend a minute switching among the various branches. Use the git branch to verify what branch you are on. If you look at the files on each branch, you will see common files and files that only exist on an individual branch. All necessary files already exist in each branch, so no files are added during the exercise.
main: Session Testing without DIPtime command:
Record the timing of three runs of the test program, and note the median value. From the time command, use the real time. Compare the timings to others on your team.dip: Session Testing with DIPdip. Make sure you are on the correct branch.std::chrono real-time clock, all clock duties have moved to the class Clock. This implies:
Clock dependency must be set up when the Session is createdTwoSecondClock.
Build and run the existing test Session2SecondTest. Record the timing of three runs of the test program, and note the median value. Compare the timings to others on your team.mock: Session Testing with Mock Objectsmock. Make sure you are on the correct branch.Create your repository Code Analysis TDD Invitation and implement each one of the Rules separately with a single pass through the TDD workflow (red, green, refactor). Each rule (and error message) is implemented in a single commit.
Due Dates
The purpose of many class exercises and projects in this class is to practice good workflows of actual, real, 40-hours-a-week software development. Due to time limitations, each part of a project cannot be very long. Treating this as a "race" at the last minute is not part of SE or any good workflow. It tends to produce less-than-optimum software in both external quality, i.e., bugs, and internal quality, i.e., poor design.
Therefore, the project has progressive due dates regarding the number of rules implemented. Each failure to meet a due date will result in a 10-point reduction in your score out of 100. The following are due dates, not the day you have to work on them, unless you wait until the last day.
| No. | Due Date | Total Rules Implemented | Exercise |
|---|---|---|---|
| 1 | Monday, Nov 2 11:59:59 pm | 1 | 46 |
| Stop Wait until I provide feedback on your initial workflow by giving you a score for the corresponding exercise. If you don't see a comment, I have not examined your first commit. If you are waiting to continue, send me an email. | |||
| 2 | Wednesday, Nov 4 10:00:00 pm | 2 | 49 |
| 3 | Thursday, Nov 5 10:00:00 pm | 3 | 52 |
| 4 | Friday, Nov 6 10:00:00 pm | 4 | 53 |
| 5 | Monday, Nov 9 10:00:00 pm | 6 | 54 |
| 6 | Tuesday, Nov 10 10:00:00 pm | 7 | |
| 7 | Wednesday, Nov 11 10:00:00 pm | 8 | |
| 8 | Thursday, Nov 12 10:00:00 pm | 9 | |
| 9 | Friday, Nov 13 10:00:00 pm | 10 | |
| Tuesday, Nov 17 11:59:59 pm | All rules and all error messages |
Due dates are given for each step. No work will be accepted after the last due date.
All commits must appear in the repository on GitHub. Commits or code changes in GitHub Codespaces do not count.
The input for a source-code static analysis tool can come from multiple sources, including individual files, e.g., main.cpp, directories of source-code files, e.g., src/, source-code archives, e.g., project.tar.gz, file.zip, and standard input, i.e., stdin, e.g., std::cin. In addition, solitary files and source-code archives can include a URL, e.g., https://mlcollard.net/fragment.cpp
To perform the code analysis, the source code is wrapped in a single XML element with metadata about the source code, including filename, programming language, URL, hash, LOC (lines of code), and timestamp. For the source code:
the resulting XML is:
Note: Scroll to see all the attributes.
The attribute hash is of the source and is a SHA1 160-bit (20 bytes) represented in 40 hex characters, which is what Git uses. The xmlns:code="http://mlcollard.net/code" is not an attribute but an XML namespace declaration, handled automatically by XMLWrapper.
The general attribute rules are:
The attribute's variety of input sources and program options follows the Rules stated below.
Implement the following rules following a Test-Driven Development (TDD) approach. Write a test in CodeAnalysisTest.cpp, implement the minimal code necessary to get it working in CodeAnalysis.cpp, refactor/clean up the code to make it clear and logical, and then commit with an appropriate commit message.
All commits must result in a program that compiles and passes all tests. This means you must successfully compile and pass the test program before a commit. Any commit that does not build will result in a 0 for that step, and every commit will be checked.
The following rules are unordered. Do not refer to them by number.
std::cin) of non-archive source code, the disk filename is a single dash "-" and the entry filename is the literal string "data". In this case, you must use the option filename for the attribute filename.std::cin) of a source-code archive, the disk filename is a single dash "-". In this case, use the entry filename for the attribute filename.All error messages are written to standard error (i.e., std::cerr) on a separate output line, and the function should return an empty string.
The workflow for implementing one rule:
All implementation should result in code that is as clean and clear as possible. For this case:
std::string_view to std::string."", use the empty() method.The project is built and graded in a Docker container running srcml/codespaces, which is the same environment as GitHub Codespaces for this project. It is based on Ubuntu 24.04 and uses the GCC compiler.
On macOS, clang is the default compiler and the one you want to use in most cases. This should not cause a problem with this program. However, before you commit, I recommend ensuring your code can build and pass the tests with GCC and the default compiler, clang.
Add GCC via homebrew:
brew install gcc
The preset macos-gcc (in the file CMakePresets.json) provides settings to compile with GCC:
cmake .. --preset macos-gcc
This preset only appears in macOS and not in Linux or Windows.
To return to using clang:
cmake .. --fresh
Instead of flipping back and forth in the same build directory, use two build directories, one for clang and one for GCC. Be sure to build and test in both build directories before you commit. Note It might seem like a pain to have two build directories, but it is not uncommon in real software development and is a good skill to have.
Your score will depend on the following:
Week 10 Class 19 Tue Oct 27 Posted: Oct 27
Class
Exercise 43: sortTDD
Code along in class (or later on) to the sortTDD example. [sortTDD Invitation Link]
The TDD workflow for this code is:
Class example: [sort-tdd-f26-020]
The goal is the simplest implementation that could work, not the silliest
There is a commit that you do not see:
Exercise 42: Team Code Coverage II
As with almost all Team exercises, you must upload your work by the end of class.
Unless stated otherwise, all exercises are due by 4 pm on Wed Oct 28
Week 9 Class 18 Thu Oct 22 Posted: Oct 22
Class
srcML Testing parser testfile, libsrcml testfile, client testfile
So three different parts of testing. But that is not all. There are tests to make sure the installers (Debian packages, rpm's, Windows installers) all work. And tests for any wrappers for libsrcml, e.g., pylibsrcml.
Exercise 40: Team Code Coverage
To replace the original Makefile with CMake, the repository has a pull request:

Accept it at GitHub:

If you have problems with this, let me know and I can accept the pull request for your team.
After the pull request is merged, you will have to git pull to see it in your repository clone.
As always with Team exercises, due by the end of class.
Unless stated otherwise, all exercises are due by 4 pm on Fri Oct 23
First, as a team, review the test cases and the code to determine if you achieved 100% code coverage and whether any test cases are not unique and cover the same code. Do not spend much time on this, as you pretty much said so with your previous exercise result.
The following assumes you are in your build directory.
The tool gcov can, when used with code compiled with the appropriate flags, produce a report that shows exactly how many times each line of code is called during a run of the program. We could use this to determine where our program is taking the most time and perhaps optimize the program. For our purposes today, we can also use it to obtain code coverage. So, we want to run the gcov program with our test program and see the code coverage of the function dotProduct() in the file dotProduct.cpp .
To produce the gcov report, do the following:
cmake to add the option --coverage to the flags provided to the compiler:
The CMake variable CMAKE_CXX_FLAGS contains the options passed to the compiler, and CMAKE_EXE_LINKER_FLAGS contains the options passed to the linker. The CMake configuration sets them for things such as Debug and Release builds. The CMake variables CMAKE_CXX_FLAGS_INIT and CMAKE_EXE_LINKER_FLAGS_INIT are the starting values before the CMake configuration sets them.cmake so that make will output the commands it is executing (instead of hiding them from you):
The CMake variable CMAKE_VERBOSE_MAKEFILE controls whether make shows the commands it uses to build the program. Note: ninja will not work here. This is one exception to ninja being a drop-in replacement for make.
Note that cmake caches its settings. So once you have this configured, you can run CMake again and it will still have these values. They are stored in the file CMakeCache.txt.--coverage. It will occur on every compile and link command.
Record in your notes the command for the compile up to and including the --coverage option.CMAKE_VERBOSE_MAKEFILE as it is annoying getting that much output with every make command:gcov to get the report.
Carefully view the output of the program to find where dotProduct.cpp is and the line that starts with Lines executed:. You can safely rerun this command. You will then see how much code coverage your test program produced. Record in your notes this percentage.
You should find a file dotProduct.cpp.gcov in your build directory..gcda and .gcov files first. A command to do this is (I strongly recommend copy and paste):
View the file dotProduct.cpp.gcov in an editor. You will see lines such as:
Columns are separated by ":". Column 2 is the line number, and Column 3 is the source code. Column 1 is the number of times that line of code was executed, or a - if it is not an executable line (i.e., comment or whitespace). If you see a #####, that means that that line of code was never executed. So, therefore, you do not have 100% code coverage.
Correctly rerunning all of the above commands is repetitive and prone to mistakes. So let's automate it by taking the above lines and making them targets in our CMake. Add the following code at the end of your CMakeLists.txt file.
Commit this change to the repository with the commit message:
Any time you make changes to the cmake file CMakeLists.txt, rerun cmake:
Now, the sequence to run the coverage for the tests is the following:
To fix this problem, you will have to change the file dotProduct.cpp. Look carefully at the lines of code that were not executed, any conditional statements that had to be true to reach that unexecuted line, and your test cases.
The change to dotProduct.cpp is to rearrange some lines. Make this change, build the program, run the test program, and make sure the tests still pass. If the tests all pass, commit the change to the file dotProduct.cpp:
Now, rerun the coverage using our new make targets. Continue making changes to your test cases until you get 100% code coverage. Record in your notes any additional test cases.
This sequence is more complex than it needs to be:
If the build file ran the target coverage-clean before every test, then we would not have to remember to do so. Any knowledge we can put into the build file makes everything easier to repeat. So change (do not just add this code) the test target in the file CMakeLists.txt so that it also DEPENDS on the target coverage-clean:
Since CMakeLists.txt changed, rerun cmake.
Now, the new sequence of commands is:
Automate one more step: change the target coverage-report in the file CMakeLists.txt so that it automatically runs the target test. Then running a new report is a single command, make coverage-report. Rerun cmake and verify that make coverage-report by itself cleans the coverage data, runs the tests, and produces the report.
Commit these automation changes to the repository:
Using the coverage, find the percentage of the code in dotProduct.cpp covered by each test case. Do this by commenting out all but one test case at a time and then running a coverage report. Record in your notes the new percentages and how they compare to what you manually calculated.
Week 9 Class 17 Tue Oct 20 Posted: Oct 20
Announcements
Professional CMake: A Practical Guide by Craig Scott is the best book on CMake for developers. Besides just covering the CMake features, it also has sections in each chapter with good practices and practical advice. One of the best books of its kind. It was a textbook for CPSC 489-010 T: DevOps in Spring 2024.
The first 5 chapters are a free download.
So take a look for any questions on cmake.
Class
Exercise 38: AddTest
Fix the code so that both tests pass. Make sure to commit this separately.
Then, add another single unit test following the style and formatting of the previous unit tests.
Make sure it passes all the tests before you commit.
Unless stated otherwise, all exercises are due by 4 pm on Wed Oct 21
The project, Vector Angle, calculates the degree angle between two vectors. It uses the function dotProduct(). It also includes a test program dotProductTest.cpp.
As you recall, white-box testing is testing (creating test cases) that knows the structure of the code because it knows the implementation. The test program dotProductTest.cpp includes a single test case using a separate block and an assert().
Your assignment is to add test cases to the file dotProductTest.cpp and get the tests to run successfully.
The repository for this assignment is a GitHub group repository. That means there is one repo per team. Assert Tests Invitation Link
First, build the program:
Then, run the program:
The test program is a separate executable, dotProductTest. To run the test program, there is a target, test. So run the test program:
For this assignment, add tests so that when the complete test program is run, all of the code in dotProduct() is run at least once. This would be 100% code coverage.
The workflow is:
Keep in mind the following:
git push for the other team members to see your test case.I encourage as many team members as possible to commit a test case. If using GitHub Codespaces, each team member has their own codespace. After a team member has entered a test case, the rest can use a git pull.
Add test cases one at a time to prevent merge issues.
Each team member must submit notes, including for each test case (not just their own):
dotProduct() and does not include empty lines or comment lines.dotProduct() by this test caseThe notes and commits of each team member are due by the end of the class, along with the test cases. Your score is based on the notes and commits in the team repository.
Week 8 Class 16 Thu Oct 15 Posted: Oct 15
Announcements
Midterm Exam In our regular classroom and at our regular time.
Week 8 Class 15 Tue Oct 13 Posted: Oct 13
After Class
Announcements
Exercise 34: Team Text Match II
Some observations regarding team collaboration and outcomes:
make is run. Not every team member did this.textmatch and regexCountTest, couldn't be worked on in parallel. Declarative languages are easier to work on independently than other types of languages due to simpler structures. E.g., make is easier to work on independently than C++.Class
Exercise 35: Build Configurations
Fill out the Build Configurations table so that it reaches 82,944 different configurations.
Upload to Brightspace.
Exercise 36: Team Text Match III
$@, $<, and $^In your repository the branch feedback in the file Feedback.md is a Claude (LLM) analysis of the team history for Exercise 34: Team Text Match II. I suggest viewing it at GitHub.
Read over the analysis and think about what can be improved, not only about your current version of the code, but also about your process. Even if your process worked and you did well, consider how you can parallelize your development (instead of waiting while someone else makes changes).
Follow the instructions for Exercise 34: Team Text Match II
The targets are: make clean, make run, make test
As before, this is due by the end of class. No commits outside of class.
Week 7 Class 14 Thu Oct 08 Posted: Oct 08
After Class
Before Class
Exercise 26: Makefile
Feedback is in the file Report1.md in the branch feedback in your Build Files repository. You can view this at GitHub. Look where it indicates the current branch, select the branch feedback and you will see the file Report1.md. If you want to compare it, look at the Report1.md from build-files-f26-020.
We will continue to add to this code in another exercise. If you have lots of problems, then get my current version at build-files-f26-020. Then put that into your Makefile and save it. Finally, commit that to your repository with the following command:
Do not deviate from this commit message as it will cause problems when I grade it.
Exercise 26: Makefile The demo that I did build-files-f26-020 included a diagrams branch with Makefile dependency graphs generated from the current version of the Makefile. This was done via a GitHub Action.
I decided to add these diagrams to your repository. So if you look at your repo, there is a diagrams branch with a diagram for each commit that changes the Makefile. It is not automated, so as you perform commits it will not automatically update the diagrams, but I will run the script periodically during class.
To automate this, we would need to add a GitHub Action. That has to be on the main branch, so you would have a commit, and would need to git pull before you made any more commits. To avoid potential confusion, it is not an action.
Announcements
Class
Exercise 32: Makefile Dependency Diagram
Using the feedback in Brightspace for Exercise 31: Team Text Match, correct your diagram. If you got a 10 / 10 with the feedback "Correct", you do not have to do anything to receive full credit. For all other cases, correct your diagram or you will receive a 0 on this exercise.
Exercise 33: Makefile II
This is a continuation of Exercise 26: Makefile. Use the same repository as before. Code along and make the same commits with the same commit messages as I do in class.
$@, $<, and $^srccomplexityCMake
CMakeLists.txt CMake file for the Build Files example
To download to your repository:
Unless stated otherwise, all exercises are due by 4 pm on Mon Oct 12
The utility textmatch finds the number of times a regular expression occurs in a file. Use the same team repository as Exercise 31: Team Text Match, and use your team's dependency diagram as a guide.
The last person who worked on it was an intern from another university. They entered the build commands in a shell every time they built the program. Of course, you and your team know better, so your team will implement the Makefile for this project.
Every team member must do one of the following to receive credit:
Restrictions:
As your team members make commits, you will have to update your working copy. Use the command:
Note that your team does not share a GitHub Codespace. All of them are different. You will not see other team members changes until you pull.
The Midterm Exam is Thursday, October 15, during our regular class time and classroom. It covers Chapters 1 - 6.5 of the Head First Software Development book, plus notes and in-class examples.
make and cmake. Given a Makefile, what would happen with specific targets. Given a project, draw a build dependency diagram.The exam has various problem types, including short answers, definitions, comparisons, creation of user stories, and planning. The question may require you to:
It is a good idea to review the "Dumb Questions" and the answers.
The questions are based on what we covered in the book, the exercises, and the projects. If I did not cover it in class, it is not on the exam.
A calculator is not needed for any required math and, therefore, not permitted.
Week 7 Class 13 Tue Oct 06 Posted: Oct 06
Announcements
Each student must get their own priorities. Do not reuse the ones from the Team Exercises.
Class
Make
$@, $<, and $^srccomplexityExercise 26: Makefile
Code along and make the same commits with the same commit messages as I do in class.
I suggest you use GitHub Codespaces as all necessary packages are installed.
Remember that you can access my commits as I make them.
CMakeLists.txt CMake file for the Build Files example
To download to your repository:
Unless stated otherwise, all exercises are due by 4 pm on Wed Oct 07
The utility textmatch finds the number of times a regular expression occurs in a file. The repository for this exercise is a GitHub group repository. That means there is one repo per team. Text Match Invitation Link
Hand draw a dependency diagram of the Makefile for textmatch:
.cpp), header files (.hpp), object files (.o), and executablestextmatch and regexCountTestclean, run, and test#includes in each file. Only include headers that are part of the project, not system headers such as <iostream>As an example, here is the Make prerequisite graph for the srccomplexity program in the build-files-f26-020 example. I suggest you open it in its own tab.
Upload a photo or image of the diagram to Brightspace by the end of class. Each member must upload their own, individual diagram.
Week 6 Class 12 Thu Oct 01 Posted: Oct 01
After Class
Before Class
If you haven't already created the GitHub Classroom repository for "Build Files" you should do so before class. You can also set up a GitHub Codespace for the project, as it takes some time to start up initially and when restarting.
Exercise 25: Build Tools Background
Please complete before class starts. There are no wrong answers, and not much to write.
Announcements
Project 1 I will allow you to earn some points back by correcting what you submitted. To count:
Class
Make
Build Files GitHub Organization Invitation Link - Create your own repository for this example (and future exercisese)
$@, $<, and $^srccomplexitybuild-files-f26-020 Example I will demonstrate with
Exercise 26: Makefile
Code along and make the same commits with the same commit messages as I do in class.
I suggest you use GitHub Codespaces as all necessary packages are installed.
Remember that you can access my commits as I make them.
Unless stated otherwise, all exercises are due by 4 pm on Mon Oct 05
Project 2 is due on Friday, Oct 9 at 11:59:59 pm. The GitHub Organization Project 2 Invitation.
For Project 2, take all the user stories from Project 1 and create a series of iteration plans.
Use the examples in the book to show which parts of the user story you should show in your iteration plan (e.g., do not restate descriptions in the plans). Also, clearly state the entire new iteration plan for each plan, not just the changes. However, make sure to thoroughly discuss what the change was and what effect it had.
This is an individual project. Each member of a team has different user-story priorities. To get individual priorities for Project 2, select the number of user stories:
Put these in the Priority field in the order in which you listed the user stories. In the report, do not discuss how you generated your report's priorities, i.e., pretend that the customer gave them.
The following plans may require you to add additional user stories. This violates our rule that only the development team can create estimates. However, as part of the exercise, put in an estimate.
Each plan is a point in time. For each plan, show the entire iteration plan, including the iterations already completed.
| Plan | Events |
|---|---|
| 1 | Create an initial iteration plan: 2 Weeks (14 calendar days) iteration, 2 developers, 0.6 velocity |
| 2 | The customer adds two new user stories of the highest priority at the end of the first iteration. For the two new user stories, one is a new feature, and one is an emergency. Create a non-trivial estimate (i.e., an estimate that makes the planning interesting) for these new user stories. |
| 3 | A user story with a non-trivial estimate takes twice as long. Assume this occurred right before the last iteration. |
| 4 | At the beginning of the last iteration of your current plan, the other developer leaves for another project, and it is up to you to finish the project. |
After the plans, create a section with all of your user stories, including their titles, descriptions, estimates, and priorities. You will need estimates for all of your user stories.
Your team completed the first iteration. Despite inexperience with determining estimates, you did complete the all the planned user stories.
For some of the remaining user stories, not part of the first iteration, the customer updated the priorities of 4 user stories. Get new priorities for these user stories:
Now, design a second iteration. Use the principles in the book to decide which of the remaining user stories belong in the second iteration.
Individually, each team member will turn in to Brightspace notes with the following:
Do not assume any dependencies between user stories.
The notes are due by the end of class. They can be a PDF (print to file from a computing device) or a JPG (picture taken via phone).
If you finish early, work on real estimates for your user stories.
Week 6 Class 11 Tue Sep 29 Posted: Sep 29
After Class
Exercise 25: Build Tools Background
Please complete before class starts. There are no wrong answers, and not much to write.
If you haven't already created the GitHub Classroom repository for "Build Files" you should do so before class. You can also set up a GitHub Codespace for the project, as it takes some time to start up initially and when restarting.
Announcements
I will allow you to earn some points back by correcting what you submitted. To count:
Project 1 Observations
UNIX Commands
I occasionally use UNIX commands in a bash shell to perform development tasks or to point out the results of development tasks. Obviously there is git, but there are a lot of other commands that we use. We just saw diff and patch.
I recommend that you keep a list of these commands with the name, short description, and example of using it. These commands will not be on any exam unless I specifically say they are. However, they may be part of a crossword.
Class
Demo: Patching Linux
Exercise 22: Patching Linux
Follow along with the Patching Linux demo shown in class. Write the commands in order as they are applied in the demo.
For the URLs, copy and paste, or write a shortened form of the URL.
Upload to Brightspace this list of commands. This can be a text file, or an image of the commands written on paper. This is due by the end of class.
Make
Build Files GitHub Organization Invitation Link - Create your own repository for this example (and future exercisese)
$@, $<, and $^srccomplexitybuild-files-f26-020 Example I will demonstrate with
Unless stated otherwise, all exercises are due by 4 pm on Wed Sep 30
As a team, create the first iteration of an iteration plan.
Ideally, we would have enough Team Meeting time to estimate all user stories using Planning Poker. However, we do not. To make up for this, I am providing estimates for the rest of your user stories. Enter the following:
Add these estimates to your user story cards.
The other missing item is the priorities. These come from the customer. To get priorities, select the number of user stories:
Add these priorities to your user stories.
You have 1 developer and a one-month iteration with a 70% velocity.
Use the principles in the book to decide which user stories belong in the first iteration.
Individually, each team member will turn in to Brightspace notes with the following:
Do not assume any dependencies between user stories.
The notes are due by the end of class. They can be a PDF (print to file from a computing device) or a JPG (picture taken via phone).
If you finish early, use planning poker for estimates on the user stories your team did not estimate earlier.
Week 5 Class 10 Thu Sep 24 Posted: Sep 24
Announcements:
Tasks
Class
Exercise 21: diff and patch
Write on paper the diff and patch commands of the two sessions, Creation and Application on a piece of paper as I show this in class.
Due after I show it in class.
Unless stated otherwise, all exercises are due by 4 pm on Fri Sep 25
As a team, take a user story that has an estimate, and create the tasks for that user story. Then, create the estimate for each task by playing planning poker using the procedure described on pages 48-49 of the book. Go through the estimation process at least one time.
When the team reaches a consensus for the estimate, place the estimate at the bottom of the task, e.g., "Estimate: 1 day" or "Estimate: 3 days".
Individually, each team member will turn in to Brightspace individual notes that include for each round of planning poker:
If the team cannot reach a consensus, table that task and go on to another one.
The notes are due by the end of class. They can be a PDF (print to file from a computing device) or a JPG (picture taken via phone). The notes are for today only. Do not start with the notes from the previous team meeting.
The more you work with the user stories, the more you will find improvements to them. Be sure to make those improvements.
Week 5 Class 9 Tue Sep 22 Posted: Sep 22
Announcements:
Class
Unless stated otherwise, all exercises are due by 4 pm on Wed Sep 23
As a team, take a user story that has an estimate, and create the tasks for that user story. Then, create the estimate for each task by playing planning poker using the procedure described on pages 48-49 of the book. Go through the estimation process at least one time.
When the team reaches a consensus for the estimate, place the estimate at the bottom of the task, e.g., "Estimate: 1 day" or "Estimate: 3 days".
Individually, each team member will turn in to Brightspace individual notes that include for each round of planning poker:
If the team cannot reach a consensus, table that task and go on to another one.
The notes are due by the end of class. They can be a PDF (print to file from a computing device) or a JPG (picture taken via phone). The notes are for today only. Do not start with the notes from the previous team meeting.
The more you work with the user stories, the more you will find improvements to them. Be sure to make those improvements.
Week 4 Class 8 Thu Sep 17 Posted: Sep 17
After Class
Announcements
Exercise 13: Commit to Project 1 Repository
Project 1: Requirements Report
Project 1 asciinema session The asciinema session is after you complete Project 1. Since you are still performing estimation, you are not done with the user stories for Project 1.
Estimates
Class
Unless stated otherwise, all exercises are due by 4 pm on Fri Sep 18
Start by reviewing your user stories, particularly the titles. Titles that do not have an action term, or have a poor action term, will reduce your score on Project 1.
As a team, create estimates for the user stories by using the planning poker procedure described on pages 48-49 of the book.
When the team reaches a consensus for the estimate, place the estimate at the bottom left of the User Story as indicated by the example, e.g., "Estimate: 1 day" or "Estimate: 3 days".
Individually, each team member will turn in to Brightspace individual notes that include for each round of planning poker:
If the team is not able to come to a consensus, table that User Story and go on to another one.
The notes are due by the end of class. They can be in the form of a PDF (print to file from a computing device), or a JPG (picture taken via your phone).
The more you work with the user stories, the more you will find improvements to them. Be sure to make those improvements. Also, you may think of additional user stories. Be sure to add them.
Week 4 Class 7 Tue Sep 15 Posted: Sep 15
Announcements:
Exercise 11: GitHub Username
There are three steps to allow you to create repositories for the projects and some of the exercises:
For 3, I indicated in your feedback for Exercise 11 if this was not accepted yet, then you need to accept the invitation
Invitations are email to the email account for your GitHub Username. I assume in most cases this is your UA email.
You can also view these on your GitHub Organization Page
If you accept the invitation, I will give you full credit for this exercise.
Windows File Explorer & WSL
To open the Windows File Explorer on the current directory in WSL:
The . means the current directory in WSL. You can also open a file explorer.exe Requirements.md. If you open a path it has to be in Linux format, e.g., C:\Users\JohnDoe\Documents would be /mnt/c/Users/JohnDoe/Documents.
Assumptions
I noticed that many of the assumptions mentioned are about the difficulty of implementation. This is not what the book discusses. Instead, they are assumptions about what the user story means. The only person who can answer those assumptions is the customer.
From now on, label assumptions about the user story as assumptions and assumptions about implementation as implementation.
Dependencies
I see a lot of user story estimates where the assumptions include the completion of a previous user story. This is a dependency. Avoid dependencies at all costs. For example, Add … does not have to be completed before Delete …. Obviously there will be some dependencies, but they are to be at the user-story level, not the implementation level.
Class
Exercise 13: Commit to Project 1 Repository
Following the procedure given in the assignment and demonstrated in class, contribute at least one commit to the Project 1 repository. This must be a valid and useful commit.
git CLI to make the commit. You can do this wherever you have the repository cloned. You can even do this in a GitHub Codespacegit commits:
You can see your commit messages with the git log command.
Unless stated otherwise, all exercises are due by 4 pm on Wed Sep 16
Your management is concerned that your team does not have a complete set of user stories. The first problem is low recall, i.e., the team is not capturing all the user stories the customer needs. The second problem is that without not enough work, the organization will have to let some of the team members go cut everybody's pay.
The customer met with their team and returned with a list of potential user-story titles. These possible new user stories fall into one of the following categories:
Each team member will fill out the form for your team. The form will not be available until your team meeting time.
Create a new user story, or multiple user stories, for each of these valid potential user stories. This includes fixing any title issues and adding a description. Also, take this time to fix any existing user stories.
If you have any additional time, then create more estimates. As you did before, keep track of details for the next team meeting when you will submit any estimate details.
There is nothing to upload for this exercise. Complete the provided form during class time.
Week 3 Class 6 Thu Sep 10 Posted: Sep 10
After Class
Exercise 11: GitHub Username
There are three steps to allow you to create repositories for the projects and some of the exercises:
For 3, I indicated in your feedback for Exercise 11 if this was not accepted yet, then you need to accept the invitation
Invitations are email to the email account for your GitHub Username. I assume in most cases this is your UA email.
You can also view these on your GitHub Organization Page
If you accept the invitation, I will give you full credit for this exercise.
Note that the link (in the title of this this notice) will only work if you:
Announcements:
Similar Action Words
Many action words are similar in meaning, but can vary in specificity or in details that they imply.
| Word 1 | Word 2 | Explanation |
|---|---|---|
| Delete | Remove | "Delete" often implies a permanent action, while "Remove" can be less final or reversible |
| Approve | Accept | "Approve" sounds authoritative, while "Accept" is more general |
| Invite | Connect | "Invite" is very specific, suggesting a request for participation, whereas "Connect" is broader |
| Create | Add | "Create" is making something new, whereas "Add" can mean including something that already exists |
| Subscribe | Register | "Subscribe" is ongoing engagement, while "Register" is often a one-time action |
| Approve | Validate | "Approve" is a decision or permission, while "Validate" suggests checking or confirming correctness |
| Merge | Link | "Merge" is combining into one, whereas "Link" connects them without combining |
| Submit | Send | "Submit" is submission to a process, while "Send" is transferring information |
| Stop | Pause | "Stop" is final, while "Pause" is temporary |
| Cancel | Stop | "Cancel" is preventing something from starting or finishing, whereas "Stop" is halting an ongoing action |
Note that the customer may not realize the difference between these terms, and say one when they mean the other.
Exercise 11: GitHub Username GitHub Classroom is no more. Instead, we are using Classroom 50. The process for allowing you to create a repository has changed and is as follows: 1) Add you to the UACPSC GitHub Organization, and 2) Add you to the roster for the course. To do so, I need your GitHub Username. If you don't provide it, you won't be able to do the projects and some exercises.
The title of this exercise is a link to the form where you can enter your GitHub Username.
Once I add you to the roster, you will receive an invitation to join the UACPSC GitHub Organization. You will need to join in order to create repositories. Note that this differs from the GitHub Classroom process of the past.
Due Friday, Sep 11 by 9 am.
Class
Unless stated otherwise, all exercises are due by 4 pm on Fri Sep 11
Project 1 is due Monday, September 21 at 11:59:59 pm, in the file Requirements.md in a GitHub Organization UACPSC repository. You will need a GitHub account, give me your GitHub Username, and accept the invitation to join the GitHub organization UACPSC. Once you are all setup, an invitation link to create the repository is in Brightspace.
At your place of work, you need to submit a formal report describing the project's current state. Write a report of your individual and team activities, including these primary sections:
1. User Stories
User Stories with title, description, estimate, and space for priority
This will be shown to the customer. This section should not contain any information that a customer should not see.
2. General Process
Details of the overall process and procedure that created the Estimates
This will be shown to the customer, so only data on the User Story cards from section 1 should be shown.
3. Background Data
Details on spread, assumptions, issues, etc.
How did the team interaction work, and what did and did not work well
This will not be shown to the customer. It is for your supervisor.
In other words, the report describes all the work and processes followed while creating the user stories and their estimates. The details of the general process and the general observations in Section 3 are in the form of a narrative, i.e., describe what you did, how you did it, and the result, ordered by time. The report's tone is professional, with a clear, consistent presentation.
The team created the User Stories and Estimates, but this report is an individual project. In your account, make changes to User Stories if they do not follow the guidelines given in the book. These changes are especially crucial for the Title and the Description. Split User Stories if the Estimate is too large. Explain any changes in your report.
The report uses plain-text formatting syntax Markdown. Markdown is an almost universal format for text formatting in software development. Due to its direct conversion to HTML, Markdown has replaced HTML and other plain-text formatting languages in SE. It has become so popular that it is a new document type in OneDrive.
You will use git to work on your report. Assuming a username of jdoe@uakron.edu, the steps are as follows:
jdoe@uakron.edu
Note: All commits must have non-blank commit messages. Any non-blank commit messages will not be accepted, leading to a 0 on the entire project.
A GitHub Codespace is available for this project. See the guide GitHub Codespaces.
After you have committed your final change to the project, you must run your report through a report check to see if it follows many of the Markdown requirements of the project. To do so, create a GitHub Codespace for the project. When in there, enter the command:
You should see a clean report. If it finds anything, fix it and rerun the checkmd command.
The checkmd is a custom command created for this project to verify specific Markdown requirements. A clean run does not mean you have nothing wrong with your project.
Upload an terminal session of your report successfully passing the checkmd program.
To demonstrate this, you will record a terminal session using asciinema. It records the commands you enter and the output the command produces. asciinema is already installed in the GitHub Codespaces image. You can also install asciinema on Linux/WSL/macOS.
asciinema is relatively straightforward to use.
Further Note I am removing the screencast requirement for Project 1
Note I removed the example screencast because it is for an old version of asciinema. Go to the asciinema site, or wait until Tuesday, Sep 22 when I will demonstrate it in class. The screencast URL due date is extended to 11:59:59 pm on Tuesday, Sep 22. The project due date remains the same.
You can play, pause, skip, etc. You can also copy the commands as text. Note that the replay even includes your pauses and any delay as the command is run.
At the end of the terminal session, asciinema will show a URL. Anybody can use this URL to view the session. This is what you will submit for the exercise to the link in the exercise title. The URL should not contain "connect" or be a local file. Test your URL in a browser; an incorrect URL will receive a 0.
Submit the URL via this form: Project 1
The report content, format, and involvement in team activities are all considered for your score.
Think carefully about how you present the report, including using Markdown. Remember, the User Stories form an unordered set, not an ordered list.
Start by reviewing your user stories, particularly the titles. Titles that do not have an action term, or have a poor action term, will be counted off on your score for this exercise.
As a team, create estimates for the user stories by using the planning poker procedure described on pages 48-49 of the book.
When the team reaches a consensus for the estimate, place the estimate at the bottom left of the User Story as indicated by the example, e.g., "Estimate: 1 day" or "Estimate: 3 days".
Individually, each team member will turn in to Brightspace individual notes that include for each round of planning poker:
If the team is not able to come to a consensus, table that User Story and go on to another one.
The notes are due by the end of class. They can be in the form of a PDF (print to file from a computing device), or a JPG (picture taken via your phone).
The more you work with the user stories, the more you will find improvements to them. Be sure to make those improvements. Also, you may think of additional user stories. Be sure to add them.
Week 3 Class 5 Tue Sep 08 Posted: Sep 08
After Class
Exercise 11: GitHub Username GitHub Classroom is no more. Instead, we are using Classroom 50. The process for allowing you to create a repository has changed and is as follows: 1) Add you to the UACPSC GitHub Organization, and 2) Add you to the roster for the course. To do so, I need your GitHub Username. If you don't provide it, you won't be able to do the projects and some exercises.
The title of this exercise is a link to the form where you can enter your GitHub Username.
I am posting this early since the deadline is earlier than normal. Due Friday, Sep 11 by 9 am.
Announcements:
Action-Oriented Titles
The primary goal of user stories is to capture a specific need or goal of a user in the context of software development. It's about "what the user wants to do" or "achieve" with the software.
Benefits of Action-Oriented Titles:
User Story Titles and the Number Grammatical Category
Strongly consider using a title with a singular noun for a user story, instead of a title with a plural noun, because it emphasizes the atomic nature of the action.
| Plural | Singular |
|---|---|
| Upload Documents | Upload a Document |
| Send Messages | Send a Message |
| Add Products to Cart | Add a Product to the Cart |
| Register for Events | Register for an Event |
| View Notifications | View a Notification |
| Search for Jobs | Search for a Job |
In general, user stories with singular titles are going to be easier to implement. There can be exceptions, as "View Notifications" may be simpler than "View a Notification" due to not having to select just one.
The most important aspect is clarity and understanding. If "Purchase Clothes" effectively communicates the intent without ambiguity and your team finds it more natural, it's also acceptable. The choice between singular and plural should ultimately be guided by what best serves the clarity and focus of the story in your context.
Class
Unless stated otherwise, all exercises are due by 4 pm on Wed Sep 09

Your team is to correct the current user stories and increase the number of user stories. Very carefully go over your user titles and descriptions. Add more user stories and see what you are missing.
The number of user stories per teams was 7, 9, 11, 12, 16, 16, 16, 17, and 27(!). Twelve and under are far too few. Greatly increase the number.
Remember to split any user stories that you can. Apply the "and" rule.
In addition to the team work of extracting user stories from the app description, each team member will turn in to Brightspace individual notes that includes:
The individual notes are due by the end of class uploaded to Brightspace. They can be in the form of a PDF (print to file from a computing device), or a JPG (picture taken via your phone).
Do not upload a photo of all your user stories This will result in a very low score for the exercise. Follow the directions for the individual notes.
Week 2 Class 4 Thu Sep 03 Posted: Sep 03
Announcements:
Class
Exercise 7: HFSD Chapter 2 p42 User Story Interview
Unless stated otherwise, all exercises are due by 4 pm on Fri Sep 04

Each Team is assigned a separate App with the description in Brightspace.
As a Team, create as many User Stories as you can for that app from the app description. For now, this is just the Title and the Description. The Title is just an action that a user can perform. The Description is from 1 to 3 sentences that describes what that action is. Follow the examples given in the book.
The User Stories are written on the provided index cards. I will provide a folder for you to put the cards in as I will collect the cards at the end of class.
In addition to the team work of extracting user stories from the app description, each team member will turn in to Brightspace separate, individual notes that include:
The individual notes are due by the end of class uploaded to Brightspace. They can be in the form of a PDF (print to file from a computing device), or a JPG (picture taken via your phone).
Week 2 Class 3 Tue Sep 01 Posted: Sep 01
Announcements:
Exercise 3: App Idea I posted scores and feedback in Brightspace
View your feedback even if you got a 10 / 10. In some cases, a 10/10 does not mean there was nothing wrong.
Fix any issues that I identified.
If you fail to fix your issues or view your feedback by 4 pm on Wed Sep 02 I will change your score to a 0
Note: This "fix your issues and get full points" is not the norm for the exercises and assignments in the course
Class
Exercise 5: HFSD Chapter 1 Crossword
Unless stated otherwise, all exercises are due by 4 pm on Wed Sep 02
Form a team of 4 members. The final team composition is at the discretion of the instructor.
After forming a team, your team needs to decide on a name from the following choices:
Pick at least 4 names.
Send Dr. Collard and Mr. Cowan an email with the following:
CPSC480-020 Teammembers.csv, in the CSV (Comma-Separated Values) format. Use the following as an example:
Firstname,Lastname,Email,Section,Team
John,Doe,johndoe@uakron.edu,020,Harpo
Jane,Doe,janedoe@uakron.edu,020,Harpo
Brian,Doe,briandoe@uakron.edu,020,Harpo
Suzy,Doe,suzydoe@uakron.edu,020,Harpo
Harpo
Moe
Yoda
Zeppo
The purpose of a team is not just to divide the work but also to meet a required level of quality. All members of the team must check any team assignment in this course. You, as a team, are responsible for these directions. Any emails sent as part of an assignment (including exercises) must have the correct subject, CC list, and contents. Exercises are not accepted and do not receive points if they do not have the proper form and content.
The exercise is due by the end of class.
Week 1 Class 2 Thu Aug 27 Posted: Aug 27
Announcements:
Syllabus Missed section on prerequisites.
Prerequisites: Minimum C- in CPSC 210 Computer Science II
Since the prerequisite course is in C++, we will also use C++.
Class
Exercise 3: App Idea - Submit via Brightspace in PDF. Due by 4 pm on Mon Aug 31
All applications start with an idea or a need. As a user, write a description of an application. The description should include who would use it and its features. The application can be one that you create yourself or an existing program.
Guidelines:
Comments:
Unless stated otherwise, all exercises are due by 4 pm on Fri Aug 28
Week 1 Class 1 Tue Aug 25 Posted: Aug 25
After Class
Announcements
A comprehensive overview of all phases of software development, including requirements, analysis, design, implementation, testing and validation, release, maintenance, and evolution, focusing on agile methodologies.
Exercises
Exercise 2: Software Development Diagram
Draw the Software Development Diagram that I present in class. Upload a PDF or JPG through Brightspace.
All exercises are due by 4 pm on Wed Aug 26
Greetings and welcome to CPSC 480 Software Engineering (SE) section 020 for Fall 2026.
See you on Tuesday, Aug 25 at 3:30 - 4:45 pm in Arts & Sciences (CAS) room 134