Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X

Some of my cohorts in development are using the Hibernate object/relational mapping software with decent success.

And although this must seem trivial to most people, last night I found the LaTeX "strikethrough" (strikeout) capability I've been looking for. Just use the "sout" tag in the "ulem" package. I don't know why that had to be so hard to find (arghhh).

Here's a list of installer/installation programs that I've seen for installing Java applications:

FWIW, InstallAnywhere seems to dominate the market, but seeing that it's not exactly free, the others might be worth a look.


I've learned something about myself the last few weeks that maybe I didn't know before. While I don't like being tired, these last few weeks have been very trying, with long hours and hard work. The thing that I've learned is that this actually helps me to settle down, and focus on one thing at a time.

I've included the source code for a Stopwatch class here so I won't lose it. It's a good class for benchmarking the performance of certain operations in your code.

I think I found the Java Stopwatch class (shown below) in a book named Java Platform Performance. You can use the class for general performance timings, or make it part of an overall benchmarking system.

I take no credit for this Java code -- I didn't write it, and at the moment I can't find that book -- but I found it on my laptop, and wanted to make sure I have a copy of it laying around for when I need it.

Ahh, Cinco de Mayo, always a good reason for a margarita at OTB ...

In other news, here's a link to a guy that's crazier than I am. He has posted a page with a bunch of sed commands and command options. Although the examples weren't exactly what I needed, I was able to pull enough from his command examples to get some stuff going. FWIW, I was specifically looking for a command that would let me grab a pattern during the "search", and let me use that pattern during the "replace".


I just started working with a product named yGuard. yGuard is a Java obfuscator that can also be built into your Ant build process. My initial experiment using it in an Ant build process has been very successful. I haven't tried decompiling my class files yet, but I can see that several/many of the class files have been renamed, and the app runs fine from the obfuscated Jar file.


Here's a link to a sample 242-page requirements document. This is a real world example, full of use cases, requirements, and a few other things.

The following three links are web site references from Joel Spolsky's book "User Interface Design for Programmers".

Another link I want to remember is I found some useful info here the other day on Windows XP shortcuts.


A co-worked gave me this URL today for low-cost magazine subscriptions. As much as I like to read (and save money) this could be a lot of fun.

Yahoo keeps a list of Mutual funds that are sorted by several categories, including one that I'm most interested in: Mutual funds ranked by top performers.

LaTeX question: For a technical document I'm creating with LaTeX, there are a lot of sections that have a repeated/consistent format. This is exactly what I want, but for a 160 page document, I ended up with a 15-page table of contents (TOC). Is there are way to control the "depth" of the table of contents?

After a little research ... yes, I can. Here's some sample code that I put in the LaTeX preamble, just before the \tablofcontents tag:

After days of deep requirements documents and use cases, here's a LaTeX FAQ that was most useful: The UK List of TeX FAQs. (Cheers)

Here is a brief list of UML-related products for the Java environment. Some may work with IntelliJ or JBuilder ... I'm about to find out. My *real* interest here, however, is in reverse-engineering source code into sequence diagrams.

I got back to working on my anti-spam program again two nights ago. I included a lesson learned on the growth of a software application here.

It's interesting how, when a software program grows, it may not evolve exactly as it should.

I was working on my anti-spam program two nights ago, and I noticed it had this growth problem. When I first starting creating the program it was supposed to mark email messages w/ varying levels of suspicion, kind of a Bayesian algorithm. But, in practice, I found that this wan't really necessary; a message was either spam, or it wasn't.

However, as my program grew I ended up leaving code in it like this:

Linux sed FAQ: How can I use the sed command to modify many files at one time?

Here's a Linux/Unix sed command file that I just used to modify a bunch of files:


I put those three lines in a text file named sed.cmds.

After that, I call that sed script from a simple shell script. Here are the contents of the shell script:

One of my co-workers told me about a cool Alphaworks project that can analyze the structure of a Java project, and report interesting structural metrics/stats. I just found the project; it's named "Structural Analysis for Java".

I don't know of any direct commands to do this, but this cat command works:

cat /etc/redhat-release

You can also take a look at the uname command, which can provide a lot of Linux version information.