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:
- Talking beats debugging - 70% of good code archaelogy is done by talking to people.
- Always start with the simplest solution.
- 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:
- Git tools like
git blame
,git log -p
,git bisect.
tig
.- 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:
- Read it before running it. Find the answer to the basic questions: Who, What, When, Why.
- Try pair programming, e.g. tuple.app's pair programming guide.
- Run the code if the above fails. Consider using Docker containers on top of different environments.