I wrote a program a little while ago that draws a Hilbert Curve. Really all I did was adapt the Java source code that’s on the Wikipedia page talking about the curve. That Java source used a class called SimpleGraphics that I’m not familiar with. I wanted to use SDL in C++ for my program. It was easy enough to convert the Java code to C++ but to do the drawing I decided to just implement a SimpleGraphics class in C++ that uses SDL to perform the actions that the program needs.
Since then I revived my interest in integrating scripting with C++ and pulled a Lua interpreter in to that project. Now my program loads a Lua script and executes it. The Lua script has access to the SimpleGraphics class that I wrote. Now that the script interpreter works and can call the drawing methods I decided to take the algorithm for drawing the Hilbert curve and implement that as a Lua script. It was actually pretty easy. The resulting source code works as a sort of Rosetta stone for the three languages.
I took a little break today from the C++ and Lua stuff I've been doing to have a look at Google's new phone platform. I followed the installation instructions and had some demos up and running pretty quickly. I also grabbed the source and poked around to see whose shoulders they stand on.
I'd forgotten how much I like Java. I've been playing with Eclipse lately, so this inevitably leads down the path to Java development. Really Eclipse is the Swiss Army Knife of Integrated Development Environments. It's built with the same philosophy as Java. It's built with that same mindset that permeates the Java community. I'd sum it up with a simple maxim: Why should I create an object of type X then do all that work of customizing that one object when I can customize a subclass of X? If you don't know what I mean, I'm talking about the practice (and I think this is great) of subclassing, for example, JButton to make your own XyzButton. Then XyzButton has all the features you need in it. The other approach is to create a single instance of a JButton and do the specific work inside that object's code.