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.
146
1.26K reads
CURATED FROM
IDEAS CURATED BY
The idea is part of this collection:
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
Related collections
Similar ideas to Chunking Code
Sometimes it’s necessary to check in code even though it has known limitations. While it can be tempting not to share known deficiencies in one’s code, it is better to make these explicit, such as with a TODO comment:
// TODO: We are making the decimal separator be a period,
Read & Learn
20x Faster
without
deepstash
with
deepstash
with
deepstash
Personalized microlearning
—
100+ Learning Journeys
—
Access to 200,000+ ideas
—
Access to the mobile app
—
Unlimited idea saving
—
—
Unlimited history
—
—
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