Would you have recognised the opportunity to use it, not knowing how it works?
Sometimes when we learn a new technique we suddenly see all the places it can be used that we didn't know about before. There's the old (probably apocryphal) story about the landscaper who was able to fire one of his staff when a customer told him he can calculate the side of a right-angled triangle without measuring all 3 sides. What he did worked for him, he just didn't know there was a better way.
Anyway I do agree in this case you are probably correct. I think most programmers these days use bitwise logical operators for flags and rarely if ever bit shift outside of system code.
I almost had to learn it once for flags, but Go has iota and constants and Java has enums, and stuffing flags into an integer and storing that in Postgres or Redis would have made the problem arguably worse. Just used a Set.
Re:A Bit Overcomplicated
by AnIdiotOnTheNet on Thursday August 05, 2021 @10:36AM
(#28074292)
It's not that they haven't come up in their job that's strange, but that they were never exposed to this level of base computing principle at any point in their career.
I'm sure there are plenty of use cases out there, I just haven't worked on them.