DEV Community

Chandravijay Agrawal
Chandravijay Agrawal

Posted on

Imposter Syndrome is Just a 'Mock Object': Why You're Faking the Right Way

It’s 3 AM. The house is quiet, the kind of quiet that amplifies every single one of your inconvenient thoughts. You’re lying awake, staring at the ceiling, replaying that meeting from Tuesday. Or the email you sent. Or the casual comment you made at dinner. And there it is, that icy tendril of dread wrapping around your stomach: I’m going to be found out.

You got this job, this promotion, this opportunity, this relationship, this… life… by sheer luck. By pulling the wool over someone’s eyes. You’re an accidental tourist in a world of legitimate residents, and any moment now, someone’s going to ask for your passport, scrutinize it, and calmly, perhaps even kindly, inform you that it’s a fake. You don’t belong here. You don’t have what it takes. You’re not really as smart, as capable, as put-together as everyone seems to think you are.

This isn’t just a bad dream. This is Imposter Syndrome.

It’s the Sunday night slump, the pit in your stomach anticipating the week ahead, convinced you’ll make a critical mistake. It’s the constant self-doubt that whispers, "Everyone else has this figured out, why don't I?" It’s the fear that if you ever stop hustling, stop pretending, stop pushing, the entire carefully constructed façade will collapse, revealing the empty space where a truly competent person should be.

You’re not alone. Far from it. This insidious feeling gnaws at leaders, artists, scientists, parents, students – anyone who has ever dared to step outside their comfort zone or reach for something meaningful. Ironically, it often afflicts the brightest and most capable among us, those who hold themselves to impossibly high standards and are exquisitely attuned to their own perceived shortcomings. They see the vast ocean of what they don't know and conclude they're drowning, while others paddle confidently in the shallows, blissfully unaware of the depths.


The world around us, with its curated social media feeds and highlight reels, only makes it worse. We’re constantly bombarded with images of effortless success, perfect families, brilliant careers, and unshakeable confidence. We see the polished exterior of others and compare it to our own messy, internal reality. It's like looking at a perfectly rendered movie and concluding that your raw, unedited daily life is simply… inadequate. We internalize the message that competence is an innate, static state, a binary on-off switch that you either possess or you don't. And if you have to work at it, if you have to learn, if you have to fake it till you make it, then by definition, you’re not really "it."

This idea of "faking it till you make it" is, at its heart, a well-intentioned but often anxiety-inducing piece of advice. It tells us to act as if we are confident, competent, and fully prepared, even when we feel utterly the opposite. The problem is, for someone prone to imposter syndrome, this just reinforces the feeling of being a fraud. See? I’m literally faking it. I’m a phony. The internal critic, always on patrol, seizes on this. "Aha!" it crows. "You knew it all along! You’re just a good actor!" The advice, meant to empower, inadvertently traps us deeper in the cycle of self-doubt.

But what if "faking it" wasn't about deception? What if it was a crucial, legitimate, and even necessary step in the process of becoming? What if the very act of performing the behaviors associated with competence was, in itself, the path to achieving it, without the internal self-flagellation?

This is where the engineers come in.


It’s funny, this feeling of "I need to perform like an expert even if I don’t feel like one" isn't just a human phenomenon. Software engineers, in their relentless pursuit of robust and reliable systems, stumbled upon a remarkably similar challenge decades ago. And they didn't just give it a name; they developed a battle-tested solution that has become a cornerstone of modern software development.

Imagine you're building a massive, interconnected software system. Let's say it's an online store. This store needs to process payments, manage inventory, send order confirmation emails, update customer records, and much, much more. Now, you’ve just made a tiny change to the "update customer records" part. How do you test it? Do you launch the entire website, connect to a real credit card processor, deduct real money, send real emails, and update real inventory for every single change you make? That would be incredibly slow, expensive, and risky. You'd quickly run out of real money, real inventory, and real patience.

Programmers faced this exact problem: how to test a small, isolated piece of a complex system without having to set up the entire complex system every single time. They needed a way for one part of the code to interact with something that behaved like a real external service, but wasn't actually the real external service. They needed to "fake it" in a controlled, predictable way.

They called these stand-in components "Mock Objects" or "Test Doubles." These are essentially stand-ins that mimic the behavior of the real thing. When your "update customer records" code wants to send an email, it doesn't talk to a real email server that might be slow or unreliable during testing. Instead, it talks to a "Mock Mailer" which just pretends to send an email, perhaps by logging a message to the console. It acts like a mailer, even if it's not the real mailer. It "walks like a mailer and quacks like a mailer," so to speak.

The critical insight here is this: The code that uses the mailer doesn't care if it's a real mailer or a mock mailer, as long as it behaves in the expected way. It just needs an object that has a send_message function that accepts certain inputs and (optionally) returns a certain output. It doesn't care about the object's internal structure or its "true identity." It only cares about its behavior – its publicly exposed "methods" or "protocols."

This concept, so fundamental to building flexible and robust software, is known in Python programming as Duck Typing. The phrase "If it walks like a duck and quacks like a duck, then it must be a duck" perfectly encapsulates it. In Python, you don't declare that an object is a Mailer; you just ensure that it can do what a Mailer is expected to do. If it has a send_message method, then any part of your code that needs to send a message can interact with it, regardless of what type of "duck" it truly is. It could be a real email service, a fake testing service, or even a carrier pigeon service, as long as it exposes that send_message behavior.

Here's literally what that looks like in Python – just to make the parallel concrete:

class FakeMailer:
    def send_message(self, recipient, subject, body):
        print(f"MOCK: Sending email to {recipient} with subject '{subject}'")
        return True

class RealMailer:
    def send_message(self, recipient, subject, body):
        # Imagine complex code here to connect to an actual email server
        print(f"REAL: Sending email to {recipient} with subject '{subject}'")
        return True

def notify_user(mailer_service, user_email, message):
    # This function doesn't care if it's a FakeMailer or RealMailer.
    # It just needs an object that can 'send_message'.
    mailer_service.send_message(user_email, "Important Update", message)

# We can pass either a FakeMailer or a RealMailer,
# as long as they 'quack' with a send_message method.
notify_user(FakeMailer(), "test@example.com", "Your account is active!")
notify_user(RealMailer(), "actual_user@domain.com", "Your account is active!")
Enter fullscreen mode Exit fullscreen mode

Here, the notify_user function doesn't care if it's a FakeMailer or RealMailer; it just needs an object that has a send_message method. This focus on what an object can do rather than what an object is is the secret sauce. It allows systems to be flexible, testable, and to evolve without constant fear of breakage.


So, what does any of this have to do with your nagging imposter syndrome? Everything.

Your brain, caught in the grip of imposter syndrome, is acting like rigid, old-school software that insists on knowing the exact type of every object it interacts with. It’s stuck on the idea that you must be a "Real Expert" with a capital E, complete with an internal certificate of competence, before you can do what an expert does. It demands that you possess the fully formed identity, the final state of perfection, before you even begin to perform.

But the world, your job, your relationships – they operate on duck typing. They don't primarily care about your internal feeling of expertise; they care about your actions, your outputs, your behaviors. When your boss assigns you a task, they're not looking for your internal "Expert" flag to be set to True. They're looking for an object (you!) that has a complete_task method, a solve_problem method, a collaborate_effectively method.

The fear that "I'm going to be found out" is precisely the fear that your internal "type" (Fraud) will be revealed, and you'll be rejected because you're not the "Real Expert" type. But what if your "type" is irrelevant? What if all that matters is that you can perform the necessary actions?

To overcome imposter syndrome, we need to embrace our "mock object" phase. This isn't about outright deception; it's about acknowledging that competence is a journey, not a destination. You are a work in progress, and your current identity might be a "mock" or "test double" of your future, more confident self. And that's perfectly okay, even essential.

Here's how to apply this engineering insight to your life:

  1. Shift Focus from Identity to Behavior: Stop agonizing over whether you are an expert. Instead, ask: "What does an expert do in this situation?" "What are the specific 'methods' or 'protocols' I need to implement?" Break down the abstract "being an expert" into concrete, actionable steps.

    • If an expert needs to present, then present.
    • If an expert needs to research, then research.
    • If an expert needs to ask probing questions, then ask probing questions.
    • Each of these is a __dunder__ method of sorts, an implicit contract for how you interact with the world. You don't need to feel the internal confidence of __real_expert__ to implement the __present__ method.
  2. Embrace the "Fake It" as a Learning Strategy: Think of your initial efforts as "testing in isolation." You're trying out the behaviors of competence in a relatively low-stakes environment (your current project, your current conversation, your current challenge). It’s not about convincing others you’re something you’re not; it’s about practicing the skills until they become second nature. Just as a FakeMailer helps test a system without deploying the real one, your "mock" performance helps you develop the muscles without the full pressure of ultimate perfection. You are developing your own internal RealExpert class through repeated execution of its "methods."

  3. Define Your Protocols Clearly: What are the essential "methods" that define competence in your role, hobby, or relationship? List them out. For a manager, it might be delegate_tasks, provide_feedback, motivate_team. For a creative, it might be generate_ideas, execute_vision, receive_critique. When you feel imposter syndrome creeping in, instead of spiraling into "I'm not good enough," ask: "Am I currently executing the [relevant_method]? How can I execute it better?" This turns abstract anxiety into actionable steps.

  4. Recognize Growth Through Iteration: In software, a mock object isn't the final product. It's a stepping stone. Over time, as components are tested and refined, they integrate into the real system. Similarly, as you consistently perform the actions of a competent person – even if you don't feel like one – two things happen:

    • You get better at the actions, building actual skill and experience.
    • The consistent positive feedback (or even just the absence of catastrophic failure) slowly starts to reprogram your internal critic. You begin to accumulate evidence that you can do it, which eventually, gradually, morphs into believing that you are capable. The FakeMailer eventually becomes robust enough to be a RealMailer, or at least a highly effective, independent component in its own right.
  5. Build Your Confidence, Method by Method: Each successful execution of a "method" builds a tiny brick of confidence. You might not feel 100% confident in the whole "Imposter Syndrome is gone forever!" way, but you can feel 100% confident that you can send that email, or deliver that presentation, or have that difficult conversation. Focus on celebrating these individual method calls.

It's a profound liberation to realize that your primary obligation isn't to be a fully formed, perfect, unimpeachable expert, but to simply act like one. To implement the expected behaviors, to provide the required outputs, to "walk and quack" in the way that moves things forward. Your internal identity will catch up, slowly but surely, as you gather evidence from your own actions.

The goal isn't to eradicate every whisper of self-doubt, but to acknowledge it, understand its often well-meaning (if misguided) origins, and then proceed anyway. Because the world doesn't care if you're a "Real Expert" by birthright or a "Mock Expert" diligently faking it till you make it. It just cares that you're a duck who can walk and quack when needed.


TL;DR:

  • Imposter Syndrome makes you feel like a fraud, convinced you’ll be exposed for not being a "real expert."
  • This feeling often comes from comparing your messy internal state to others' polished external appearances and misunderstanding how competence develops.
  • Software engineers solved a similar problem: how to test complex systems efficiently. They use "Mock Objects" that behave like real components without actually being them.
  • The underlying principle is Duck Typing: If an object can perform the required actions ("walks like a duck and quacks like a duck"), its "true type" or internal state doesn't matter.
  • Embrace your "mock object" phase. Focus on doing what a competent person does, rather than being a perfectly formed expert. Your identity and confidence will follow your actions.
  • And yes – you just quietly learned how Duck Typing works in Python.

Top comments (0)