diff --git a/README.md b/README.md index 47d70a8..589064c 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ We should reduce the cognitive load in our projects as much as possible. The tricky part is that the author may not have experienced a high cognitive load due to familiarity with the project. > **Familiarity is not the same as low cognitive load**. They *feel* the same — that same ease of moving through a space without much mental effort — but for very different reasons. Every “clever” (read: “self-indulgent”) and non-idiomatic trick you use incurs a learning penalty for everyone else. Once they have done that learning, then they will find working with the code less difficult. So it is hard to recognise how to simplify code that you are already familiar with. This is why I try to get “the new kid” to critique the code before they get too institutionalised! - +> > It is likely that the previous author(s) created this huge mess one tiny increment at a time, not all at once. So you are the first person who has ever had to try to make sense of it all at once. - +> > In my class I describe a sprawling SQL stored procedure we were looking at one day, with hundreds of lines of conditionals in a huge WHERE clause. Someone asked how anyone could have let it get this bad. I told them: “When there are only 2 or 3 conditionals, adding another one doesn’t make any difference. By the time there are 20 or 30 conditionals, adding another one doesn’t make any difference!” - +> > There is no “simplifying force” acting on the code base other than deliberate choices that you make. Simplifying takes effort, and people are too often in a hurry. - +> > *Thanks to [Dan North](https://dannorth.net) for his comment*. ![Mental Models](/img/mentalmodelsv5.png)