Tag: Java

Property of Properties

I was looking at a problem in the early chapters of Artificial Intelligence: A Modern Approach. It’s called Vacuum World. This is a very simple agent problem consisting of a vacuum placed on a grid. The grid has only two squares, each of which is either dirty or clean. The vacuum has three actions: move…

Read the full article

Loggerheadache

I decide to play around with the Java logging facility. I write a simple test program: import java.util.logging.*; public class LoggingTest { public static void main(String[] args) { Logger log = Logger.getLogger(“com.stuartsierra”); log.entering(“LoggingTest”, “main”); log.info(“Info Message”); log.warning(“Warning Message”); log.exiting(“LoggingTest”, “main”); } } Compile, run, and I get this: Aug 30, 2006 10:48:45 AM LoggingTest main…

Read the full article

The Naming of Namespaces

Or, How the Lisp-n Shall Inherit the Earth Humans like to name things. Like ourselves, Homo sapiens, Latin for “Primate that has taken leave of its senses.” Then there are engineers. Engineers like to name things too. Like SCSI, pronounced “scuzzy.” Or WYSIWYG, pronounced “wizzy-wig.” Or TTY, pronounced (I couldn’t believe this at first) “titty.”…

Read the full article

Permutations of Iteration

Ah, the loop, so fundamental to programming it’s hard to imagine a single program without one. After all, what’s the use of calculating just one thing? Usually you have a big pile of things you want to calculate, which is why you need a computer in the first place. I think one of the quickest…

Read the full article

Broken Binary Searches Oh My!

So it turns out that nearly every binary search algorithm is broken. Why? Fixed-sized integers, a holdover from machine programming that still lingers in supposedly modern languages like Java. LtU’ers are haggling to decide if it’s a type error, a bad data structure, a language defect, a failure of correctness proofs, or just a bug.…

Read the full article