I’ve often thought/said/repeated that I “learn best by programming”.

It seems true.

The process is typically something like:

  1. pick a concept
  2. read enough about it to get the gist
  3. implement it in code
  4. it doesn’t work
  5. iterate: reading other sources and updating the code until it works
  6. share a tutorial on the concept taught via a worked example in code (bonus!)

I did this during my phd (60+ tech reports), when writing my first book (~50 optimization algorithms), with machine learning mastery (1000+ tutorials, 20+ books on machine learning and deep learning), and with super fast python (500+ tutorials, 14+ books on python concurrency), and on.

Let’s dig in with claude.

It seems this approach to learning combines existing learning methodologies documented in the literature:

What you’re describing combines several established learning theories and approaches:

  1. Active Learning with Programming (or “Programming to Learn”)
  • Your approach uses programming as a tool for understanding abstract concepts
  • The code becomes a concrete representation of abstract ideas
  • The compiler/interpreter provides immediate feedback on your understanding
  1. Constructionism (developed by Seymour Papert, who worked with Piaget)
  • This theory specifically emphasizes learning through creating working models
  • Papert actually developed the LOGO programming language to help students learn mathematics through programming
  • Your approach mirrors Papert’s belief that programming can be a “Mathland” where abstract concepts become tangible
  1. Project-Based Learning with these specific properties:
  • Iterative refinement through error correction
  • Multiple representations (math → code → visualization)
  • Integration of multiple knowledge sources
  • Self-verification through working implementations

There are documented benefits for this type of learning.

For example (via claude):

  1. Executable Understanding
  • Your understanding must be precise enough to be executable
  • Computers are unforgiving - they expose gaps in understanding immediately
  • The feedback loop is tight and objective
  1. Multi-Modal Learning
  • You engage with the material in multiple ways:
    • Mathematical notation
    • Programming syntax
    • Visual representations
    • Written explanations (when you write tutorials)
  1. Knowledge Construction Cycle
  • Initial implementation attempt
  • Error identification
  • Deep dive into concepts
  • Understanding refinement
  • Implementation correction
  • Verification through working code

And:

The effectiveness of this approach likely comes from:

  1. Active engagement with the material
  2. Concrete feedback on understanding
  3. Multiple representations of knowledge
  4. Integration of theory and practice
  5. The need for precise understanding
  6. The creation of shareable artifacts (code, visualizations)

I suspect the large community of “technical bloggers” are my crowd.

People that learn like me and compulsively share what they learn.

This is different from “learning to program” for developer/software engineering roles or “learning machine learning” for data science roles.

There are fields where one writes code in order to complete tasks as “work”. To get good, you need reps. Therefore, you need to do a lot of programming to get in the reps in order to be good at the task.

This is different from “learning via programming”.

I may want to learn about statistics and write a function for each distribution or statistical test I learn about and demonstrate them on different synthetic samples. This is not required in order to use statistics on “work” projects, one would simple call a library function. The code reps are not practicing tasks for a job, they are learning the target field, from a practical constructive perspective.

But, is it true that I learn best this way?

Is this a real thing? Do others learn “best” this way?

Probably not. It has a smell of folk wisdom to me (e.g. VARK and 4MAT learning styles crap), is it falsifiable? Are there studies?

From gpt4o:

  • There is no strong scientific consensus that specific individuals have a singular best learning method.
  • Learning styles (e.g., visual, auditory, kinesthetic, etc.) have weak empirical support (Pashler et al., 2008). Many studies suggest that learning preferences exist, but they do not necessarily lead to better outcomes.
  • Cognitive Load Theory (Sweller, 1988) suggests that active problem-solving (e.g., coding) can help with complex understanding but also can be overwhelming if not structured well.

And:

Thus, while programming as a learning tool is well-supported, the claim that some people learn best this way and not otherwise is harder to prove.

And deepseek:

Research supports the idea that active, hands-on learning is generally more effective than passive learning (e.g., listening to > lectures or reading). Programming, as a form of active learning, can be highly effective for certain topics, especially in STEM > fields. However:

  • No Exclusive Learning Style: There is no evidence that people are inherently wired to learn only through programming or any > other single method.
  • Context Matters: The effectiveness of programming as a learning tool depends on the subject matter. For example, it might be > great for learning algorithms or data analysis but less relevant for learning history or literature.
  • Multimodal Learning is Best: Research shows that combining multiple methods (e.g., reading, discussing, practicing, and programming) leads to deeper and more durable learning.

And:

The idea of “learning best by programming” is likely a form of folk wisdom, similar to VARK. While it may reflect a personal preference or an effective strategy for some individuals, it is not a scientifically validated learning style. Instead, it aligns with broader, evidence-based principles like active learning and learning-by-doing.

Nod.

About what I would have guessed.

Active, constructive, project-based learning is good. Programming is merely method in this direction, it is a preference.