Judith van Stegeren - Practical Code Archaeology - 2023

Details

Title : Judith van Stegeren - Practical Code Archaeology Author(s): PyData Link(s) : https://www.youtube.com/watch?v=5KItp5WJY3o

Rough Notes

Archaeology here refers to the remnants of old, legacy code, often in the form of scripts, Jupyter notebooks etc.

When trying to grapple with the problems of old code, keep note that:

  1. Talking beats debugging - 70% of good code archaelogy is done by talking to people.
  2. Always start with the simplest solution.
  3. Invest time in detective skills, e.g. read posts from Julia Evans, also see about their UNIX tools posts.

Some other methods the speaker has seen:

  1. Git tools like git blame, git log -p, git bisect.
  2. tig.
  3. UNIX tools like find, grep, netstat, tcpdump.

A lot of work however is in Jupyter notebooks which are often not under version control. When encountering a Jupyter notebook:

  1. Read it before running it. Find the answer to the basic questions: Who, What, When, Why.
  2. Try pair programming, e.g. tuple.app's pair programming guide.
  3. Run the code if the above fails. Consider using Docker containers on top of different environments.

Emacs 29.4 (Org mode 9.6.15)