Live data from Hacker News

Trolling homework questions - sorting

codegolf.stackexchange.com

21–30 of 51 posts

Re: Trolling homework questions - sorting

#22

Trolling people looking for easy answers is pointless. Folks like this won't use a single source to send in their work. The problem with this approach is you often penalize people who are truly curious and not trolls. If you were to allow the masses to determine whether a question is a troll question or not, using an OR, allowing anyone to flip the bit, then almost every question would be considered a troll question.…

In terms of responding seriously to someone actually asking for code to sort a list, I completely agree with you. My impression, though, since this is on the Code Golf section of Stack Exchange, is that this is purely hypothetical. It's a challenge to come up with the most evil answer to the question, not as a serious answer to someone asking it but as a puzzle.

Re: Trolling homework questions - sorting

#23
post #15

Trolling people looking for easy answers is pointless. Folks like this won't use a single source to send in their work. The problem with this approach is you often penalize people who are truly curious and not trolls. If you were to allow the masses to determine whether a question is a troll question or not, using an OR, allowing anyone to flip the bit, then almost every question would be considered a troll question.…

I didn't downvote you. Two thoughts: 1. I read the whole thing three times and I still don't really understand what your objective is.... and do you actually know the purpose of the trolling thread or not. The purpose is to have fun and pretend one as a student who is under some stress and is trying to figure out some funny yet creative ways to brain fuck with the TA or professor. Even if it receives F, whatever. > T…

I'm probably so serious because it seems like so many other people are so dismissive :)

Re: Trolling homework questions - sorting

#25

Trolling people looking for easy answers is pointless. Folks like this won't use a single source to send in their work. The problem with this approach is you often penalize people who are truly curious and not trolls. If you were to allow the masses to determine whether a question is a troll question or not, using an OR, allowing anyone to flip the bit, then almost every question would be considered a troll question.…

>Providing a thorough, quality answer to a troll question won't help advance that troll's career, they will pay the price later, for sure, when their intellect is on the line.

This what would happen in an ideal world.

In reality though it's orders of magnitude easier to check credentials than intellect (provided it's even possible to do the later). In many situations, if you go against somebody with credentials without credentials of your own you won't even have a chance to have a battle of wits (like applying for a job that requires a degree).

And cheating will get you credentials most of the time, it's not like universities check every graduate's intellect before issuing them a diploma. Otherwise cheating would not be such a big deal in the academia.

So yes, helping stupid people with their homework will advance their career. Might not to the level of Google's CTO but to the level of the guy who codes healthcare.gov or the DV's "random number generator" or Toyota's ECU or any other example of crappy code that has a good chance to interfere with people's lives. Please don't do that. If you don't want to troll them - just don't reply.

Re: Trolling homework questions - sorting

#26
Sigh, don't have an SO account but if I did, I would suggest this code which I call randsort --

   #include 
   #include 
   #include 

   int
   main(int argc, char *argv[]) {
       int i, ndx;
       double my_numbers[10];
       double sorted_numbers[10];
       uint16_t picked;

       for (i = 1; i = 0; i--) {
               if (( i == -1) || (sorted_numbers[i] > sorted_numbers[i+1])) {
                   break;
               }
           }
           if (i == -1) {
               printf(" Sorted: \n");
               for (i = 0; i 

Re: Trolling homework questions - sorting

#28
post #6

The ultimate answer is to ask your young siblings to sort them for you. The price is a little time and some candy. Or since so many people are unemployed, ask them to crowdsource and work for something in return! Or just ask wolframalpha.

Set up a job through the Amazon mechanical Turk API and that might actually be possible to do programmatically.

Re: Trolling homework questions - sorting

#29

Sigh, don't have an SO account but if I did, I would suggest this code which I call randsort -- #include #include #include int main(int argc, char *argv[]) { int i, ndx; double my_numbers[10]; double sorted_numbers[10]; uint16_t picked; for (i = 1; i = 0; i--) { if (( i == -1) || (sorted_numbers[i] > sorted_numbers[i+1])) { break; } } if (i == -1) { printf(" Sorted: \n"); for (i = 0; i

Nice. Is that O(e^n)?

Out of curiosity, why do you divide the rand() by 100 before applying the mod?

Re: Trolling homework questions - sorting

#30

Trolling people looking for easy answers is pointless. Folks like this won't use a single source to send in their work. The problem with this approach is you often penalize people who are truly curious and not trolls. If you were to allow the masses to determine whether a question is a troll question or not, using an OR, allowing anyone to flip the bit, then almost every question would be considered a troll question.…

Everything you say is true. Luckily, none of it applies because no one goes to CodeGolf for homework questions.

CodeGolf will look at other SE sites, find homework questions, then take those questions back to codegolf.

Thus, CodeGolf gets an interesting new flavour of challenge (provide the worst solution to a problem) and the person who originally asked the question doesn't have to deal with the codegolfing. They do, however, have to deal with the rest of SE.

I guess downvotes are because you appear to think that codegolfers are answering in the threads where the questions are originally asked.

Post reply on HN