• arcine@jlai.lu
    link
    fedilink
    arrow-up
    6
    ·
    18 hours ago

    No. In interpreted languages that is kinda true, in compiled languages that is definitely false.

    The code is a simplification. It has a direct relationship to what actually happens, yes, but most often glosses over the details (even in C and other very low level languages)

  • CombatWombat@feddit.online
    link
    fedilink
    English
    arrow-up
    8
    ·
    20 hours ago

    Not so. The code may be the same, but the code is the map, not the territory. The code is not enough to understand the territory, even with mock data, c.f.

    Our staging environment contains data that matches Production as closely as possible, but was not sufficient in this case and the mock data we relied on to simulate what would occur was insufficient.

    From cloudflare’s most recent outage

    • presoak@lazysoci.alOP
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      edit-2
      21 hours ago

      PHYSICAL WORLD

      The thing : [A rock]

      The map artifact : rock. Size, location, chemical composition.

      SOFTWARE

      The thing : x=1;

      The map artifact : x=1;

  • IndignantIguana@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    19 hours ago

    I’m not sure they are the same thing. And maybe there are layers to this. A code base can be a representation, a map, of some real-world thing. A physics engine in a game maps to real-world physics. A robotics control program maps to a set of movements that accomplish a task. But there is another layer that I think is more what the saying is about. As a software developer you have a mental map of your software. You have some understanding of how it works to accomplish its goal. And your mental map, your understanding, may be complete and correct and it may not be. This is one of the most common sources of defects in code. I think my code is working this way, but actually it’s working that way, so when it runs it does something I don’t expect.

  • oni ᓚᘏᗢ@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    19 hours ago

    The code is the map, but the territory would be the abstractions we use of the real world (and ideas). We only use what we need and is what we put in the code, it’s useless make an abstraction 1:1. Just read about the topic, so I’m still digesting some things.