Tag Archives: Java

Dependency Management First-Aid Kit

This article attempts to unravel some of the mysteries of dependency management with Maven and Maven-based tools. Help, something’s missing! Say you have a project named “my-new-project” which declares a dependency on version 3 of the “awesome-sauce” library by the … Continue reading

Posted in Programming | Tagged , , , | 2 Comments

Single Abstract Method Macro

John Rose’s article, Scheme in One Class, introduced me to the notion of Single Abstract Method, or SAM, classes. One of the proposed APIs for JSR-292 allows a MethodHandle (the Java version of a closure) to be cast to any … Continue reading

Posted in Programming | Tagged , | Leave a comment

Generating Clojure from an Ontology

I’ve been fascinated with RDF for years, but I always end up frustrated when I try to use it. How do you read/write/manipulate RDF data in code? Sure, there are lots of libraries, but they all represent RDF data as … Continue reading

Posted in Programming | Tagged , , , | 4 Comments

It’s About the Platform

I’ve said It’s About the Libraries, and indeed, one of the major selling points of Clojure is that it can call Java libraries directly. But there’s more to it than that.  Libraries are just one benefit to building Clojure on … Continue reading

Posted in Programming | Tagged , , | 1 Comment

Stop Your Java SAX Parser from Downloading DTDs

Back in February, in a slightly plaintive post, the W3 sysadmins asked that people stop hammering their servers with requests for XHTML DTDs. Everyone said yes, this is a stupid problem that wouldn’t have happened if a) the XML spec … Continue reading

Posted in Programming | Tagged , , , | 4 Comments

Calling Java Constructors with this()

The things I don’t know about Java… could fill a book. Here’s a new one, from the Hadoop sources: public ArrayWritable(Class valueClass) { // … } public ArrayWritable(Class valueClass, Writable[] values) { this(valueClass); this.values = values; } The second constructor … Continue reading

Posted in Programming | Tagged | Leave a comment

Not So Slow

Perhaps I was premature worrying about how slow Ruby is. John Wiseman was benchmarking Montezuma, his Common Lisp port of Ferret/Lucene, and found out in the process that Ferret is 10 times faster than Java Lucene! As he says, Ferret … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Who Needs Data Structures?

Ran across an interesting remark in a discussion of Microsoft hiring interviews: If I remember, a lot of MIT people back in the 70s broke the computer world into the Lisp and non-Lisp data typers. The Lisp folk took a … Continue reading

Posted in Programming | Tagged , | 2 Comments

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 … Continue reading

Posted in Programming | Tagged , | Leave a comment

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”); … Continue reading

Posted in Programming | Tagged | 2 Comments