1. Home
  2. Wookash Podcast

Sep 20, 2024

Why code libraries shouldn't hide data

Casey Muratori

136 min → 2:47

Overview

Professional programmer Casey Muratori discusses his career without university, the flaws of object-oriented programming, the benefits of data-oriented design, and why physical conferences are outdated.

3 things to know

Muratori: Hiding code details leaves outside programmers powerless

Casey Muratori argues that hiding code details is a lie that leaves outside developers powerless to fix problems the original creator did not foresee.

▶ Watch at 1:46

Muratori says good software tools expose stable data openly

Casey Muratori explains that the best software libraries give users maximum power and flexibility by openly sharing stable data alongside fast routines to process it.

▶ Watch at 38:08

Muratori concludes 99% of C++ features are not useful

Casey Muratori believes programming language features should only be used when they clearly save code or improve readability, noting that almost all C++ features fail that test except for math operator overloading.

More

Language features should be used only when they provide a clear, provable benefit, such as saving code or improving readability.

Also in this episode

Critique of Physical Conferences

Physical conferences are an inefficient, expensive, and exclusionary model for education that primarily benefits a privileged few, whereas accessible online content can reach a much larger global audience.

▶ Watch at 1:42:08

Wookash Podcast: Good software starts with experiments before marching

Wookash Podcast describes a successful building process as an early experimental phase to find a solid working approach, followed by a direct march to apply it across the product.

Wookash Podcast says trusting developers to rewrite drives success

Wookash Podcast notes that success comes from managers who set a clear big-picture goal but trust the developer to pick the best way to build it, allowing complete rewrites.

Wookash Podcast claims Unity and Unreal hurt game creativity

Wookash Podcast claims that widespread use of game engines like Unity and Unreal has reduced gameplay creativity by pushing developers toward making the types of games those tools are designed for.

Quotes

“The whole paradigm is a lie. The lie is that if something's object-oriented, it will be easier for someone else to integrate because it's all encapsulated.”

▶ Watch at 27:51

“Your goal is not to hide everything. It's for you to do the work up front to figure out what you can promise, and then promise that. That is what makes a library good.”

▶ Watch at 38:08

“Is this the future of education? A conference is just a bad thing. It's just another way that poor people don't get to experience something.”

▶ Watch at 1:42:08

2 more quotes

“I didn't go to university.”

▶ Watch at 1:46

“It's very easy to unlearn these bad habits. Just stop thinking about X and you're good.”

▶ Watch at 1:17:47

Full summary

Episode Overview

  • Casey Muratori discusses his non-traditional career path, revealing he started programming professionally right after high school without attending university.
  • He presents a sharp critique of Object-Oriented Programming (OOP), arguing its principles like encapsulation are fundamentally flawed for creating easy-to-integrate libraries.
  • Muratori advocates for a data-oriented design philosophy, emphasizing the importance of exposing stable data structures rather than hiding them.
  • The conversation covers the origins of the Handmade Hero stream and leads to a broader critique of physical conferences as an exclusionary and outdated model for education.

Key Concepts

  • Critique of OOP for Integration: The principle of encapsulation is described as a "lie" for third-party developers, as it prevents them from solving problems the library author didn't foresee, rendering them powerless.
  • Data-Oriented Design Philosophy: The ideal library design involves exposing well-defined, stable data structures and providing optimized routines that operate on that data, giving users maximum power and flexibility.
  • Pragmatic Language Feature Adoption: Language features should be used only when they provide a clear, provable benefit, such as saving code or improving readability. Muratori concludes 99% of C++ features are not useful, with operator overloading being a notable exception for math code.
  • Development as Exploration then Execution: A successful development process involves an initial experimental phase to find a solid working paradigm, followed by a "direct march" to apply that paradigm across the product.
  • High-Trust Environment: Success is fostered by a management style that sets a clear high-level goal but trusts the developer to determine the best implementation, allowing for iteration and even complete rewrites.
  • Critique of Physical Conferences: Physical conferences are an inefficient, expensive, and exclusionary model for education that primarily benefits a privileged few, whereas accessible online content can reach a much larger global audience.
  • Homogenization of Game Design: The widespread use of game engines like Unity and Unreal has led to a decline in mechanical creativity, as developers are pushed toward making the types of games the tools are designed for.

Quotes

  • At 1:46 - "I didn't go to university." - Casey Muratori's direct and unexpected answer to the question about his university experience, revealing his self-taught path into programming.
  • At 27:51 - "The whole paradigm is a lie. The lie is that if something's object-oriented, it will be easier for someone else to integrate because it's all encapsulated." - He directly challenges the core promise of encapsulation in OOP.
  • At 38:08 - "Your goal is not to hide everything. It's for you to do the work up front to figure out what you can promise, and then promise that. That is what makes a library good." - He summarizes his new philosophy of library design, focusing on providing stable, exposed primitives instead of black-box objects.
  • At 77:47 - "It's very easy to unlearn these bad habits. Just stop thinking about X and you're good." - Muratori explaining that the difficulty in moving away from paradigms like OOP isn't in learning something new, but in consciously deciding to stop applying old, unhelpful organizational patterns.
  • At 102:08 - "Is this the future of education? A conference is just a bad thing. It's just another way that poor people don't get to experience something." - Summarizing his core philosophical opposition to the conference model as a means of education.

Takeaways

  • When designing libraries, prioritize exposing stable data structures over enforcing strict encapsulation to empower users and simplify integration.
  • Adopt language features pragmatically based on proven benefits for code simplicity and readability, rather than following programming dogma.
  • Unlearning bad programming habits is primarily about consciously deciding to stop applying flawed patterns, not about learning a complex new system.
  • Prioritize creating accessible, affordable online educational resources to maximize reach and impact, as physical conferences inherently exclude many potential learners.

Watch the full episode 2 hr 16 min

Read along with the audio summary

Casey Muratori claims that ninety nine percent of features in the C plus plus programming language are not useful, and that a core rule of modern software is actually a lie. In this episode from September 20, 2024, Muratori shares his non traditional, self taught path into professional programming right after high school without attending university. By the end, you will learn how to build flexible software libraries, ditch unhelpful coding habits, and rethink how we share knowledge.

Why hiding your code leaves other developers powerless.

Muratori calls this whole paradigm a lie when it comes to building code libraries for other people to integrate. Think of it like buying a car with the hood welded shut. If the creator did not foresee a specific problem you run into, you are rendered completely powerless to fix it yourself.

That frustration leads directly to a better way to build software: exposing your data to give users maximum power.

Instead of locking everything away, Muratori advocates for a data oriented design philosophy. The ideal library exposes well defined, stable data structures and then provides optimized routines that operate on that data.

How ignoring ninety nine percent of a programming language can improve your code.

Software languages come packed with tools, yet Muratori concludes that ninety nine percent of C plus plus features are not useful. He argues that a feature should only be used when it provides a clear, provable benefit, like saving code or improving readability, noting that operator overloading is a notable exception for math code.

The two step rhythm behind a successful development process.

Instead, a successful development process starts with an initial experimental phase just to find a solid working paradigm. Once that foundation is proven, the work shifts into a direct march to apply that paradigm across the entire product.

That kind of exploration only works when you have the right management style: setting a clear goal and getting out of the way.

Success is fostered when management sets a clear high level goal, but trusts the developer to determine the best implementation. That trust means allowing space for constant iteration and even complete rewrites when an early idea does not pan out.

Why physical tech conferences are an outdated way to learn.

Turning to how programmers share knowledge, the conversation looks at the origins of the Handmade Hero stream and critiques physical conferences as an inefficient, expensive, and exclusionary model for education. Muratori asks if this is really the future of education, pointing out that a conference is just another way that poor people do not get to experience something, benefiting a privileged few while accessible online content can reach a much larger global audience.

How popular game engines are making video games feel the same.

Today, there is widespread use of pre built game engines like Unity and Unreal. That reliance has led to a decline in mechanical creativity across the industry. Because these tools are designed for specific styles of play, developers are subtly pushed toward making only the types of games the engines were built to handle.

Moving away from flawed habits does not require learning a complex new system, just consciously deciding to stop applying old, unhelpful patterns. Just stop thinking about X and you are good.

More from Wookash Podcast

Related Episodes