Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lecture materials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
generic software skills
lecture materials
Commits
1008b7ee
Commit
1008b7ee
authored
1 year ago
by
Dominik Zobel
Browse files
Options
Downloads
Patches
Plain Diff
Draft for complexity exercise
parent
b8992915
No related branches found
No related tags found
1 merge request
!24
complexity lecture
Pipeline
#66513
passed
1 year ago
Stage: test
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_quarto.yml
+1
-1
1 addition, 1 deletion
_quarto.yml
exercises/complexity.qmd
+44
-0
44 additions, 0 deletions
exercises/complexity.qmd
with
45 additions
and
1 deletion
_quarto.yml
+
1
−
1
View file @
1008b7ee
...
@@ -46,7 +46,7 @@ website:
...
@@ -46,7 +46,7 @@ website:
-
"
exercises/git.qmd"
-
"
exercises/git.qmd"
-
"
exercises/programming_paradigms.qmd"
-
"
exercises/programming_paradigms.qmd"
-
"
exercises/data_structures.qmd"
-
"
exercises/data_structures.qmd"
#
- "exercises/complexity.qmd"
-
"
exercises/complexity.qmd"
# - "exercises/debugging.qmd"
# - "exercises/debugging.qmd"
# - "exercises/good_scientific_practice.qmd"
# - "exercises/good_scientific_practice.qmd"
# - "exercises/user_experience.qmd"
# - "exercises/user_experience.qmd"
...
...
This diff is collapsed.
Click to expand it.
exercises/complexity.qmd
0 → 100644
+
44
−
0
View file @
1008b7ee
---
title: "Complexity"
---
### Using `git bisect` to find committed bugs
_The tasks should be done using the test repository **(provide link here)**._
**General information**
`git bisect` allows to specify a good and a bad commit and applies a binary search to locate
the commit which introduced a bug our flawed behaviour.
In general, you start the procedure by typing
```bash
git bisect start
```
Then a good and a bad commit have to be defined. In our case the bad commit is the most recent one,
while the good commit is the fourth commit of the repository.
Find out the has of the respective commits and replace them in the commands below
```bash
git bisect good <commit>
git bisect bad <commit>
```
Now git will start bisecting and needs input whether the selected commit is good or bad
(by testing and issueing `git bisect good` or `git bisect bad`).
If you're done, enter the following to clean up and return to the original HEAD
```bash
git bisect reset
```
_For more information about `git bisect`, refer to the documentation at <https://git-scm.com/docs/git-bisect>._
**Tasks**
1. Which commit does `git bisect` return, if you use simply run `test_myint.py` from the selected commit every time?
2. How can you make testing more consistent for more or even all of the commits? Can you spot additional issues with this method?
3. Try to give a best practices about git commits and the checked in code based on the experience from the previous two tasks (3-5 recommendations)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment