Archive for November, 2007

Apple VM and Eclipse 3.3.1

Thursday, November 15th, 2007

If you get the ‘Java started on first thread’ AWT exception running crap4j in Eclipse, here is a fix.

Inside <eclipse install dir>/Eclipse.app/Contents/MacOs/eclipse.ini, add the following two VM switches.

-Dapple.awt.usingSWT=false

-Djava.awt.headless=true

I ran into this for the first time tonight, and not sure what changed in my Eclipse 3.3.1 install. Everything still works fine in Eclipse 3.2.2. Anyway, those two switches solved the problem. Someone else mentioned removing the -XstartOnFirstThread flag, but only the combination of the two above actually worked for me.

Why could this happen? This is a perennial problem with Apple Java and Eclipse SWT. I had long been afraid it would happen since Crap4j renders the bar graph for ‘% CRAP’ using Java 2d, which loads in AWT. However, it hadn’t blown up on the Mac until today. I hope no one else will have the problem.

Version 1.1.5 w/ Benchmarking!

Thursday, November 15th, 2007

 

New!

Version 1.1.5 of Crap4j is available at http://www.crap4j.org/downloads/.

It has some bug fixes, and a really exciting new feature or two.

The big feature is that you can share your CRAP results anonymously (or publicly) and see how you fare against all the other projects uploaded. It even puts the global average in the report graphic to make it more useful. (You can turn this off if it’s just too painful :-)

You can see stats on other projects on the benchmark site.

We hope that this will help us understand the CRAP metric better in the wild, and that it will provide users an opportunity to check themselves against fellow developers.

Enjoy, and please let us know how you like it.

 

Crap4J - The Movie

Wednesday, November 7th, 2007

Well not quite a movie, but I’ve created a 6 min video showing the basic usage of Crap4J:

1) Run Crap4J

2) Identify crappy methods

3) Add tests or refactor crappy methods until you have eliminated them

The video quality is not very good due to YouTube’s compression, but it should help people get the basic idea of how to use Crap4j.

Here’s the link to YouTube: Crap4J Basic Demo.

Alberto

IE 6 — Blecchhh!

Tuesday, November 6th, 2007

I just realized, via the netrenderer service, that our site looks pretty bad in IE 6 and IE 5, and that 10% of our visitors used those browsers. Yikes! I’ll be putting up a graceful degrade in the near future, but in the meantime, if you can, you might want to upgrade to IE 7. It seems like it has been out for over a year now!