Thursday, September 16, 2010

Java Write Text into a Image

graph = image.getGraphics();

graph.setColor(aColor);
graph.setFont(aFont);
graph.drawString(text, x-position, y-position);

Friday, September 10, 2010

Some small consideration when design web applications

Sometimes I think to myself, what makes web application different from others? I find a real case when I review a real application.

This application has an edit page, on which user can select "Y" or "N" from a drop list. It also define keys for "Y" and "N" in a message properties file and this application is designed for English only.

I think there are at least two small places that the designer can do better.
  1. use radio button instead of drop down list, this saves one click.
  2. still put real messages in properties files but no need to treat a "Y"/"N" choice as a real message
The reason to put real messages in properties files even for an English only application is to allow business easily change those messages during the whole application life cycle. It will still be an application level change, but you would have much more confidence that a regression test will not be needed.