Page 3 of 712345...Last »

Pre- and Post-Conditions in Java: maybe a solution…

In this article I explain a solution I’ve imagined to execute pre- and post-conditions in Java. . . . → Read More: Pre- and Post-Conditions in Java: maybe a solution…

ServletContextListener initialization issue

This week at my client’s offices, I discovered, with another IT consultant from a concurrent firm, a strange behaviour of ServletContextListeners.

The specification doesn’t state much about them.  They are classes which implement the ServletContextListener interface, and they are instantiated with their default constructor during the webapp loading, in the same order as specified in the web.xml.

The . . . → Read More: ServletContextListener initialization issue

About classes

One thing many developers forget about OO design is the purpose of classes.

A class consists in the association of data structure and behaviour!  Many people forget the behaviour.

This is really important when defining class hierarchies and applying the Liskov Substitution Principle (LSP).

Behaviour is at least as important as data structure. But it becomes complicated to analyse . . . → Read More: About classes

When should method arguments be validated in Java?

Only during development and tests, as in later steps the code has already been tested and validated?
Always, even in production?

This was a debate I had with another developer at the YaJug (Luxembourg Java User Group).

My opinion is that they always have to be executed especially in production environments.  But wait: argument checks usually throw IllegalArgumentException, which . . . → Read More: When should method arguments be validated in Java?

About the right use of Java assertions

When should Java assertions be used?  Are these really important, as they are disabled in many production environments?  Well, there is no really simple answer and documentation is quite ambiguous.  I’ll give you my vision of the right use of assertions.

Assertions are mostly used in two typical cases:

For argument validity checks (sometimes this is very bad…);
To . . . → Read More: About the right use of Java assertions

About the right use of exceptions

This article explains how to choose the type of an exception in the Java language. . . . → Read More: About the right use of exceptions

Jazoon 2009, I’m coming!

Yesterday I went to the Yajug’s meeting (the Luxembourgian JUG).

There I won a 3-days free entrance ticket for the Jazoon 2009 event taking place in Zurich, Switzerland.  It’s a gift worth about 1200€.

I’m very happy about this and very thankful to the Yajug’s team.

The schedules for the event still aren’t available now – so I still . . . → Read More: Jazoon 2009, I’m coming!

HP OfficeJet 5610 Error 5012 or Error 12 on Linux

This is due to the fact that the user does not have access to the device.

Add the user to the group lp.
sudo chmod 664 /dev/bus/usb/001/004
sudo chown root:lp /dev/bus/usb/001/004

Bus/Device 001/004 identifies my printer on my system, to see how it is identified on yours, execute lsusb.

Log out and in again and that should . . . → Read More: HP OfficeJet 5610 Error 5012 or Error 12 on Linux

VirtualBox 2.1

If everyday of this new year is like the first, I’ll bet that 2009 is going to change a lot of habits in personal computing.

Today, I updated VirtualBox to the version 2.1.  I must say that I was much surprised when I read in the changelog that experimental support for OpenGL has been added to this . . . → Read More: VirtualBox 2.1

Object Mentor resources about software design

The following site contains a lot of interesting articles about good software design: . . . → Read More: Object Mentor resources about software design

Page 3 of 712345...Last »