Modern Software Experience

2011-05-24

GIGO's complement

Garbage In, Garbarge Out (GIGO)

Most progammers are familiar with the Garbage In, Garbarge Out (GIGO) principle, but for those readers who are not, here is the definition from The Jargon File, also published as the The New Hacker's Dictionary:

GIGO:/gi:´goh/ [acronym]
1. ‘Garbage In, Garbage Out’ — usually said in response to lusers who complain that a program didn't “do the right thing” when given imperfect input or otherwise mistreated in some way. Also commonly used to describe failures in human decision making due to faulty, incomplete, or imprecise data.
2. Garbage In, Gospel Out: this more recent expansion is a sardonic comment on the tendency human beings have to put excessive trust in ‘computerized’ data.

GIGO principle

The GIGO principle is that if you put garbage in, you'll get garbage out; you cannot reasonably expect correct output for incorrect input.
The Garbage In, Garbarge Out (GIGO) mantra, originally coined by IBM instructor George Fuechsel, has spread from programming jargon into general usage, not in the least because some programmers use it an excuse for their application's less then exemplary behaviour. Such abusage is, ironically, quite the opposite from George Fuechsel intended usage, which was to make programmers aware that they have to check the input to keep garbage out, not to excuse poor output by blaming the poor input.
The upside is that many users have become aware that they should avoid the Garbage In, Gospel Out syndrome, and cannot expect a system to provide correct output if they do not provide correct input.

Valid Input, Valid Output

Valid Input, Valid Output (VIVO) expresses a complementary notion, one that is in user's interest to be familiar with; that you should expect and can demand valid output when you provide valid input.

An input file is valid iff it passes validation. The content input file may be nonsensical, and the content of output file may be hilarious, but the file should be valid too. Output should always be valid, but invalid input files provides a bit of an excuse for fouling up. When the input is valid, there is no excuse any more.
When you provide valid input, you can and should demand valid output; Valid Input, Valid Output (VIVO).

no excuse

Applications are always to blame for invalid output, but some vendors will latch to invalid input and the GIGO principle as an excuse to not fix their application. Hence the VIVO principle; when the input is valid they have no excuse anymore.

It is generally reasonable to demand valid output for invalid input, and it definitely unreasonable to produce invalid output for valid input.
It perfectly reasonable to expect an application to produce valid output for valid input.

Valid Input, Valid Output (VIVO) is a strict position, but not an unreasonably strict one. Quite the contrary, it is a most reasonable position; if applications do not even produce valid output for valid input, then when do they?
Valid Input, Valid Output, please.

links