JUnit vs. TestNG

December 7th, 2007

The problem: We have several XML transformations, which we want to test with several inputs each. The tests are done by running the transformation on a source XML file and comparing the result with an expected XML file (using XMLUnit’s Diff class). These XMLs are stored in directories in the file system, where each such directory contains the input file, the expected result and info of which transformation to use them against.

I want each directory to be treated as a separate unit test, but I don’t want to actually write a separate test method for that. Thus the XML test will be well integrated with the rest of the unit test of the system and I don’t have to develop separate reports and other management stuff for them.

I couldn’t find anything like that for JUnit, other than the advise to read JUnit’s source code and try to figure out where to hook my changes. But I also found this blog entry, discussing JUnit extensions. Yes, I know, his needs were different than mine. Anyway, I decided to give TestNG a try, because I’ve also considered it before for a different project. And guess what I found! They have a nice little feature, called “factories,” which allow you to dynamically generate test cases. Just what I needed.

There are TestNG plugins for various IDEs, including Eclipse, and it is supported by Maven. So, it seems TestNG is the right answer for this situation.

Paul Graham predicted iPhone?

December 3rd, 2007

I was rereading the essay “The Other Road Ahead” from “Hackers & Painters” and I was quite surprised by the following note (it’s number 14):

If the Mac was so great, why did it lose? Cost, again. Microsoft concentrated on the software business and unleashed a swarm of cheap component suppliers on Apple hardware. It did not help, either that suits took over during a critical period. (And it hasn’t lost yet. If Apple were to grow the iPod into a cell phone with a web browser, Microsoft would be in big trouble.)

This was back in 2004, mind you! And Apple announced iPhone in January 2007. “The Other Road Ahead” was originally published in September 2001, and is missing the part between the parentheses, but it turned out that Apple announced iPod one month later.

Most impressive.

Getting “Getting Things Done” — Done!

October 4th, 2007

Finally the book arrived and it looks very promising. I read a few pages already and I like the style. I also found GTDInbox, which is a Firefox extension, that integrates GTD methodology with GMail.

Common Lisp Tutorial

September 20th, 2007

Peter Siebel points out the fact that googling for “common lisp tutorial” gives poor results. I hope that this post will help a bit in improving the situation, because I think Practical Common Lisp is the best introduction to Lisp.

Update
It’s now up to 3rd place! Not bad.

EA releases unprotected game. Pirates lock it with a “zero day” crack!

April 1st, 2007

In a stunning move, yesterday EA officially released the shining new FIFA’08 with state of the art copy protection missing, in the hopes of catching the cracker community off-guard. A member of a well known cracker group was quoted to say that “[they] expected the worst,” but nevertheless they’ve released an “official” zero-day crack.

EA spokesmen refused to comment these events.

Save the Bulgarian Medics in Libya

December 31st, 2006

Six innocent people are sentenced to dead in Libya! The five Bulgarian nurses and the Palestinian doctor are accused of deliberately infecting more than 400 Libyan children with the AIDS virus and the death sentence was recently reconfirmed by the Libyan high court.

There are multiple proofs by independent experts that these children were already infected before our medics start working there, but these were dismissed in favor of confessions obtained by torture.

I’m supporting this (and others) campaigns for whatever good they bring.

First rule of Emacs-related blog: don’t talk about emacs

December 4th, 2006

Second rule of Emacs-related blog: don’t talk about emacs.

Let’s see if anybody brakes them on Planet Emacsen.

Planet Emacsen

November 30th, 2006

Just stumbled on Planet Emacsen. At last, there is an aggregation for Emacs-related blogs. Currently it doesn’t seem to filter emacs unrelated posts, but I guess that will happen over time.

SBCL 1.0 Released!

November 30th, 2006

Today, the SBCL team released the long awaited version 1.0. Besides the bugfixes, this version introduces several interesting optimizations:

  • method calls with &OPTIONAL or &KEY arguments are faster and don’t cause extra consing
  • MAP and MAP-INTO are significantly faster on vectors whose elements types have been declared.
  • Improvements to SB-SPROF:
    • Support for allocation profiling
    • Reduced profiling overhead, especially for long profiling runs

There are also improvements to the Windows port.

Great work! Congratulations, guys.

“Organized” is my middle name. “Poorly” is my first.

June 2nd, 2006

This quote from a Garfield comics is a pretty accurate description of my organization problems. I periodically try to do something about this, which is to use some tool to organize. I’ve tried several things, including Palm IIIc (I hadn’t used it for quite awhile, by the time it got stolen), KOrganizer, Evolution, an old Sharp Zaurus, Planner–the Emacs mode, and several on-line organizers. Not surprisingly, none of these helped very much. Part of the problem is, that none of these is 100% of the time with me: the PDAs are a bit large, especially when in summer outfit; and contrary to what my wife believes, I’m not on-line 24/7.

The more important reason is, that tools can only help you so much. One needs some method and a bit of discipline to follow it. And I just read an article titled “Getting Things Done” (via Planet Lisp), which lead me to want to read the book and probably use its principles.

I don’t have the book, but I the description in Wikipedia and the links from there give some information to start with. The Hipster PDA seems like a good idea, too, though I’ll probably try using Gmail first.