Puzzles and Computers


Calvin wanted to work with someone to combine a love of puzzles and a love of computers. Here are some ways to do that:

“Cryptogram.java”:http://www.cs.utsa.edu/~wagner/laws/Acryptogram.html are a really fun kind of puzzle. The simplest is the substitution cypher. One letter in English is translated directly into another. Writing a program to do this isn’t too hard as this site shows. You just need to have a Java compiler to use it. Of course this is just the source. To really use it, you have to know how to compile and run it on the Mac. Just the directions listed don’t work. (Of course, nothing is easy anymore, even though Java is supposed to be interpreted!)

“Hello World on the Mac”:http://bioportal.weizmann.ac.il/course/prog2/tutorial/getStarted/cupojava/mac.html. I learn to program everything just from figuring out how to print “hello world”. This probably comes from the dawn of time, but I learned it first when I learned C (I don’t want to tell you how many years ago, OK, 30, there you have it!) where the first program was literally printf(“hello world\n”). It is amazing how complicated folks have made it.

“DrJava”:http://www.cs.princeton.edu/introcs/11hello/mac.html. If Xcode is a little much at Princeton, they use a simplified development environment called Dr Java, this seems way simpler to me. It is only command line, but that is OK for kids really. Otherwise the user interface code is 10x more than the rest of it. As an aside, watch you, Java SE for Windows 6 Update 4 and 5 are incompatible with the exe file, you have to use .jar version of DrJava otherwise you get a strange, “no zip entry error message”

“Java SE”:http://java.sun.com/javase/. If you don’t have a Mac, you have to load Java on Windows first. This is not the standard Java runtime, but what is know as the Standard Edition that lets you compile Java programs. It is required by Dr. Java to compile and run Java.

“Anagram.java”:http://freespace.virgin.net/martin.mamo/fanagram.html. A little complicated, this takes any pile of characters and turns them into an anagram.

“Anagram Solver”:http://nifty.stanford.edu/2006/reges-anagrams/. Something from Stanford, but it includes recursion to solve a program.