r/ProgrammerHumor • • Oct 26 '21

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

27k Upvotes

713 comments sorted by

View all comments

Show parent comment

1

u/_JJCUBER_ Oct 26 '21

This will instantly return for num != 0 and will go in an infinite loop for num == 0. Not sure if this was your intent (single = vs double in the if statement), though I assume not? Unless you’re using some weird language where = both assigns and checks for inequality.

2

u/Wekmor Oct 26 '21

No you're correct, I missed a =. What I get for shitposting whilst eating lunch I guess.

1

u/_JJCUBER_ Oct 26 '21

Technically, you unintentionally made your code better in 99% of cases 🤣

1

u/Wekmor Oct 26 '21

A pile of shit with sprinkles on top ಠ_ಠ