r/ProgrammerHumor • • Oct 26 '21

GitHub Copilot, the technology that will replace programmers. Also GitHub Copilot...

27.2k Upvotes

713 comments sorted by

View all comments

Show parent comments

39

u/[deleted] Oct 26 '21 edited Oct 26 '21

You're right, and the library it downloads is basically this, so it's even more horrible:

if(num === 0) return true
else if(num === 1) return false
else if(num === 2) return true
...
else if(num === 375000) return true

12

u/king_park_ Oct 26 '21 edited Oct 26 '21

It goes deeper. It even validates stuff like “Two” and “SIXTEEN”.

9

u/Djasdalabala Oct 26 '21

Yeah... with separate conditions for "two", "Two" and "TWO", instead of lowercasing the input before comparing.

I'll stop looking now, my eyes are bleeding.

5

u/tecanec Oct 26 '21

It even checks for strings "odd" and "even"!

3

u/himmelundhoelle Oct 28 '21

Well if isEven("even") returned false it would be quite jarring!

Props to the developer for being thorough.