Reading source code is usually underestimated by many developers and AQA engineers as they are mostly focused on writing it.
Moreover, some people find reading someone else’s code boring, frustrating or even creepy. Others consider this activity a waste of time.
However, this is a common misconception which must be cleared. Do you want to know why? Are you still wondering how to master the art of reading code? Then come and hear it! This talk will be helpful for newbies who got stuck and don’t know how to start reading and understanding someone else’s code, as well as for professionals who want to structure their knowledge and learn some new patterns.
4. 4
4
THE PAOMNNEHAL PWEOR OF
THE BIARN
I cna elasiy rade tihs ifrontamoin.
It manes taht oru barin has
amiznag pewor! As I culod raed
scuh pecie of txet woihtut ayn
porlebm, I nac laren woh to rade
ceod as wlel. Tsurt yuro biran adn
it wlil ecixte yuo!
21. 21
21
• Pay attention to names
• Avoid focusing on implementation
details
• Think about usage context
• Describe what you see in a single
sentence
ABSTRACT AWAY FROM DETAILS
23. 23
23
• Learn common design patterns
• Locate common patterns in existing
code base
• Focus on your daily reading style and
find out how does your brain optimize
different code parts
PATTERNS RECOGNITION
25. 25
25
• Coding standards are finalized
• Git flow is selected / hooks are configured
• Branch / commit message conventions are
set
• Key branches are protected
• Minimal amount of approvers is set
• Code owners are assigned
• Required checks are integrated into dev
ToDo before code review integration:
DOWN THE RABBIT HOLE
26. 26
26
• The code is well-designed
• The functionality is good for users of the code
• The code isn’t overcomplicated
• There’s no code “for future” if it’s not required
right now
• Tests are present and well-designed
• The code conforms style guides and name
ToDo while reviewing someone
else’s code:
DOWN THE RABBIT HOLE
27. 27
CONCLUSIONS
• Keep reading code to improve
writing skills
• Collect metadata to reduce
reading effort
• Practice abstract thinking
• Learn existing / highlight new
patterns