Most of the code that exists in the world is code you didn’t write, and so most of the code you work with is also code you didn’t write, even if you’re not working with a legacy system. But when we don’t understand that code, we can all too often dismiss, disparage, or even simply delete it - and that’s a mistake!
Almost all the code we interact with was written by other humans, and they wrote the code that way for a reason. If we take the time to understand the context and the story behind a piece of code, we can infer a lot about what those humans meant to achieve, what their culture was like, and what they valued… in other words, we need to become an archaeologist!
Let’s work to build a better understanding of the code we didn’t write, and of who wrote it and why. Using the tools of psychology you can learn what’s happening to your brain when you’re reading someone else’s code, and then learn how you can make understanding it take less cognitive effort. Using the tools of archaeology you can learn how to use your development environment to find the real stories of the people that wrote it, and how that story can protect you from making the same mistakes they did. The ability to read and examine others’ code is essential - you can’t change or improve software without understanding what it already does, so come learn how to do it with skill and compassion!
==Resources==
Gratitude journaling -
https://greatergood.berkeley.edu/article/item/tips_for_keeping_a_gratitude_journal
User roles research -
Just Enough Research, Erika Hall
https://www.nngroup.com/articles/personas-study-guide/
https://jobs-to-be-done.com/jobs-to-be-done-a-framework-for-customer-needs-c883cbf61c90
https://www.nngroup.com/articles/journey-mapping-101/
Reading Code -
The Programmer's Brain, Felienne Hermans
Execution Flow Diagrams -
https://dev.to/conw_y/visualising-execution-flows-59e7
Branching Patterns -
https://martinfowler.com/articles/branching-patterns.html
Parkinson's First Law -
https://en.wikipedia.org/wiki/Parkinson%27s_law
Refactoring -
Emily Bache’s Refactoring Guided Learning, https://www.youtube.com/watch?v=K7xSsNpeM8I
Refactoring, Martin Fowler
Working Effectively with Legacy Code, Michael C Feathers
Refactoring to Patterns, Joshua Kerievsky