19 votes

Interpretation of Truthy/Falsey

Don't forget program exit codes! If my C or C++ or perl or bash or ... program calls exit(0) this action could be considered truthy, and calling ...
19 votes

Standard definitions of terms within specifications

"uniformly random" There are two distinct things to define for "uniform" (in the context of uniformly distributed random variables). If "uniform" is not specified, then &...
16 votes

Standard definitions of terms within specifications

"Black-Box-Functions" The content (i.e. the code) of black-box-functions may not be accessed, you can only call them (passing arguments if applicable) and observe their output. They should ...
  • 43.4k
14 votes

Interpretation of Truthy/Falsey

I would partition values into the categories truthy, falsy, and indeterminate according to the following rules: The following values are considered falsy: the zero value of the type of the result, ...
  • 10.1k
12 votes

Standard definitions of terms within specifications

"Positive", "Negative", "Non-Negative", "Non-Positive" Positive, by default, means strictly positive, ie. all N larger than zero. Zero is not a positive number. ...
  • 46.6k
11 votes
Accepted

How can we clearly define "Must work for theoretically large values"?

This is what I use in my challenges (with slightly different wordings): The algorithm should theoretically work for arbitrarily large input values. In practice, it is acceptable if the program is ...
  • 102k
9 votes
Accepted

What counts as distinct and consistent?

Outputs are consistent if they are equal in the sanest and most obvious way of comparing them. For example, if you have two char * strings in C or C++, and you try <...
  • 57.9k
6 votes

How can we clearly define "Must work for theoretically large values"?

I don't this cannot be defined in in an objective and satisfactory way. We can talk about the behavior of a program as more memory is added to a computer, or more computing time is given. Since we ...
  • 94k
5 votes

What's a string?

A string is also a list of single character strings. For example: ["H", "e", "l", "l", "o", ",", " ", "w", "o", "r", "l", "d", "!"] While technically different, ...
2 votes

Interpretation of Truthy/Falsey

I think Truthy/Falsey instead of being language specific is problem (answer) specific. So in a language we can define different truthy/falsey s based on different conditions. For example one can ...
  • 5,635
1 vote

What's a string?

If a language makes a distinction between char[] and String, I think a good question to ask is "Does a char[] print like a ...
  • 28.8k
1 vote

Interpretation of Truthy/Falsey

Answers should be able to specify what is truthy and what is falsy Almost all of the answers here are either ambiguous or put some languages at a disadvantage. For the top rated answer, there are many ...
  • 2,692

Only top scored, non community-wiki answers of a minimum length are eligible