Pointers memory personal identity

Pointers & Memory: The Continuity of Personal Identity

Series: A Programmer’s Philosophical Reflections #05/11 | Reading time: 25-30 min | Concept: Personal Identity — Memory, Continuity, and the Self

Author: Wina @ Code & Cogito


The Git Blame That Wasn’t Me Anymore

Friday afternoon. A colleague dropped a code snippet into the team chat.

“Who wrote this? Looks like something a junior would produce on day one.”

I opened git blame and found the author of that line.

It was me. Eighteen months ago.

The version of me with inconsistent naming conventions, no error handling, business logic tangled into UI logic — that was indeed me. At least, that’s what git records.

But staring at that code, I felt a strange disconnection. I couldn’t remember why I had written it that way. I couldn’t follow my own reasoning. If I rewrote it today, the result would be completely different.

Is the person who wrote that code still “me”?

Same name. Same email. Same SSH key. But the thinking patterns, technical judgment, even the values — all different. If you put the eighteen-months-ago version of me and the current version in the same code review, we’d probably argue about the architecture.

I suddenly realized this isn’t just a story about professional growth. It’s a philosophical question — one that humans have been thinking about for two thousand years:

What makes a person the “same person” across time?

Your body replaces all its cells roughly every seven years. Your beliefs are constantly revised as you grow. Your memories are subtly rewritten each time you recall them. What exactly makes you believe that the twenty-year-old you and the forty-year-old you are “the same person”?

As a programmer, you’re actually better equipped than most people to think about this. Because you work with the core mechanisms of identity every day: pointers, references, copying, garbage collection.

This is the fifth article in the “A Programmer’s Philosophical Reflections” series. Let’s use the language of memory management to disassemble the age-old puzzle of personal identity.

Let’s debug the self.


Background: The Identity Problem in Code

Object ID: Are You Your Memory Address?

In Python, every object has a unique id() — its memory address. Even if two objects have identical contents, as long as they occupy different memory locations, they’re different objects.

a = {"name": "Wina", "beliefs": ["open source", "clean code"]}
b = {"name": "Wina", "beliefs": ["open source", "clean code"]}
print(a == b)       # True -- contents are the same
print(a is b)       # False -- not the same object

== asks: “Do you look the same?” (value equality). is asks: “Are you the same one?” (identity).

This distinction seems simple, but it maps to a fundamental philosophical split:

Numerical identity — literally the same entity. You are you, not a copy of you. Like a is a being forever True.

Qualitative identity — possessing all the same properties. Two coins struck from the same die are qualitatively identical but numerically two different coins. Like a == b being True, but a is b being False.

In everyday life, we constantly switch between these two. When you say “I’m still the same person I was ten years ago,” you’re invoking numerical identity. When you say “I’ve become a completely different person,” you’re denying qualitative identity.

But here’s the crux: if all your qualities have changed, can your numerical identity still hold?

References and Entities: Are You the Pointer, or What the Pointer Points To?

In code, a variable name is just a reference — a label pointing to some memory location.

me = Person("Wina")  # 'me' is the reference, Person(...) is the entity

Your name works like that variable name — it’s a social reference that points to the entity called “you.” But references can be reassigned, and entities can be modified.

It gets messier: multiple references can point to the same entity.

developer = me
writer = me
friend = me
# Three roles, one person

You’re the engineer your colleagues see, the child your family sees, the personality your friends see. These “references” point to the same entity, but each sees a different “interface.”

So when every reference sees a different facet, where is the “real you”? The intersection of all references? Or something beyond them — something no single perspective can fully capture?

The Philosopher’s Identity Battlefield

Philosophy has three major theoretical traditions on personal identity.

Soul theory — Plato and Descartes’ position. You are you because you have an unchanging soul. The body can age, memory can fade, personality can shift, but the soul remains the same. In code, it’s like a permanent id() — no matter how the object’s attributes change, the id never does.

Body theory — Aristotle’s direction. You are you because your body is a continuous physical entity. Even as cells renew, the body’s overall structure and physical continuity are unbroken. Like the same memory address — even if the data it holds is overwritten, the address itself is continuous.

Psychological continuity theory — Locke’s revolutionary claim. You are you not because of soul or body, but because your memory links your past self to your present self. You remember yesterday’s self; yesterday’s self remembered the day before’s. This chain of memory constitutes your identity.

Locke’s theory resonates most with programmers — because it looks like a data structure. Identity isn’t a fixed value; it’s a linked list, each node connecting to the previous state and the next.

But Locke’s theory has serious holes. Scottish philosopher Thomas Reid posed the famous “brave officer” paradox: an old general remembers being decorated as a middle-aged officer; the officer remembers being whipped as a boy for stealing apples; but the general does not remember stealing apples as a boy. Under Locke’s theory, the general and the officer are the same person, the officer and the boy are the same person, but the general and the boy are not the same person — transitivity of identity is broken.

Memory is an important clue, but not a perfect foundation.


Deep Analysis: From Copying to Garbage Collection

One: Shallow Copy vs. Deep Copy — Does a Copy of You Count as You?

Let’s push the identity question to its extreme.

Suppose one day, technology can fully scan your brain — every neural connection, every encoded memory, every chemical pattern of emotion — and precisely reconstruct it in another body.

The copy wakes up with all your memories, all your personality traits, all your habits and preferences. It believes it is you.

Are you the same person?

Code gives a clear answer:

import copy
original = {"memories": [1, 2, 3], "personality": {"openness": 0.8}}
clone = copy.deepcopy(original)
print(original == clone)   # True -- contents are identical
print(original is clone)   # False -- not the same object

A deep copy creates a content-identical but independently existing new entity. From that moment on, they evolve separately. If the original modifies a memory, the copy is unaffected.

But what if you do a shallow copy:

shallow = copy.copy(original)
# The outer layer is new, but the inner list and dict are shared
original["memories"].append(4)
print(shallow["memories"])  # [1, 2, 3, 4] -- affected

Shallow copies aren’t fully independent — they share some deep structures. Changing one’s deep layer affects the other.

Human identity has similar “shallow copy” aspects. You and your siblings share genes, cultural background, childhood memories. You and your colleagues share professional language, work context, team experiences. These shared “references” mean your identities aren’t completely independent — a change in one can affect the other’s self-conception.

Philosopher Derek Parfit took a radical position on this: perhaps “identity” itself isn’t what matters most. What matters is the degree of psychological continuity — how much memory, personality, and values carry over between your past self and your present self. If the continuity is high, the question “is it the same person?” becomes less important.

Parfit even argued that clinging to the identity of “I” is a cognitive error. Just as you wouldn’t ask a river “is it still yesterday’s river?” — the water is always flowing, yet we still call it the same river. Identity may be nothing more than a pattern within that flow.

Two: Memory Chains and Linked Lists — The Fragility and Resilience of Continuity

Locke’s memory theory can be modeled as a linked list:

# Identity as a memory linked list
identity = memory_today -> memory_yesterday -> ... -> memory_childhood

Each node links to the previous one, forming a chain stretching from present to past. But linked lists have a fatal weakness: if any single node breaks, everything behind it is lost.

Amnesia is exactly this kind of break. A person loses ten years of memory — the chain is severed. Under strict Lockean theory, the post-amnesia person and the pre-amnesia person are not the same person.

But intuitively, we don’t believe that. The family still recognizes them. The law still binds them. The body is still the same. This means identity isn’t just a single chain of memory — it’s a network of multiple connections. Memory is one thread, but bodily continuity, social recognition, and legal records are all additional links.

Even if the memory chain breaks, other connections can maintain identity’s stability.

This is like distributed system fault tolerance — instead of storing all identity information in a single node, you distribute it across multiple independent sources. If any one source fails, the others keep the system running.

More precisely, your identity isn’t a value. It’s a consensus continuously maintained by multiple parties.

Three: Garbage Collection — Forgetting Is Not a Bug, It’s a Feature

A program without garbage collection eventually memory-leaks — fills up memory and crashes.

What would happen to a human who literally “remembered everything”?

There’s a rare neurological condition called hyperthymesia — patients can remember the details of nearly every day of their lives. Sounds like a superpower, but research shows that people with hyperthymesia often bear an enormous psychological burden. They can’t forget painful experiences, can’t recover from trauma, can’t let the past “be past.”

Forgetting is the human cognitive system’s garbage collection mechanism. It’s not a defect — it’s a critical function for keeping the system runnable.

# Human garbage collection: forgetting low-relevance memories
def cognitive_gc(memories, relevance_threshold):
    """Keep high-relevance memories, release the rest"""
    return [m for m in memories if m.relevance > relevance_threshold]

Nietzsche was remarkably incisive on this point. In his essay “On the Uses and Disadvantages of History for Life,” he observed that animals appear happy because they live in an eternal present, unburdened by memory. Humans need a certain degree of forgetting to “move forward” — perfectly faithful memory is a curse, not a blessing.

From an identity perspective, this means something counterintuitive: forgetting is the mechanism of identity renewal.

You’re able to change — growing from a junior to a senior, shifting from one value system to another — partly because you forget the old versions of yourself. If you simultaneously remembered all versions of yourself and weighted them equally, you’d be trapped in a kind of identity “merge conflict,” unable to make any decisions.

Garbage collection frees old memory so new objects can be created. Forgetting lets old selves exit the stage so new selves can step on.


Modern Connections: Digital Twins and the Identity Crisis of the AI Era

Your Digital Copy Already Exists

You may not have realized it, but your “digital twin” is already scattered across the internet.

Your social media profile is one copy — a carefully curated version. Your search history is another — more honest than you’d probably admit. Your behavioral data across platforms forms a statistical model — used by ad systems to predict your next move.

Now, generative AI makes these copies even more lifelike. You can fine-tune a language model on your chat history, writing style, and speech patterns, making it “talk like you.”

This AI doppelganger can answer emails on your behalf, maintain social interactions while you’re away, or even continue “existing” after you’re gone.

But it is not you.

Just like a deep copy — at the moment of creation it matches you perfectly, but from that instant forward, you diverge. You learn new things, experience new feelings, change some opinions, while it stays frozen in your past.

The question is: can other people tell the difference? And if they can’t, is it “you” in any socially meaningful sense?

The Ship of Theseus, Digital Edition

The ancient Greek paradox of Theseus’ ship asks: if you replace a ship’s planks one by one until no original plank remains — is it still the same ship?

Software systems go through this paradox every day. You refactor a module, replace a dependency, upgrade a framework — until not a single line of original code remains. But users still call it the same product.

People are the same way. Your body’s cells are constantly being replaced, your beliefs are constantly being revised, your memories are subtly rewritten each time you recall them. Strictly speaking, there may not be a single atom in common between the you of ten years ago and the you of today.

Yet you’re still “you.”

Because identity isn’t based on material continuity. It’s based on pattern continuity. The ship’s shape, function, and name persist. The software’s interface, behavior, and user perception persist. Your narrative, relationships, and self-conception persist.

Identity is a continuity contract — maintained collaboratively by you, the people around you, and social institutions. As long as the contract isn’t broken, identity holds.

When the Contract Breaks

But some moments can break or force a renegotiation of that contract:

Major trauma — PTSD can make a person feel like they’ve “become someone else.” The memory chain may persist across the before and after, but personality continuity is severely disrupted.

Technological copying — if one day we can truly upload consciousness to the cloud, law and ethics must answer: does the uploaded copy have civil rights? What’s the legal relationship between the original person and the copy?

AI impersonation — when deepfakes and AI voice synthesis can perfectly simulate a person, the social mechanisms for recognizing identity face a fundamental challenge. If your friends can’t tell you apart from your AI copy, your identity’s “social references” have been hijacked.

These are no longer distant thought experiments. They’re technological realities unfolding right now.


Reflections & Takeaways: A Programmer’s Identity Literacy

Which Kind of “Same” Are You Trying to Preserve?

When facing identity questions, different people anchor on different things:

Some anchor on values — “No matter how I change, my core beliefs stay the same.” Like an immutable property on an object.

Some anchor on relationships — “As long as these people still recognize me.” Like external references to an object.

Some anchor on narrative — “As long as I can weave my past and present into a coherent story.” Like an object’s changelog.

Some anchor on name — “As long as I’m still called this name.” Like a variable name.

No anchor is “correct.” What matters is knowing what your anchor is, and how you respond when it’s challenged.

Identity Is a Collaboratively Maintained System

Perhaps the deepest insight is: identity isn’t your business alone.

Your identity is maintained jointly by your self-conception, others’ recognition of you, and social institutions. Just as a distributed system needs multi-node consensus, your identity needs collaborative maintenance to remain stable.

When you travel alone, leaving behind everyone who knows you and entering an entirely new environment — you may feel a sense of identity floating. Not because you “forgot who you are,” but because the other nodes maintaining your identity are temporarily offline.

Four Identity Mental Models to Take With You

  1. Distinguish is from == — Don’t confuse “being the same one” with “looking the same.” A digital copy might == you, but it will never is you.

  2. Identity is a linked list, not a constant — You’re not a fixed, immutable value but a continuous record of state transitions. Allowing yourself to change doesn’t mean losing yourself.

  3. Forgetting is a feature, not a fault — Moderate garbage collection keeps your mental system runnable. You don’t need to remember everything; you just need to maintain continuity.

  4. Maintain your identity contract — Actively manage your self-narrative, your important relationships, and your roles in society. Identity doesn’t maintain itself — it requires ongoing investment.


Conclusion

Back to that git blame on a Friday afternoon.

The version of me from eighteen months ago and the current me share the same git account, the same career history, the same chain of memory. But our coding styles, technical judgments, even our values have diverged.

Am I still “me”?

The answer depends on which kind of “same” you’re asking about.

If you’re asking about numerical identity — yes, the same physically continuous body. If you’re asking about qualitative identity — not entirely, many attributes have changed. If you’re asking about psychological continuity — yes, but every node on that chain differs slightly from the one before it.

Perhaps the best answer is Parfitian: don’t fixate too much on the question “is it the same person?”

What matters is that there’s enough continuity between you and your past self to learn, and enough difference to grow.

Like a system under continuous refactoring — each refactor makes it better, and users keep treating it as the same product.

You are a system under continuous refactoring. Don’t be afraid to change.


Next Article Preview

Causality and the Call Stack

You spent three days tracking a bug and finally found the root cause. But wait — is what you found really the “cause”? Or just the node in the stack trace closest to where you were looking?

  • Hume said you never actually “see” causation — you only see events happening one after another. So does a program’s call stack count as a genuine causal chain?
  • In event-driven and concurrent systems, why does causality go from a line to a web?
  • Recommendation system feedback loops: when the effect rewrites the cause, can you still find the root cause?
  • What’s the real purpose of a postmortem — finding someone to blame, or building a repairable structure?

Next time, we start from function calls and event-driven architectures to disassemble the philosophical maze of causation.


References

  • Locke, John. An Essay Concerning Human Understanding, Book II, Ch. 27. 1689. (Psychological continuity theory)
  • Parfit, Derek. Reasons and Persons. Oxford University Press, 1984. (Personal identity and psychological continuity)
  • Reid, Thomas. Essays on the Intellectual Powers of Man, Essay III. 1785. (The brave officer paradox)
  • Nietzsche, Friedrich. “On the Uses and Disadvantages of History for Life.” Untimely Meditations, 1874. (The value of forgetting)
  • Plutarch. Life of Theseus. (The Ship of Theseus paradox)
  • Nozick, Robert. Philosophical Explanations. Harvard University Press, 1981. (Closest continuer theory)
  • Floridi, Luciano. The Fourth Revolution. Oxford University Press, 2014. (Philosophy of digital identity)


Philosophy for Programmers・Series Navigation

Main Series

#00 Introduction: Why Programmers Need Philosophy

#01 Is Truth a Function?

#02 Is Knowledge Just Data?

#03 cogito_ergo_sum.py

#04 Time Complexity vs. the Nature of Time

#05 Pointers & Memory: The Continuity of Personal Identity ← You are here

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *