ALE

XANDER 

ZHIKUN HE

Home
Bio
Contact Me
Portfolio:
Programming
Miscellany

Programming > Java

Recursionless Hanoi: A Sonnet in Java

After seeing a recursive program that gave the solution the Tower of Hanoi math puzzle, I took it upon myself to attain the same result non-recursively. My professor's jaw dropped when I showed him my 14-line ''sonnet'' program. He said that he had never heard seen it solved non-recursively in less than three pages of code. (That this English major's first exposure to Java had been only two months prior may have also added to his amazement.)

You need Java to run this program. If you see this message for more than a few seconds, go to http://www.java.com/en/download/.

Java

My recent language of choice for my hobby projects, whether it be figuring out the optimum strategy for Blackjack or teaching myself how to read sheet music. While most are not in a web-friendly form (being made solely for my own amusement), here are a handful that are:

  • Recursionless Hanoi: A Sonnet in Java
    After seeing a recursive program that gave the solution the Tower of Hanoi math puzzle, I took it upon myself to attain the same result non-recursively. My professor's jaw dropped when I showed him my 14-line ''sonnet'' program. He said that he had never heard seen it solved non-recursively in less than three pages of code. (That this English major's first exposure to Java had been only two months prior may have also added to his amazement.)
  • AZH PaletteScaled image showing AZH Palette 0.9 as a preview
    Dissatisfied with typical color palettes of graphics programs which have either too much black or too much white, I made my own. While the original goal was to fit as many distinct colors as possible in a small area, it ended up being a work of art by its own merit.
  • Grimstock
    Based on the renaissance piece 'Grimstock' from John Playford's The English Dancing Master, the music recorded here was produced using Java. I wrote the simple program to guage my progress as I taught myself how to read sheet music--figuring that I passed the test when it actually sounded like Grimstock. (More details at Wikimedia.)

JavaScript

Well, examples of JavaScript are pretty much everywhere on this website. However, if you want a more blatant example:

  • Multi Pay Table HTML Generator for Keno and Lotto Games
    Keno games and lotteries often have multiple pay scales, which apply depending on how many numbers the player selects on the ticket. While online calculators for such games have existed since the dawn of JavaScript, they seem only to show just one table at a time--that is, until now. Not only can this script can generate as many tables as your computer can handle, it displays and updates all of them simutaneously and efficiently. Then, with the payouts entered, it can produce HTML for use on your own website.

Web Page Analyzed at WebSiteOptimation.com
Valid HTML 4.01 Transitional

Copyright © 2008-2015 by Alexander Zhikun He. All rights reserved.
1022 West River St., Milford, CT 06461