How To Approach A New Codebase
How To Approach A New Codebase
I haven't done this in a while. So how do I do this please? The very first step is to break it down.
Hold on a minute. Let me write this down properly.
Steps
1. Break it down
Chat GPT says to "Don't try and understand everything at once.
Break down the codebase into smaller, manageable parts.
Focus on understanding one module, class or function at a time.
2. FOCUS ON PATTERNS
PATTERNS PATTERNS YES YES YES PLEASE I LOVE PATTERNS
LOOK FOR RECURRING PATTERNS OR CONVENTIONS IN THE CODEBASE
LOOK FOR RECURRING PATTERNS OR CONVENTIONS IN THE CODEBASE
LOOK FOR RECURRING PATTERNS OR CONVENTIONS IN THE CODEBASE
LOOK FOR RECURRING PATTERNS OR CONVENTIONS IN THE CODEBASE
LOOK FOR RECURRING PATTERNS OR CONVENTIONS IN THE CODEBASE
LOOK FOR RECURRING PATTERNS OR CONVENTIONS IN THE CODEBASE
LOOK FOR RECURRING PATTERNS OR CONVENTIONS IN THE CODEBASE
LOOK FOR RECURRING PATTERNS OR CONVENTIONS IN THE CODEBASE
3. Take breaks - yeah yeah yeah right okay I'll do that later
I'll do that later then
4. ASK QUESTIONS
don't hesitate to ask questions if something is unclear. reach out to your colleague or team members for clarification.
ASKING QUESTIONS NOT ONLY HELPS YOU UNDERSTAND THE CODE BETTER, BUT ALSO FOSTERS COLLABORATION WITHIN THE TEAM.
5. ENGAGE MULTIPLE SENSES
- READ OUT LOUD
- USE COLOURS
- EXPLAIN THE CODE TO OTHERS
MAKE NOTES
MAKE NOTES
MAKE NOTES
6. MAKE NOTES - AGAIN- ON YOUR UNDERSTANDING
7. WRITE IN YOUR DAILY LOG - if you have one.
I always use my daily log. Thank you so much dear readers for helping me to have this wonderful reminder. "document your UNDERSTANDING, ASSUMPTIONS, AND ANY QUESTIONS YOU MAY HAVE."
THIS WILL HELP TO:
- RETAIN INFORMATION
- SERVE AS A REFERENCE FOR FUTURE DISCUSSIONS
8. EXPERIMENT WITH THE CODEBASE
Play around with it and test it
EDIT:
This post got hijacked by asking a senior and writing an EVEN BETTER POST ON IT:
What does os.environ mean?
What is os.environ?
os.environ
"os.environ is a Python mapping object that represents the user's OS environmental variables.
It returns a dictionary having the user's environmental variable as key and their values as value".
It returns a dictionary having the user's environmental variable as key and their values as value.
What are environment variables in Python?
Environment variables or env vars are "variables you store outside your program that can affect how it runs".
Because I am so happy to be sharing the angels again here is one more angel:
Comments
Post a Comment