4 ms·
I hope the people who don't think of using a bitwise operator still get through. I've been programming for ~9 years and have never thought to use it.
by brailsafe 9y ago
I hope the people who don't think of using a bitwise operator still get through. I've been programming for ~9 years and have never thought to use it.
- Jach 9y agoYeah it's secondary so I don't hold it against the ones that didn't come up with it (one person came up with an idea I hadn't considered, I like that a person can think of different ways at all, which was casting the int to string and then checking the last character), it's a minor piece of information. All else being equal I'd like to see knowledge of bitwise operations demonstrated (and I'm sad to say that at my work we occasionally have to deal with bit-level concerns thanks to some legacy database decisions...) but things are typically unequal in more important matters.
- brailsafe 9y agoThat's a fairly reasonable approach. Looking for creativity in a relatively mundane problem is probably a good thing. The bitwise operator thing, if it actually needed to be used like you say, could be more appropriate for a coding standards guide if the candidate was otherwise suited. The immediate comparison I made, though admittedly contrived, was to that of the comma operator which I just learned about. Unlike self executing anonymous functions—which I'd consider hard to understand but critical to know—, they both fall into the category of fairly obscure pieces of syntax.