Note: This question was severely edited since I first posted it here. The rules were moved to here, read them before posting any answer to understand the purpose of this. This was the first question created in the code-trolling category.
Imagine a lazy user on Stack Overflow asks this question:
I need a program where the user inputs an array of doubles and the program outputs the array sorted. Could you please give the code?
How could you create a piece of code that will troll this user? Create a piece of code that will appear useful to an inexperienced programmer but is utterly useless in practice.
The winner is the most upvoted answer, except if the answer is somehow not eligible (for eligibility requirements, check the tag wiki description of code-trolling). If the previously most upvoted answer is beaten in the future in the number of upvotes after being accepted, the new best answer is accepted and the previous one is unaccepted. In the case of a tie, I will choose the winner at will among the tied ones or just wait a bit more.
Answers that have no code are not eligible. They might be fun and get some upvotes, but they won't be accepted.
Rules can be found at tag description.