Jerry Yoakum's thoughts on software engineering and architecture from experience working with code, computer science, python, java, APIs, NASA, data mining, math, etc.
Monday, December 03, 2018
"Garbage In, Garbage Out" Is Incorrect
Many people quote the expression "garbage in, garbage out" as if it were acceptable for software to behave like this. It is not. If a user provides invalid input data, the program should respond with an intelligent message that describes why the input was invalid. If a software component receives invalid data, it should not process it, but instead should return an error code back to the component that transmitted the invalid data. This mindset helps diminish the domino effect caused by software faults and makes it easier to determine error causes by 1) catching the fault early and 2) preventing subsequent data corruption.
Reference:
McConnell, S., Code Complete, Redmond, WA: Microsoft Press, 1993.
Labels:
design,
software-engineering
Location:
Springfield, MO, USA