Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ask Your Code

Ask Your Code

What do we really use version control for at a fundamental level? How do we ask our codebase questions and are the tools we're using able to answer the questions that we really want to ask it? What do you want to ask your code?

Scott Chacon

July 26, 2023
Tweet

More Decks by Scott Chacon

Other Decks in Programming

Transcript

  1. When you explain a why, you have to be in

    some framework that you allow something to be true. GitButler
  2. aunt minnie is in the hospital GitButler she fell and

    broke her hip she slipped on some ice
  3. aunt minnie is in the hospital GitButler she fell and

    broke her hip she slipped on some ice ice is slippery
  4. we all use git GitButler we need version control to

    collaborate and save our work our computer doesn’t save the history of our files or let other people access them
  5. GitButler what does version control do? backing up commit experimenting

    branch, checkout collaborating and reviewing diff, merge moving bits push, pull archaeology log, blame, bisect
  6. GitButler what does version control do? backing up commit experimenting

    branch, checkout collaborating and reviewing diff, merge moving bits push, pull archaeology log, blame, bisect archaeology log, blame, bisect
  7. GitButler the common questions What are the last few dozen

    commits that have been made to this codebase?
  8. GitButler the common questions What are the last few dozen

    commits that have been made to this codebase? git log
  9. GitButler the common questions Who is the last person who

    touched this line of code? What are the last few dozen commits that have been made to this codebase?
  10. GitButler the uncommon questions What commits are on this branch

    that are not yet merged into this other branch?
  11. What files are most closely related to this file? get

    all the commits that touch this fi le
  12. What files are most closely related to this file? get

    all the fi les each commit touches get all the commits that touch this fi le
  13. What files are most closely related to this file? print

    out the top fi ve fi les in common
  14. GitButler the impossible questions What Pull Requests contributed to this

    file? What code in other repositories are related to this code? What were the conversations (in chat or GitHub) my team had around this code before it was merged? What did the author/s reference when writing this? What specifications was this based on? What errors were or are commonly created by this code or code related to it that I should be aware of before changing?