Learn more about books with this collection
Navigating and enjoying the thrill of horror and scare experiences
Historical knowledge of Halloween and its origins
Understanding and appreciating Halloween traditions worldwide
The way the chess experiment applies to programming is that we should aim to split our code into chunks that make it more readable and easier to remember.
We can achieve this by using design patterns and comments. If a function’s name is enough to describe what it does, then a comment is not necessary. But sometimes a comment is needed to increase code readability.
MORE IDEAS ON THIS
It is pretty obvious that the names of variables matter. But oftentimes when we are in the middle of a hard problem, thinking about the name of a variable is too much for our cognitive capacity, so we just choose the first thing that comes to mind.
But we can increase our naming abilities ...
In an experiment, both chess masters and average players were asked to memorize a chess board configuration, and the chess masters did way better.
That was because the experts had previously seen something similar, and they only had to store a few items in their STM, such as “Sicilian open...
Active elaboration is the process of thinking about similar things when learning a new concept. This helps strengthen the concept in memory.
In the context of programming, you can think about similar concepts in another programming language or if the concept fits a certain paradigm, framewo...
Since code is similar to natural language, we can apply the same techniques that we use to understand text to understand a piece of code. A great way is to try to summarize the piece of code in words, which helps you understand it better and can serve as documentation.
Since we can only hold a few things at once in our memory, this can slow us down while programming or while reading code. There are 2 strategies we can use.
One of the things I take away from this book is that confusion and feeling cognitively overwhelmed is fine, and is part of life and learning. Before I knew all I know about cognition, I used to get upset with myself for not being smart enough to read complicated papers...
A good name must fit the natural language the variables are defined in. For example, since in English you would say “the maximum number of points”, it makes more sense to choose the name max_points over points_max.
Also, the aim should be to use 2-4 words per variable (apart from the common...
We use 3 cognitive processes while programming or reading code:
Explore the World’s
Take Your Ideas
Just press play and we take care of the words.
2 Million Stashers
Read & Learn
Access to 200,000+ ideas
Access to the mobile app
Unlimited idea saving & library
Unlimited listening to ideas
Downloading & offline access
Supercharge your mind with one idea per day
Enter your email and spend 1 minute every day to learn something new.
I agree to receive email updates