Ad
  • Custom User Avatar

    Whatever the standard practice is, the instructions should specify that the input cannot be mutated. When the random tests fail, they give errors that imply the test is inconsistent with the example tests, and that they are looking for something other than the stated objective.

  • Default User Avatar

    @da_big_fella: If you're autodidact, CW will learn you that. ;) If you had programation courses other than simple introduction courses, your teachers should have... :/

  • Custom User Avatar

    don't pass them by reference into my functions

    I don't think you understand how arrays and objects work in most languages.

    Just wait until you write all kinds of functions with side effects in production code, and see everyone want to beat you to hell for all the bugs you're causing :P

  • Default User Avatar

    Well, my mother never taught not to. How should I know it's standard practice? If you don't want your arrays mutated, don't pass them by reference into my functions.

  • Custom User Avatar

    Not mutating the input is the standard practice though.

    I don't know why lots of people mutate the input and then complain the random tests not working, that's what you get for mutating the input after all!