2010/01/28

GWT 2 "Debugging and Compiling" FAQ missing

The GWT compiler has several options that can be used to customize the build process. There are two trivial ways to get the option list:
  • by running the com.google.gwt.dev.Compiler class without arguments
  • reading the Debugging and Compiling part of the offiicial documentation
I naively thought that the second would be easier but surprisingly it isn't :)

2010/01/13

Eclipse may freeze if console output is not limited

I have an application which continually generates a large amount of log. During development the log was written to the Eclipse console. In order not to lose any log output, I turned off the limit console output feature:



I started the application but I had to go away from my computer. When I got back I saw a message about memory is out, and it is recommended to restart the workbench. To tell the truth, I didn't have a choice: all functions of Eclipse became unusable.

It's very minor issue - and probably an expectable behaviour - but it's good to know that Eclipse takes this setting literally, and there is no protection against OutOfMemoryExceptions :).

2010/01/11

Experimenting with Datanucleus JPA

I have been using Hibernate for a very long time, and I'm more or less satisfied with it. When I saw that Google App Engine uses the JPA/JDO implementation of Datanucleus for high level persistence, I decided to create a sample JPA project with it.

Incremental average calculation

To calculate the average of some numbers, we can use the following simple formula:
It works in most cases, but let's suppose that we would like to know the average of a fast growing set of numbers.