Programming Sudoku, a book review

Programming Sudoku - Wei-Meng Lee

ISBN: 1-59059-662-5

 

I’ve been a fan of sudoku for some time now, and have, since playing it the first time, been very interested in writing my own version for the .NETCF. I’ve been looking for a good reference on the subject for some time now. While at the South Carolina Code Camp 2.0 (I was a speaker on .NETCF game development), I saw this book (Apress sent it as giveaway…thanks for that), and flipped through a few pages. I was very impressed, so much in fact that I came home and ordered a copy via Amazon.

 

I was overall very pleased with this book. The first chapter was about sudoku, and the rules. The next ones were on building an interface on which to play and build. Later, it adds chapters on solving and puzzle generation. He included some excellent techniques I had never thought of using, like the Stack data type for tracking moves for redo/undo. His code, on a pure basis, is very clean and concise. I’ve adopted some of his basic approaches myself.

 

However, once I started reviewing it, I was a bit disappointed because the author really didn’t explain some key parts. For example, he uses a calculation to determine which sub-grid on the main grid a particular control exists (he uses label controls on his playing surface), but doesn’t give any explanation on why it works. It would have been an added bonus if he had. He also uses a string pattern to determine which numbers still exist in a row, column, or sub-grid. This approach was pretty slick, but he didn’t explain it. A beginner would likely be lost, and most definitely frustrated.  Being completely honest, for the first half of the book, I could have just downloaded the source code and learned as much as the book taught me…other than the rules, of course.

 

Once I got into the puzzle-solving and game generation stuff, I was much happier because he goes into much more detail. The second half of this book is exactly what I wanted it for, and what anyone who wants to write a version of this wants to see. This book provides great examples and succinct explanations on how to generate a sudoku game yourself.  Perhaps his thought was to rush through the hardcore coding part (the interface) and get to the true sudoku portion of the game. I couldn’t say, but it would have been a little nicer if he hadn’t rushed.

 

Ultimately, this is a good book from which you can learn a lot about sudoku. However, don’t expect to get the most out of it that you could if you are beginner.

Mercury Support does it again

First, let me tell you that I am not someone who uses support very much. Years ago, I worked in a cell center supporting a software product. I used to grouse that the larger percentage of those people to whom I talked weren't very savvy (read as: seemed to be idiots), it drove me nuts. That said, I did talk occassionally to someone with some skills who tried all the easy stuff first, and I honestly loved those calls. Fun to figure out, like a puzzle. I never minded the time to help someone who at least attempted to help themselves. As a result of my experience, I try hard to be one of this smaller, latter group.

So, I wasn't as upset as some folks were when the rewards program was taken away. I didn't get my Mercury branded wheelie bag, but hey, no biggie (I did get coupla shirts and a USB hub...yay, me!). And no, I wasn't one of those “me, too!” people who posted for points. There has been a recent buzz on the forums lately that the loss of expert traffic on the forums has hurt the effectiveness of that service. I tend to agree; few experts go there anymore.

In light of this, Mercury has made a rather questionable move: they will no longer take support calls to resolve issues! All service requests must be submitted via the web “in order to be more efficient”. I've tried communicating with them via the web; it's an exercise in frustration. I hope they improve the quality of the experience. Supposedly, once the issue is submitted, they will use all forms of communication, including telephone, to resolve the issues. Yeah, right....don't hold yer breath.

I don't mean to come down hard on Mercury, but I just don't get these changes in their policy.

«October»
SunMonTueWedThuFriSat
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234