Bens Stuff

Tuesday, August 31, 2004

More of them shifty bits

This Javaranch article is a decent tutorial on bit shifting. I do have a question for some people that have used this stuff. Lets say I have a ten character field that can be either Y or N. I suppose you could think of them as 1 and 0 as well. Anyways, what would be the best way to read these into a set of 10 boolean values? Right now I just use the following simple code:

myObject.setTrueFalseFieldn( myString.charAt(n)=='Y' );

and I repeat it 10 times. Any ideas on how to improve that code? Geez, you'd think I'm some kid straight out of college with this simple of a question...

Another post I had dealing with bits.

Pondering Java Certification

Lately I've been wondering if I should take the Sun Certified Java Programmer exam. I've been coding in Java for the past 4 years, most of it server side. I know I will pass, but I'll probably do poorly because I don't have any experience with applets or Swing or any client side stuff. Most of my programming has been servlets, JSP's and the like. I've heard that there is a lot of stuff about bit shifting (which I wrote about earlier) and small syntactical things. I guess for the next couple of days I'll hang out at the JavaRanch and see what I can learn. It's only $150 to take the test so it shouldn't hurt too much financially.

Then after the SCJP, I'll go for the Sun Certified Web Component Developer exam. That one I'll probably buy a book for. I took the free sample test from Sun and there are a couple things that tripped me up. Like coding your own tag libraries. I've done that, but I only modified existing taglibs. Deployment descriptors were another area that I didn't do well in. I know the major tags, but I forgot there was an order to them.

Anyone have any personal experience with these exams? I'd be particularly interested in your thoughts if you were already a Java programmer for some time and decided to take the exam like I'm about to do.