In August 1971, Stanford psychologist Philip Zimbardo posted an ad in the newspaper: “Male college students needed for psychological study of prison life. $15 per day for 1-2 weeks.”

Twenty-four mentally healthy, middle-class college students responded. They were screened, tested, and deemed normal, stable individuals.

Zimbardo randomly assigned them to two groups: guards and prisoners.

The experiment was supposed to last two weeks.

It lasted six days.

What Happened

Zimbardo converted the basement of Stanford’s psychology building into a mock prison. The “guards” received uniforms, wooden batons, and mirrored sunglasses to prevent eye contact. The “prisoners” were given smocks, assigned numbers, and had their heads covered with nylon stockings.

On the first day, local police “arrested” the prisoners at their homes, handcuffed them, and brought them to the “Stanford County Jail.”

At first, it felt like a game.

Then the guards started taking their roles seriously.

Day 1-2: The Shift Begins

Guards began enforcing arbitrary rules. Push-ups for minor infractions. Prisoners had to ask permission for everything—even to use the bathroom.

Some guards became creative with punishments:

  • Making prisoners do endless jumping jacks
  • Forcing them to clean toilets with their bare hands
  • Waking them in the middle of the night for “counts”

Day 2: The First Rebellion

Prisoners rebelled. They barricaded themselves in their cells using their beds.

The guards responded with escalation:

  • They used fire extinguishers to force prisoners away from doors
  • They stripped prisoners naked
  • They took away their beds, forcing them to sleep on concrete
  • They put the ringleaders in solitary confinement

The rebellion was crushed. The guards had won.

Day 3-5: Psychological Breakdown

The guards’ cruelty intensified:

  • They forced prisoners to simulate sexual acts
  • They made them clean toilets with their hands
  • They denied bathroom privileges, forcing prisoners to use buckets
  • They conducted “counts” that lasted for hours

One guard later admitted: “I was surprised at myself… I made them say they loved each other and then made them do degrading tasks.”

The prisoners began to break down:

  • One prisoner had to be released after 36 hours due to severe emotional distress
  • Another developed a psychosomatic rash covering his body
  • Prisoners began referring to themselves by their numbers instead of names
  • They internalized their prisoner identity, becoming passive and hopeless

Day 6: The Experiment Ends

Christina Maslach, a graduate student (later Zimbardo’s wife), visited the experiment and was horrified:

“What you are doing to these boys is terrible!”

Zimbardo had become so absorbed in his role as “prison superintendent” that he had lost objectivity. Over 50 people had observed the experiment. Maslach was the first to object.

The experiment was terminated.

The Shocking Reality

These were not bad people. They were normal college students who had been screened for psychological stability.

Yet within days:

  • Guards became sadistic
  • Prisoners became helpless
  • Everyone accepted the roles as real

One-third of the guards displayed genuinely sadistic tendencies. They enjoyed the power and seemed disappointed when the experiment ended.

What the Experiment Revealed

1. The Power of Roles

When people are assigned a role—guard, prisoner, manager, intern—they conform to expectations, even when those expectations are harmful.

2. The Situational Power

“Good” or “bad” behavior is less about individual character and more about the situation people find themselves in.

3. The Stanford Prison Effect

Normal people can commit cruel acts when:

  • Given authority and power
  • Placed in a dehumanizing environment
  • Provided anonymity (the mirrored sunglasses)
  • Operating in a system that normalizes the behavior

4. Deindividuation

Uniforms, numbers, and anonymity strip away individual identity, making cruelty easier.

5. The Absence of Oversight

Without external accountability, power corrupts rapidly.

Criticisms and Controversies

In recent years, the Stanford Prison Experiment has faced significant criticism:

1. Zimbardo Coached the Guards

  • Recordings revealed Zimbardo explicitly encouraged guards to be tough
  • Guards were told to create feelings of “powerlessness” in prisoners

2. Some Guards Played Up Their Roles

  • At least one guard admitted he was “acting” based on what he thought was expected

3. Ethical Violations

  • Participants experienced real psychological harm
  • Zimbardo had a dual role as researcher and “superintendent”
  • No meaningful informed consent about the actual conditions

4. Limited Scientific Rigor

  • Small sample size
  • No control group
  • Heavy researcher interference

Despite these criticisms, the core insight remains powerful: situations shape behavior more than we realize.

In the Real World

The Stanford Prison Experiment mirrors countless real scenarios:

Abu Ghraib Prison Abuse (2003)

U.S. soldiers tortured and humiliated Iraqi prisoners. The parallels were striking:

  • Dehumanization of prisoners
  • Lack of oversight
  • Power without accountability
  • Normal people committing atrocities

Zimbardo himself testified as an expert witness, arguing the situation created the abuse, not individual “bad apples.”

Corporate Cultures Gone Wrong

Companies where:

  • Hazing is normalized
  • “Tough” management is celebrated
  • Employees are treated as numbers

Enron, Theranos, and countless startups have toxic cultures where “the role” justifies terrible behavior.

Online Moderation and Power

Reddit moderators, Discord admins, and online community leaders—given power with limited oversight—sometimes become petty tyrants.

In Tech and Software

The Stanford Prison Experiment reveals patterns everywhere in technology:

Code Review Culture

The “Guard” Reviewer

Senior dev gets power to approve/reject code
Without oversight, some become harsh, nitpicking, power-tripping
Junior devs become afraid to submit PRs

The role of “gatekeeper” can turn helpful review into cruel rejection.

On-Call Rotations

The “Prison” of Production Support

Engineers assigned to on-call duty
Treated as second-class by feature teams
Demoralized, overworked, burned out
Begin to identify as "the on-call prisoner"

The role defines their experience and self-perception.

Manager-Employee Dynamics

The Power Differential

New manager given authority over former peers
Role encourages "tough decisions"
Without training/oversight, becomes authoritarian
Team becomes passive, disengaged

The manager role can corrupt good people.

Gaming Communities

Moderators and Admins

Volunteer moderators given ban/mute powers
Some become tyrannical, enjoying the control
Users feel powerless, resentful
Community becomes toxic

What We Learn About Software Teams

1. Roles Shape Behavior

If you call someone a “junior developer,” they act junior. If you treat on-call as punishment, it becomes prison.

2. Power Needs Accountability

Code reviewers, tech leads, managers—all need oversight and feedback loops.

3. Dehumanization is Real

When engineers become “resources” or “headcount,” cruelty becomes easier.

4. Culture Is Situational

Toxic behavior isn’t always about “bad people”—it’s about bad systems that enable and reward it.

5. Zimbardo Was Part of the Problem

Leaders who don’t step outside the system can’t see what’s wrong. External perspective matters.

How to Prevent the Stanford Prison Effect

1. Question Roles and Hierarchies

Are your team roles creating harmful power dynamics?

2. Build in Oversight

No one should have unchecked authority. Code review should be reviewed. Managers should have managers.

3. Humanize, Don’t Dehumanize

  • Use names, not ticket numbers
  • Treat engineers as people, not “resources”
  • Respect autonomy and dignity

4. Rotate Power

Don’t let the same people always be “guards.” Rotate on-call, rotate code review duties, rotate leadership.

5. Encourage Dissent

Be the Christina Maslach. If something feels wrong, speak up—even if everyone else seems okay with it.

6. Exit Ramps Matter

Zimbardo should have stopped the experiment sooner. In tech: kill toxic projects, fire abusive managers, change broken systems.

The Deeper Lesson

The Stanford Prison Experiment wasn’t about discovering that some people are evil. It revealed something more disturbing:

We are all capable of cruelty when the situation enables it.

The guards weren’t sadists when they arrived. The prisoners weren’t weak. But the system—the roles, the power dynamics, the lack of oversight—transformed them.

Philip Zimbardo concluded: “The line between good and evil is permeable. Any of us can move across it.”

The Uncomfortable Truth

You might think, “I would never be a cruel guard.”

But statistically, one-third of people become sadistic when given power and anonymity.

The real question isn’t “Would I be evil?” It’s:

“What systems am I part of that enable cruelty? And am I willing to speak up when I see it?”

Key Takeaways

  • ✅ Situations shape behavior more than personality
  • ✅ Roles and power dynamics can corrupt good people
  • ✅ Dehumanization and anonymity enable cruelty
  • ✅ Power without oversight leads to abuse
  • ✅ Toxic systems create toxic behavior
  • ✅ External perspective is critical to seeing problems

Six days. That’s all it took for normal college students to create a brutal prison culture.

In your workplace, your codebase, your team—how long would it take?

The Stanford Prison Experiment failed as a scientific study but succeeded as a warning:

The roles we create, the power we grant, and the systems we build shape who we become.

Design your systems carefully. Because the next guard might be you.