Book review: "Tcl/Tk 8.5 Programming Cookbook"
Written by Wojciech Kocjan   
Recently I've been asked by Packt Publishing to read and review the new "Tcl/Tk 8.5 Programming Cookbook" book. You can find full review after the break: "Tcl/Tk 8.5 Programming Cookbook" aims to be a book introducing Tcl/Tk language and providing set of recipes for solving problems and implementing solutions. The author tries to explain Tcl in a way that both newbie and experienced programmers would understand it. However, range of problems mentioned in the book is far from what most people will come up with.

The book provides a good introduction to Tcl, Tcl shell and a typical "Hello world" example to get readers familiar with the basics and dive into Tcl. The book is also not a "rewrite of the manual", even though large part of the book covers options or flags that could otherwise be also found in Tcl/Tk documentation.

"Tcl/Tk 8.5 Programming Cookbook" provides examples that both novice and intermediate users should understand. Purpose and result of each example is clearly explained. All sections are also clearly separated and recipes tend to be self-sufficient and not depend on examples or code from earlier sections or chapters of the book.

Recipes are also created using a consistent style. They start off with a "How to do it" part which explains the goal. "How it works" section shows Tcl code to achieve the result. Finally, "There's more" shows additional information that points reader to additional features or commands to get familiar with.

Main downside of the book is that it shows Tcl a complex language - more difficult to learn than it actually is. Sections such as performing calculations or describing quoting, braces and brackets in Tcl were a bit confusing, despite the fact that entire Tcl syntax is contained within 11 clearly stated rules in its manual. To make things worse, the author tends to use wording inconsistent with Tcl manual - this can complicate things even more for a Tcl newbie.

"Tcl/Tk 8.5 Programming Cookbook" also has a few mistakes - such as putting "if" command in "looping" section. In some cases first examples were a bit too complex for a newbie - such as first recipe in "Error Handling" chapter, which also shows "double evaluation" issue. Personally I find the issue something difficult to explain and very specific to Tcl language - so anyone new to Tcl (both newbie and experienced programmer in general) will find the issue difficult to understand.

What I lacked most was that it does not mention TkCon at all. I personally find it one of the best ways to learn and explore Tcl - since it comes with ActiveTcl, is much easier to use than standard Tcl shell and makes prototyping code fun.

It also should mention more features of both core Tcl and some commonly used extensions. For example it does not mention networking, does not mention most GUI widget types and skips Windows specific features such as registry. Running child processes is only mentioned when describing "open" command, completely ignoring very powerful "exec" command.

The book could also mention some of commonly used extensions - such as tile for native GUIs (which are very important for new Windows versions and Mac OS X), expect which is commonly used to interact with programs and registry/twapi extensions for Windows specific tasks.

To sum things up - the book has its upsides and downsides, but in general is worth reading for a Tcl newcomer. The thing I like most is its clear and consise way of showing recipes, however the major downside is that too little areas of Tcl use is covered. I can give it a 3-star rating without any hesitation!

You can find the book here:
Amazon: http://www.amazon.com/Tcl-Tk-8-5-Programming-Cookbook/dp/1849512981/
Packt Publishing: http://www.amazon.com/Tcl-Tk-8-5-Programming-Cookbook/dp/1849512981/