I hate 1% problems. No this isn’t an OWS slogan. I’m thinking of those code issues that really aren’t a problem 99% of the time, but when they bite, they’re really hard to debug and they cause real pain. Several common cases in Java:
- Using
java.util.Date
or java.util.Calendar
instead of JodaTime.
- Not specifying a
Locale
when doing language sensitive operations such as toLowerCase()
and toUpperCase()
.
- Not escaping strings passed to SQL, XML, HTML or other external formats.
What I hate most is that it’s really, really hard to convince other developers that these are problems they should take seriously.
Read the rest of this entry »
This entry was posted
on Sunday, July 22nd, 2012 at 10:58 am and is filed under Java, Programming.
You can follow any responses to this entry through the Atom feed.
You can make a comment or trackback from your own site.
Last week one of my colleagues hit me with an idea that was so obvious when he pointed it out I wondered why I hadn’t realized it before:
If you’re designing for reuse, you’re doing it wrong.
In 2012 the only code you should be writing is what’s needed for the immediate task at hand. Don’t design for reuse. Don’t consider reuse. Don’t waste one minute of your day making code reusable.
Read the rest of this entry »
This entry was posted
on Saturday, July 14th, 2012 at 4:17 pm and is filed under Programming.
You can follow any responses to this entry through the Atom feed.
You can make a comment or trackback from your own site.