Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightning talk: Using git to understand and debug software #27

Open
anubh-v opened this issue Feb 7, 2020 · 0 comments
Open

Lightning talk: Using git to understand and debug software #27

anubh-v opened this issue Feb 7, 2020 · 0 comments

Comments

@anubh-v
Copy link
Contributor

anubh-v commented Feb 7, 2020

Here are the slides: (in PowerPoint, so the animations can be viewed)
git-talk-5March.pptx

Impact

  • Do:

    • When trying to understand a piece of code in a software project, consider using git log rather than git blame.
    • When trying to pin down the root cause of a bug, consider debugging with git bisect
  • Believe:

    • git log can help developers determine how a certain unit of code ended up in its current state. Unit of code = package, class, function, or even a line
    • git bisect speeds up the process of identifying problematic commits
  • Know:

    • git log allows commit history to be filtered in many ways (by directory, time period, line numbers, line content)
    • git bisect uses binary search to look through a set of specified commits

WIIFY

  • In mature projects, git could be one of the reliable methods of understanding technical decisions, especially since documentation may not always be complete and senior team members may have left the project. Alternatively, git can be used to do some background research before we approach others with our questions.

Key points

  • git blame is not always the most suitable tool for understanding how a piece of code ended up in its current state.

  • git log allows us to zoom in on the history of a specific unit of code, because it allows commit history to be filtered in many ways (by directory, time period, line numbers or even a function name)

  • git bisect allows us to partially automate the process of finding problematic commits

References

@anubh-v anubh-v changed the title Lightning talk: Using git to understand legacy code ("code archeology") Lightning talk: Using git to understand legacy code Feb 7, 2020
@anubh-v anubh-v changed the title Lightning talk: Using git to understand legacy code Lightning talk: Using git to understand and debug software Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant