Monday, October 31, 2005

I'm bitwise, are you?

When I finally decided to get a Java Programmer Certification and had to review all that bit shifting, bitwise operating, etc. I just kept thinking...."My domain is basic business apps. I don't use this crap."

I have been proven wrong.

private static final int ACCOUNTDISABLE = 2;
if (ACCOUNTDISABLE == (accountStatusValue & ACCOUNTDISABLE))
System.out.println("The account's disabled. Whoo-hoo!");

Granted, this isn't the actual code, but it's pretty darn close. One dinky line to determine if someone's AD account is disabled or not. Doh! Maybe there is something to this whole computer "science" thing. :) (I'm kidding, people.)

That certification is way expired, by the way, but what's the point if you're not job hunting.....


Post a Comment

<< Home