{"action":"created","issue":{"url":"https://api.github.com/repos/FreeCodeCamp/freecodecamp/issues/218","labels_url":"https://api.github.com/repos/FreeCodeCamp/freecodecamp/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/FreeCodeCamp/freecodecamp/issues/218/comments","events_url":"https://api.github.com/repos/FreeCodeCamp/freecodecamp/issues/218/events","html_url":"https://github.com/FreeCodeCamp/freecodecamp/issues/218","id":62515833,"number":218,"title":"Design Flaw in Bonfires ","user":{"login":"duttakapil","id":6577624,"avatar_url":"https://avatars.githubusercontent.com/u/6577624?v=3","gravatar_id":"","url":"https://api.github.com/users/duttakapil","html_url":"https://github.com/duttakapil","followers_url":"https://api.github.com/users/duttakapil/followers","following_url":"https://api.github.com/users/duttakapil/following{/other_user}","gists_url":"https://api.github.com/users/duttakapil/gists{/gist_id}","starred_url":"https://api.github.com/users/duttakapil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duttakapil/subscriptions","organizations_url":"https://api.github.com/users/duttakapil/orgs","repos_url":"https://api.github.com/users/duttakapil/repos","events_url":"https://api.github.com/users/duttakapil/events{/privacy}","received_events_url":"https://api.github.com/users/duttakapil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T20:53:05Z","updated_at":"2015-03-17T21:11:30Z","closed_at":null,"body":"When you click on Run Code in a Bonfire challenges with just the default code, it shows you all the tests that are run for that program and their expected output. This can be used to write a program that returns the expected output for all the tests and pass the challenge. \r\n\r\nI passed the [No Repeats Please](http://www.freecodecamp.com/bonfires/no-repeats-please) challenge by doing just this. Here is my code : \r\n```\r\nfunction permAlone(str) {\r\n  if(str == 'aab')\r\n    return 2;\r\n  if(str == 'abcdefa')\r\n    return 3600;\r\n  if(str == 'abfdefa')\r\n    return 2640;\r\n  if(str == 'zzzzzzzz')\r\n    return 0;\r\n  if(str == 'aabb')\r\n    return 8;\r\n  if(str == 'aaa')\r\n    return 0;\r\n}\r\n```\r\n![Passed the Challenge](http://i.imgur.com/QeSoSGP.png)\r\n \r\nMy solution for this design flaw is, instead of giving away the expected output, we say something like \"Your code din't pass for this test\" and give just the input of the test and not the expected output. \r\nThat way the user would not know what the expected outputs are and would not be able to pass the challenge like I did. \r\n"},"comment":{"url":"https://api.github.com/repos/FreeCodeCamp/freecodecamp/issues/comments/82602574","html_url":"https://github.com/FreeCodeCamp/freecodecamp/issues/218#issuecomment-82602574","issue_url":"https://api.github.com/repos/FreeCodeCamp/freecodecamp/issues/218","id":82602574,"user":{"login":"terakilobyte","id":1911390,"avatar_url":"https://avatars.githubusercontent.com/u/1911390?v=3","gravatar_id":"","url":"https://api.github.com/users/terakilobyte","html_url":"https://github.com/terakilobyte","followers_url":"https://api.github.com/users/terakilobyte/followers","following_url":"https://api.github.com/users/terakilobyte/following{/other_user}","gists_url":"https://api.github.com/users/terakilobyte/gists{/gist_id}","starred_url":"https://api.github.com/users/terakilobyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terakilobyte/subscriptions","organizations_url":"https://api.github.com/users/terakilobyte/orgs","repos_url":"https://api.github.com/users/terakilobyte/repos","events_url":"https://api.github.com/users/terakilobyte/events{/privacy}","received_events_url":"https://api.github.com/users/terakilobyte/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T21:11:30Z","updated_at":"2015-03-17T21:11:30Z","body":"That's perfectly fine. The solutions are saved. If someone is caught doing this they'll most likely be uninvited from participating in non-profit projects.\r\n\r\nI'm rather a fan of this, actually. I firmly believe in giving someone enough rope to hang themselves."}}