Wednesday, October 26, 2005

Museum Reservations

Our Italy trip would have been slightly better had we made reservations at some of the museums we went to (Uffizi, Accademia in Firenze).

Live Your Life

Today, Martin said: "If I lived as if I had two weeks to live, I'd have some big problems in about two weeks."

Friday, September 23, 2005

More Ascensions

More ascending this week.

Friday, June 10, 2005

Ascension

Muspel has ascended.

The fun thing about the Kingdom is thinking things like "time to equip the continuum transfunctioner".

Thursday, June 09, 2005

Friday, May 13, 2005

Happy Music - Joscho Stephan

Very happy.

EditPlus v. File Creation Capitalization - Resolved

I upgraded to EditPlus 2.12. Now files get created with appropriate capitalization.

Wednesday, May 11, 2005

Derby v. Locking

I added a little DB cleanup query to the end of the monitor-checking code. But it kept blowing up with a "couldn't get a lock" error. I fixed the problem by calling conn.setAutoCommit(true); on every connection.

Thursday, April 21, 2005

Cheating Faster

Replacing the scan with a binary search sped things up. A lot.

Wednesday, April 20, 2005

Cheating at Boggle

I wrote a little program that helps you cheat at Boggle. You enter the board and it gives you all the words in its dictionary file that are found on the board.

It's still not that fast, even though I don't generate all paths on the fly (I read the possible paths from a file). It seems like the slow part is looking up words in the dictionary. I should replace my (very slow) call to dictionary.contains with a binary search.

It's slow enough that it takes too long to get the longest words first! So I generate short words first and hope that by the time I've entered them, the cheater program has found the longer words.

Monday, April 18, 2005

Derby v. Memory

It seems like calling getConnection with a connect string that ended in ";shutdown=true" is a good way to get Derby to leak lots of memory. But only when running in Tomcat (on Solaris, if that's relevant). Calling getConnection to shut down Derby also takes about a second, which really adds up if you're trying to shut down Derby after every DB call, as I was.

Tuesday, April 12, 2005

OutOfMemory in Tomcat

I've been getting a few OutOfMemoryErrors in Tomcat. They seem to correlate to Derby queries. I tried increasing the start and max sizes in the JVM. It seems to get rid of the problem, but I suspect one of the Monitors is leaking memory.

Wednesday, April 06, 2005

Group By Substr in Derby

Derby doesn't let you do
select substr(some_column,1,10),count(*)
from some_table
group by substr(some_column,1,10)
But you can get the same result by doing
select short_version,count(*) from
(
select substr(some_column,1,10) as short_version
from some some_table
) a
group by short_version
Sam thought of this. The "a" is there as an alias name for the subselect. You don't have to use it, but if you don't put it in there, Derby rejects the SQL.

Tuesday, April 05, 2005

Another DOS Tip

Add a directory to your path (/mp/bin, for example). Fill it with little batch files that cd to directories you use for different projects and purposes.

DOS Tip

It's handy to map a "network" drive to a local drive. Like "net use m: \\mymachine\c$". Then you can use M: as an alias to C:. So you can do:

m:
cd some\long\directory\that\an\application\created
c:
copy m:.\somefile
instead of

c:
copy some\long\directory\that\an\application\created\somefile
Maybe the latter seems better to you, but I like the former. Maybe because I feel more comfortable typing a long directory name as part of a cd command than as part of a copy command. Less chance of something going wrong, or just too many times getting burned by a putty terminal whose "backspace" I didn't configure correctly.

Monday, April 04, 2005

Tomcat WAR Expansion Problem

Tomcat detected my new WAR files successfully, but it couldn't expand them fully. I'd end up with a [webappname] directory that only contained WEB-INF/lib/wlclient.jar file. Luckily, I didn't really need the WebLogic JARs (wlclient.jar and wljmsclient.jar), because when I removed them from the WAR, Tomcat was able to unzip it no problem.

I'm learning that Tomcat and WebLogic don't get along.

Unnecessary JAXB Rebuilds

I was getting some unnecessary JAXB rebuilds. The problem was an old generated Java file under gen-src. The solution was running "ant clean" to get rid of the file. Subsequent rebuilds (after the first) detected "files up-to-date" correctly, saving precious seconds.

Friday, April 01, 2005

EditPlus v. Capital Letters

Why, oh why, when I type "editplus MyFile.txt", does EditPlus create "myfile.txt"?

Tomcat v. Vitria Queue Client

My simple Vitria BW queue client wouldn't run inside Tomcat's servlet container. It hung on "ChanFlowLib.resolveQueue(somequeuename)". So I created a tiny Java server that listens for queue names and returns queue info (just queue size). A little hacky. I wonder whether Tomcat in Solaris'll have the same problem.

xs:extension

The elements you add in XSD extensions go after the elements in the extended complex type. So if your XSD looks like:

<xs:complexType>
<xs:sequence>
<xs:element name="BaseElement" type="xs:string/>
</xs:sequence>
</xs:complexType>

<xs:element name="TheExtension">
<xs:complexType>
<xs:complexContent>
<xs:extension base="MonitorConfig">
<xs:sequence>
<xs:element name="ExtensionElement" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>

then valid XML would look like this:

<TheExtension>
<BaseElement>somevalue</BaseElement>
<ExtensionElement>someothervalue</ExtensionElement>
</TheExtension>

The extension definition looks unnecessarily complicated, but both complexType and complexContent are necessary (at least for the JAXB compiler).

LEM & LNC

We can combine the Law of the Excluded Middle and the Law of Non-Contradiction to produce:
  • exactly one of {a statement and its contradiction} is true and exactly one is false
But I'm reluctant to call this a "Law". It's the distillation of lots of experience with statements, but I don't see how that experience with many (many!) individual statements can justify a universal claim.

LEM

The Law of the Excluded Middle is:
  • the claim that at least one of {a statement and its contradiction} is true
  • a way of rejecting statements based on their form
  • the encapsulation of many people's experience with statements

LNC

The Law of Non-Contradiction is:
  • the claim that at most one of {a statement and its contradiction} is true
  • a way of rejecting statements based on their form
  • the encapsulation of many people's experience with statements