Saturday, January 29, 2011

Eclipse Color Themes

I think it's a shame how StackOverflow is jammed with old Q&A about how to do custom color themes for Eclipse.

Thanks to Felix and his buddy Roger Dudler, there is now a far better way:

Eclipse Color Theme plugin and www.eclipsecolorthemes.org.

(Picture from http://www.rogerdudler.com/?p=509 )

Sunday, January 23, 2011

Certified Scrum Master?

I think the dust has begun to settle around the certification debate. It seems to be that we've ended up at a kind of "Yes, CSM certification is silly, but it's a necessary evil." attitude. I don't like this.

Judging by the membership-ID on my ScrumAlliance profile page, I reckon I was one of the first few thousands to take the certification. I openly blogged about it at the time, I dare say with a hint of skepticism, and since then I've never really flaunted it (well, maybe now I am).

I just saw a nice analogy for the CSM, paraphrasing Jon Kern:

To filter out potential employees by checking their certification, is like seeking out race-car drivers by checking if they have a driver's license.

I don't want to support this unwarranted prestige of being a CSM any more, so I've taken the notion of CSM out of my résumé, and I recommend everyone else to do the same.

If I'm hiring, and you flag your CSM title, I'll rank it as bragging, and that your CV is well inflated.

If you're a company looking to hire me, and you filter out non-CSM candidates, I don't want to work for you anyway. Thanks for not wasting my time! 

Saturday, January 22, 2011

Made a Google Guava page

Just a quick post to announce my new Google Guava page.

My Guava blog post has gotten a relatively large amount of traffic, but the list of resources have gone a bit stale. In order to make the resources a bit more "time-agnostic", I've cleaned it up a little, and made it into it's own page:

http://www.tfnico.com/presentations/google-guava

Saturday, January 15, 2011

Maven build helper POMs

A typical misconception in Maven is that if you want to build a project in a special way, or parameterize it somehow, profiles are the thing for you. My opinion is that..

Profiles are POM smell.
While I know they have their uses, I have abused profiles heavily in the past, and seen others do this too. What might start off as a simple little trick to get some desired build eventually leads to:
  • One profile for each testing category (unit, database, web-tests, etc)
  • One profile for each environment/stage configuration (testing, live, etc)
  • One profile for each artifact assembly (exclude module X when deploying in certain environments)
The POM ends up awfully complicated, you get confusion around what kind of artifact is deployed where, and people start hating Maven because they forget -P parameters when they build, and end up rebuilding the whole project to change some single configuration.

The point of a POM is that the output of the build, the artifact, should always be the same thing.

If you want to build *a different thing*, you probably should build another project. Andrew Spencer recently wrote a nice article about best practices in Maven profiles. If you want more advice you should have a look.

An example from the other day:  I wanted to build a sub-set of the modules in a rather large multi-module project. In order to speed up the build, I wanted to exclude the modules with static contents (texts and resources):



Instead of making a quickbuild-profile, I made an adjacent fastbuild-pom.xml that extends the original, but excludes the static modules:



This build I can invoke in the CI-server:

mvn clean install -f fastbuild-pom.xml


So, not too much duplication of the original pom, and very unobtrusive.

Remember that in 95% of the cases you want to create profiles, there is probably a better tool for what you are trying to do. I think the best cases for profiles are read in their activation docs: Making it possible to build the project on different JDK's, or different OS. Then again, the whole point of Java is to be platform-independent, so this seldom an issue.