in reply to Split string into hash
Obviously some University or trade-school out there is in its fifth week of classes ... and full of lazy students. (I have been a college professor, so I can say that.)
Nevertheless, I would caution that when dealing with “real” data, it isn’t enough to simply write code that works perfectly when given correct data, but that behaves unpredictably at all other times.
#define SOAPBOX#undef SOAPBOX
- Data will contain errors and inconsistencies, and the only player that can detect them is: the computer itself.
- If the computer detects that it is in a situation where it cannot meaningfully continue, it should not allow itself to continue.
- Only the computer can make that determination.
- If the software does not aggressively test its data, it is usually impossible to determine whether the problem is with the software or with the data or both.
- Per contra, if it does do so, it becomes impossible to assert that the input data does not contain the issues that are being tested for ... a very important thing to be able to say in a real-world production setting, where hundred-megabyte input files are common.