What makes code valuable?

Sources:

The value of code can be derived from multiple perspectives:

  1. Longevity and Continuity: The best code continues to bring value over many years, even if it wasn't perfect initially. Code that remains useful despite being old, readable, or maintainable, is considered valuable because it still serves its purpose long-term 1.

  2. Viability: There's a distinction between good code and viable code. Good code might not always be viable, whereas viable code (even if it's not the best written) continues to deliver value. The goal is to have code that is both good and valuable 1.

  3. Flexibility: Valuable code is seen as one that developers are willing to discard if needed. Viewing code as "worthless" encourages a mindset where it's okay to rewrite or refactor, which can lead to more valuable outcomes in maintaining and improving software over time 2.

  4. Reasoning and Interaction: Code is crucial for logic, holding states over time, and enabling interaction with the real world through APIs and scripts. This not only supports operational tasks but also allows auditing and improving AI models' actions, which is vital for alignment and controllability 3.

    The Value of Code

    Jerod and Adam discuss the importance of writing code that continues to bring value years down the road, even if it's not perfect. They explore the concept of good code versus viable code and the long-term implications of code readability and maintainability.
    The Changelog
    Why smart engineers write bad code
    1
    2
    3

In essence, valuable code maintains usability over time, balances readability with functionality, and fosters an environment where continuous improvement is possible.

RELATED QUESTIONS