From a school exam where you needed to return the game score based on the number of wins and ties, this guy just looked at the automatic test cases and returned their expected result
https://redd.it/tgg0ef
@r_badcode
https://redd.it/tgg0ef
@r_badcode
My boss told me to refactor a function, I was like: well, it's just a function, It won't take me too much time and I will do it late at night, then I came up with this beautiful function, I need help guys :D
https://redd.it/ti93sh
@r_badcode
https://redd.it/ti93sh
@r_badcode
If you think about it, all odd numbers contain an 'e', so here is an implementation of isEven in a whopping O(1)
https://redd.it/tp3s1s
@r_badcode
https://redd.it/tp3s1s
@r_badcode
Boss asked me to approve his pull request... looks good to me. Approved!
https://redd.it/tt2tkc
@r_badcode
https://redd.it/tt2tkc
@r_badcode
in a homework were they ask to make a func that return 3 numbers from highest to lowest. (For some reason for loops and such are not permited)
https://redd.it/tss6a6
@r_badcode
https://redd.it/tss6a6
@r_badcode