Replit founder Amjad Masad explains how to overcome Intuition in Programming in his article Overcoming Intuition in Programming. The article Outlines the following points:

  • Introducing the relationship between “difficulty” or “disfluency” and cognition

  • Studies have found that the brain processes problems in two ways:

    • Mode 1: Automatic, effortless, intuitive or experiential mode of thinking
    • Pattern 2: More deep, thoughtful, and analytical thinking patterns

    The brain uses mode one by default when it processes problems, and switches to mode two when it encounters difficult questions

  • Correspond these two modes to programming:

    • Mode 1: Use frameworks or third libraries to solve problems. They provide solutions to specific problems. At the same time, they encapsulate the details so that we don’t need to know the details and reduce our mental burden.
    • Pattern 2: A framework or third library can only solve problems for certain scenarios, and there are always scenarios where there is no solution. This is called “Framework Negative space”, not because the framework or third party library is inherently defective, but because the problem they are trying to solve is not that

    When we were in the “Framework Intuitive Space” for a long time, once we encountered a problem, we would feel at a loss when passively placed in the “Framework Negative space”

  • During the programming process, we always unconsciously put ourselves in the “Framework Intuitive space”. For example, when developing, we always confirm whether there is a third-party library to support the business; Depending on the framework we use, we can always find a variety of scenario-specific plug-ins or extensions to cover more business scenarios. Staying in this pattern for a long time can have many unexpected negative effects:

    • Increased reliance on library developers
    • Relegate architectural design to the library and, at the same time, increase technical debt
    • Leads to the misconception that programming only relies on intuition.