Skip to content
Snippets Groups Projects
Commit 1008b7ee authored by Dominik Zobel's avatar Dominik Zobel
Browse files

Draft for complexity exercise

parent b8992915
No related branches found
No related tags found
1 merge request!24complexity lecture
Pipeline #66513 passed
...@@ -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"
......
---
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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment