I just got a notice that the 2nd Edition of Icon Programming for Humanists (PDF) by Alan D. Corré has been up (and its free). This has been made available by Jeffery Books who will also sell you a paperback copy. Donations go to promoting Icon and Unicon programming languages and systems.
I read Icon Programming for Humanists ages ago. It was one of the few how-to-program books that were aimed at humanists with text manipulation examples. I thought the book excellent and was only held back because I couldn’t find an Icon interpreter for the Mac when I looked.
This edition has 2 new chapters that deal with Unicode (so you can analyze texts in different languages), and Markup (so you can work with TEI encoded texts.)
There is a recurring issue that crops up as to whether we should be teaching humanities students to program or just to use tools. CorrĂ©’s book would make a good textbook for teaching programming.