29483
views
✓ Answered

A Step-by-Step Guide to Grasping the True Purpose of Code

Asked 2026-05-18 17:40:47 Category: Programming

Introduction

In an era where AI agents increasingly write code for us, a profound question emerges: will human-readable source code still matter? To answer this, we must first understand what code truly is. Unmesh Joshi, a seasoned software practitioner, argues that code serves two intertwined purposes: it provides instructions to a machine and forms a conceptual model of the problem domain. This guide will walk you through five steps to internalize this dual nature, helping you see code not just as a technical artifact but as a sophisticated thinking tool. By the end, you’ll be equipped to navigate the evolving landscape of large language models (LLMs) and human collaboration.

A Step-by-Step Guide to Grasping the True Purpose of Code
Source: martinfowler.com

What You Need

  • A basic understanding of any programming language (e.g., Python, JavaScript)
  • Access to a code editor or an online IDE (like VS Code, Replit)
  • Curiosity about the deeper meaning of code
  • Willingness to explore abstract concepts

Step-by-Step Instructions

Step 1: Distinguish Code as Machine Instructions

Start by viewing code as a set of precise commands that a computer executes. Every line of code ultimately translates into CPU operations—instructions that handle arithmetic, memory access, or control flow. Write a simple program, such as a “Hello, World!” script, and mentally trace how the compiler or interpreter converts your text into binary. This step grounds you in the machine-facing purpose of code: it is the language through which humans tell computers what to do, step by step. Recognize that without this side, no automation is possible.

Step 2: Understand Code as a Conceptual Model

Now shift your perspective. Code also represents a model of the problem domain—an abstraction that organizes concepts, relationships, and rules. Take the same “Hello, World!” program: it models the simple act of outputting a greeting. More complex code models entire business processes, scientific simulations, or social networks. To practice, sketch a class diagram or data model for a domain you know well (e.g., a library system). Notice how code structures and names reflect real-world entities. This step reveals that code is a thinking tool for humans to reason about complex problems.

Step 3: Build a Vocabulary to Talk to the Machine

Effective communication with machines requires a shared vocabulary. Programming languages offer primitives—variables, functions, types—that let you express intent. Create a small project (e.g., a calculator) and deliberately focus on naming conventions, function signatures, and type annotations. A well-chosen name like calculateAverage conveys meaning both to the compiler and to other developers. This step shows how vocabulary bridges the gap between human conceptualization and machine execution. It also prepares you for future interactions where LLMs may generate code based on natural-language prompts.

Step 4: Use Programming Languages as Thinking Tools

Programming languages shape the way you think about problems. Experiment with two different paradigms—for instance, write the same algorithm in a functional style (e.g., using map/reduce) and an imperative style (with loops). Observe how each approach highlights different aspects of the solution. As Joshi notes, languages are not just syntax; they are mental models that influence how you decompose tasks. Document your reflections. This step deepens your appreciation that code is both a communication medium for machines and a cognitive scaffold for humans.

Step 5: Embrace the Future with Large Language Models

Finally, consider the implications of LLMs that can generate code from descriptions. Will source code vanish? Not entirely. Instead, the two purposes of code will shift: machines will still need precise instructions, but humans will increasingly use code as a specification of conceptual models. Practice writing prompts that describe the what (the model) rather than the how (the instructions). For example, “Generate a RESTful API that models a library with books and members, including borrowing rules.” Then examine the generated code—does it capture the intended domain concepts? This step prepares you to collaborate with AI agents while preserving the essential human role of defining the problem domain.

Tips for Deepening Your Understanding

  • Refactor regularly: After writing any code, revise it to make the conceptual model clearer—rename variables, extract functions, add comments. This strengthens the bridge between machine instructions and human understanding.
  • Study domain-driven design (DDD): DDD explicitly treats code as a model of the business domain. It’s a powerful methodology that aligns with Joshi's view.
  • Pair program: Explain your code to a partner; if you struggle to articulate the conceptual model, it’s a sign that your code needs improvement.
  • Use LLMs as thinking partners: When stuck, ask an LLM to generate multiple implementations. Compare them to see how each models the domain differently.
  • Keep a journal: Write about the mental models you discover in different codebases. Over time, you’ll internalize that code is never just about the machine.

By following these steps, you’ll no longer see code as a mere sequence of instructions. You’ll recognize it as a dual-purpose artifact that communicates with machines while simultaneously shaping human thought. This understanding is essential as we move into a future where humans and AI co-author software—the conceptual model remains the unique value we bring.