Book review : SCJP Sun Certified Programmer for Java 6 Study Guide

In order to get ready for the SCJP 6 exam, I’ve read SCJP Sun Certified Programmer for Java 6 Study Guide, from Katherine Sierra and Bert Bates, aka some of the certification’s exam creators.
The authors make clear at the beginning that the book is about, and only about, being ready for the SCJP exam. No [...]

Wave Panel for Wicket

in case someone thought it was a good idea:
We’re delighted to introduce a new wicket component which will allow you to easily integrate Google Waves right into your application. Please meet GoogleWavePanel !
The idea of making this component came from a recent tutorial which aimed at clarifying the use of Google’s Wave Embed API.
http://blog.zenika.com/index.php?post/2010/02/03/Surf-the-Wave-with-Wicket-and-the-GoogleWavePanel

Primitive Array to Object[]

If ever you face the need of ‘boxing’ the elements of a primitive array into an array of Objects, this might be handy:
 Java |  copy |?  public static Object[] convertPrimitiveArray(final Object array) { final int arrayLength = Array.getLength(array); [...]

Eclipse Builder plugin

in case you use Eclipse and like the builder pattern, try this plugin. Update Site: http://boss.bekk.no/bpep/update

Wicket gem: Gravatar

from the javadoc:
Creates an image that is rendered by the Gravatar online service. Gravatars are user
icons that are registered by a central server and that can be used across the
internet with blogs, forums and other profile based websites.

The Gravatar requires the email address for which the gravatar image
needs to be [...]

Scripting in Scala….

Interpreter style can be easier than one might think.
See Vassil Dichev´s Embedded Scala Interpreter

Fun with Java’s syntax !

Have you ever prepared a certification ?
Well, for me, it’s the first time, and it proves a very nice occasion to learn stuff you should never do and hopefully will never meet in real code. Still, it’s fun like hell
So, what am I speaking about ?
Well, stuff like these :
 Java |  copy |? class ExtractsFromTheExams{ [...]

InfoQ: IntelliJ Goes Open Source

…Starting with the upcoming version 9.0, IntelliJ IDEA will be offered in two editions: Community Edition, free and open-source, and Ultimate Edition, which until today has been referred to as simply IntelliJ IDEA.
via InfoQ: IntelliJ Goes Open Source.
Unfortunately, without html/css and refactoring support in the community version, i´d not even consider installing it to take [...]

Wanted : book/resources on Java certifications !

I’m currently looking seriously at some Java certifications. As such, Uwe kindly gave me lots of Java certification books, but they are about Java 1.2 (whaou, prehistory ) and 1.4.
Since Java 5 introduced quite some new stuff, extra resources/books would be welcome, as such feel free to comment. I’ll as well update [...]

How we have the development specific code safely out of the way

Quite frequently, one has to write some development specific code. For example, at work, we have, when needed, an “application launcher” (named with the application name) and a dev web page, mounted under /dev. This page in turn allows to write shortcuts in the application work flow, in order to access specific page with an [...]

Thoughts and questions on Pragmatic Unit Testing

2 points stroke me when reading this “Pragmatic Unit Testing” book :
- in order to easily test some class, they suggest to open the required methods by making them protected. I had first to check that protected included package readability (it does) but still I think it’s going a bit too far : if the [...]

AMF Serialization (followup Faster Serialization)

While i was looking for the fastest possible way to serialize Java Objects to byte-streams, i was comparing some serialization libs. With the help of Adobe Evangelist Cornel Creanga, i added AMF3 Serialization to the test.
Good things first: for my test-case, AMF3 turns out to be slightly faster and a little more compact than plain [...]

Book review : Pragmatic Unit Testing

During my holidays, I notably read

Coins, coins, coins…

As the List for project coin is finalizing, it looks like, we wont get Multi-catch, which is pretty sad.
 Java |  copy |? } catch (Exception1 | Exception2 ex) { LOGGER.log(Level.SEVERE, ex); throw ex; }
That being said, i really like the Collection Literals [...]

“Faster” Serialization

as i´m gonna be involved in building a System that has some significantly complex aggregated Data Objects to serialize frequently, i came across http://jboss.org/serialization/.
this one actually promises some kind of performance gain over plain java serialization …

Recently we discovered that most of the problems in JavaSerialization are related to static synchronized caching, what causes [...]

Wicket 1.4.1 supports Ajax file uploads | Wicket in Action

via Wicket 1.4.1 supports Ajax file uploads | Wicket in Action.
The Apache Wicket project is proud to announce the first maintenance release: Apache Wicket 1.4.1. The most notable change in this release is the transparent support for multipart form submissions via Ajax. Wicket is now smart enough to submit a form using a hidden iframe [...]

Thrift, or where generated java source code sucks…

Rod Johnson (yes, the guy who´s company was just sold for 420mn ) once wrote in a book, that about any kind of source-code generation sucks for a bunch of reasons and nowadays could/should be replaced by reflective or framework code. (j2ee one on one, wrox, very old)
those of you, who know details [...]

Wicket resource caching

Whenever you add extensive caching to your wicket resources, this might be awfully useful:
 Java |  copy |? Application.getResourceSettings().setAddLastModifiedTimeToResourceReferenceUrl(true);
which exactly does what you can get from the name

Book review : Effective Java, 2nd edition

I bought Effective Java 2nd edition last year. I loved it immediately, and since I’m frequently reading bits of it again. I even think I should read it all over another time.
Indeed, Joshua Bloch items are more than just “do this, do that” : he takes care of explaining them in great depth. It allows [...]

Interesting serialization trick

Wicket is a well known serialization addict, and as such it’s quite often a topic when dealing with wicket pages and, especially, going back through the page map.
In doing so, we had recently the following surprise : the DefaultMutableTreeNode, a javax.swing.tree class, is used to to the current incarnation of the tree component in wicket. [...]

Shape the future…

of sun´s certification program by helping with their survey.

Book review : Clean code

hi
I recently finished Clean code, from Robert C. Martin (well, in fact it’s mainly from him and some guests, but then..).
Anyway, the focus of this book is how to write clean code, meaning readable and maintainable code. For this, the authors go at length on the different aspects, dedicating whole chapters to aspects like “Meaningful [...]

fun with enums

i stumbled upon a very nasty corner-case using enums. i wont call it a puzzler, but you may want to try to predict the output of the following:
 Java |  copy |? public enum Person { PETER, PAUL, MARY;  private Food favFood;  Food getFavFood() { [...]

wicket : setGatherExtendedBrowserInfo doesn’t play well with Ajax

As I’ve written on the wicket jira, setGatherExtendedBrowserInfo doesn’t play well with Ajax. For the explanation, here are Igor 2 cents on it :
ajax doesnt work because probably the ajax request is redirected to
that page…that page is what gathers all the browser info through
javascript…

.
Maybe I am a bit picky, but to have such [...]

Hibernate & mysql5 dialect: just frightening…

did you know? http://opensource.atlassian.com/projects/hibernate/browse/HHH-468. Note that this issue (like some of my favorite) is now open since 2005.

Uh, that was quick….

Maven 2.2 released: http://maven.apache.org/release-notes.html

Design hint : introduce Null Object

I’m currently reading Refactoring from Martin Fowler. Overall, it’s an interesting book from which much could be said but tonight I would like to speak only of the “introduce Null object” hint provided in it.
The basic idea is pretty simple, instead of checking for null return from various call, just provide a “null object”. It [...]

50+ Guicy Tips

Parleys shares “50+ Tips to Guice up your Java”-Talk from Crazy Bob, held at JavaPolis 2007.

Guicy JSR

this is awesome news. First of all, it is nice, that Spring and Guice find some common ground. More importantly, independence of any EEish API is absolutely necessary for this to become interesting.
Not that Guice needed a specification to back it up, but it is good to push it more into the mainstream.

IDetachListener saves the day

i just asked this on the Wicket user list:
we have a problem here, which we think might be a common one, so i´d like to discuss.
from time to time we create models (mostly LDMs) that are not actually reachable by components. (yes, you can argue that this is stupid, but it happens where 1:1 mapping [...]

Riena 1.0 released

please note that Riena 1.0 was released. i´m really greedy on getting opinions about it, so if you should have tried it already, please drop me a note. One interesting sidenote: they seem to use Caucho´s Hessian as wire protocol.

Performance of Wicket vs Seam + JSF

even though Gavin King expectedly disagrees, i find this article
a very useful benchmark. not that [...]

servlet registration at runtime

awesome! did you have a look at the servlet 3.0 API PD?

[...]

Pagelink considered harmful

ahhh. doesn’t wicket offer a great model of programming webpages? isn’t it too easy to do things like this?

 Java |  copy |? add(new [...]

Quartz fits

whenever you have any need for cron-like functionality within your java application, Quartz is the obvious chose for quite a long time now.
i did not need much of what quartz had to offer, so i [...]