2014 Book Roundup

As I write these words, the end of the year is approaching, and with it, so is the time for my annual book roundup. As in past years, in this article, I describe books that were new to me during the past 12 months, which means that I might well mention some new ones or ignore others that simply didn't come to my attention. My interests (professionally, and for this column) generally are relevant to people involved in Web development using open-source technologies, but I admit to veering into other subjects occasionally. And as I have done for the last few years of this annual roundup, I have expanded my list of books also to include blogs, podcasts and other resources that may be of interest to others in the Open Source community.

Programming Languages

Python continues to grow in popularity and for good reason—it's an elegant language that is both powerful and easy to learn. I have been teaching a growing number of Python courses during the past few years to a variety of audiences—aspiring Web developers, companies interested in moving their automation and testing systems into an open-source high-level language, and also people interested in learning basic programming techniques and ideas.

The best-known book about Python, Programming Python by veteran instructor Mark Lutz, recently was released in its 4th edition by O'Reilly (ISBN 9780596158101). The book has been expanded and improved in many ways, most importantly with additional information about Python 3.x. Truth be told, I have yet to encounter a company that is using Python 3; all of my consulting and training clients still use Python 2.7. However, there's no doubt that Python 3.x is the future, and Lutz has done us all a good service by providing such information.

This is not a book about learning Python, but rather it's meant to be a reference and in-depth description of how the language works. And at that, it succeeds. At the same time, I feel like the book is far too large (at more than 1,600 pages), 400 pages of which are spent describing TkInter, a GUI toolkit that is included with Python, is easy to use and is cross-platform. But, it's also extremely ugly and not particularly popular, in my experience. If you're a Python programmer though, you'll likely want to have this book on your shelf.

When I'm teaching Python programming classes, my students often ask me how they can boost the performance of their code. True, I think that Python, like many other high-level languages, stresses programmer efficiency over language efficiency. And of course, we know that worrying about performance too early in a project is asking for trouble. At the same time, once our program is working, we definitely want to increase its speed. Python High-Performance Programming, written by Gabriele Lanaro and published by Packt Press (ISBN 978-1-78328-845-8), aims to solve some of these issues. The book concentrates on a small number of areas that can be used to increase performance: benchmarking and profiling (to understand where the problem is); NumPy's arrays (which are faster, if more limited, than Python's built-in lists); Cython (which translates Python code into C); and finally, multiprocessing. The book is relatively short (at 108 pages), but it does provide some of the most common techniques for increasing program speed. At the same time, I think that some more basic techniques, such as not using += to iteratively build strings, would have added something to the book.

The hottest language continues to be JavaScript, if for no other reason than the very large number of people who have access to browsers, be it on their computers or their mobile devices. JavaScript's huge community has been pushing forward with a variety of techniques and libraries that make development easier. Moreover, JavaScript is now popular beyond the browser, in such places as node.js, a server-side framework that uses asynchronous JavaScript.

It is this first topic that Async JavaScript, written by Trevor Burnham and published by the Pragmatic Programmers (ISBN 978-1-937785-27-7) addresses. Part of the difficulty that people have when working with JavaScript is its asynchronous nature. You often set up a function to be executed later on, when a particular even happens, and it's frequently tough to remember just how that worked. This book introduces techniques that will help you build asynchronous programs that are easier to understand and debug.

Functional programming is a technique that was pushed aside for many years by object-oriented programming, but it's making a comeback. Even if you're not using a purely functional programming language, functional techniques are increasingly important and useful. Functional JavaScript, written by Michael Fogus and published by O'Reilly (ISBN 9781449360726), introduces a wide variety of functional ideas and techniques. I'd say that this book is good for two types of audiences: those who already know functional programming and want to see how these ideas can be applied in JavaScript, as well as the opposite, people who know JavaScript and are interested in learning functional programming.

If you are new to JavaScript, or if you have been using it only for Web development and haven't yet learned how it works as a more general-purpose programming language, you may well want to read Eloquent JavaScript. The book, written by Marijn Haverbeke and available on-line at http://eloquentjavascript.net (and soon to be published in paper form by No Starch Press), reviews the basics of JavaScript as a language, ignoring the Web-related aspects until halfway through the book. So you learn about JavaScript objects, higher-order functions and even regular expressions, with clear and interesting examples.

HTML5 is not quite a language, but it certainly represents a combination of APIs and tools—most specifically, HTML, JavaScript and CSS—that are the standard way to create modern Web applications. It's quite amazing to see the breadth and depth of HTML5, as well as the applications that people are creating with it. If you're reading this column, you're probably not the right audience for Head First HTML5 Programming, which aims to teach the basics of HTML, JavaScript and CSS to people who have little or no familiarity with those technologies. But if you know of someone who wants to understand how these things work, it's worth recommending it.

Another non-language is Git, which has become one of my favorite and most indispensable tools. It's hard to believe that I used to be content with CVS and SVN, given the advantages that Git brings to the table. I must admit that many years ago, a friend of mine said that I eventually would switch to a distributed version-control system, which would make life so much easier. He was right, although he was recommending a system that preceded Git known as Arch, which I don't believe is used any longer.

I frequently teach courses in the use of Git, and I've found that the problem for most users is not the commands, but rather the understanding of what Git does (and doesn't do) and how the various objects work together. In particular, an understanding of what a commit is, and how branches, tags, blobs and trees fit into this commit-centric view of the world, is the biggest obstacle to working with Git.

So, I was happy to see the Git Pocket Guide, written by Richard E. Silverman and published by O'Reilly (ISBN 9781449325862). Yes, this book will help you use Git better, and it will remind you of many of the commands. But more significant, the Git Pocket Guide introduces you to the objects Git uses and describes how they work together to provide a robust and efficient version-control system.

Databases and Analysis

The growth of the Web has led not only to a growing need for people who can create Web applications, but also for those who can store, retrieve and analyze the data generated by those applications. The term "big data" increasingly is applied to such programs, and a number of books have been written in the past few years that attempt to help newcomers to the field.

In some cases, you don't need to collect or analyze the data yourself. Rather, you can get by just using the APIs that various systems have provided. This is particularly the case with social networks, which collect enormous quantities of information about their members and the connections between them. Mining the Social Web, by Matthew A. Russell, was released in its second edition (ISBN 9781449367619), and it describes many ways in which you can access and analyze different social networks. I've played with such APIs in the past, so I wasn't new to their use in my applications, but this book described a number of uses I didn't think of, with lots of clear example code that illuminated the points.

For those who want to analyze large data sets more directly, Doing Data Science, by Cathy O'Neil and Rachel Schutt and published by O'Reilly (ISBN 9781449358655), is a dense, but interesting, introduction to the techniques that are collectively known as "Data Science". The authors give a whirlwind tour of the math and algorithms used in such analysis and also the types of conclusions you can draw from its use. Some of this book was a bit heavy for my needs and interests, but it gave me a much better sense of what the Data Science people are doing, and how it is already becoming useful. I should note that Cathy O'Neil, one of the co-authors of this book, is a participant in the new "Slate Money" podcast. If you want to hear financial analysis driven by big data, you might want to tune in to that weekly recording.

Freelancing and Business

I've been a freelance consultant since 1995, working with clients around the world, and I really enjoy my work. I even participate in a weekly podcast, "The Freelancers Show", in which panelists discuss different aspects of what it's like to be self-employed.

Two of my co-panelists from the show have come out with eBooks during the past year. Curtis McHale wrote Don't Be an Idiot: Learn to Run a Viable Freelance Business, which gives practical advice for starting and running a successful freelance business. Along the same lines, Eric Davis has a practical, day-by-day plan for you to start on the freelancing track, in his 30 Days to Become a Freelancer.

Other Books

Of course, I don't read only technical books, although my friends and family might not quite believe that claim. I have read a number of excellent books in the past year that I think you all might enjoy.

Tim Harford is a well-known economics writer and has published numerous books on the subject. His most recent, The Undercover Economist Strikes Back, describes how macroeconomics and government policies work, and the various theories that economists have used to try to understand these policies and their effects. I have long had an interest in economics, but still very much enjoyed reading this book, which shed new light on the differences between various schools of economics.

Another favorite writer of mine, Tom Standage, came out with a new book this year: Writing on the Wall: Social Media—The First 2,000 Years. Standage's argument is that just about every type of social media and technology that we use nowadays has precedents in previous cultures. His funny and interesting book is sure to give you some perspective on Facebook and LinkedIn, among other things.

Another great book that came out this year is How Not to Be Wrong: The Power of Mathematical Thinking, by Jordan Ellenberg. Ellenberg is a mathematics professor, and he tries to show in this book how mathematical thinking can help you make useful decisions. He starts the book by pointing out that "mathematics" isn't what you learned in elementary and high school, and it succeeds in having very few equations in the book. Rather, his point is to show how it's a perspective on life that can help you make decisions or persuade others. To his credit, the author also includes a number of examples of where mathematics cannot really provide a clear-cut answer, such as (most surprisingly) in deciding election results.

As readers of this column know, I have traveled to China several times in the past few years to teach Ruby and Python programming classes. And, I've become something of an aficionado of China-related books written by reporters who were there. Evan Osnos, who was the New Yorker's correspondent in China for several years, published a book this year titled Age of Ambition: Chasing Fortune, Truth, and Faith in the New China that tries to make sense of the political and social changes happening in China. Along the same lines, I'm enjoying Howard French's book, China's Second Continent: How a Million Migrants Are Building a New Empire in Africa, which describes the experiences and interactions of Chinese expatriates in various African countries.

Finally, as someone who recently finished a PhD, I can recommend a funny (if rather cynical) book: Surviving Your Stupid, Stupid Decision to Go to Grad School, by Adam Ruben. Perhaps it's easier to laugh at his jokes now that I've completed the degree, but I found it not only funny but also therapeutic to know that others had experienced similar problems and challenges to mine during their grad-school careers.

I hope these recommendations will provide you with many hours of insightful and interesting reading! I'm sure I have missed many good books that came out in the past year; I'm always open to hearing about them and welcome your suggestions.

Reuven M. Lerner, a longtime Web developer, offers training and consulting services in Python, Git, PostgreSQL and data science. He has written two programming ebooks (Practice Makes Python and Practice Makes Regexp) and publishes a free weekly newsletter for programmers, at http://lerner.co.il/newsletter. Reuven tweets at @reuvenmlerner and lives in Modi’in, Israel, with his wife and three children.

Load Disqus comments