DEV Community

Cover image for Missing Boundary Checks: Why “Nice” Code Always Gets Exploited
Khali Sollis
Khali Sollis

Posted on

Missing Boundary Checks: Why “Nice” Code Always Gets Exploited

When you don’t validate inputs, don’t be surprised when the system gets abused.

Context

In my previous refactor, I removed a core anti-pattern:

Default behavior:
→ say yes
→ be available
→ be helpful

That fix exposed something deeper.

The real issue wasn’t just over-availability.

It was the absence of boundary checks.

The Bug: No Input Validation

For a long time, my system operated like this:

Incoming request → accept → execute

No filtering.
No validation.
No consideration of cost.

Everything got processed.

Requests, expectations, emotional load—queued and handled in real time.

I thought this made me “reliable.”

In reality, it made me unprotected.

What Happens Without Boundary Checks

In software, if you don’t validate inputs, two things happen:

Bad data gets in
The system becomes unpredictable

Human systems behave the same way.

Without boundaries:

unreasonable requests feel normal
disrespect gets reclassified as personality
urgency is assigned by whoever asks first

You don’t control the system anymore.

You just maintain it.

The API Problem: People Probe for Limits

Here’s the part I didn’t understand before:

People don’t always consciously exploit you.

But they do test for limits.

Like hitting an API endpoint:

Request → response
Adjust → request again

If the system always returns:

200 OK

Then the behavior escalates.

small asks become bigger asks
favors become expectations
access becomes assumed

Not because people are malicious.

Because the system allowed it.

The “Nice” Misconfiguration

I had configured my system like this:

Boundary checks: disabled
Rate limiting: none
Access control: open

And then I was surprised when:

I felt drained
people expected more
saying no felt disruptive

But from the outside, the system was working exactly as designed.

The Cost of No Validation

  1. Priority Corruption

Without boundaries, your priorities get overwritten by external input.

Whoever asks first—or loudest—wins.

  1. Silent Resentment

When you say yes against your own capacity, the system logs it:

Accepted request ≠ aligned decision

That mismatch turns into resentment over time.

  1. Identity Drift

If everything gets accepted, nothing is chosen.

And if nothing is chosen, you disappear from your own decision-making.

The Fix: Implement Boundary Checks

I didn’t try to “be less nice.”

I added validation.

  1. Request Evaluation Layer

New flow:

Incoming request
→ evaluate (Do I want this? Do I have capacity?)
→ optional response

Not everything passes.

  1. Explicit Rejection Handling If (request ≠ aligned) → return: No

No long explanations.
No defensive reasoning.

Just a clean response.

  1. Access Control

Not everyone gets the same level of access.

Access levels:

  • earned
  • limited
  • revoked

This used to feel harsh.

Now it feels accurate.

  1. Rate Limiting

Immediate response is no longer the default.

Response time = intentional

Urgency is no longer assigned externally.

What Changed

Once boundary checks were in place:

fewer bad inputs reached execution
expectations recalibrated
some “users” stopped making requests altogether

That last part matters.

When a system stops being easy to exploit, it stops attracting exploitative behavior.

Reframing “Nice”

The old model:

Nice = always accessible

The updated model:

Respectable = selective + clear

And a hard truth:

If your system never rejects a request,
it’s not kindness.

It’s misconfiguration.

Takeaway

Boundaries aren’t about controlling other people.

They’re about defining what your system accepts.

If you don’t implement boundary checks, the world will write your rules for you.

And it won’t optimize for your well-being.

Status
Boundary checks: enabled
Default response: not guaranteed
System integrity: improving

Series: Behavioral Anti-Patterns

Previous: Deleting the “Nice” Anti-Pattern
Next: Unbounded Processes: The Hidden Cost of Always Saying Yes

Top comments (17)

Collapse
 
patjo profile image
Pat Johansen •

This is such a clever and immediately relatable way to translate software concepts into human behavior.
The “boundary checks” metaphor is especially strong because it reframes being nice from unlimited availability into intentional, validated access.
I loved the API comparison—when every request returns “200 OK,” it makes perfect sense that expectations can gradually escalate.
The sections on priority corruption, silent resentment, and identity drift brilliantly capture what happens when external input constantly overrides internal priorities.
The shift from “be less nice” to “add validation” is such a powerful reframing: boundaries don’t eliminate kindness, they make it sustainable.
And “If your system never rejects a request, it’s not kindness. It’s misconfiguration” is an absolute mic-drop of a takeaway.

Collapse
 
usernameinvalid profile image
Larry Z. •

The “boundary checks” metaphor makes this idea especially clear: the problem isn’t simply being helpful—it’s allowing every request to reach execution without evaluating whether it belongs there.

A few highlights stood out:

  • “Incoming request → accept → execute” perfectly captures how automatic yeses can bypass the most important question: should this request actually be processed?
  • The API analogy is particularly effective. When every request receives a consistent “200 OK,” people naturally learn that the endpoint is available. Expectations can expand without anyone consciously deciding to take advantage.
  • I like the nuance that exploitation doesn’t always require malicious intent. Sometimes people simply respond to the boundaries a system demonstrates—or fails to demonstrate.
  • Priority corruption is one of the most significant hidden costs. Without filters, the loudest or most urgent external request can quietly become more important than your own priorities.
  • The “accepted request ≠ aligned decision” distinction explains where resentment often begins. Saying yes externally while saying no internally creates a mismatch that eventually has to be paid for.
  • Identity drift is another powerful point. If everything is accepted automatically, personal choice gradually disappears from the equation. You can become extremely responsive while becoming increasingly disconnected from what you actually want.
  • The fix is refreshingly practical: evaluate the request, check capacity, allow yourself to reject it, control access, and stop treating immediate responses as mandatory.
  • Most importantly, boundaries aren’t framed as punishment or control. They are input validation. They define what your system is designed to accept.

The line “If you don’t implement boundary checks, the world will write your rules for you” captures the larger lesson beautifully.

A healthy system doesn’t need to process every request that reaches it.

Sometimes integrity looks less like improving execution and more like deciding what never gets executed in the first place.

Collapse
 
n_s_df8b9b80336beea1e5b profile image
N. S. •

This was a really clever way to frame boundaries. 👏 Comparing people probing for limits to hitting an API endpoint that always returns "200 OK" explains so well why small asks quietly turn into expectations. I also liked the point that "Accepted request ≠ aligned decision," since that mismatch is exactly where resentment builds. And "If your system never rejects a request, it's not kindness. It's misconfiguration" is a line worth remembering. Looking forward to the rest of the series!

Collapse
 
anne_jacobs_ac166227aa92b profile image
AJ •

This one lands cleanly.

The API metaphor is especially effective: people probe for limits the same way clients test endpoints. If the system always returns 200 OK, escalation is inevitable—not because people are malicious, but because the interface allowed it. That distinction removes the moralizing and focuses on system design.

The three costs you named—priority corruption, silent resentment, and identity drift—are precise. When everything is accepted, nothing is actually chosen, and you slowly disappear from your own decision-making.

The updated model (“Respectable = selective + clear”) feels like the right replacement for the old “nice = always accessible” configuration. And the observation that some “users” simply stop making requests once boundary checks are enabled is both practical and telling.

Strong entry in the series.

Collapse
 
mona_d_4222dda374567263b profile image
Amber D. •

The line that stayed with me: "Accepted request ≠ aligned decision." Framing resentment as the system logging a mismatch between what you agreed to and what you actually wanted is a useful way to see it. Resentment stops looking like a character flaw and starts looking like a signal that a boundary check was skipped.

I also liked the API probing analogy, especially the point that people don't always consciously exploit you, they escalate because the system keeps returning 200 OK. That's a fairer and more accurate account than "people take advantage," and it makes the fix feel less adversarial.

One addition: boundary checks work better when they're communicated, not just enforced. In software, a good API returns a clear error with a reason code so the caller can adjust. People often can't adjust to a limit they've never been told about. A short, warm, non-defensive no ("I can't take that on this week, but I could do X") gives them the chance to recalibrate, and it filters for who respects the boundary. Your point that some users stop making requests then reads as information about them, not a sign the system failed.

I'd also gently note that the "earned, limited, revoked" access model fits some relationships better than others. With close family or a partner, a permissions framing can feel transactional, and the more useful check may be "is this reciprocal over time?" than "who gets what tier."

Thanks for the clear, practical write-up. The "world will write your rules for you" line is one I'll remember.

Collapse
 
dgold profile image
D. Goldberg •

YESSSSSSSSSSSSS >>>>>>>>>> "Boundaries aren’t about controlling other people.

They’re about defining what your system accepts.

If you don’t implement boundary checks, the world will write your rules for you.

And it won’t optimize for your well-being"

Collapse
 
jd2026 profile image
Jean David •

Thank you for sharing this amazing writing here on DEV.to cheers!

Collapse
 
jd2026 profile image
Jean David •

Great essay thank you!

Collapse
 
dpietro profile image
Denise Pietro •

This is a brilliant way to frame something that often gets misunderstood as a personality issue rather than a system-design problem. Being helpful isn't inherently the problem; the problem is accepting every request without evaluating its legitimacy, urgency, or cost. I especially like the distinction between an accepted request and an aligned decision. That gap is where resentment quietly develops. In both software and relationships, a healthy system needs more than the ability to process incoming requests—it needs the intelligence to determine which requests deserve processing in the first place. Boundaries aren't a rejection of kindness; they're what make sustainable kindness possible.

Collapse
 
dpietro profile image
Denise Pietro •

The analogy of returning “200 OK” to every request is particularly powerful because it explains how unhealthy expectations become normalized. When people consistently receive immediate access, unlimited availability, and unconditional agreement, they eventually stop recognizing those things as generosity and start treating them as standard operating conditions. What's especially insightful is that exploitation doesn't always require malicious intent. Sometimes people simply adapt to whatever behavior a system consistently permits. This is why changing the response pattern matters so much. A boundary doesn't necessarily change someone's intentions, but it reveals whether the relationship can accommodate mutual respect rather than one-sided convenience. Excellent reminder that reliability without discernment eventually becomes self-sabotage.

Collapse
 
dpietro profile image
Denise Pietro •

The section on identity drift really stood out to me. When every external request takes priority, we gradually become excellent at responding to other people's needs while losing touch with our own preferences, goals, and limitations. That's a much deeper consequence than simply feeling overwhelmed. I also appreciate the practical solutions: request evaluation, explicit rejection, access control, and rate limiting. These aren't just clever metaphors; they offer a useful framework for translating personal boundaries into repeatable behaviors. One important distinction is that healthy boundaries aren't about making access difficult to everyone—they're about making access intentional and reciprocal. The ultimate goal isn't to become unavailable; it's to stop making your own well-being the hidden operating cost of everyone else's convenience. Fantastic continuation of the series.

Collapse
 
rosana_e4663528aeaba0b05b profile image
Rosana •

The framing keeps getting sharper. “Accepted request ≠ aligned decision” is a precise description of how resentment builds, and the API-probing analogy explains something people often miss: escalation usually comes from reinforcement, not malice. A few thoughts to build on it:

  1. Expect an “extinction burst.” In behavioral terms, when you stop rewarding a pattern, it often gets worse briefly before it fades (more asks, more pressure, more guilt-tripping). It’s worth knowing in advance, because otherwise the pushback feels like proof the boundary is wrong. Treat it as expected behavior of the system, and hold steady.

  2. Validation needs criteria defined in advance. “Do I want this? Do I have capacity?” is a good start, but if it’s evaluated in the moment, it’s easily swayed by mood and guilt. Developers already have tools for this:

Capacity budgets: e.g. “I reserve ~2 hours a week for ad hoc help,” like an error budget. When it’s spent, requests queue.
Severity levels: define what counts as truly urgent (as with incident response), so urgency isn’t set by whoever asks loudest.
WIP limits: protect your priorities by capping what’s in flight.

These also separate want from aligned. Sometimes you help because it fits your values even when you don’t feel like it, and a policy can say so explicitly.

  1. Don’t let the security metaphor become a worldview. Input validation assumes untrusted inputs, but close relationships work on graduated trust, not zero trust. “Access: earned/limited/revoked” fits colleagues and acquaintances; it fits less well for family, close friends, or someone in genuine crisis, where there should be deliberate exceptions. The most useful framing is that boundaries govern your own behavior (“if X happens, I will Y”), not a verdict on the other person.

  2. Treat reciprocity as two-way. You’re also a client of other people’s systems. A quick audit of your own requests helps keep the model fair and reminds you that most people who make heavy demands aren’t adversaries, just unbounded in their own way.

  3. In a workplace, individual boundaries aren’t the whole fix. If the interruptions come from structure (no intake process, “quick questions” in DMs, glue work that’s invisible and unrewarded), a personal “no” gets expensive. Structural options scale better: office hours, ticketed intake, rotating on-call for ad hoc help, and making the load visible to your manager.

  4. Keep a feedback loop. Strong language like “exploited” and “exploitative” can make a model self-reinforcing, because every ambiguous interaction gets read as a probe. Check your classifications now and then with a trusted friend or colleague so the validator doesn’t develop false positives.

And if saying no still triggers outsized guilt or anxiety, that signal is worth exploring directly, since the code-level fix works best when the underlying belief shifts too.

Curious what your scripts look like for the “clean no” in practice, especially with managers. Looking forward to the unbounded-process post.