this post was submitted on 12 Jun 2024
41 points (95.6% liked)

Programming

17430 readers
75 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
41
Lost in translation (lemmy.world)
submitted 5 months ago* (last edited 5 months ago) by [email protected] to c/programming
 

Just had some requirements through for a query that a customer has specified.

“Set the value to 1 if the Outcome is not Complete or Cancelled or NULL”

This could be variously interpreted as: 

“if the Outcome is NOT Complete and NOT Cancelled and NOT NULL”

Or “if the Outcome is NOT Complete, and NOT Cancelled, or IS NULL”

Or perhaps even “if the Outcome is NOT ‘Complete or Cancelled’ or IS NULL”

Obviously I’ll go back to them for clarity, but it’s a wonder why so often “bugs” arise based on interpretation of specifications.

you are viewing a single comment's thread
view the rest of the comments
[–] LaggyKar 2 points 5 months ago* (last edited 5 months ago) (2 children)

What's the difference between case 2 and 3? Those look the same to me. The three cases look like:

  • ¬complete ∧ ¬cancelled ∧ ¬null
  • (¬complete ∧ ¬cancelled) ∨ null
  • ¬(complete ∨ cancelled) ∨ null
[–] [email protected] 2 points 5 months ago (1 children)

Case 3 is one separate text string containing the words ‘Complete or Cancelled’ (hence the quotes).

[–] LaggyKar 1 points 5 months ago

Oh, I thought that was just a grouping