Click here to Skip to main content
15,887,676 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Wordle Hurdle Pin
Amarnath S21-Apr-22 14:11
professionalAmarnath S21-Apr-22 14:11 
GeneralRe: Wordle Hurdle Pin
OriginalGriff21-Apr-22 19:22
mveOriginalGriff21-Apr-22 19:22 
GeneralRe: Wordle Hurdle Pin
dan!sh 21-Apr-22 21:18
professional dan!sh 21-Apr-22 21:18 
GeneralRe: Wordle Hurdle Pin
0x01AA21-Apr-22 21:58
mve0x01AA21-Apr-22 21:58 
GeneralRe: Wordle Hurdle Pin
5teveH21-Apr-22 22:29
5teveH21-Apr-22 22:29 
GeneralRe: Wordle Hurdle Pin
Cp-Coder22-Apr-22 2:35
Cp-Coder22-Apr-22 2:35 
GeneralRe: Wordle Hurdle Pin
FreedMalloc22-Apr-22 5:26
FreedMalloc22-Apr-22 5:26 
RantEdge case or poor planning Pin
kmoorevs21-Apr-22 8:32
kmoorevs21-Apr-22 8:32 
Sometimes, defensive (employing rules that prevent the user from shooting themselves in the foot) programming/design can come back to bite you. Sigh | :sigh:

Consider this: A simple data collection/reporting application for vending machines. A couple of properties of a machine are initial meter reading and initial meter reading datetime. Once a machine has been setup, users log meter readings and money collected.

The rules are simple:
0: Datetime for a new reading must be greater than the previous reading datetime.
1: Meter reading must be greater than or equal to the previous reading.

If these rules are violated, the screen warns the user and refuses to save.

Did anybody spot the design/logic flaw here? Confused | :confused:

For two years and 58 vending machines, this model has worked perfectly, but real life has a way of disrupting the model.

Rule #1 is a problem if the meter gets reset to 0 or the meter/plc gets replaced! Apparently, this just happened on one of their machines, and now the customer is unable to enter a new transaction! WTF | :WTF:

Sure, there are multiple ways to deal with a 'once in 2 year' glitch:
0: Manual entry (with a note) behind the scenes to force the new entry. This creates a huge overage for that transaction (against actual cash/cc collected) and creates other chaos with the 'order of things' in some reports.
1: Tape a note inside the machine informing the user to add X to the current reading before entering into the system. It's only for a few months until the end of the FY.
2: Create a new vending machine.
3: Alter the previous transactions to negative numbers thereby keeping the flow/order/calculations correct.

1 or 2 is what I'm pushing for, but my bp disagrees and thinks I should modify the app to enable a reset gracefully. I don't disagree, but it's not a priority.

One of the most challenging parts of this job is premonition...anticipating the edge cases before they happen. I do my best, but it's often misunderstood as negativity or introducing unnecessary complexity to a problem. At least it stays challenging! Laugh | :laugh:
"Go forth into the source" - Neal Morse
"Hope is contagious"


modified 21-Apr-22 15:21pm.

GeneralRe: Edge case or poor planning Pin
CodeWomble21-Apr-22 10:25
CodeWomble21-Apr-22 10:25 
GeneralRe: Edge case or poor planning Pin
kmoorevs21-Apr-22 11:24
kmoorevs21-Apr-22 11:24 
GeneralRe: Edge case or poor planning Pin
dandy7221-Apr-22 9:39
dandy7221-Apr-22 9:39 
GeneralRe: Edge case or poor planning Pin
jmaida21-Apr-22 9:50
jmaida21-Apr-22 9:50 
GeneralRe: Edge case or poor planning Pin
kmoorevs21-Apr-22 11:22
kmoorevs21-Apr-22 11:22 
GeneralRe: Edge case or poor planning Pin
dandy7222-Apr-22 4:30
dandy7222-Apr-22 4:30 
GeneralRe: Edge case or poor planning Pin
honey the codewitch21-Apr-22 13:14
mvahoney the codewitch21-Apr-22 13:14 
GeneralRe: Edge case or poor planning Pin
englebart21-Apr-22 14:25
professionalenglebart21-Apr-22 14:25 
GeneralRe: Edge case or poor planning Pin
Sander Rossel21-Apr-22 20:56
professionalSander Rossel21-Apr-22 20:56 
GeneralRe: Edge case or poor planning Pin
jsc4222-Apr-22 0:30
professionaljsc4222-Apr-22 0:30 
GeneralRe: Edge case or poor planning Pin
Gerry Schmitz22-Apr-22 9:42
mveGerry Schmitz22-Apr-22 9:42 
GeneralLooking for recommendations Pin
Slow Eddie21-Apr-22 8:06
professionalSlow Eddie21-Apr-22 8:06 
GeneralRe: Looking for recommendations Pin
charlieg21-Apr-22 8:11
charlieg21-Apr-22 8:11 
GeneralRe: Looking for recommendations Pin
Slow Eddie21-Apr-22 9:17
professionalSlow Eddie21-Apr-22 9:17 
GeneralRe: Looking for recommendations Pin
0x01AA21-Apr-22 10:23
mve0x01AA21-Apr-22 10:23 
GeneralRe: Looking for recommendations Pin
Slacker00721-Apr-22 8:25
professionalSlacker00721-Apr-22 8:25 
GeneralRe: Looking for recommendations Pin
Slow Eddie21-Apr-22 9:18
professionalSlow Eddie21-Apr-22 9:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.