Thursday, November 10, 2005

bit bash it instead

I must confess, I don't really use bit bashing in my code. I just never bothered. Sure, I've come accross it before and understood it, but I could never be bothered applying it. That is, until I read the bitwise operator section of the Mozilla JavaScript 1.5 reference. I have to say, this little wiki page is the shortest, most useful article on the topic and is very very easy to understand and the examples at the bottom are a great little reference.
If you don't bit bash, then maybe you should. It would be a shame to be missing out on one of the most useful/fundamental techniques in programming just because you never got round to checking it out properly like me. It's also the most efficient way to do many things that people often burden SQL databases with (eg. user priverlages).


Post a Comment

<< Home

My status