About Code-Bowling:
In golf, you try to get the lowest score (smallest application, most elegant, etc). In Bowling, you try to get the highest score. So if you follow, the goal of a Code-Bowling challenge is to make the biggest, most bastardized, hardest to maintain piece of code that still meets the requirements of the challenge. However, there's no point in making source longer just for the sake of it. It needs to seem like that added length was from design and not just padding.
The Challenge:
Create a program that sorts a list of numbers in ascending order.
Example:
Input: 1, 4, 7, 2, 5
Output: 1, 2, 4, 5, 7
Code: Obviously this wouldn't be a good answer, since there aren't many WTFs in there
function doSort(array $input) {
sort($input);
return $input;
}
Rules:
There are no real rules. As long as the program functions, have at it!
Remember: This is code-bowling, not golf. The objective is to make the worst, most bastardized code that you can! Bonus points for code that looks good, but is actually deceptively evil...
sort(sort(sort(sort(sort(sort(myarray))))))
Guarantees perfect sorting! \$\endgroup\$