Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My application has 3 shipping methods, the cheapest of which is free. The free shipping option is only available for orders totaling over $100.

As soon as I built it, I thought of a way a user could easily circumvent this. Add items to the cart totaling over $100, then select your free shipping, then edit your cart to be less then $100 and maintain the free shipping.

I fixed my application to not allow this. I started wondering though, what do you call this sort of design flaw? I know you can call it a bug, but is there a better description that I can use so that someone will understand what I am talking about?

share|improve this question

closed as primarily opinion-based by GlenH7, Robert Harvey, Greg Hewgill, ChrisF Dec 7 '13 at 13:48

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

Refresh bug? Failure to update dynamic status? – rwong May 6 '11 at 6:14
From my time as a QA guy I'll tell you this is called "Works as designed" and is worth +100 snarky points and a strong glare. – Steve Jackson May 6 '11 at 11:37
up vote 17 down vote accepted

From Wikipedia->Software bugs, it sounds like a conceptual error:

"[The] code is syntactically correct, but the programmer or designer intended it to do something else."

share|improve this answer

"Design Flaw" would also cover this.

You implemented the system to the design but the design was wrong.

Note - this doesn't have any bearing on the quality of the code. It can be "perfect" in that it works exactly as designed.

share|improve this answer

It's a conceptual error in general.

I tend to think of these sort of things as "conceptual race conditions": instead of checking a final stable state, checks are made at interim points where the state is not final.

In this case, the error is that the shipping check is done only once (when the user selects), and not repeated at the end (when the order has a final validation and review).

Most commercial systems do a final check.

share|improve this answer
"Most"? Please let me know which ones don't so I can get free shipping ;) – Rein Henrichs May 5 '11 at 19:26
Yes--If you have to classify it, it's a sort of very slow race condition. – Dan Ray May 5 '11 at 20:41
+1 A conceptual race condition -- that makes a lot of sense. – Matthew Rodatus May 6 '11 at 13:53
@Rein: If you follow the various deals sites (like SlickDeals/Fatwallet), you will regularly see users reporting on (and exploiting) these sort of errors (e.g., double application of coupons). Unfortunately, most companies have learned to cancel orders when these sort of things happen. – Uri May 6 '11 at 20:48

Internally, we call it a Z-Axis error or temporal error -- basically forgetting to account that states change over time or another dimension so you need to revalidate certain things and otherwise guard against it.

We are crazy, so I'm just sharing here.

share|improve this answer

It's a sequencing or timing bug. As originally written, you checked the total at one of the time-points you needed to check (when first summarizing the order) but not all of them (after every edit or just before the final confirmation.) In addition to the bug you imagined, there could also be one where I order $99 of stuff, realize how much I have to pay for shipping, and then add something to my cart to get over the $100 mark, but the shipping doesn't become free, making me unhappy and possibly abandoning the order.

If you wanted to show off you could tell someone you "misidentified the invariants" for the problem.

share|improve this answer

I would consider this not properly handling user input. Don't know if there a specific name for that, but it's the cause of a whole lot of bugs.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.