ecoming familiar with a codebase could be overwhelming, and its effectiveness is often one of the key differences between a senior and a junior developer. Is there a strategic way to do it? To answer this question, we have to touch on psychological topics like the fear of the unknown, the unknowns mapping and the cognitive load theory. With this broader frame in mind, we will convert some "code search techniques" or "git exploring tricks" into bricks of a more systematic approach.
6. Topics to delve
Rabbit holes
Cognitive load management
Active procrastination
Known unknowns
Known unknowns
7. keep listening to spot
the ephipany
Unknown knowns
Unknown knowns
james joyce
vincent mcdonnell
james joyce
vincent mcdonnell
8. Obscurity occurs when important
information is not obvious.
Docs = red flag
A keen eye for detail
Read ADR, pr and issues
Unknown unknowns
Unknown unknowns
24. As a matter of
fact, codebase
knowledge is more
than just lines
of code
A multitude of clues
and relevant whys
can be found in
the PRs and Issues threads.
Why
26. how to ask for help
Once the doubt has been identified, we must
know how to ask for help from those who possess
the information.
27. HELP! Next.js
navigation is not
working.
Can't use next/navigation 'redirect' method inside the layout
file
I'm using the "next/navigation" redirect function to redirect
the page to the login page if the session is not found. I'm
using that function inside a server component which is inside
the "layout.tsx" file.
The page doesn't redirects and the screen shows an unhandled
runtime error (Error: NEXT_REDIRECT) that makes me think that
the redirect method is not being executed on the server side,
because the error shows in the client. If I use this same method
inside a component on the "page.tsx" file it works perfectly.
pnpm run dev
Go to localhost:3000
The app should detect that the user is not logged and should
redirect automatically to the login page but the error will
show.
Node: 18.12.1 npm: 8.19.2 Yarn: 1.22.19 pnpm: 7.17.0
next: 13.0.6-canary.1 react: 18.2.0 react-dom: 18.2.0
To Reproduce
28. Anatomy of a well-
crafted question
What I want to know?
Who am I talking to?
Where I am
and how I got there?
29. The etiquette/galateo
of asking for help.
Don’t ask to ask
Makes the
interlocutor lose
time by slowing down
communication
Don’t be lazy
Check the grammar,
spelling and font
(use monospaced font
for code)
Don’t expect
only confirmations
You can find a clue
under every word, so
be open to new ideas
Avoid passive-
aggressive behaviors
Wait, don’t use
urgent/help, share the
answers
You are asking for
help not the
solution!
30. the cost of asking help
Expensive, large bandwidth but
super limited to scale.
Implement the documentation.
Faster, easy to find the
knowledge holder, low signal-
noise ratio.
One to One One to many
Stay in the loop
feature, pr, slack, discord,
news...
31. The emotional impact of the answer
'Illustration: 'Nika Akin''
Make sure you don't interpret
the answer as a judgment
RTFM / STFW
Make this silly answer useful
by asking where (which topic)
and why (for which lack)
32. created by the way
information is presented
to the person
is the result of the
constructive method of
handling information
Germane
the cognitive load
associated with the nature
and subject matter
Intrinsic Extraneous
33. 7 ± 2 elements
20 sec. Duration
(Miller 1956)
Continuous evolution
Synaptic Plasticity during sleep
(Sleep function and synaptic
homeostasis Giulio Tononi, Chiara
Cirelli 2005)
Working memory:
Long term memory:
External world
the cognitive load theory
LEARNING
REM
EMB
ERI
NG
FORGETTING
ATTENTION
36. spot the gems
Look at the first commits
https://github.com/mercurius-js/mercurius/commit/main?
after=4c8242...+300&branch=main
git log --reverse --all | head -30
37. Find the hot spots
Look at the parts that
change frequently
git log --pretty=format: --name-only | sed
'/^s*$/d' | sort | uniq -c | sort -rg |
head -100