Software Project Management Fundamentals
Welcome to this comprehensive course on software project management fundamentals. In this module we blend core software development concepts—such as C++ compilation, build automation, and…

In a Makefile, what command is executed when you run `make clean`?
When using Git, which command stages changes for the next commit without affecting already staged files?
Which of the following best describes the purpose of a header guard (`#pragma once`) in C++?
During a Git merge, a conflict arises. Which command aborts the merge and restores the pre‑merge state?
In the Agile Scrum framework, what is the primary artifact that lists the tasks to be completed in the current sprint?
When compiling a C++ project with `g++` using separate compilation, which file type is produced after the compilation step but before linking?
Which Git command shows the list of files that have been modified but not yet staged?
In a CMake project, which command generates the Makefile from `CMakeLists.txt`?
When using pygame, which method updates the display after drawing operations?
In Git, what does the `HEAD~2` notation refer to?
Which of the following statements about unit tests is FALSE?
During a Git pull, which two operations are performed sequentially?
In a C++ project, why is it recommended to place the implementation of data‑structure functions in a separate `.cpp` file rather than in the header?
Which Git command records a snapshot of the current index with a message describing the change?
When using SFML, which class represents a texture that resides in GPU memory?
In a Git repository, which file is used to specify patterns of files that should never be tracked?
Which of the following best explains why `g++ -Wall -c monProgramme.cpp -o monProgramme.o` does not need to list all header files on the command line?
When developing a static website for the algorithmic project, which of the following is a mandatory requirement?
In the context of software project planning, which diagram is specifically mentioned for visualizing task scheduling and dependencies?
When using pygame, which object represents the drawable area where images and text are rendered before being shown on the screen?
Which Git workflow model is described as "Applicatif aidant à gérer les différentes branches d’un dépôt"?
In a C++ project, what is the purpose of the `#pragma once` directive placed at the top of a header file?
Software Project Management Fundamentals
Welcome to this comprehensive course on software project management fundamentals. In this module we blend core software development concepts—such as C++ compilation, build automation, and version control—with essential project‑management practices from Agile Scrum. By mastering these topics you’ll be able to streamline development workflows, reduce errors, and keep your team aligned with business goals.
Understanding the C++ Compilation Process
When you write a C++ program, the source code undergoes several distinct phases before it becomes an executable. Knowing each step helps you diagnose errors quickly and write more efficient code.
- Preprocessing: Handles directives like
#includeand#define. The preprocessor expands macros and inserts header files. - Lexical analysis: Breaks the preprocessed text into tokens (identifiers, literals, operators).
- Semantic analysis: Checks the consistency of types, validates scope rules, and ensures that expressions make sense. This is the step that catches type‑mismatch errors.
- Code generation: Translates the validated abstract syntax tree into assembly or machine code.
- Linking: Combines object modules and libraries into a final executable.
Remember, semantic analysis is the phase that verifies type correctness, making it a critical checkpoint for catching bugs early.
Build Automation with Makefiles
Makefiles are the backbone of many C++ projects. They define how source files are compiled and linked, and they provide convenient shortcuts for common tasks.
One frequently used target is clean. Running make clean executes the commands associated with this target, typically removing all intermediate files such as object files (.o) and the final executable. This helps ensure a fresh build environment.
# Example Makefile snippet
clean:
rm -f *.o my_program
By cleaning the build directory you avoid hidden dependencies and guarantee that subsequent builds start from a clean slate.
Version Control Basics: Staging and Status
Git is the most widely adopted distributed version‑control system. Two fundamental concepts are staging and status checking.
- Staging changes: Use
git add <file>to stage specific files for the next commit. This command adds the file to the index without affecting files that are already staged. - Viewing unstaged changes:
git statuslists files that have been modified but not yet staged, giving you a clear picture of your working directory.
These commands enable granular control over what gets committed, which is essential for clean, atomic commits.
Header Guards and #pragma once
In large C++ projects, header files are often included multiple times across different translation units. To prevent duplicate definitions, developers use header guards.
The modern, compiler‑specific directive #pragma once tells the compiler to include the header file only once per translation unit, effectively acting as a guard without the need for traditional macro definitions.
#pragma once
// Declarations go here
Using #pragma once improves compilation speed and reduces the risk of multiple‑definition errors.
Managing Git Merges and Conflicts
When multiple branches modify the same code, a merge conflict can occur. Git provides a safe way to abort an ongoing merge and revert to the pre‑merge state.
The command git merge --abort stops the merge process, discarding any partially merged changes and restoring the repository to the state it was in before the merge began.
# Example workflow
git checkout feature-branch
git merge main # conflict arises
# Resolve or abort
git merge --abort
Using --abort helps maintain a clean history and prevents accidental commits of conflicted code.
Agile Scrum: Sprint Backlog
Scrum is an iterative framework that emphasizes transparency, inspection, and adaptation. Within each sprint, the team works from a sprint backlog, which is a prioritized list of tasks and user stories selected from the product backlog.
- Product backlog: The master list of all desired features and improvements.
- Sprint backlog: The subset of items the team commits to delivering in the current sprint, often visualized on a board.
- Burndown chart: Tracks remaining work over the sprint duration.
Understanding the sprint backlog is crucial for effective sprint planning and for delivering incremental value.
Separate Compilation and Object Files
Modern C++ development encourages separate compilation: each source file is compiled independently into an object module (typically with a .o extension). These object files are later linked together to produce the final executable.
# Compile each source file separately
g++ -c main.cpp # produces main.o
g++ -c utils.cpp # produces utils.o
# Link object files into an executable
g++ main.o utils.o -o my_app
Separate compilation speeds up incremental builds because only changed source files need recompilation.
Putting It All Together: A Mini‑Project Workflow
Let’s walk through a typical workflow that combines the concepts covered:
- Initialize a Git repository and create a
.gitignoreto exclude build artifacts. - Write C++ source files with proper header guards or
#pragma once. - Set up a Makefile that includes a
cleantarget and separate compilation rules. - Compile using
make. The compiler performs preprocessing, lexical analysis, semantic analysis, and code generation, producing object files. - Stage changes with
git add <file>and verify withgit status. - Commit with a clear message, then push to a remote branch.
- Open a pull request and, after review, merge into the main branch. If a conflict appears, resolve it or use
git merge --abortto start over. - Run make clean to remove old object files before the next build cycle.
This loop reinforces good practices: clean builds, precise version control, and clear project artifacts.
Key Takeaways
- Semantic analysis is the compilation step that checks type consistency.
make cleanremoves generated object files and executables, ensuring a fresh build.- Use
git add <file>to stage specific changes without disturbing already staged files. #pragma onceguarantees a header is compiled only once per translation unit.git merge --abortsafely aborts a conflicted merge.- The sprint backlog is the primary Scrum artifact for tracking tasks in a sprint.
- Separate compilation produces object modules (
.o) before linking. git statusshows modified but unstaged files.
By integrating these technical and managerial concepts, you’ll be better equipped to lead software projects that are both technically sound and aligned with business objectives.
