SAML, or Security Assertion Markup Language, is an protocol used to exchange authentication and authorization data. It is XML based and allows the sharing of identity between multiple organizations and applications.

When dealing with a piece of code like this
String id = "abc";
return id;

IntelliJ may give a warning message:

Local variable 'id' is redundant

I can see IntelliJ’s point. The code could be rewritten as follows:
return "abc";

However, sometimes it can be useful to use a variable name as a form of documentation.
Also, and more often, I don’t want to see this warning pop up for other people’s code! If they wish to use a “redundant” variable, who am I to argue? I certainly don’t want to be warned about it every time I do a commit.

I typically use Chrome as my browser of choice, and it comes with a plethora of keyboard shortcuts that I find incredibly useful and use constantly. However there are ways to add to those shortcuts too, including a tool called Vimium…

Some short notes from a talk from Ted Young on the Docker ecosystem. Slides available here.

BusyBox – a number of use linux tools packaged up in to a single file. “The Swiss Army knife of Embedded Linux”

CoreOS and Red Hat’s Atomic are particularly suited for running containers, work well with (and I think even come preinstalled with) Docker.

VM vs Container. VMs ofter have multiple apps running in them (e.g. a tomcat with multiple apps running it int). With containers it is typically 1 app per container. Containers typically run within a VM (although can run on “raw metal” too). Multiple containers per VM? – I’m not so clear on!

I attended a talk by Hadi Hariri at JavaOne last week. He introduced a whole bunch of IntelliJ keyboard shortcuts I was not aware of. Very useful talk. I have listed some of the most useful ones below. Or see the official reference card.

There is no right answer to the question of what is the best Java web framework. Still I end up asking it to myself every time a new project crops up. I did a post on a related talk I saw at JavaOne last year, which provoked a lot of debate and some really interesting responses. More recently, this report from Zero Turnaround is useful and this comparison from Matt Raible is also well written.

I have also been swayed in the past by the Thoughtworks technology radar in which component based frameworks (which, I think, in the Java world includes JSF, Wicket and Tapestry) get a thumbs down e.g. see the May 2013 radar. GWT has also in the past (see July 2011 radar) been singled out as something to avoid. Presumably Vaadin falls in to the same ‘hold’ category. Full disclosure, I’ve had limited exposure to these types of frameworks personally though.

My own preference remains Spring MVC. It is relatively easy to setup (especially with Spring Boot), provides decent testing support, and obviously integrates well with the rest of the Spring ecosystem. I am admittedly biased due to already knowing Spring core, but so be it.

My recent, albeit limited, experience with Struts2 is that I have been fairly pleasantly surprised. It wasn’t as bad I was expecting! The Action classes, which are instantiated for each request, and hence threadsafe, are fairly easy to use and test. I am not so fond of the xml mappings and the variable passing that gets done there though. It seems kind of clunky, although there may be a better way I am not aware off.

As described here, IntelliJ’s live templates let you easily insert predefined code fragments into your source code.
I have posted some of my most used templates below, a link to my complete list of template files on GitHub (as a reference for myself when I setup new IntelliJ environments) and the steps I took to add the IntelliJ settings file to GitHub.(more…)

Although the GitHub docs contains good info on how to add an existing GitHub project to your local machine, how to add an existing (unversioned) project from your local machine to GitHub was a little less clear to me. Here are the steps I use.