Archive | Java & Programming

17 October 2007 ~ 0 Comments

Non-invasive CAPTCHA

Here’s a nice noninvasive CAPTCHA (the site seems to be down right now, probably because of Digg).
Basically, add a text input to your form, then use CSS to make it hidden. Unsuspecting spam bots will see it and try to fill it in with some value. Your code can simply reject the form [...]

Continue Reading

11 September 2007 ~ 2 Comments

E Text Editor – Best Text Editor on Windows for Your Money

If you’re using a text editor on Windows and it’s not E ($35), do yourself a favor and head over to the product’s web site, watch the screencast, and then download and use the trial version. I’ve been using UltraEdit for a long time, and while it’s a solid solution, E is heading in [...]

Continue Reading

29 August 2007 ~ 0 Comments

The Mythical Man Month

If you haven’t read this book yet, go get it.. This book is often referred to as “The Bible” of software project management (the author jokes that, just like the real Bible, “everybody reads it but nobody does anything about it!”) This does in fact seem to be true at a large number [...]

Continue Reading

19 July 2007 ~ 0 Comments

Better Hibernate Logging with log4j

“I’m the Boss Man, Need the Info!”
Want to see not only the SQL statements that Hibernate generates, but also the parameters it binds to them, and the results it gets back? I did too.
Here’s how:
First, set Hibernate’s show_sql to false (if you’re using it)
Second, add the following to your log4j.properties file:

log4j.logger.org.hibernate.SQL=debug
log4j.logger.org.hibernate.type=trace
Log4j will now [...]

Continue Reading

20 February 2007 ~ 0 Comments

Quote of the Day

With regard to the fragility of software:
“It’s like driving a bulldozer out on a frozen pond man…” – Ryan

Continue Reading

19 February 2007 ~ 8 Comments

Hibernate, Oracle, Sequences, Triggers, and Off-by-One’s

Hibernate and Oracle triggers may both need to set the primary key value when inserting a row into the database – here’s how to make them play nice together.
Oracle users typically use a combination of a trigger and a sequence to achieve what many databases support natively – the concept of an Identity data type [...]

Continue Reading

05 February 2007 ~ 0 Comments

Computer Formatted Number Output in FreeMarker

Something any FreeMarker templater should know when creating links that contain numeric values:
From the FreeMarker reference:
Warning!
As you can see, interpolations print for human audience (by default at least), as opposed to “computer audience”. In some cases this is not good, like when you print a database record ID-s as the part of an URL or [...]

Continue Reading