NorthWest Drupal User Group - The varieties of development experience with Andrew Harmel-Law (10/05/2022 19:00 - 20:15)
This talk was a thought provoking insight into the mindset behind learning to write programming language and ways to improve how we write code. It was presented from a speaker with considerable production experience, growing up in the software engineering sphere in the 90s and a psychology educational background well-versed in understanding the mental model of a software developer.
Andrew used personal learning experiences to convey his awareness of imposter syndrome and shares his opinions on why we feel this way when faced with technical challenges. He believes that we should not be using excuses like lack of working memory or not being from a mathematical background, as reasons why we can't problem solve. The code you write is an extension of your thought process and mental state, so poorly written code could suggest someone might be emotionally fatigued and not just somebody who does not understand the concepts well enough. Programming uses a lot of mental bandwidth, so it is natural that emotions can reduce this bandwidth considerably.
The speaker mentions that code review is the reviewer trying to reverse-engineer your thought process and mental model. He highly recommends peer programming and TDD to get both developers at a similar mental model and improve problem solving.
The mix of negative emotions and incoherent code can drive us down more serious thoughts of inadequacy that are harmful to our mental state. We need to be aware of them, understand them and find reasonable means of treatment.
The thought process when we see incorrect code we wrote is: doubting simple syntax errors we have made. Simple enough to resolve- use a linter, read over your script and use verified examples to check against. Then we have doubting the mental models fit for the problem (the rules of the language, tool or library). Doubting the integrity of our mental model (the foundational logical knowledge that underpins the language etc.). Then, doubting underlying mental model building blocks (our grasp of mathematical rules, logical statements etc.). Worse, doubting our perception. Each step is less granular, moving away from the technical issue and becoming more of a personal issue.
We write code on a limited knowledge of the language (modules or 'chunks' of our mental model). Eventually, we will come across edge cases where we doubt our knowledge because our mental model is limited. Accepting this is the case and having humility and an open mind (and no arrogance) will help to improve this mental model and allow you to solve more complex abstract problems hopefully rewarding you with that sense of gratification that developers thrive on.