This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes padding space in update code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "padding space in update code" Watch "padding space in update code" New topic
Author

padding space in update code

Tim Fernandez
Ranch Hand

Joined: Aug 31, 2005
Posts: 65
Hi All,

Ive seen some codes in some posts about writing padded Strings to the db file and most of them use the System.arraycopy.. Now im worried that my code below is not efficient as compared to the others. Is my code ok?
Christian P�cher
Greenhorn

Joined: Sep 04, 2005
Posts: 8
Well, I understood the code within 30 secs and when you write documentation for the method, I would have been even faster. My assignment - as well as my experience - says you should prefer clarity over minor speed improvments. The code is readable, so it is ok. If you are really concerned about speed, I would take a profiler and fix hotspots first.

HTH, chris
Tim Fernandez
Ranch Hand

Joined: Aug 31, 2005
Posts: 65
more readable than this?

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: padding space in update code
 
Similar Threads
I have a question, but I don't know how can I do?
NX : Help! Error occur in read the data file!
StringBuffer's setCharAt - near help
NX: handling of Remote- and ParseException
Data class in Beta