Programming by permutation

Programming by permutation (programming by accident) is an approach where a problem is solved by iteratively making small changes (permutations) and testing each change to see if it behaves as desired. It can happen when the programmer does not fully understand the code and believes that small modifications may result in the correct code.