13
\$\begingroup\$

Recently I've been posting a lot of challenges on the site. This is because I am in a class where the homework are programming challenges (Algorithm Class).

Is that OK? or should I stop posting them? I ask because I know this is not site for homework (Yes, the answers helps me to create better algorithms)

| |
\$\endgroup\$
  • \$\begingroup\$ codegolf.meta.stackexchange.com/questions/1126/… \$\endgroup\$ – user202729 Jun 5 '18 at 14:47
  • 1
    \$\begingroup\$ Well, to prove that you have actually done your homework prior to creating the challenge, you could self-answer it with your current solution. \$\endgroup\$ – Antti29 Jun 6 '18 at 6:26
  • 4
    \$\begingroup\$ If I were you, I'd wait until the assignment has been due and turned in before posting a challenge on it. \$\endgroup\$ – mbomb007 Jun 8 '18 at 15:14
  • \$\begingroup\$ You should probably check with your teacher too, even if a golfed solution will probably get an awful grade, it could still be considered cheating depending on the university/school \$\endgroup\$ – Sefa Jun 18 '18 at 14:19
18
\$\begingroup\$

Depends

If you just come here and post "hi please help I am new to Python have to make program print 1 to 100 please give me code" then no. If you post an actual on-topic challenge-formatted question that adds something to the site, it doesn't really matter whether or not it was homework (unless your exact homework was to golf your code. I hope not).

Really, the two things we need to consider: is it on-topic, and do you deserve credit for it?

Is it on-topic?

That depends on whether or not you made it on-topic. Whether or not it's on-topic has nothing to do with whether or not it's inspired by your homework or not, but just based on how you made it.

Do you deserve credit for it?

Probably. Since your homework relies on certain algorithms that you can then adapt into code-golf challenges, it's really no different from creating a challenge from an already known sequence or a known algorithm. The point is that you still had to put forth the effort to extract the algorithms from the problem and adapt it into a PPCG-on-topic challenge.

Overall, as long as you didn't just copy-paste and it's on-topic, I don't see a problem with it.

| |
\$\endgroup\$
  • 6
    \$\begingroup\$ However, you should always write your own code to solve these challenges. Even if your homework is in, say, Python, and somebody posts a very nice python solution, don't copy their solution. \$\endgroup\$ – Rɪᴋᴇʀ Jun 5 '18 at 15:42
  • \$\begingroup\$ @Picard Definitely, I agree. \$\endgroup\$ – HyperNeutrino Jun 5 '18 at 15:47
  • 1
    \$\begingroup\$ Homework won't require you to golf the code, but they may require an optimize to running. \$\endgroup\$ – l4m2 Jun 7 '18 at 5:56
  • 3
    \$\begingroup\$ @l4m2 on the contrary, I'd expect golfed code to receive a failing grade on most courses teaching a language. Something with very specific format requirement and golf not being compatible. \$\endgroup\$ – JAD Jun 8 '18 at 6:31
  • \$\begingroup\$ @JAD Agreed. Readability (often with comments) is emphasized, because the goal of a class is to prepare you for a job and practical usage. Code that you can't read a year after you wrote it isn't practical. \$\endgroup\$ – mbomb007 Jun 8 '18 at 15:13
  • 1
    \$\begingroup\$ @mbomb007 and then there's code-golf code which I can't read a day after I wrote it :D \$\endgroup\$ – HyperNeutrino Jun 8 '18 at 16:08
  • 1
    \$\begingroup\$ And to make sure it’s on-topic, make sure to use the Sandbox ;) \$\endgroup\$ – JayCe Jun 10 '18 at 2:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .