A couple weeks ago, I wanted to start playing around with the python curses module, but it’s been almost forever since I’ve done anything with curses. So, for a bit of a refresher course, I picked up Dan Gookin’s Programmer’s Guide to nCurses (note this book covers the C API, not the python API).
I was actually very surprised at how good of an introduction Dan’s book is. His laid back style of writing helps keep the reader entertained, and his short code snippets make for succinct examples that get right to the point without losing the reader in pages of boilerplate. The book itself is a fairly quick read too; although it officially weighs in at 556 pages, the last 300 pages or so is a reference manual for the nCurses API.
I honestly didn’t have too many problems with the book, other than the occasional typo (including an off-by-one error in the code on p. 177). However, I would warn the reader that I had some issues with a few of Dan’s examples. First, in many of the examples, the error handlers are missing a getch() call, which causes the program to immediately exit when an error occurs without pausing to let you see the errors. Also, in Chapter 8, some of the examples involving wrefresh() wouldn’t work for me unless a call was made to refresh() beforehand (but after that call was made once, all the wrefresh() calls worked after that). Not sure if this is an issue with nCurses or with my system, so YMMV.
I would definitely recommend this book to anyone who is looking to become familiar with the nCurses API. Although the book doesn’t cover more advanced topics, like best practices for designing and building full-fledged nCurses applications, it still makes for a very good starting point.
My Rating: 4/5 stars.
This entry was posted on Thursday, August 28th, 2008 at 5:47 pm and is filed under General. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply