Whew, Grails has some gotchas. It is so great for so many reasons. But WOW! There are some time sinks tucked away for you to discover. In the hope of helping others, here is a list of the ones that hit me.
<Read on…>

 
 

I’m embarking, balls-out, on a new project using Grails. I’ll be leveraging a significant portion of our Java codebase and the fact that I can do that,is just plain stellar.

It quickly came time to test out some of the integration. The very first question was how to load resources for testing. E.g., I have a service that handles file uploads. How do I pass it a test file?

The documentation isn’t straightforward on this. In fact, I found the solution attached to a bug report for grails 1.1. It’s pretty simple, once you pull in the spring packages:

import org.springframework.core.io.ClassPathResource
import org.springframework.core.io.Resource

And then in your testXXX() function:

Resource resource = new ClassPathResource("resources/crying-baby.jpg")
def file = resource.getFile()
assert file.exists()

And you are good to go. Note the assert at the end to verify things are working.

 
 

Just went through a few hours of pounding my head.  I couldn’t, for the life of me, get SOLR to return results sorted by a new date field added to our schema.  My query was simply:

pr_score:[3 TO *] sort pr_lastUpdated desc

No matter what, the results came back sorted by ANYWHICHFRICKINWAY.

Scouring the mailing lists and google search results yielded exactly squat.  Then I found it.  By pure chance I was looking at a developerworks article on IBM and in a table at the bottom the showed this crazy syntax:

<Read on…>

 
 

Driving me nuts.

If you are a developer on OS X and you are customer of JetBrains using IDEA the Java IDE, it is a cloudy year for you!

There are two critical bugs that haven’t been fixed in over 6 months since being reported to JetBrains. IDEA enabled my fulltime switch to OS X and now it is unusable after 4 – 5 open files or half a work day. Whichever comes first.

Check it out:

Hidden editor tabs:
http://www.jetbrains.net/jira/browse/IDEA-16084

CPU spike after every compilation:
http://www.jetbrains.net/jira/browse/IDEADEV-25376

Unfortunately, there is no viable workaround.

Come on JetBrains! Fix it!

 
 

John Gruber of Daring Fireball fame, who I have mucho respect for, linked to an article about how the Java support in the lastest version of Mac OS X is terrible. He then makes a very irresponsible statement:
“I fail to see why anyone (other than Java developers themselves) would care.”

The problem with this statement is that you should care. Why? Well, because you are a Mac user. It will take a bit to explain. Humor me.

There are many upon many businesses out there that support the Mac platform ONLY because their Java applications will run on a Mac. But this isn’t the complete reason. Hear me out.

Now, these businesses aren’t Google, Microsoft, or IBM. You probably haven’t heard the names of these businesses, let alone the names of the software they provide. They certainly aren’t household names, and your mom and dad aren’t using their applications. But they do represent a significant base of development energy. These are the guys that make it possible for the little guys and the medium guys to do business.

<Read on…>

 
 

If you run your own IMAP server or if you use Thunderbird, you may have run into the problem where there are just too many emails in your folder and you need to delete them.

It seems that at a certain threshold of emails, trying to delete your email through any normal IMAP client is just impossible. I first had this happen when I was mail bombed with about 3000 emails. For some reason, Thunderbird just couldn’t handle deleting them. I would select all the messages in my inbox and hit delete. Then it would sit there for hours just spinning.

My first thought was that this was a server problem. To troubleshoot it, I created a groovy script to run through my inbox and delete the messages. It worked and actually finished it in 5 minutes! So it appears there is definitely a problem with Thunderbird and other clients.

<Read on…>

 
 

This is pretty cool.

P4Java

It’s a java API for integrating with Perforce SCM servers. It’s supposed to take the place of P4Package, the Perforce provided API.

I like the fact that its extensible and open source. It’s brought to us by the same people that created flowzit.com.

 
 

Appearance is everything and I hate it when I have to deal with applications that are designed to sub par standards. A great example of this is the Windows Command Prompt.

I spend quite a bit of time on both Mac and Windows platforms. Unfortunately, of late, the majority has been on Windows. And when I’m stuck on windows, I’m stuck using the command prompt. The command line on Windows is crippled when compared with Linux or OS X. While not as bad as the lack of a fully integrated bash shell, the fact that I’m looking at fonts created in 1991 or earlier really doesn’t make the experience any better.

Unfortunately, the properties window for the command prompt doesn’t give you any choices besides “Raster” or Lucida. There is also no built-in method for adding fonts to this list.

<Read on…>

 
 

I was just trying out the latest state of UML tools for Eclipse and gave a look at the apparent industry heavyweight, Omondo. Since the beginning, they always seemed like they would end up on top. So I went and downloaded version 3.2.0.

My initial impression was that this was a quality product and one that I would actually consider buying at work. For home use, I would just stick with the free version. But then I ran into some trouble.

On Omondo’s feature list comparing the free to paid for version, it shows Team solution and that the free edition doesn’t have that. Okay, no problem. I’m not that lazy that I need to have eclipse check out my diagram files for me. I can take the extra step and check them out within Perforce.

But no. They aren’t saying there is no team integration for diagram files. They are saying you can’t use the Team Feature of Eclipse AT ALL! This is even the case in projects that do not use Omondo’s UML diagram tool!

<Read on…>

 
 

JEditAs with any programmer, I have a set of tools I use on a frequent basis. Coming from a Windows background, you need a powerful text editor for basic tasks. It needs the ability to read files coming in from Unix as well as Windows, hopefully has the capability to run external programs, an easy interface for working with large file sets, and maybe syntax highlighting.

If I’m on a *nix machine and coming in over a terminal, I will be using Vim. When I’m on Windows, I used to use EditPlus. Now, I’m finding myself more and more on different operating systems but working with the same set of files. So I decided to see what was available that was cross platform and didn’t run in a terminal window.

jEdit rose to the top. However, I had a few issues to get past. The first and foremost being the non-native look and feel of a Java Swing application. Not a java application, but a Swing application… Important distinction.

<Read on…>