Exploratory Programming for the Arts and Humanities
Exploratory Programming for the Arts and Humanities
Second Edition
Nick Montfort
The MIT Press
Cambridge, Massachusetts
London, England
2021 Nick Montfort
The open access edition of this work was made possible by generous funding from the MIT Libraries. This work is subject to a Creative Commons CC-BY-NC-SA license.
Subject to such license, all rights are reserved.
This book was set in ITC Stone Serif Std and ITC Stone Sans Std by New Best-set Typesetters Ltd.
Library of Congress Cataloging-in-Publication Data
Names: Montfort, Nick, author.
Title: Exploratory programming for the arts and humanities / Nick Montfort.
Description: Second edition. | Cambridge, Massachusetts : The MIT Press, [2021] | Includes bibliographical references and index. | Summary: "Exploratory Programming for the Arts and Humanities offers a course on programming without prerequisites. It covers both the essentials of computing and the main areas in which computing applies to the arts and humanities"Provided by publisher.
Identifiers: LCCN 2019059151 | ISBN 9780262044608 (hardcover)
Subjects: LCSH: Computer programming. | Digital humanities.
Classification: LCC QA76.6 .M664 2021 | DDC 005.1dc23
LC record available at https://lccn.loc.gov/2019059151
10 9 8 7 6 5 4 3 2 1
d_r0
[Contents]
[List of Figures]
Anaconda Nagivator.
Jupyter Notebook.
The first two code snippets.
A new piece of scratch paper.
The index of the first element of a list is 0.
There are iterative and recursive ways to see if a string is a palindrome.
Nested iteration is an easy way to visit each pixel in an image.
Interior pixels have eight neighbors.
Training a binary classifier defines a boundary.
Part-of-speech tagging associates tokens with grammatical categories.
[Acknowledgments]
First, my thanks go to everyone who has taught and encouraged exploratory programming, from at least the 1960s through today.
Many people discussed the concept of this book with me at different stages of the project. Some of these informal conversations were quite important to the final direction I took with the textfor instance, I learned that senior artists and researchers were interested in learning programming using a book of this sort. In response, I developed a book that could be used in a class or by independent learners and tried to improve both of these aspects of the book in the second edition.
In developing the first edition, I greatly appreciate the opportunity to do daylong and multiday workshops on exploratory programming in New York (at NYU), in Mexico City (at UAM-Cuajimalpa), and in the Boston area (at MIT). I also had the opportunity to teach an undergraduate/graduate course based directly on a late draft of the book in New York, at the New School, thanks to Anne Balsamo. My New School students were a great help to me as I worked to complete the first edition. Ive benefited from many experiences teaching programming, and also wish to thank my students in semester-long courses at MIT, the University of Pennsylvania, and the University of Baltimore. My thanks go to those at the New York City gallery Babycastles, where a good bit of work on this book was originally done, and particularly to those who helped out there by reading and commenting on parts of the manuscript as I completed it: Del, Emi, Frank, Justin, Lauren, Lee, Nitzan, Patrick, Stephanie, and Todd. As I was in the last stages of work on the first edition, I was able to teach a two-day course based on some of it for the School for Poetic Computation in New York City. I thank my students and those who ran the schools summer session for this opportunity. I have been fortunate to learn about programming and computing throughout my life in many contexts; an important one was at Penn, where I was particularly helped by Michael Kearns, Mitch Marcus, and the researchers at the Institute for Research in Cognitive Science.
My thanks go to several who reviewed the full text of this book in both of its editions. Erik Stayton went through the full first edition manuscript, commenting on it and correcting it, and also completed all the exercises. Patsy Baudoin provided detailed comments on a full draft of that manuscript. The second edition benefited from the close attention of Judy Heflin, who reviewed the text closely and also served as my teaching assistant when I used a draft of this edition. Todd Anderson did a technical edit of the book to help winnow out many mistakes that remained. My inestimable spouse, Flourish Klink, read and commented on the book and supported me in very many other ways as I worked on this project.
As I developed a draft of the second edition and began to refine it, I got to lead a months-long discussion about the draft book, and an in-person workshop based on it, with members of the Society for Spoken Art, and I greatly appreciate the opportunity to refine the book in this creative context. Thank you all, ITs of Full Circle. Thanks, too, to my students at MIT who were the first to use a full draft of the second edition in a regular classroom course: Andrea, Casey, Janina, JJ, and Meng Fu.
The conventional wisdom about a new edition of a textbook seems to be that its simply a ploy to milk more money out of students. It would be hard to accuse anyone of that this time around, because the second edition will be available both in a print format (which I believe is extremely well-suited to learning, and worth buying or borrowing from a library) and in a free, digital and screen-based open-access format. Thats due to the generosity of the MIT Libraries, which offered the financial support needed to make this edition freely available. Beyond that, the conventional wisdom is quite off the mark, as anyone who has worked on a substantial textbook revision like this one will know! I would like to thank everyone who reported errors in the first edition. I also want to give special thanks to two groups of people whose use of the first edition helped me get to this point. One is a group of faculty and staff at Trinity College in Hartford, CT, who undertook extensive study of the book; thanks to an invitation from Jason B. Jones, I was able to talk with the group and hear presentations about where their studies had led them. The other people who helped immensely were instructors who had used the first edition and could report how it worked (or didnt) in their particular class contexts. I particularly want to thank Angela Chang and Zach Whalen for extensive discussions of their teaching experiences.
The MIT Press of course arranged for anonymous reviewers to consider both the original proposal and the manuscript closely; I am grateful to these reviewers for their support of the project and for their valuable comments and suggestions. At the MIT Press, I also particularly would like to thank Doug Sery, who has discussed, worked on, and supported my book projects for more than a decade and a half now. I cant imagine having explored as many issues in digital media and creative computing, in the same breath and depth, without his backing over the years. I also appreciate the work MIT Press editor Kathy Caruso (who worked on three previous books of mine) did to improve the manuscript and ready the book for publication, in both editions. Any errors in the published text are of course my responsibility.
Next page