|
|
|
|
|
by reagent_finder
2153 days ago
|
|
Bitwise hacks in production code? Seriously? This is a nice gimmick to show off in an interview because the interviewer is definitely not going to get it, however it might backfire because the interviewer might realize a) you'll be out to get his job b) you might actually want to put stuff like this into production. The idea is solid, don't get me wrong, and clever code is always clever code. Also like u/kevingadd mentions, the principle behind the thought is an important one, knowing when and how to handle data in bulk since you are looking for a needle in the haystack. For instance SQL and streams in Java are places where you need this kind of thinking. But please, for the love of Gord, never put this bit of code in production. |
|
There's nothing hacky about this — it's a very simple procedure.
> the interviewer is definitely not going to get it,
I sure hope any interviewer for a software engineering position would get it. But this has nothing to do with interviews.