Rainy days and Java always get me down


I've Moved My Blog

It's currently located at http://www.urlinone.com/blog

I should say "I'm moving my blog." It's a pretty painful process.

Pebble has blown up on me, and it's been many months since I've been able to blog reliably. I've lost posts. And now I've got to figure out how to migrate my past blog posts from Pebble to my new destination without all the URLs changing, lest external links become 404 Not Founds.

Why does everything in the 21st century have to be a three-day project???

Sometimes the littlest changes make the biggest difference. I'm using this one all the time now.

I created a new code completion template in Eclipse. (Go to Window > Preferences, then Java > Editor > Templates.)

I added a new template called dbg in the java context. It is defined as

if( log.isDebugEnabled() ) {
    log.debug("${cursor}");
}

Now, any time I want to log something, I just type dbg<Ctrl-space>, and I'm in position to type my logging message. (I just saved myself three minutes a day! Let's see, what am I going to do with that time? I think I'll learn a new language!)

Naming the template dbg is preferable to debug because there are no naming conflicts with dbg. If you name it debug, you have to confirm that you want the template named debug, as opposed to one of the many classes whose name starts with "Debug".