Recently I inserted about 200 rows into a MySQL table using Hibernate.

However, my application had an error because of missing data and I explored the database in order to find the problem.

In general, SQuirreL is a good tool to do this and I like using it, but this time it made me crazy.

Read more…

There are some cases where you want a text field to automatically scroll down, e.g. for a log window. The following code snippet will make the JTextArea (embedded in a JScrollPane) scroll down automatically when the scroll position is at the bottom before adding the text:

Read more…

Lately, I have started becoming more and more interested in job interviews. Part of that might be because I’m in the finishing run of my diploma thesis, and so I’ll likely start my first real job the next months.

NOOP.NL has an article on the perfect job interview question. A question that can single-handedly decide the fate of an interviewee (at least at the linked shop ;)).

The question: When reviewing somebody else’s code, what is it that you usually find most disturbing?
Some people will rant about a programming style guide, but few will mention the architecture.

I found the reasoning behind it all the more interesting. The thing is, while architecture is obviously a pet field I love to be in, I think I wouldn’t have given it as answer to the “perfect question”: In most situations, you can’t even determine the system architecture from just looking at one person’s code.

Maybe the question is just short on details. The question is interesting, the answer to why it is important is kinda non-negotiable, but the process of weeding people out solely because of their answer to this is… well… questionable.

Most applications need to use timers to do things every few seconds. They are needed for maintenance work, network keep alive or other reasons. In most cases, they don’t need to be very exact.

I’m wondering why they are not synchronized on the OS-level: All applications do their maintenance work directly after each other and then the CPU is allowed to go to a state with lower power consumption. The current case is probably that it can’t even go low-power because all applications have their timers fired at arbitrary times.

Does anyone know about such possibilities in the major operation systems?

This HowTo describes a way to integrate Seam, Spring and jBPM in order to use the same Hibernate SessionFactory in both Spring and jBPM (and of course, Seam).

At first, make sure you use the latest version 2.1.0 of Seam since you could get trouble with 2.0.1 and SpringTransactions.

The relevant parts of the configuration are:

Read more…