I didn’t see the opportunity. Do you? Black to move and win material.

Chess puzzle #15 (medium)
July 19th, 2008Glassfish: WebService in Session EJB
July 13th, 2008I just got the strangest error message when trying to use a stateless session EJB as a WebService in Glassfish v2 u1:
[#2008-07-13T16:41:25.366+0200 SEVERE sun-appserver-pe9.0 javax.enterprise.system.tools.deployment _ThreadID=12 _ThreadName=Thread-31 _RequestID=d816d64c-543d-47ac-b339-2231f346754e Exception occured in J2EEC Phase com.sun.enterprise.deployment.backend.IASDeploymentException at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1817) at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2089) at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:328) at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:200) at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:129) at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169) at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95) at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739) at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174) at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210) #]
Apparently there is a problem in this Glassfish version that prevents it from showing the proper Exception as JAX-WS reports it. The verifier only barfed random shit at me, too.
I updated to the lastest Glassfish to get a better error message, but then it even worked without an error. Strange days.
VMWare asynchronous TSCs on Opteron
July 5th, 2008A rare VMWare error message is this one, occuring when the virtual machine is being launched:

Your host does not have synchronized TSCs. Please read VMware Knowledge Base article 2041.
When that error message pops up it is likely that all sorts of time-related things will go wrong in the guest system: Video playback, audio for the video, double-clicks.
An example environment where this can occur:
- Host system Windows XP
- CPU AMD Opteron for socket 939 (175, 180, 185, 190)
- Certain drivers, such as those installed by MSI Live Monitor (AMD CPU Driver 1.3.2.16?)
Fix
I fixed the problem by adding these lines on the bottom of the .vmx file:
processor0.use = TRUE processor1.use = FALSE host.noTSC = "TRUE" ptsc.noTSC = "TRUE" host.TSC.noForceSync = "TRUE"
That way the guest system only has a single core CPU and only one core of the Opteron helps to emulate it, but that seems to be the only disadvantage.
Whizlabs vs. Enthuware
July 4th, 2008I bought several exam simulators for mock exams:
- The one for SCJP 5.0 (CX-310-055) from Whizlabs
- The one for SCWCD 1.4 (CX-310-081) from Whizlabs
- The one for SCBCD 1.3 (CX-310-090) from Whizlabs
- The one for SCDJWS (CX-310-220) from Whizlabs
- The one for SCEA (CX-310-051) from Whizlabs
- More recently: The one for SCBCD 5.0 from Enthuware
License
Enthuware uses a pretty normal end user software license, while Whizlabs plagues the user with a complicated activation procedure, only to limit the use to three CPUs! So when the user upgrades the CPU or gets a new computer, the license is lost. The three CPUs for which it works have to be chosen within 6 months after the purchase. That makes it pretty much useless for what I bought it, which is to keep my knowledge about topics that I currently don’t need at work up to date. Whizlabs simulators cannot be used for that. This is not much of an issue when the user wants to learn for a certificate and will never need the simulator again afterwards.
Learning process, repetition scheme
Whizlabs simulators have certain features which try to adept to the user (“adaptive testing”). As far as I know they do not follow proven methods from the field of education science, though.
Enthuware’s direct support for such features is limited. However, its comment system provides great flexibility for custom systems. My article Effective Enthuware describes how to use the Leitner System in the Enthuware Test Studio. That is the system for this type of learning.
Supported Platforms
Enthuware Test Studio requires JRE 5.0. The Whizlabs simulators support all common Microsoft Windows versions.
Errata
Enthuware Test Studio provides a direct link to the Enthuware forum post in which that question is being discussed. That can be helpful to find out if the proposed answer is incorrect, but recently I was usually the first one to check that out, so there were no other comments about that question.
Useability
Whizlabs has a Flash based GUI. It works well, but most things must be done with the mouse.
Enthuware uses the common key and mouse bindings for GUIs (Swing with system’s default L&F).
Price
For most exams the Whizlabs products are a little more expensive than the Enthuware products. For example Whizlabs SCBCD 5.0 Preparation Kit for USD 74.95, Enthuware EJB+ Full Version for USD 29.00.
Question Quality
The big unknown. I do not know anything about a conclusive study regarding the question qualities. They are both at least okay.
Question Quantity
Untransparent for Whizlabs products, and varies from product to product.
Conclusion
I recommend the Enthuware products. The knock-out arguments are the license and the Leitner System support. A really nice objective test from a huge organisation would help, like the tests we have for cars and such, a test which would also examine question quality and study time / exam result ratio. But this market is just too small, so you have to do with subjective reports like mine.
See also the Effective Enthuware article.
Chess puzzle #3 (medium)
July 2nd, 2008I (black) felt that there was a way to get out of this alive and with even material, after I accepted the sacrifice of Chessmaster Grandmaster Edition (white) and ended up in this situation. So I used up all my time to think myself out of it … and still failed.
Do you see a way out? It is possible.

Solution: show
Something in the general line of 1. … c4 2. Qxc4 Be6 3. Qb3 Nxf4 4. Qxb7+ could also work.
The key is to see that … Qxb7 and … Qxa8 is not such a big thread, because there is a potential trap against the white queen. As a consequence, the light bishop can be activated.
Chess puzzle #9 (easy)
June 30th, 2008Chess puzzle #12 (easy)
June 30th, 2008vjoe (white) made a mistake here. How could I (black) have won material?

Solution: show
Chess puzzle #10 (easy)
June 30th, 2008I (black) made a mistake in a game against vjoe (white) here.

White to move and win material.
Solution: show
Chess puzzle #7 (easy)
June 30th, 2008Ignore my IP in AWStats
June 29th, 2008I use AWStats to get statistical usage information about my websites. The problem is that for less important websites like my private one I often test and develop directly on the production system. That creates many garbage entries in the HTTP log.
AWStats has the option SkipHosts for the configuration file, but my IP changes all the time.
So what I did was this:
Modify awstats.pl
... if ($param =~ /^SkipHosts/) { @SkipHosts=(); #foreach my $elem (split(/\s+/,$value)) { # if ($elem =~ /^REGEX\[(.*)\]$/i) { $elem=$1; } # else { $elem='^'.quotemeta($elem).'$'; } # if ($elem) { push @SkipHosts, qr/$elem/i; } #} #### my $ips="/home/whoever/ips.txt"; open(DAT, $ips) || die("can't open ip list"); my @lines=<DAT>; close(DAT); foreach my $line (@lines) { chop($line); my $esc='^'.quotemeta($line).'$'; push @SkipHosts, qr/$esc/i; } #### next; } ...
(You may want to keep the old code which I commented out and concatenate it with your values for @SkipHosts.)
Log my IPs
How that can be done depends on the situation. In my case I can safely assume that I have logged in to the web server over ssh with most IPs that I would use, so I added this to the .bash_profile:
echo $SSH_CLIENT | egrep -i -o '([[:digit:]]+\.){3}[[:digit:]]+' >> ips.txt
Hope it helps someone.

