Search |
||
In praise of the one-evening-hackPosted by bsandersen on July 13, 2005 at 2:55 PM PDT
The Boston Globe gets delivered to my door every morning. If I do take a look at it before heading to work in the morning, I'll turn to the pages that give me the perspective I need in today's hard-hitting world: the funny pages. On this page are the things I cherish most before my daily dose of oatmeal: Dilbert, the chess puzzle, For Better or Worse, Foxtrot, and the rest of the gang. I was met Monday with a shock to the system, though. The Globe reorganized the paper collecting all the "lighter" stuff into a section called Sidekick which now includes the comics, TV and movie listings, and the daily puzzles. A new addition thrown into the mix is sudoku, a numerical puzzle that caught my eye immediately. Sudoku is a 9x9 grid with 9 3x3 grids marked within. This grid is sparsely populated with numbers. The puzzle is solved when you fill the grid with digits 1-9 such that each row, each column, and each 3x3 sub-grid has the digits 1 through 9 appearing once-and-only-once. Last night, during the All Star Game, I sat with my feet up in the recliner and worked one of the puzzles. Interesting! That was fun. I then had a thought: how hard would it be to write a hack to solve this? In the very early days of the PC, there used to be a bunch of small BASIC programs that would make the rounds doing this or that. BASIC was the lingua franca of the day because it was buried into the ROMs of lots of machines of that time. And, though everybody's BASIC was a bit different, it was pretty easy to port a clever program from one version to another. Today, we shouldn't have that porting problem: Java is Java is Java no matter where you run it. Remember the "write once, run anywhere" mantra? So, why not do the hack in Java? I did. You can find it here. There is something very restful about doing the one-evening-hack. First, you do it only for yourself. Sure, you might share it (as I'm doing here), but that isn't the reason for doing it. You do it for the enjoyment of doing it! There are some implicit rules for the one-evening-hack:
I've posted the little hack. Try one of those puzzles if you get a chance. And, if somebody wants to do a nicer solver for these puzzles, of course I'm interested. In the mean time, if your soul feels empty, try the one-evening-hack. And may it bring you the joy my little hack gave me! »
Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|