4 ms·
my machine learning algorithm for predicting whether there are bugs in any of my team's code: (C code) int main(int argc, char *argv[]) { return 1; }
by plg 12y ago
my machine learning algorithm for predicting whether there are bugs in any of my team's code: (C code)
int main(int argc, char *argv[]) {
return 1;
}
- lern_too_spel 12y agoNonzero exit code means false (no bugs). If this program represents the entirety of your team's code, your story checks out.
- Dylan16807 12y agoAmusing, but I feel like that's a terrible way to think about return codes. No error vs. error number does not map cleanly to a boolean.
- lern_too_spel 12y agoAny other interpretation of his program goes against decades of Unix convention. http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.htm...
- Dylan16807 12y agoEhhh, "if" is a bit of a specialized case. In general programs don't map fully to true/false, just leave it as "error code". It's not that we should use any other interpretation, it's that that interpretation is only mostly true. Don't overgeneralize lest you introduce mistakes.
- plg 12y agoit's true, non-zero exit code is supposed to mean boolean FALSE but I am a part of my team, and so my code is my team's code, and hence the program is self-referential I think? my brain hurts