Earlier thisweek I had a chance to talk with Anthony Scopatz and Katy Huff about their new book, Effective Computation in Physics .
JC : Thanks for giving me a copy of the book when we were at SciPy 2015. Its a nice book. Its about a lot more than computational physics.
KH : Right. If you think of it as physical science in general, thats the group were trying to target.
JC : Targeting physical science more than life science?
KH : Yes. You can see that more in the data structures we cover which are very float-based rather than things like strings and locations.
AS : To second that, Id say that all the examples are coming from the physical sciences. Thedeep examples, like in the parallelism chapter, are most relevant to physicists.
JC : Even in life sciences, theres a lot more than sequences of base pairs.
KH : Right. A lot of people have asked what chapters they should skip. Its probable that ecologists or social scientists are not going to be interested in the chapter about HDF5. But the rest of the book, more or less, could be useful to them.
JC : I was impressed that theres a lot of scattered stuff that you need to know that youve brought into one place. This would be a great book to hand a beginning grad student.
KH : That was a big motivation for writing the book. Anthonys a professor now and Im applying to be a professor and I cant spend all my time ramping students up to be useful researchers. Id rather say Heres a book. Its yours. Come to me if its not in the index.
JC : And theyd rather have a book that they could access any time than have to come to you. Are you thinking of doing a second edition as things change over time?
AS : Its on the table to do a second edition eventually. Katy and I will have the opportunity if the book is profitable and the material becomes out of date. OReilly could ask someone else to write a second edition, but they would ask us first.
JC : Presumably putting out a second edition would not be as much work as creating the first one.
KH : I sure hope not!
AS : Theres a lot of stuff thats not in this book. Greg Wilson jokingly asked us when Volume 2 would come out. There may be a need for a more intermediate book that extends the topics.
KH : And maybe targets languages other than Python where youre going to have to deal with configuring and building, installing and linking libraries, that kind of stuff. Id like to cover more of that, but Python doesnt have that problem!
JC : You may sell a lot of bookswhen the school year starts.
KH : Anthony and I both have plans for courses based around this book. Hopefully students will find it helpful.
JC : Maybe someone else is planning the same thing. It would be nice if they told you.
AS : A couple people have approached us about doing exactly that. Something Id like to see is for people teaching courses around it to pull their curriculum together.
JC : Is there a web site for the book, other than an errata page at the publisher?
KH : Sure, theres physics.codes . Anthony put that up.
JC : When did yall start writing the book?
AS : It was April or May last year when we finally started writing. There was a proposal cycle six or seven months before that. Katy and I were simultaneously talking to OReilly, so that worked out well.
KH : In a sense, the book process started for me in graduate school with The Hacker Within and Software Carpentry . A lot of the flows in the book come from the outlines ofHacker Within tutorials and Software Carpentry tutorials years ago.
AS : On that note, what happened for me, I took those tutorials and turned them into a masters course for AIMS, African Institute for Mathematical Sciences . At the end I thought it would be nice if this were a book. It didnt occur to me that there was a books worth of material until the end of the course at AIMS. I owe a great debt to AIMS in that way.
JC : Is there something else youd like to say about the book that we havent talked about?
KH : I think it would be a fun exercise for someone to try to determine which half of the chapters I wrote and which Anthony wrote. Maybe using some sort of clustering algorithm or pun detection. If anyone wants to do that sort of analysis, Id love to see if you guess right. Open competition. Free beer from Katy if you can figure out which half. We split the work in half, but its really mixed around. People who know us well will probably know that Anthonys chapters have a high density of puns.
AS : I think the main point that I would like to see come across is that the book is useful to a broader audience outside the physical sciences. Even for people who are not scientists themselves, its useful to describe the mindset of physical scientists to software developers or managers. That communication protocol kinda goes both ways, though I didnt expect that when we started out.
JC : I appreciate that its one book. Obviously it wont cover everything you need to know. But its not like heres a book on Linux, heres a book on git, here are several books on Python. And some of the material in here isnt in any book.
KH : Like licensing. Anthony had the idea to add the chapter on licensing. Weget asked all the time Which license do you use? And why? Its confusing, and you can get it really wrong.
* * *
Check out Effective Computation in Physics . Its about more than physics. Its a lot of what you need to know to get started with scientific computing in Python, all in one place.