how can he be so good?
This YouTube video discusses the coding style and philosophy of John Carmack, focusing on his approach to game engine development. Key points include:
-
Carmack’s “from-scratch” approach: He frequently rewrote entire game engines from scratch for each generation, rather than reusing code or libraries. This was partly due to the limitations of hardware and software in the early days of game development (e.g., Doom’s era), where optimizing for performance was paramount. He viewed rewriting as a way to learn and improve.
-
Rejection of external libraries: Carmack rarely used external libraries, preferring to write his own functions even for common tasks. His reasoning was that writing the code himself was often faster than finding, integrating, and potentially debugging a library, especially given his high typing speed. This highlights a prioritization of control and deep understanding.
-
Emphasis on efficiency and simplicity: Carmack’s code, while extensive, was noted for its clarity and straightforwardness. The speaker argues that Carmack avoided excessive abstraction, favoring simpler, more direct solutions when possible. This contrasts with modern practices that often prioritize modularity and abstraction.
-
Typing speed as a factor: The speaker advocates for improving typing speed (aiming for 80-90 words per minute) to reduce mental overhead and allow for more focus on problem-solving. This relates to Carmack’s approach, as fast typing enabled him to quickly write custom code instead of using external libraries.
-
Appreciation for self-written code: The speaker personally advocates for writing one’s own code, even for seemingly simple tasks, as a learning and control mechanism. This emphasizes the value of understanding the underlying processes even if pre-built solutions exist.
-
Comparison to modern software development practices: The video implicitly contrasts Carmack’s approach with modern software development, particularly the use of libraries (npm, cargo, pip, etc.), and test-driven development (TDD). While acknowledging the value of these modern practices, the video highlights the merits of Carmack’s approach, especially within the context of its time and focusing on extremely efficient performance.
-
Carmack’s code’s readability: Despite the “from scratch” approach, Carmack’s code is described as remarkably clear and easy to understand, a testament to his skill and coding style. The speaker uses the analogy of a good teacher making complex concepts seem obvious.