Coding Horror Logo

Coding Horror

Programming and human factors, the broken window theory.

In a previous entry , I touched on the broken window theory. You might be familiar with the Pragmatic Progammers' take on this :

Don't leave "broken windows" (bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up. Perhaps you can comment out the offending code, or display a "Not Implemented" message, or substitute dummy data instead. Take some action to prevent further damage and to show that you're on top of the situation. We've seen clean, functional systems deteriorate pretty quickly once windows start breaking. There are other factors that can contribute to software rot, and we'll touch on some of them elsewhere, but neglect accelerates the rot faster than any other factor.

That's excellent advice for programmers, but it's not the complete story.

broken windows

The broken window theory is based on an Atlantic Monthly article published in 1982. It's worth reading the article to get a deeper understanding of the human factors driving the theory:

Second, at the community level, disorder and crime are usually inextricably linked, in a kind of developmental sequence. Social psychologists and police officers tend to agree that if a window in a building is broken and is left unrepaired, all the rest of the windows will soon be broken. This is as true in nice neighborhoods as in rundown ones. Window-breaking does not necessarily occur on a large scale because some areas are inhabited by determined window-breakers whereas others are populated by window-lovers; rather, one unrepaired broken window is a signal that no one cares, and so breaking more windows costs nothing. (It has always been fun.) Philip Zimbardo, a Stanford psychologist, reported in 1969 on some experiments testing the broken-window theory. He arranged to have an automobile without license plates parked with its hood up on a street in the Bronx and a comparable automobile on a street in Palo Alto, California. The car in the Bronx was attacked by "vandals" within ten minutes of its "abandonment." The first to arrive were a family — father, mother, and young son — who removed the radiator and battery. Within twenty-four hours, virtually everything of value had been removed. Then random destruction began — windows were smashed, parts torn off, upholstery ripped. Children began to use the car as a playground. Most of the adult "vandals" were well-dressed, apparently clean-cut whites. The car in Palo Alto sat untouched for more than a week. Then Zimbardo smashed part of it with a sledgehammer. Soon, passersby were joining in. Within a few hours, the car had been turned upside down and utterly destroyed. Again, the "vandals" appeared to be primarily respectable whites. Untended property becomes fair game for people out for fun or plunder and even for people who ordinarily would not dream of doing such things and who probably consider themselves law-abiding. Because of the nature of community life in the Bronx — its anonymity, the frequency with which cars are abandoned and things are stolen or broken, the past experience of "no one caring" — vandalism begins much more quickly than it does in staid Palo Alto, where people have come to believe that private possessions are cared for, and that mischievous behavior is costly. But vandalism can occur anywhere once communal barriers — the sense of mutual regard and the obligations of civility — are lowered by actions that seem to signal that "no one cares."

There's even an entire book on this subject . What's fascinating to me is that the mere perception of disorder — even with seemingly irrelevant petty crimes like graffiti or minor vandalism — precipitates a negative feedback loop that can result in total disorder:

We suggest that "untended" behavior also leads to the breakdown of community controls. A stable neighborhood of families who care for their homes, mind each other's children, and confidently frown on unwanted intruders can change, in a few years or even a few months, to an inhospitable and frightening jungle. A piece of property is abandoned, weeds grow up, a window is smashed. Adults stop scolding rowdy children; the children, emboldened, become more rowdy. Families move out, unattached adults move in. Teenagers gather in front of the corner store. The merchant asks them to move; they refuse. Fights occur. Litter accumulates. People start drinking in front of the grocery; in time, an inebriate slumps to the sidewalk and is allowed to sleep it off. Pedestrians are approached by panhandlers. At this point it is not inevitable that serious crime will flourish or violent attacks on strangers will occur. But many residents will think that crime, especially violent crime, is on the rise, and they will modify their behavior accordingly. They will use the streets less often, and when on the streets will stay apart from their fellows, moving with averted eyes, silent lips, and hurried steps. "Don't get involved." For some residents, this growing atomization will matter little, because the neighborhood is not their "home" but "the place where they live." Their interests are elsewhere; they are cosmopolitans. But it will matter greatly to other people, whose lives derive meaning and satisfaction from local attachments rather than worldly involvement; for them, the neighborhood will cease to exist except for a few reliable friends whom they arrange to meet.

Programming is insanely detail oriented, and perhaps this is why: if you're not on top of the details, the perception is that things are out of control, and it's only a matter of time before your project spins out of control. Maybe we should be sweating the small stuff .

broken window theory code

  • Bipolar Disorder
  • Therapy Center
  • When To See a Therapist
  • Types of Therapy
  • Best Online Therapy
  • Best Couples Therapy
  • Best Family Therapy
  • Managing Stress
  • Sleep and Dreaming
  • Understanding Emotions
  • Self-Improvement
  • Healthy Relationships
  • Student Resources
  • Personality Types
  • Guided Meditations
  • Verywell Mind Insights
  • 2024 Verywell Mind 25
  • Mental Health in the Classroom
  • Editorial Process
  • Meet Our Review Board
  • Crisis Support

Broken Windows Theory

How Environment Impacts Behavior

Rachael is a New York-based writer and freelance writer for Verywell Mind, where she leverages her decades of personal experience with and research on mental illness—particularly ADHD and depression—to help readers better understand how their mind works and how to manage their mental health.

broken window theory code

Akeem Marsh, MD, is a board-certified child, adolescent, and adult psychiatrist who has dedicated his career to working with medically underserved communities.

broken window theory code

Verywell / Dennis Madamba

Origins and Explanation

  • Application
  • Impact on Behavior
  • Positive Environments

The broken windows theory was proposed by James Q. Wilson and George Kelling in 1982, arguing that there was a connection between a person’s physical environment and their likelihood of committing a crime.

The theory has been a major influence on modern policing strategies and guided later research in urban sociology and behavioral psychology . But it’s also come under increasing scrutiny and some critics have argued that its application in policing and other contexts has done more harm than good.

The theory is named after an analogy used to explain it. If a window in a building is broken and remains unrepaired for too long, the rest of the windows in that building will eventually be broken, too. According to Wilson and Kelling, that’s because the unrepaired window acts as a signal to people in that neighborhood that they can break windows without fear of consequence because nobody cares enough to stop it or fix it. Eventually, Wilson and Kelling argued, more serious crimes like robbery and violence will flourish.

The idea is that physical signs of neglect and deterioration encourage criminal behavior because they act as a signal that this is a place where disorder is allowed to persist. If no one cares enough to pick up the litter on the sidewalk or repair and reuse abandoned buildings, maybe they won’t care enough to call the police when they see a drug deal or a burglary either.

How Is the Broken Windows Theory Applied?

The theory sparked a wave of “broken windows” or “zero tolerance” policing where law enforcement began cracking down on nonviolent behaviors like loitering, graffiti, or panhandling. By ramping up arrests and citations for perceived disorderly behavior and removing physical signs of disorder from the neighborhood, police hope to create a more orderly environment that discourages more serious crime.

The broken windows theory has been used outside of policing, as well, including in the workplace and in schools. Using a similar zero tolerance approach that disciplines students or employees for minor violations is thought to create more orderly environments that foster learning and productivity .

“By discouraging small acts of misconduct, such as tardiness, minor rule violations, or unprofessional conduct, employers seek to promote a culture of accountability, professionalism, and high performance,” said David Tzall Psy.D., a licensed forensic psychologist and Deputy Director for the Health and Wellness Unit of the NYPD.

Criticism of the Broken Window Theory

While the idea that one broken window leads to many sounds plausible, later research on the topic failed to find a connection. “The theory oversimplifies the causes of crime by focusing primarily on visible signs of disorder,” Tzall said. “It neglects underlying social and economic factors, such as poverty, unemployment, and lack of education, which are known to be important contributors to criminal behavior.”

When researchers account for those underlying factors, the connection between disordered environments and crime rates disappears.

In a report published in 2016, the NYPD itself found that its “quality-of-life” policing—another term for broken windows policing—had no impact on the city’s crime rate. Between 2010 and 2015, the number of “quality-of-life” summons issued by the NYPD for things like open containers, public urination, and riding bicycles on the sidewalk dropped by about 33%.

While the broken windows theory would theorize that serious crimes would spike when the police stopped cracking down on those minor offenses, violent crimes and property crimes actually decreased during that same time period.

“Policing based on broken windows theory has never been shown to work,” said Kimberly Vered Shashoua, LCSW , a therapist who works with marginalized teens and young adults. “Criminalizing unhoused people, low socioeconomic status households, and others who create this type of ‘crime’ doesn't get to the root of the problem,”

Not only have policing efforts that focus on things like graffiti or panhandling failed to have any impact on violent crime, they have often been used to target marginalized communities. “The theory's implementation can lead to biased policing practices as law enforcement officers can concentrate their efforts on low-income neighborhoods or communities predominantly populated by minority groups,” Tzall said.

That biased policing happens, in part, because there’s no objective measure of disordered environments so there’s a lot of room for implicit bias and discrimination to influence decision-making about which neighborhoods to target in crackdowns.

Studies show that neighborhoods where residents are predominantly Black or Latino are perceived as more disorderly and prone to crime than neighborhoods where residents are mostly white, even when police-recorded crime rates and physical signs of physical deterioration in the environment were the same.

Moreover, many of the behaviors that are used by police and researchers as signs of disorder are influenced by racial and class bias . Drinking and hanging out are both legal activities that are viewed as orderly when they happen in private spaces like a home or bar, for example. But those who socialize and drink in parks or on stoops outside their building are viewed as disorderly and charged with loitering and public drunkenness.

The Impact of Physical Environment on Behavior

While the broken windows theory and its application are flawed, the underlying idea that our physical environment can influence our behavior does hold some water. On one hand, “the physical environment conveys social norms that influence our behavior,” Tzall explained. “When we observe others adhering to certain norms in a particular space, we tend to adjust our own behavior to align with them.”

If a person sees litter on the street, they might be more likely to litter themselves, for example. But that doesn’t necessarily mean they’ll make the leap from littering to robbery or violent assault. Moreover, litter can often be a sign that there aren’t enough public trashcans available on the streets for people to throw away food wrappers and other waste while they’re out. In that scenario, installing more trashcans would do far more to reduce litter than increasing the number of citations for littering.

“The design and layout of spaces can also signal specific expectations and guide our actions,” Tzall explained. In the litter example, then, the addition of more trashcans could also act as an environmental cue to encourage throwing trash away rather than littering.

How to Create Positive Environments to Foster Safety, Health, and Well-Being

Ultimately, reducing crime requires addressing the root causes of poverty and social inequality that lead to crime. But taking care of public spaces and neighborhoods to keep them clean and enjoyable can still have a positive impact on the communities who live in and use them.

“Positive environments provide opportunities for meaningful interactions and collaboration among community members,” Tzall said. “Access to green spaces, recreational facilities, mental health resources, and community services contribute to physical, mental, and emotional health,” said Tzall.

By creating more positive environments, we can encourage healthier lifestyle choices—like adding protected bike lanes to encourage people to ride bikes—and prosocial behavior —like adding basketball courts in parks to encourage people to meet and play a game with their neighbors.

At the individual level, Tzall suggests people “can initiate or participate in community projects, volunteer for local organizations, support inclusive initiatives, engage in dialogue with neighbors, and collaborate with local authorities or community leaders.” Create positive environments by taking the initiative to pick up litter when you see it, participate in tree planting initiatives, collaborate with your neighbors to establish a community garden, or volunteer with a local organization to advocate for better public spaces and resources. 

Wilson JQ and Kelling GL. Broken Windows: The Police and Neighborhood Safety . The Atlantic Monthly. 1982.

Harcourt B, Ludwig J. Broken windows: new evidence from new york city and a five-city social experiment . University of Chicago Law Review. 2006;73(1).

Peters M, Eure P. An Analysis of Quality-of-Life Summonses, Quality-of-Life Misdemeanor Arrests, and Felony Crime in New York City, 2010-2015 . New York City Department of Investigation Office of the Inspector General for the NYPD; 2016.

Sampson RJ. Disparity and diversity in the contemporary city: social (Dis)order revisited . The British Journal of Sociology. 2009;60(1):1-31. Doi:10.1111/j.1468-4446.2009.01211.x

By Rachael Green Rachael is a New York-based writer and freelance writer for Verywell Mind, where she leverages her decades of personal experience with and research on mental illness—particularly ADHD and depression—to help readers better understand how their mind works and how to manage their mental health.

Refactoring code: the broken windows theory

Refactoring code: the broken windows theory

Every time we write software we incur technical debt.

Every decision to add new code to a project has the potential to introduce new bugs. Over time a team will introduce disorder to their systems as new features are built and technical architecture changes. So how can you encourage a healthy codebase and avoid it falling into a state of disrepair?

Let's think about the broken windows theory.

The Broken Windows Theory

The broken windows theory is a criminological theory that states that visible signs of crime, anti-social behaviour, and civil disorder create an urban environment that encourages further crime and disorder, including serious crimes.

This theory, from 1982, suggests that a building with broken windows, a potential indicator of criminal behavior, causes the local residents to not care about their environment and other windows soon become broken. After a while, more windows are broken and ultimately the building becomes so damaged that it becomes abandonded.

We can apply this theory to software development and the teams who build and own applications. Small hacks added to the code can quickly add up over time. Leaving badly named variables or functions can encourage the next developer to do the same. If the previous developer didn't care about the code, why should you? Over the time a software project can quickly incur more and more technical debt. Over time the project quickly becomes a tangled mess and you'll start to see your team wince when asked to work on that application.

Avoiding rotting software

Want to avoid software going bad? Let's look at fixing some broken windows we find.

Martin Fowler calls it opportunistic refactoring . This is when a developer sees code that isn't as clear as it should be and takes the chance to fix it by tidying up variables or refactoring a function. If everyone does this regularly, the team can continue to keep the codebase healthy. This little act of fixing a small piece of code encourages the whole team to care about their code. It avoids a "cut and paste" mentality and builds a consistency in the code.

By doing this we quickly build a culture of engineering excellence. 🎉

One practice that I encourage is to avoid large pull requests. These become difficult to review and often get merged with few comments due to their size. If you're writing new code and spot the opportunity to fix one of these broken windows, sometimes it's more useful to note down where the code needs fixing rather than adding it to your current feature work. Instead raise a second pull request to make these changes so that the improvements are isolated from new features. Don't leave it for too long though or that code will start to rot again.

Be pragmatic about fixing all of the issues you find. While there is a huge benefit to refactoring and fixing your broken windows, no software will ever be perfect. You can only work with the best knowledge you have right now. Consistent small changes to make the code better may make a bigger impact in the long run and will help you to balance building new features with fixing the technical debt.

Robert Baden-Powell , the father of scouting, says it nicely:

The Scouting Rule

“Try and leave the world a little better than you found it”

- Robert Baden-Powell

I think this is a wonderful rule to live your life by as well as using it to help you to decide when to refactor your software.

Marc Littlemore avatar

I'm Marc Littlemore.

I’m a Senior Software Engineering Manager who works with high performing development teams and loves to help to grow other software leaders and engineers.

Want to read more?

Automate Your Static Site Rebuilds with Netlify Scheduled Functions

Automate Your Static Site Rebuilds with Netlify Scheduled Functions

Effortlessly automate regular website updates for your static site using Netlify scheduled functions. Set it and forget it - never worry about manual updates again!

Easily Create Gravatar Images With Eleventy

Easily Create Gravatar Images With Eleventy

If you're moving your Wordpress site to Eleventy, you will want to convert your Gravatar images too. Find out how easy it is using an Eleventy shortcode.

Streamline Your Workflow: Automate GitLab Releases with Semantic-Release

Streamline Your Workflow: Automate GitLab Releases with Semantic-Release

Revolutionise your GitLab workflow with automated releases. Discover how to use semantic-release for seamless deployment.

You've got this: become a confident developer

You've got this: become a confident developer

If you're early in your software development career, you might not realise how good you are yet. Here are a few ideas to boost your confidence.

  • Expert Users
  • Open Journies
  • Success Stories

Thought Leaders

  • Open Strategy
  • Open Source India 2022
  • Open Source India 2021
  • OSFY Webinars

Open Journey

  • Electronics and Open Source
  • Subscribe to Print Edition
  • Write For Us

broken window theory code

“Open source allows us to lower costs, accelerate delivery, and customise…

broken window theory code

Ensuring Ethics in AI and Mitigating Bias

broken window theory code

Open Source Tools for Generative AI: An Introduction

broken window theory code

PHP Geek, FOSS Enthusiast, CTO And A Pediatrician

AI Generative code

The Transformative Impact Of Generative AI On Organisations

broken window theory code

Threat For OpenAI As Microsoft Plans AI Service With Databricks

broken window theory code

EA Apps Can Run on Linux Due To CrossOver 23

broken window theory code

Google Chrome Outperformed By Firefox in SunSpider

Metaverse

Open Source Platforms You Can Use for AR and VR

team work

Why and How to Become an Open Source Contributor

broken window theory code

A Developer’s Guide To Large Language Models And Prompt Engineering

Open-AI

OpenAI’s Whisper: A New Era in Audio Transcriptions

Open Source AI Models

Why Organisations Must Embrace Open Source AI Models

pass featured image

Cloud Foundry: One of the Best Open Source PaaS Platforms

broken window theory code

Resource Provisioning in a Cloud-Edge Computing Environment

broken window theory code

“More than a technical problem, Open Source management, Is a business…

broken window theory code

“Take any open source project — its contributors cut across national, religious…

broken window theory code

“Contributing To OSS Is My ‘Guru Dakshina’ To The Open Source Community”

broken window theory code

“Indian Open Source Space Is Still In The Evolving Stage”

broken window theory code

“The adoption of FOSS in the MSME sector needs considerable work”

broken window theory code

PySpark: Big Data Processing Made Easy

broken window theory code

What’s Good About Python 3?

broken window theory code

Red Hat Unveils Developer Preview Of RHEL AI

broken window theory code

Googletrans: Making Machine Translation Easy

broken window theory code

Languages for AI/ML: A Quick Look at Python, R, and Julia

Container security

Securing Docker: Best Practices

broken window theory code

Common UNIX Commands and Tools that Enhance Security

broken window theory code

Unveiling Terraform: The Infrastructure-as-Code Software Tool

Dog generative image illustration

Stable Diffusion: The Image Generation Wizard

broken window theory code

Getting Started with Istio

Metaverse

Metaverse: Current Status and What to Come

Maneesh Sharma, country-manager at GitHub India.jpg

GitHub India: The Focus is on the Community, Commerce and Country

Raman Sharma, VP product marketing, DigitalOcean

“Companies should continue to find ways to support the ecosystem as…

broken window theory code

“To Have A Successful Tech Career, One Must Truly Connect With…

broken window theory code

“If You Are A Techie, Your Home Page Should Be GitHub,…

broken window theory code

SecureDrop: Making Whistleblowing Possible

broken window theory code

GNUKhata: Made-for-India Accounting Software

broken window theory code

“Open source helps us brew and deliver the perfect chai.”

Karrtik Iyer, Head of Communities-Data Science & AI, Thoughtworks

“Open source plays a crucial role in ensuring the ethical and…

Ajay Chaudhary,

The Rise of Edge AI

Mani Ganeshan,

“For us, stability and scalability are the key aspects of open…

Richard Matthew Stallman-(RMS)

Non-free programs are a threat to everyone’s freedom

broken window theory code

OSS Offers Triburg Tech Stability and Cost Optimisation

An interactive workshop with researchers at Kaiinos

Rich Spatial Data Acts as a Backbone for this Lake Management…

broken window theory code

Over Eighty three per cent of Red Hat’s business in the…

broken window theory code

Recherche Tech Puts Together Best Available Open Source Technologies to Revolutionize…

broken window theory code

Red Hat Partner Ecosystem to Gain $21.74 for Every Dollar Red…

broken window theory code

Red Hat, NVIDIA Expand Alliance to Accelerate AI/ML Workloads Across Hybrid…

broken window theory code

F5 Networks Completes $670 Million NGINX Acquisition

broken window theory code

OpenAI, Looks into Crafting Its Own AI Processors

broken window theory code

Know How Open Source Edge Computing Platforms Are Enriching IoT Devices

xmpp

Microsoft, BMW Group Join Hands to Launch Open Manufacturing Platform

broken window theory code

Suse Plans to Focus on Asia-Pacific as Independent Firm

broken window theory code

Twitter CEO Jack Dorsey Building Open-Source Bitcoin Development Team

Red Hat

Red Hat Broadens Automation Across Hybrid Clouds

broken window theory code

Streamlined Coding From Concept To Execution

broken window theory code

Open Source Llama 3 And The Rise Of Open Models

broken window theory code

HubSpot Expands Presence In India With New Bengaluru Office

Joy of programming: the ‘broken window’ theory.

Broken Window

Development projects are often completed within tight deadlines to deliver working software, and hence managers focus only on externally visible product quality aspects, such as reliability, stability, performance, security, etc. Other less visible or not immediately measurable aspects, such as maintainability or reusability, are generally ignored. Most projects fail because they do not meet customer requirements (typically, non-functional requirements such as reliability); if the project survives, it moves on to the maintenance phase.

During maintenance, changes are made to fix or enhance features in the software without much focus on improving design or code quality. If such changes continue to be made, the design and code starts ‘decaying’ — the visible symptoms are known as ‘code smells’ in the refactoring community. If efforts to take up ‘refactoring activities’ are not made, it reaches a situation in which developers dread to touch the code.

First, it becomes extremely difficult to understand the design and code; so any attempts to make even minor changes to the code could break the software! When the software becomes ‘fragile’, managers and customers wake up and try to do ‘something’ to get the situation under control. However, at this point, it is often too late to address the problem, and hence the project gets ‘scrapped’. Soon, someone decides to use some other software, or write new software from scratch.

For large enterprise software, the effort required for such ‘re-engineering’ activities often costs millions of dollars.

Why does ‘software decay’ happen so quickly? Why don’t developers follow good programming practices to keep the design and code clean? One way to explain this phenomenon is through the ‘broken window’ theory.

The ‘broken window’ theory was first introduced by Wilson and Kelling in 1982: “Consider a building with a few broken windows. If the windows are not repaired, the tendency is for vandals to break a few more windows. Eventually, they may even break into the building, and if it’s unoccupied, perhaps become squatters or light fires inside.”

In India, this theory is easy to explain using the traffic jams that happen so very often. When a few vehicles break the rules and create confusion in the absence of traffic police, others, too, break the rules and make their own way through the traffic, which quickly leads to chaos!

In a software project, developers often do notice that the existing design and code is not clean, yet managers and leaders focus on ‘getting the work done as soon as possible’ rather than on ‘getting it right’. Given the fact that the programming best practices have already been abandoned, there is no reluctance in breaking more rules, particularly when no one notices. This quickly leads to chaos, and the software becomes ‘fragile’, leading to scrapping the project.

A successful approach to the ‘broken window’ problem is to address the situation when things are under control, and when the problem is small. This is especially true for software. Things can go out of control very quickly in software. It is easier to do small refactorings with every fix or enhancement, than to get approvals for refactoring activities that require large budgets and a lot of time.

It is understandable that managers can’t usually get an approval to take up long-lead-time refactoring activities, but no one stops them from allocating a little extra time to ensure the quality of the code for every change done. Developers should be aware that breaking programming best practices is taken as a serious problem. To a great extent, these two approaches will keep the maintenance projects under control.

RELATED ARTICLES MORE FROM AUTHOR

Leave a reply cancel reply.

Save my name, email, and website in this browser for the next time I comment.

broken window theory code

“More than a technical problem, Open Source management, Is a business...

Karrtik Iyer, Head of Communities-Data Science & AI, Thoughtworks

“Open source plays a crucial role in ensuring the ethical and...

Ajay Chaudhary,

“For us, stability and scalability are the key aspects of open...

Richard Matthew Stallman-(RMS)

Search file and create backup according to creation or modification date

LAN and Raw Sockets network cable connect

A Guide to Using Raw Sockets

Grep me out!

A Beginner’s Guide To Grep: Basics And Regular Expressions

Most popular.

Database Programming

Database Programming in Python

broken window theory code

“Take any open source project — its contributors cut across national, religious...

broken window theory code

EDITOR PICKS

broken window theory code

“Open source allows us to lower costs, accelerate delivery, and customise...

Popular posts, popular category.

  • Developers 1592
  • For U & Me 922
  • Tools / Apps 632
  • How-Tos 617

Understanding the broken window concept.

The Broken Window Concept was introduced by social scientists James Wilson and George Kelling in 1982 to explain the occurrence of vandalism and crime in urban environments. The theory posits that visible signs of disorder, like broken windows, can create an atmosphere of neglect, encouraging more significant acts of delinquency.

Imagine you're walking down a street with a row of houses. One of the houses has a broken window that hasn't been fixed. Over time, another window breaks because no one fixed the first one. After all, if one broken window isn't a problem, why would another be?

Gradually, people might start to think that no one cares about the house. That might lead them to believe that they can do more damaging things, like graffiti or even break into the house, without consequences. In other words, the small problem (a broken window) escalated into much larger problems because it was ignored.

Similar to this Imagine a piece of software you are building. A tiny, insignificant crack in one window - the 'broken window', symbolizes the first instance of poor coding practice or design. Ignoring this 'broken window' equates to leaving the code issue unattended.

Over time, the software team may interpret this unattended window as a tacit acceptance of substandard work, leading to more 'broken windows' in the form of additional poor coding practices. As these defects multiply, the codebase degrades, becoming convoluted and hard to maintain. Ultimately, it might lead to 'software rot,' a state where the software is so beset with problems that it becomes almost impossible to improve or even use effectively.

broken window theory code

Refactoring Handyman.

In this context, refactoring emerges as the "handyman" tasked with repairing these "broken windows".

By continuously refactoring the code, developers ensure that "broken windows" are promptly repaired, keeping the codebase healthy and maintainable. These repairs might include renaming variables for better clarity, splitting large functions into smaller, more manageable ones, or eliminating redundant code. In essence, refactoring is a proactive practice to maintain code hygiene, thus preventing the occurrence of 'software rot.'

Regular refactoring sends a clear message to the team that the software quality is of paramount importance. It sets a standard, encouraging developers to follow best practices and discouraging them from introducing 'broken windows' into the codebase.

So, the next time you spot a 'broken window' in your codebase, remember to repair it promptly. The health of your software depends on it.

Broken Windows Theory in Software Development: Keeping Your Codebase Pristine.

In the world of software development, the Broken Windows Theory serves as a powerful analogy, drawing a parallel between the deterioration of a neighborhood and the decay of a codebase. Coined by George L. Kelling and James Q. Wilson in criminology, this theory suggests that visible signs of neglect, such as broken windows, can lead to an increase in crime. Similarly, in software development, seemingly minor issues left unaddressed can contribute to the degradation of a codebase over time.

The concept gained prominence in the software engineering community through “The Pragmatic Programmer” , a seminal work by Andrew Hunt and David Thomas . They argue that just as a broken window left unrepaired can signal a lack of care, allowing small issues to persist in a codebase can lead to more significant problems.

The Broken Windows in Code

In the context of software development, a broken window might manifest as:

Code Duplication: When the same or similar code appears in multiple places, it becomes harder to maintain and increases the likelihood of introducing bugs.

Unclear Naming Conventions: Poorly chosen names for variables, functions, or classes can create confusion and hinder the understanding of the code.

Unused Code: Functions or modules that are no longer in use contribute to code bloat, making the codebase more challenging to navigate.

Inconsistent Formatting: Inconsistent indentation, spacing, or coding styles can make the code look messy and unprofessional

Unhandled Exceptions: Ignoring or not properly handling exceptions can lead to unpredictable behavior and make debugging a nightmare.

The Domino Effect

Much like the broken windows in a neighborhood, these seemingly minor issues in code can have a cascading effect. When developers see existing problems that are not being addressed, they may be more likely to introduce new issues, assuming that the code quality bar is already set low.

The Importance of Repairs

Addressing broken windows in software development is not merely about maintaining aesthetics. It’s about fostering a culture of excellence and a commitment to quality. Here are some steps you can take to keep your codebase pristine:

Regular Code Reviews: Encourage a culture of regular code reviews to catch and address issues early on.

Automated Testing: Implement comprehensive automated testing to catch regressions and ensure the stability of your codebase.

Refactoring: Allocate time for refactoring to eliminate code smells and improve overall code quality.

Documentation: Keep documentation up-to-date to aid understanding and future development efforts.

Continuous Improvement (CI): Foster a mindset of continuous improvement, where developers are encouraged to suggest and implement enhancements to the codebase.

By taking these steps, you can prevent the accumulation of technical debt and maintain a healthy, sustainable codebase. Remember, in software development, just like in neighborhoods, a proactive approach to addressing broken windows ensures a cleaner, more secure, and more inviting environment for everyone involved.

Happy coding! đŸŒâœš

Broken Windows Theory

Ayesh Perera

B.A, MTS, Harvard University

Ayesh Perera, a Harvard graduate, has worked as a researcher in psychology and neuroscience under Dr. Kevin Majeres at Harvard Medical School.

Learn about our Editorial Process

Saul Mcleod, PhD

Editor-in-Chief for Simply Psychology

BSc (Hons) Psychology, MRes, PhD, University of Manchester

Saul Mcleod, PhD., is a qualified psychology teacher with over 18 years of experience in further and higher education. He has been published in peer-reviewed journals, including the Journal of Clinical Psychology.

On This Page:

  • The broken windows theory is a criminological theory which, employing broken windows as a metaphor for anti-social behavior and civil disorder, and links the occurrence of serious crimes with visible signs of incivility in a community (Wilson & Kelling, 1982).
  • The theory holds that policing approaches targeting misdemeanors such as vandalism, fare evasion, public drinking, and loitering can help create an environment favorable to law and order.

Zimbardo’s Study

In 1969, the Stanford psychologist Philip Zimbardo conducted an experiment in which he arranged two automobiles in the same condition, with their hoods up and no license plates, to be parked in two different locations—one in Bronx, New York, and the other in Palo Alto, California.

  James-And-Karla-Murray-NYC-Untapped-Cities

Within minutes, the car in the Bronx was attacked. The first vandals comprised a family, a mother, and father with their young son, who removed the battery and radiator. Within the ensuing 24 hours, the vehicle was stripped of everything valuable.

Not long afterward, the car’s upholstery was ripped, its windows were smashed, and soon children were playing upon it. Meanwhile, the car in Palo Alto would remain untouched for more than 7 days.

Finally, Zimbardo went and smashed the car using a sledgehammer. Soon, others joined in, and the car was destroyed. Most of those involved in the vandalism herein were well dressed and apparently decent individuals.

The study seemed to support the conclusion that communities with histories of theft and abandoned property are more likely to experience vandalism because apathy to the erosion of civility is likely to engender and encourage unacceptable behavior.

Wilson and Kelling – Broken Window Policy

Despite the abovementioned early experiments, the concept was first introduced as a theory by George L. Kelling and James Q. Wilson in March 1982 in their article “Broken Windows” in The Atlantic Monthly.

Herein, they noted, “one unrepaired broken window is a signal that no one cares, and so breaking more windows costs nothing” (Wilson & Kelling, 1982).

Broken Windows Theory

Source: Hinkle, J. C., & Weisburd, D. (2008). The irony of broken windows policing: A micro-place study of the relationship between disorder focused police crackdowns and fear of crime. Journal of Criminal Justice, 36(6), 503-512.

The theory would be further developed by George Kelling and Catherine Coles in their 1996 book Fixing Broken Windows: Restoring Order and Reducing Crime in Our Communities .

The book discussed strategies to curb crimes in urban neighborhoods and posited that addressing problems while they are small (e.g., immediately repairing broken windows and cleaning the sidewalks daily) could stop minor misconduct from escalating into major crimes (Kelling & Coles, 1997).

The theory soon gained enormous attention. While its advocates sought to enact it via various law enforcement initiatives, its detractors showed no reluctance in denouncing what they saw as its adverse aspects.

Examples of Broken Windows Policing

New york city.

Giulian Broken Window Policing

The 1990s saw the broken windows theory significantly shaping law enforcement policy. Having hired George Kelling as a consultant in 1985, New York City authorities soon embarked on an ambitious project to reduce crime (Fagan & Garth, 2000).

Led by Police Commissioner William Bratton, New York City adopted an aggressive order-maintenance approach, deploying squads of plain-clothes officers to make arrests for misdemeanors.

The ‘quality of life initiative’ of 1994, in particular, cracked down on disorderly conduct, panhandling, street prostitution, unsolicited windshield washing, and public drinking. By 1996, when Bratton resigned, the rate of homicide had been halved, and felonies had decreased by nearly 40%.

Lowell, Massachusetts

broken windows

New York City’s success would soon inspire similar policing around the United States. For instance, researchers from Harvard and Suffolk tracked down 34 hotspots for crime in Lowell, Massachusetts, and local authorities reorganized half of these regions (Johnson, 2009; Ruhl, 2021).

They increased misdemeanor arrests, fixed streetlights, and cleaned up the trash. The other half of the crime hotspots remained unaltered. Calls to the police dropped by a notable 20% in the areas which had been cleaned up by the law enforcement.

Making regular arrests, as well as significantly changing the landscape of the city, seemed to have profoundly improved the safety of the environment.

Tokyo, Japan

The local government of Adachi Ward, Tokyo, which once had Tokyo’s highest crime rates, introduced the “Beautiful Windows Movement” in 2008 (Hino & Chronopoulos, 2021).

The intervention was twofold. The program, on one hand, drawing on the broken windows theory, promoted policing to prevent minor crimes and disorder. On the other hand, in partnership with citizen volunteers, the authorities launched a project to make Adachi Ward literally beautiful.

Following 11 years of implementation, the reduction in crime was undeniable. Felony had dropped from 122 in 2008 to 35 in 2019, burglary from 104 to 24, and bicycle theft from 93 to 45.

This Japanese case study seemed to further highlight the advantages associated with translating the broken widow theory into both aggressive policing and landscape altering.

Pros and Cons of Broken Windows Policing

Despite its salutary effects, the broken windows theory has been challenged as a fallacious slippery slope argument that fuels fear of youth and class bias (Harcourt, 2009).

Critics have contended that punishing misdemeanors, such as avoiding subway fares, imposes penalties on economic desperation and that such harsh policing discriminates against a society’s lower socio-economic classes and by extension, certain racial minorities.

Another major criticism of the theory holds that policing inspired by the broken windows theory justifies needless rules (e.g., prohibiting people from painting their houses with certain colors) and wasteful government expenditure (e.g., the cost of regular police patrols).

Notwithstanding the criticism, the theory’s proponents adamantly defend its merits against its adversaries. Heather Mac Donald, the author of The War on Cops: How the New Attack on Law and Order Makes Everyone Less Safe , for instance, has pointed out that government spending on misdemeanor enforcement interrupts criminal conduct before it could ripen into felony (Donald, 2016).

She has repeatedly noted that “the solution to racial disparities in the criminal-justice system is not to target policing” but “to bring the Black crime rate down” by “revalorizing the two-parent family” (Harcourt, 2009).

In conclusion, denounced by some and praised by others, the broken windows theory remains a controversial means of reducing crime and maintaining law and order.

Further Information

Wilson, J. Q., & Kelling, G. L. (1982). Broken windows. Atlantic monthly, 249(3), 29-38.

Harcourt, B. E., & Ludwig, J. (2006). Broken windows: New evidence from New York City and a five-city social experiment. U. Chi. L. Rev., 73, 271.

Sampson, R. J., & Raudenbush, S. W. (2004). Seeing disorder: Neighborhood stigma and the social construction of “broken windows”. Social psychology quarterly, 67(4), 319-342.

Hino, K., & Chronopoulos, T. (2021). A review of crime prevention activities in a Japanese local government area since 2008: Beautiful Windows Movement in Adachi Ward. Crime Prevention and Community Safety, 1-17.

Fagan, J., & Davies, G. (2000). Street stops and broken windows: Terry, race, and disorder in New York City. Fordham Urb. LJ , 28, 457.

Harcourt, B. E. (2009). Illusion of order: The false promise of broken windows policing . Harvard University Press.

Harcourt, B. E., & Ludwig, J. (2006). Broken windows: New evidence from New York City and a five-city social experiment. U. Chi. L. Rev., 73 , 271.

Johnson, C. Y. (2009). Breakthrough on “broken windows.” Boston Globe.

Kelling, G. L., & Coles, C. M. (1997). Fixing broken windows: Restoring order and reducing crime in our communities . Simon and Schuster.

Ruhl, C. (2021, July 26). The broken windows theory . Simply Psychology. www.simplypsychology.org/broken-windows-theory.html

Wilson, J. Q., & Kelling, G. L. (1982). Broken windows. Atlantic monthly, 249 (3), 29-38.

Zimbardo, P. G. (1969). The human choice: Individuation, reason, and order versus deindividuation, impulse, and chaos. In Nebraska symposium on motivation. University of Nebraska press.

Print Friendly, PDF & Email

Related Articles

How To Stop Being Passive-Aggressive

How To Stop Being Passive-Aggressive

How To Stop Being Insecure In A Relationship

Dating Tips , Self-Care

How To Stop Being Insecure In A Relationship

IQ vs EQ: Why Emotional Intelligence Matters More Than You Think

Emotions , Self-Care

IQ vs EQ: Why Emotional Intelligence Matters More Than You Think

Signs of Low Emotional Intelligence

Signs of Low Emotional Intelligence

How Is Emotional Intelligence Important In The Workplace?

How Is Emotional Intelligence Important In The Workplace?

How To Improve Emotional Intelligence

How To Improve Emotional Intelligence

Salienko Evgenii/Shutterstock

Broken Windows Theory

Reviewed by Psychology Today Staff

The broken windows theory states that visible signs of disorder and misbehavior in an environment encourage further disorder and misbehavior, leading to serious crimes. The principle was developed to explain the decay of neighborhoods, but it is often applied to work and educational environments.

  • What Is the Broken Windows Theory?
  • Do Broken Windows Policies Work?

Syda Productions/Shutterstock

The broken windows theory, defined in 1982 by social scientists James Wilson and George Kelling, drawing on earlier research by Stanford University psychologist Philip Zimbardo, argues that no matter how rich or poor a neighborhood, one broken window would soon lead to many more windows being broken: “One unrepaired broken window is a signal that no one cares, and so breaking more windows costs nothing.” Disorder increases levels of fear among citizens, which leads them to withdraw from the community and decrease participation in informal social control.

The broken windows are a metaphor for any visible sign of disorder in an environment that goes untended. This may include small crimes, acts of vandalism, drunken or disorderly conduct, etc. Being forced to confront minor problems can heavily influence how people feel about their environment, particularly their sense of safety.  

With the help of small civic organizations, lower-income Chicago residents have created over 800 community gardens and urban farms out of burnt buildings and vacant lots. Now, instead of having trouble finding fresh produce, these neighborhoods have become go-to food destinations. This example of the broken windows theory benefits the people by lowering temperatures in overheated cities, increasing socialization, reducing stress , and teaching children about nature.

George L. Kelling and James Q. Wilson popularized the broken windows theory in an article published in the March 1982 issue of The Atlantic . They asserted that vandalism and smaller crimes would normalize larger crimes (although this hypothesis has not been fully supported by subsequent research). They also remarked on how signs of disorder (e.g., a broken window) stirred up feelings of fear in residents and harmed the safety of the neighborhood as a whole.

The broken windows theory was put forth at a time when crime rates were soaring, and it often spurred politicians to advocate policies for increasing policing of petty crimes—fare evasion, public drinking, or graffiti—as a way to prevent, and decrease, major crimes including violence. The theory was notably implemented and popularized by New York City mayor Rudolf Giuliani and his police commissioner, William Bratton. In research reported in 2000, Kelling claimed that broken-windows policing had prevented over 60,000 violent crimes between 1989 and 1998 in New York City, though critics of the theory disagreed.

Tana888/Shutterstock

Although the “Broken Windows” article is one of the most cited in the history of criminology , Kelling contends that it has often been misapplied. The implementation soon escalated to “zero tolerance” policing policies, especially in minority communities. It also led to controversial practices such as “stop and frisk” and an increase in police misconduct complaints.

Most important, research indicates that criminal activity was declining on its own, for a number of demographic and socio-economic reasons, and so credit for the shift could not be firmly attributed to broken-windows policing policies. Experts point out that there is “no support for a simple first-order disorder-crime relationship,” contends Columbia law professor Bernard E. Harcourt. The causes of misbehavior are varied and complex.

The effectiveness of this approach depends on how it is implemented. In 2016, Dr. Charles Branas led an initiative to repair abandoned properties and transform vacant lots into community parks in high-crime neighborhoods in Philadelphia, which subsequently saw a 39% reduction in gun violence. By building “palaces for the people” with these safe and sustainable solutions, neighborhoods can be lifted up, and crime can be reduced.  

When a neighborhood, even a poor one, is well-tended and welcoming, its residents have a greater sense of safety. Building and maintaining social infrastructure—such as public libraries, parks and other green spaces, and active retail corridors—can be a more sustainable option and improve the daily lives of the people who live there.

According to the broken windows theory, disorder (symbolized by a broken window) leads to fear and the potential for increased and more severe crime. Unfortunately, this concept has been misapplied, leading to aggressive and zero-tolerance policing. These policing strategies tend to focus on an increased police presence in troubled communities (especially those with minorities and lower-income residents) and stricter punishments for minor infractions (e.g., marijuana use).  

Zero-tolerance policing metes out predetermined consequences regardless of the severity or context of a crime. Zero-tolerance policies can be harmful in an academic setting, as vulnerable youth (particularly those from minority ethnic/racial backgrounds) find themselves trapped in the School-to-Prison Pipeline for committing minor infractions. 

Aggressive policing practices can sour relationships between police and the community. However, problem-oriented policing—which identifies the specific problems or “broken windows” in a neighborhood and then comes up with proactive responses—can help reduce crime. This evidence-based policing strategy  has been shown to be effective. 

broken window theory code

We question the contribution made by criminology to the practicalities of policing and suggest that police officers would be better off acquainting themselves with psychology.

broken window theory code

In reports of police use of force, officers and minority citizens are often portrayed as natural enemies. Here is what we know and some suggestions for a helpful approach.

broken window theory code

Once we've mastered self-rationalization, our "inner weasels" can silence our consciences.

broken window theory code

Part 2: A high murder rate. A cry for help. And I was walking down the street


broken window theory code

Pace yourself. It all comes down to this month, and it doesn't. It's ongoing, uphill work.

broken window theory code

Lying is always bad except when it's good. Recursion suggests how to find exceptions to moral rules.

broken window theory code

Defund the police is the rallying cry you hear as people feel more resources need to help residents deal with mental health issues. In one city, therapists respond with the police.

broken window theory code

We live in a time of political chaos, terrorism, civil unrest, and economic unpredictability. We must build resilient communities if we are to survive and thrive. Here's how.

  • Find a Therapist
  • Find a Treatment Center
  • Find a Psychiatrist
  • Find a Support Group
  • Find Online Therapy
  • United States
  • Brooklyn, NY
  • Chicago, IL
  • Houston, TX
  • Los Angeles, CA
  • New York, NY
  • Portland, OR
  • San Diego, CA
  • San Francisco, CA
  • Seattle, WA
  • Washington, DC
  • Asperger's
  • Bipolar Disorder
  • Chronic Pain
  • Eating Disorders
  • Passive Aggression
  • Personality
  • Goal Setting
  • Positive Psychology
  • Stopping Smoking
  • Low Sexual Desire
  • Relationships
  • Child Development
  • Therapy Center NEW
  • Diagnosis Dictionary
  • Types of Therapy

May 2024 magazine cover

At any moment, someone’s aggravating behavior or our own bad luck can set us off on an emotional spiral that threatens to derail our entire day. Here’s how we can face our triggers with less reactivity so that we can get on with our lives.

  • Emotional Intelligence
  • Gaslighting
  • Affective Forecasting
  • Neuroscience

The Psychology of Code - Decoding the Impact on Development 🧠

fmoretti

@ franmoretti_

The Psychology of Code - Decoding the Impact on Development 🧠

What is the Psychology Behind Code? đŸ€”

Coding is a human activity. That's why understanding the mind is crucial for development. These psychological effects that can significantly influence the code and coding process.

The Broken Windows Theory in Code Culture đŸȘŸ

The Broken Windows Theory says that visible signs of disorder can lead to more disorder. Its a concept that was introduced in "The Pragmatic Programmer" by Andy Hunt and Dave Thomas. In a building, when a single broken window is left unrepaired, it can signal a lack of care and encourage further deterioration and damage, impacting the overall condition of the building. In the coding context, neglecting small issues, like leaving bugs unattended or tolerating messy code, sets the stage for a deteriorating codebase. Imagine a neglected project where every small bug or inconsistency becomes a "broken window," signaling a lack of attention to detail. This cultivates a culture where developers may feel less inclined to maintain code quality.

Encouraging Developers: A Catalyst for Fixes and Improvements 🚀

Empowering developers goes beyond providing technical resources. It involves creating a culture that supports innovation and improvement. An exemplary way to achieve this is through hackathons or dedicated time for developers to work on personal projects. This not only encourages creativity but also sparks a sense of ownership and responsibility, leading to faster issue resolution and continuous improvements.

No Blame, More Trust: Fostering Proactiveness đŸ’Ș

Blaming each other for coding issues is counterproductive. Creating a blame-free environment encourages developers to be more proactive in addressing issues. For instance, implementing a blameless post-mortem culture after incidents promotes a constructive analysis of what went wrong without pointing fingers. This approach promotes trust among team members, enhancing collaboration and problem-solving.

Conclusion 🌐

Understanding the psychological landscape of coding is essential for a positive development environment. By addressing broken windows, encouraging developer empowerment and promoting a blame-free culture, teams can create a workspace that not only produces high-quality code but also supports the well-being and creativity of its developers.

Software Rot, Entropy and the Broken Window Theory

Umer Mansoor

“Complexity is the business we are in and complexity is what limits us.” - Fred Brooks, The Mythical Man-Month

Software projects go through many modifications over their lifetime. As they evolve, the code grows in size and complexity creeps in. Software developers spend a large portion of their time maintaining existing software either by adding new functionality or fixing bugs. Often times, they are forced to take shortcuts to meet deadlines. Developers add new functionality in a ‘quick and dirty’ manner and apply duct-tape to defects. While the organization meets its short-term goal of getting the software out of the door quickly, the code quality suffers and deteriorates. After a while, things start to get really bad. The software becomes so complex and buggy, that it is virtually impossible to maintain. Fixing a bug would introduces more bugs and modifying one part of the software would break several others.

Let’s look at a related concept called software entropy . Entropy is the amount of disorder in a system. It is a physical phenomenon but Ivar Jacobson et al used it to describe the disorder in a software system:

The second law of thermodynamics, in principle, states that a closed system’s disorder cannot be reduced, it can only remain unchanged or increased. A measure of this disorder is entropy. This law also seems plausible for software systems; as a system is modified, its disorder, or [software] entropy, always increases . This is called Software Entropy.

When the ‘disorder’ or the software entropy increases, it leads to software or code rot . The system ends up becoming so complex and disorganized that it is too costly or impossible to maintain. People get frustrated and consider major refactoring or, in some cases, rewriting from scratch . These arduous solutions fix the problem in the short-term but the software will rot again if the team doesn’t adopt a plan for keeping future complexity under control .

While there are many factors that lead to software rot, the most important ones, according to Andrew Hunt and Dave Thomas , are the psychology and the team culture . In their book, The Pragmatic Programmer , they argue that software entropy is contagious and if not controlled, becomes an epidemic .

In inner cities, some buildings are beautiful and clean, while others are rotting hulks. Why? Researchers in the field of crime and urban decay discovered a fascinating trigger mechanism, one that very quickly turns a clean, intact, inhabited building into a smashed and abandoned derelict . A broken window. One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment — a sense that the powers that be don’t care about the building. So another window gets broken . People start littering. Graffiti appears. Serious structural damage begins. In a relatively short space of time, the building becomes damaged beyond the owner’s desire to fix it, and the sense of abandonment becomes reality.

Broken window theory was proposed by criminologists James Wilson and George Kelling and had an enormous impact on police policy throughout the 1990s. While the broken window theory was been widely criticized , I think it makes sense. When shortcuts are taken poor design decisions are made, it sends a signal that no one cares or that no one is in charge. Since its a feature of the environment, even good software developers might fall for it. The solution according to Andrew and Dave is simple:

Don’t leave “broken windows” (bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up. Perhaps you can comment out the offending code, or display a “Not Implemented” message, or substitute dummy data instead. Take some action to prevent further damage and to show that you’re on top of the situation .

A simple comment around ugly code stating that its ugly and needs to get fixed soon is better than nothing. Code can quickly rot once windows start breaking. Even a mere perception of disorder could result in total chaos. Don’t leave broken windows, fix them as soon as you could. Entropy will creep in - don’t let it win.

You May Also Enjoy

  • Blameless Postmortems - Examining Failure Without Blame
  • Why Do Developers Love Music so Much? How to Concentrate in Noisy Open Offices
  • Software Estimates are not Targets
  • Minimum Viable Product - Lessons for Software Teams
  • Good Abstractions Have Fewer Leaks
  • Do Not Let Technical Debt Get Out of Control
  • Code Reviews During Emergencies
  • Committing Teamicide by Micromanagement
  • Behind Monty Hall's Closed Doors - Our Limited Minds
  • Effective Coding Standards
  • Generating Sessions Ids
  • Developing Sense of Ownership in Employees - Let Your People 'Own' It!

If you like this post, please share using the buttons above. It will help CodeAhoy grow and add new content. Thank you !

Comments (1)

Nice summary! I personally put some todo in my code to signal shortcuts and other broken windows.

I’m always pretty proud when I fix them, I feel my code gets better. If refactoring is part of your development process, and it should, it’s very easy to fix broken windows that way.

I wrote an article myself on Software Entropy. Hope it can help!

https://thevaluable.dev/fighting-software-entropy/

Speak Your Mind Cancel reply

broken window theory code

What Is the Broken Windows Theory?

  • Equal Rights
  • The U. S. Government
  • U.S. Foreign Policy
  • U.S. Liberal Politics
  • U.S. Conservative Politics
  • Women's Issues
  • The Middle East
  • Race Relations
  • Immigration
  • Crime & Punishment
  • Canadian Government
  • Understanding Types of Government
  • B.S., Texas A&M University

The broken windows theory states that visible signs of crime in urban areas lead to further crime. The theory is often associated with the 2000 case of Illinois v. Wardlow , in which the U.S. Supreme Court confirmed that the police, based on the legal doctrine of probable cause , have the authority to detain and physically search, or “stop-and-frisk,” people in crime-prone neighborhoods who appear to be behaving suspiciously.

Key Takeaways: Broken Windows Theory

  • The broken windows theory of criminology holds that visible signs of crime in densely-populated, lower-income urban areas will encourage additional criminal activity.
  • Broken windows neighborhood policing tactics employ heightened enforcement of relatively minor “quality of life” crimes like loitering, public drinking, and graffiti.
  • The theory has been criticized for encouraging discriminatory police practices, such as unequal enforcement based on racial profiling.

Broken Windows Theory Definition

In the field of criminology, the broken windows theory holds that lingering visible evidence of crime, anti-social behavior, and civil unrest in densely populated urban areas suggests a lack of active local law enforcement and encourages people to commit further, even more serious crimes.

The theory was first suggested in 1982 by social scientist, George L. Kelling in his article, “Broken Windows: The police and neighborhood safety” published in The Atlantic. Kelling explained the theory as follows:

“Consider a building with a few broken windows. If the windows are not repaired, the tendency is for vandals to break a few more windows. Eventually, they may even break into the building, and if it's unoccupied, perhaps become squatters or light fires inside.
“Or consider a pavement. Some litter accumulates. Soon, more litter accumulates. Eventually, people even start leaving bags of refuse from take-out restaurants there or even break into cars.”

Kelling based his theory on the results of an experiment conducted by Stanford psychologist Philip Zimbardo in 1969. In his experiment, Zimbardo parked an apparently disabled and abandoned car in a low-income area of the Bronx, New York City, and a similar car in an affluent Palo Alto, California neighborhood. Within 24 hours, everything of value had been stolen from the car in the Bronx. Within a few days, vandals had smashed the car’s windows and ripped out the upholstery. At the same time, the car abandoned in Palo Alto remained untouched for over a week, until Zimbardo himself smashed it with a sledgehammer. Soon, other people Zimbardo described as mostly well dressed, “clean-cut” Caucasians joined in the vandalism. Zimbardo concluded that in high-crime areas like the Bronx, where such abandoned property is commonplace, vandalism and theft occur far faster as the community takes such acts for granted. However, similar crimes can occur in any community when the people’s mutual regard for proper civil behavior is lowered by actions that suggest a general lack of concern.

Kelling concluded that by selectively targeting minor crimes like vandalism, public intoxication, and loitering, police can establish an atmosphere of civil order and lawfulness, thus helping to prevent more serious crimes.

Broken Windows Policing

In1993, New York City Mayor Rudy Giuliani and police commissioner William Bratton cited Kelling and his broken windows theory as a basis for implementing a new “tough-stance” policy aggressively addressing relatively minor crimes seen as negatively affecting the quality of life in the inner-city.

Bratton directed NYPD to step up enforcement of laws against crimes like public drinking, public urination, and graffiti. He also cracked down on so-called “squeegee men,” vagrants who aggressively demand payment at traffic stops for unsolicited car window washings. Reviving a Prohibition-era city ban on dancing in unlicensed establishments, police controversially shuttered many of the city’s night clubs with records of public disturbances.

While studies of New York’s crime statistics conducted between 2001 and 2017 suggested that enforcement policies based on the broken windows theory were effective in reducing rates of both minor and serious crimes, other factors may have also contributed to the result. For example, New York’s crime decrease may have simply been part of a nationwide trend that saw other major cities with different policing practices experience similar decreases over the period. In addition, New York City’s 39% drop in the unemployment rate could have contributed to the reduction in crime.

In 2005, police in the Boston suburb of Lowell, Massachusetts, identified 34 “crime hot spots” fitting the broken windows theory profile. In 17 of the spots, police made more misdemeanor arrests, while other city authorities cleared trash, fixed streetlights, and enforced building codes. In the other 17 spots, no changes in routine procedures were made. While the areas given special attention saw a 20% reduction in police calls, a study of the experiment concluded that simply cleaning up the physical environment had been more effective than an increase in misdemeanor arrests.

Today, however, five major U.S. cities—New York, Chicago, Los Angeles, Boston, and Denver—all acknowledge employing at least some neighborhood policing tactics based on Kelling’s broken windows theory. In all of these cities, police stress aggressive enforcement of minor misdemeanor laws.

Despite its popularity in major cities, police policy based on the broken windows theory is not without its critics, who question both its effectiveness and fairness of application.

In 2005, University of Chicago Law School professor Bernard Harcourt published a study finding no evidence that broken windows policing actually reduces crime. “We don’t deny that the ‘broken windows’ idea seems compelling,” wrote Harcourt. “The problem is that it doesn’t seem to work as claimed in practice.”

Specifically, Harcourt contended that crime data from New York City’s 1990s application of broken windows policing had been misinterpreted. Though the NYPD had realized greatly reduced crime rates in the broken windows enforcement areas, the same areas had also been the areas worst affected by the crack-cocaine epidemic that caused citywide homicide rates to soar. “Everywhere crime skyrocketed as a result of crack, there were eventual declines once the crack epidemic ebbed,” Harcourt note. “This is true for police precincts in New York and for cities across the country.” In short, Harcourt contended that New York’s declines in crime during the 1990s were both predictable and would have happened with or without broken windows policing.

Harcourt concluded that for most cities, the costs of broken windows policing outweigh the benefits. “In our opinion, focusing on minor misdemeanors is a diversion of valuable police funding and time from what really seems to help—targeted police patrols against violence, gang activity and gun crimes in the highest-crime ‘hot spots.’”

Broken windows policing has also been criticized for its potential to encourage unequal, potentially discriminatory enforcement practices such as racial profiling , too often with disastrous results.

Arising from objections to practices like “Stop-and-Frisk,” critics point to the case of Eric Garner, an unarmed Black man killed by a New York City police officer in 2014. After observing Garner standing on a street corner in a high-crime area of Staten Island, police suspected him of selling “loosies,” untaxed cigarettes. When, according to the police report, Garner resisted arrest, an officer took him to the ground in a chock hold. An hour later, Garner died in the hospital of what the coroner determined to be homicide resulting from, “Compression of neck, compression of chest and prone positioning during physical restraint by police.” After a grand jury failed to indict the officer involved, anti-police protests broke out in several cities.

Since then, and due to the deaths of other unarmed Black men accused of minor crimes predominantly by white police officers, more sociologists and criminologists have questioned the effects of broken windows theory policing. Critics argue that it is racially discriminatory, as police statistically tend to view, and thus, target, non-whites as suspects in low-income, high-crime areas.

According to Paul Larkin, Senior Legal Research Fellow at the Heritage Foundation, established historic evidence shows that persons of color are more likely than whites to be detained, questioned, searched, and arrested by police. Larkin suggests that this happens more often in areas chosen for broken windows-based policing due to a combination of: the individual’s race, police officers being tempted to stop minority suspects because they statistically appear to commit more crimes, and the tacit approval of those practices by police officials.

Sources and Further Reference

  • Wilson, James Q; Kelling, George L (Mar 1982), “ Broken Windows: The police and neighborhood safety .” The Atlantic.
  • Harcourt, Bernard E. “ Broken Windows: New Evidence from New York City & a Five-City Social Experiment .” University of Chicago Law Review (June 2005).
  • Fagan, Jeffrey and Davies, Garth. “ Street Stops and Broken Windows .” Fordham Urban Law Journal (2000).
  • Taibbi, Matt. “ The Lessons of the Eric Garner Case .” Rolling Stone (November 2018).
  • Herbert, Steve; Brown, Elizabeth (September 2006). “ Conceptions of Space and Crime in the Punitive Neoliberal City .” Antipode.
  • Larkin, Paul. “ Flight, Race, and Terry Stops: Commonwealth v.Warren .” The Heritage Foundation.
  • Criminology Definition and History
  • How the Illinois v. Wardlow Case Affects Policing
  • The History of Modern Policing
  • What Is a Criminal Infraction?
  • 5 Common Misconceptions About Black Lives Matter
  • What Is Restorative Justice?
  • Why Racial Profiling Is a Bad Idea
  • What Is Retributive Justice?
  • Racial Profiling and Why it Hurts Minorities
  • An Overview of Labeling Theory
  • What Is Procedural Justice?
  • Terry v. Ohio: Supreme Court Case, Arguments, Impact
  • Racial Bias and Discrimination: From Colorism to Racial Profiling
  • Manifest Function, Latent Function, and Dysfunction in Sociology
  • What Is Social Learning Theory?
  • What's the Difference Between Probation and Parole?

IMAGES

  1. Broken Windows Theory-Definition, Examples, and Applications

    broken window theory code

  2. Broken Window Theory

    broken window theory code

  3. The Broken Windows Theory

    broken window theory code

  4. Understanding The “Broken Windows” Theory: a reading list

    broken window theory code

  5. Broken Window Theory

    broken window theory code

  6. Refactoring code: the broken windows theory

    broken window theory code

VIDEO

  1. Breaking Glass

  2. #LUNC Broken Window Theory

  3. VERISIMILITUDE

  4. Broken Windows Theory: How Environmental Changes Reduced Crime in the NYC Subway

  5. Window Theory 1

  6. Broken Window Theory, êčšì§„ ìœ ëŠŹì°œ 하나넌 ë°©ìč˜í•˜ë©Ž ëČŒì–Žì§€ëŠ” 음...#shorts

COMMENTS

  1. The Broken Window Theory

    The Broken Window Theory. In a previous entry, I touched on the broken window theory. You might be familiar with the Pragmatic Progammers' take on this: Don't leave "broken windows" (bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up.

  2. Broken windows theory

    In criminology, the Broken Windows Theory states that visible signs of crime, antisocial behavior and civil disorder create an urban environment that encourages further crime and disorder, including serious crimes. The theory suggests that policing methods that target minor crimes, such as vandalism, loitering, public drinking and fare evasion, help to create an atmosphere of order and lawfulness.

  3. The Broken Windows Theory: Origins, Issues, and Uses

    The broken windows theory was proposed by James Q. Wilson and George Kelling in 1982, arguing that there was a connection between a person's physical environment and their likelihood of committing a crime. The theory has been a major influence on modern policing strategies and guided later research in urban sociology and behavioral psychology.

  4. Refactoring code: the broken windows theory

    The broken windows theory is a criminological theory that states that visible signs of crime, anti-social behaviour, and civil disorder create an urban environment that encourages further crime and disorder, including serious crimes. This theory, from 1982, suggests that a building with broken windows, a potential indicator of criminal behavior ...

  5. Joy of Programming: The 'Broken Window' Theory

    The 'broken window' theory was first introduced by Wilson and Kelling in 1982: "Consider a building with a few broken windows. If the windows are not repaired, the tendency is for vandals to break a few more windows. Eventually, they may even break into the building, and if it's unoccupied, perhaps become squatters or light fires inside

  6. Understanding the broken window concept

    The Broken Window Concept was introduced by social scientists James Wilson and George Kelling in 1982 to explain the occurrence of vandalism and crime in urban environments. The theory posits that visible signs of disorder, like broken windows, can create an atmosphere of neglect, encouraging more significant acts of delinquency.

  7. Broken Windows Theory of Policing (Wilson & Kelling)

    The Broken Windows theory, first studied by Philip Zimbardo and introduced by George Kelling and James Wilson, holds that visible indicators of disorder, such as vandalism, loitering, and broken windows, invite criminal activity and should be prosecuted. ... forcing strict dress and behavioral codes, and enforcing specific classroom etiquette.

  8. Broken Windows Theory: History, Meaning, and Controversy

    This theory of broken windows was introduced in an article in 1982 by George Kelling and James Q. Wilson, but the original research dates back to the late 1960s. The theory states that ...

  9. Broken windows theory

    broken windows theory, academic theory proposed by James Q. Wilson and George Kelling in 1982 that used broken windows as a metaphor for disorder within neighbourhoods. Their theory links disorder and incivility within a community to subsequent occurrences of serious crime.. Broken windows theory had an enormous impact on police policy throughout the 1990s and remained influential into the ...

  10. Reimagining Broken Windows: From Theory to Policy

    It describes the core concepts of the broken windows perspective, examines its theoretical underpinnings, and sets out priorities for future research and policy development. Important advancements have been made in the intellectual development and programmatic application of the broken windows perspective over the last 30 years.

  11. Omar Izquierdo

    In the world of software development, the Broken Windows Theory serves as a powerful analogy, drawing a parallel between the deterioration of a neighborhood and the decay of a codebase. Coined by George L. Kelling and James Q. Wilson in criminology, this theory suggests that visible signs of neglect, such as broken windows, can lead to an increase in crime.

  12. Reimagining Broken Windows: From Theory to Policy

    Since its first utterance by Wilson and Kelling (1982), broken windows has become a powerful and enduring part of the criminological nomenclature, with deep influences in both the disciplines' scholarly and applied traditions.Upon the death of Wilson in 2012, obituaries and personal remembrances often led with his contribution to the broken windows perspective.

  13. Broken Windows Theory

    Definition. The broken windows theory is a criminological theory which, employing broken windows as a metaphor for anti-social behavior and civil disorder, and links the occurrence of serious crimes with visible signs of incivility in a community (Wilson & Kelling, 1982).; The theory holds that policing approaches targeting misdemeanors such as vandalism, fare evasion, public drinking, and ...

  14. Broken Windows Theory

    In research reported in 2000, Kelling claimed that broken-windows policing had prevented over 60,000 violent crimes between 1989 and 1998 in New York City, though critics of the theory disagreed ...

  15. Applying the "Broken-Windows" Theory to Software Design

    The theory was first suggested in the early 1980s by a social scientist, George L. Kelling, in his article in the Atlantic. It follows an experiment conducted by Standford's psychologist Philip Zimbardo in 1969. "Consider a building with a few broken windows. If the windows are not repaired, the tendency is for vandals to break a few more ...

  16. The Broken Windows Theory And What We Can Learn From It

    The outcomes he observed in both regions later formed the precursor to the Broken Windows Theory. The car left on Bronx street was vandalised within ten minutes. ... a project whose code is poorly ...

  17. The Psychology of Code

    The Broken Windows Theory in Code Culture đŸȘŸ. The Broken Windows Theory says that visible signs of disorder can lead to more disorder. Its a concept that was introduced in "The Pragmatic Programmer" by Andy Hunt and Dave Thomas. In a building, when a single broken window is left unrepaired, it can signal a lack of care and encourage further ...

  18. Software Rot, Entropy and the Broken Window Theory

    Broken window theory was proposed by criminologists James Wilson and George Kelling and had an enormous impact on police policy throughout the 1990s. ... Code can quickly rot once windows start breaking. Even a mere perception of disorder could result in total chaos. Don't leave broken windows, fix them as soon as you could. ...

  19. What Is the Broken Windows Theory?

    The broken windows theory states that visible signs of crime in urban areas lead to further crime. The theory is often associated with the 2000 case of Illinois v. Wardlow, in which the U.S. Supreme Court confirmed that the police, based on the legal doctrine of probable cause, have the authority to detain and physically search, or "stop-and ...

  20. In the Shadows of Broken Windows: The Code Enforcement Success ...

    The Broken Windows Theory is a criminological theory that states that visible signs of crime, anti-social behavior, and civil disorder create an urban environment that encourages further crime and ...

  21. Broken windows theory: why code quality and simplistic design ...

    The broken windows theory is a criminological theory that visible signs of crime, anti-social behavior, and civil disorder create an urban environment that encourages further crime and disorder ...

  22. Broken windows and broken code

    The theory that the aforementioned Zimbardo investigated has become known as "The broken window theory". Among other things, it led to the police punishing seemingly small things earlier on ...

  23. In the Shadows of Broken Windows: The Code Enforcement Success Story

    Code enforcement duties are focused on the detection and investigation of municipal codes pertaining to nuisances and structural integrity of commercial and residential properties. Broken Windows Theory Debunked. Two large-scale criminology studies in the past two decades have debunked the 1982 Broken Windows Theory.

  24. Broken Window Theory In Software Development

    Aug 7, 2019. 47. The Broken Window Theory was release in 1982, and it comes from the field of criminology. It states: "Visible signs of crime, anti-social behavior and civil disorder create an ...