You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I praise your urge to help the community, I don't think you should pursue both is-even and is-odd projects, because, from a developper's point of view, they are utterly nonsense. There exist some trivial bitwise computations which do this in a couple of CPU instructions: isEven(a) -> (a & 1) == 0 isOdd(a) -> (a & 1) == 1
You need to take a little step-back, and re-think carefully about the real usefulness of these projects. Plus, you should not make publicly visible a code which encourages bad practices; and trying to brute-force a trivial parity test with a huge if-else block is definitely a bad practice.
Please, consider that I am actually trying to help you; I promise you, at some point, when you will look back at these projects, you will wish to never have thought conducting a parity test that way.
Respectfully.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
While I praise your urge to help the community, I don't think you should pursue both is-even and is-odd projects, because, from a developper's point of view, they are utterly nonsense. There exist some trivial bitwise computations which do this in a couple of CPU instructions:
isEven(a) -> (a & 1) == 0
isOdd(a) -> (a & 1) == 1
You need to take a little step-back, and re-think carefully about the real usefulness of these projects. Plus, you should not make publicly visible a code which encourages bad practices; and trying to brute-force a trivial parity test with a huge if-else block is definitely a bad practice.
Please, consider that I am actually trying to help you; I promise you, at some point, when you will look back at these projects, you will wish to never have thought conducting a parity test that way.
Respectfully.
Beta Was this translation helpful? Give feedback.
All reactions