E2: The (NP-Complete) Kids’ Game with the $2 Million Prize

The Eternity 2 (E2) puzzle has attracted the attention of puzzle fanatics, computer programmers, and mathematicians for many reasons, not the least of which is the $2 million prize for being the first to solve it. E2 is an edge-matching puzzle with 256 pieces. The general class of edge-matching puzzles is known to be NP-Complete, but it is unknown if there are aspects of E2 that can be exploited to make it tractable. In the spirit of cooperation, a few people have made their automated solvers available online, and I have provided an overview and back-of-the-napkin analysis of two of them. Read the rest of this entry »

The Top 9½ In a Hacker’s Bookshelf

Every hacker should have a good solid dead tree library to draw ideas from and use as reference material. This list has a bit of everything - textbooks you will encounter at top tier computer science universities, books giving insight into the industry, and references you shouldn’t be caught without. It is a list of hackers’ classics. Read the rest of this entry »

Sweet Hacks - Vol I

A sweet hack can be a clever piece of code, an innovative way of solving a technical problem, or just a cool use of technology. I put together a list of 5 hacks that I think are really sweet.

I am making Sweet Hacks a regular series here at GrokCode, turning it into a blog carnival that runs every three months. If you would like to nominate your own sweet hack for the next issue, send an email to jess [AT] grok-code.com with a short description of the hack and a link. Or if you are a del.icio.us user, tag the page “for:grokcode” to put it into my “links for you section.” Read the rest of this entry »

How to Write Original Jokes (Or Have A Computer Do It For You)

This is a Common Lisp code walkthrough for generating original jokes. You seed the generator with the knowledge about different objects, and it uses that vocabulary to generate unique jokes. All of the jokes are of the form: “What do you get when you cross X with Y?” This code was originally written for my CS288: An AI Approach to Natural Language Processing class at UC Berkeley in 2004. Read the rest of this entry »

J2EE Application Environment Optimization Checklist

Optimizing J2EE applications is hard. Even if all of your algorithms have been analyzed in big-O notation and finely tuned, you can have abysmal performance due to a poorly configured environment. J2EE applications depend on many lower layers which all must be properly optimized in order to give good overall performance. This page gives a checklist of optimization tips organized by layer. It includes optimizations for the HTTP Server, Application Server, Java frameworks, database, and the application itself. This page isn’t intended to be a comprehensive optimization guide; it is a checklist of the most effective optimizations I have found that can be applied in most situations. This checklist is a good place to start before more focused optimizations - and you may even find that nothing more is required.
Read the rest of this entry »