Think Complexity – Exploring Complexity Science with Python – #programming #bookreview

Think Complexity
By Allen B. Downey
(O’Reilly, paperback, list price $29.99)

Are you a reasonably competent Python programmer yearning for new mental challenges? Allen B. Downey’s Think Complexity definitely can deliver some. His well-written new book can help you dive into complexity science and improve your Python skills at the same time.

Right away, you will see that Think Complexity is not just another how-to-program-in-Python book.

“This book,” Downey states, “is about data structures and algorithms, intermediate programming in Python, computational modeling, and the philosophy of science.” Hello, new world.

His new work, he adds, sprang out of a blending of “boredom and fascination: boredom with the usual presentation of data structures and algorithms and fascination with complex systems. The problem with data structures is that they are often taught without a motivating context; the problem with complexity science is that it usually is not taught at all.”

Complexity science is the scientific study of complex systems – which can be anything from computer networks to the human brain, global markets, ecosystems, metropolitan areas, space shuttles, ant trails, and countless other “systems.”

Complexity science is practiced “at the intersection of mathematics, computer science, and natural science,” Downey says.

How does “the philosophy of science” fit in? Downey’s book offers “experiments and results [that] raise questions relevant to the philosophy of science, including the nature of scientific laws, theory choice, realism and instrumentalism, holism and reductionism, and epistemology.”

Think Complexity “picks up where Think Python left off” and is intended to appeal to the “broad intellectual curiosity” of software engineers and their “drive to expand their knowledge and skills.”

There are case studies, exercises, code samples and even mini-lessons within the exercises. One brief example: “Hoisting is a way to speed up code by moving an expression that does not change out of a loop.” (Hoisting then is applied in a discussion involving Fast Fourier Transform and the Danielson-Lanczos Lemma.)

Not every exercise has an answer against which you can check your work. So you probably shouldn’t jump into this book just now unless you feel confident you are an intermediate-level Python programmer and you are open to wide-ranging mental challenges.

Python, by the way, is a free download available in 2.X and 3.X versions. And, along with Think Python, several other books can help you advance from novice to Python professional.

Head First Python by Paul Barry is a fun, “brain-friendly guide” nicely tailored for beginners who want to advance from “What’s Python?” to understanding how to use the language in real-world applications. The book is written for 3.X versions. And it uses multiple learning methods (often in amusing ways) to help impart the necessary how-to information.

Once you gain a basic understanding of Python, Mark Lutz’s book Learning Python is recommended as the next step. His 4th edition covers both the 2.6 and 3.X versions. If you are a complete Python beginner, you might want to put this book second on your list, rather than dive into it from a cold start. It has 39 chapters and 1162 pages, and it weighs nearly four pounds – which can make it seem a very intimidating starting point. Still, it is a well-written, self-paced tutorial, and it can help you advance to intermediate-level Python programmer and beyond.

Students at Olin College (where Allen B. Downey is a computer science professor) wrote the case studies for Think Complexity. (They were edited by Downey and his wife and reviewed by other Olin faculty members). Appendix A of Downey’s new book contains a call for readers to submit additional case studies.

“Reports that meet the criteria [explained in the appendix] will be published in an online supplement to this book, and the best of them will be included in future print editions.”

This may be an offer – and a Python challenge — you can’t refuse.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available now in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.

The New London explosion – Two views of America’s worst school disaster – #bookreview #texas #history

 My Boys and Girls Are in There: The 1937 New London School Explosion
By Ron Rozelle
(Texas A&M, hardback, list price $24.95; Kindle edition, list price $24.95)

 Gone at 3:17: The Untold Story of the Worst School Disaster in American History
By David M. Brown and Michael Wereschagin
(Potomac Books, hardback, $29.95; Kindle edition, list price $29.95)

On March 18, 1937, in East Texas’ tiny New London community, a natural gas explosion killed some 300 students, teachers and others at London Junior-Senior High School.

Seventy-five years later, the exact death toll in America’s worst school disaster remains uncertain. But its grim lessons are relevant and timely again as school districts across the nation struggle to cut their operating expenses without endangering student safety. 

Briefly, at least, the New London catastrophe made world headlines. Even Adolph Hitler sent a message of condolence. One of the reporters who covered the explosion’s aftermath was a young Dallas newsman named Walter Cronkite.

But 1937 was a year full of troubling currents and undercurrents, including the Spanish Civil War, the rise of Germany, Italy and Japan as military powers, and the Roosevelt Administration’s continuing struggles to lift the American economy out of the Great Depression.

Across most of the world, the devastating event soon faded into the global swirl of tensions and distractions. 

But not in New London. The shock continued to run so deep, townspeople “refused to speak of the explosion or of its victims, to the press or even to each other,” Ron Rozelle notes in My Boys and Girls Are in There.

Indeed, four decades passed before the first commemoration could be organized. And, 75 years after the school tragedy, some people still shudder when the explosion is mentioned. Pains and fears it created continue to be carried forward by survivors, witnesses, family members, and friends of the dead and injured.

“Sorrow is ambulatory, and refuses to be left behind,” writes Rozelle, an author and educator who grew up 80 miles from New London. Rozelle’s father was one of many volunteers who helped search the destroyed school for survivors and victims.

Rozelle’s book is written to read like a novel, yet its chapters arise from historical records, extensive follow-up research, and interviews with people who lost loved ones, survived injuries or otherwise were scarred.

Meanwhile, one of the authors of  Gone at 3:17, David M. Brown, also grew up in East Texas and has spent more than two decades interviewing New London survivors, rescuers and others. His co-writer, Michael Wereschagin, is a veteran journalist who has covered several large disasters. Their factual account likewise reads like a story. And, benefitting from doubled manpower, it offers some additional details on survivors, witnesses, investigations, and where victims were buried.

Both works are well-researched and well-written, and they bring fresh perspectives to the New London school explosion and its aftermath.  They also can be emotionally wrenching to read.

A key lesson from New London remains valid today as states struggle to reduce their school budgets. New London’s school was part of the London Consolidated School District, which may have been America’s richest rural school district in 1937. Tax revenues from oil production and related industries were plentiful. Indeed, London Junior-Senior High was the first secondary school in Texas to get electric lights for its football field. Yet, the superintendent and at least some of the board members still bore down hard on costs, to the point that money finally was put above student safety.

Late in 1936, the superintendent, with quiet approval from four board members, decided to disconnect the school from commercial natural gas and tap into a free, unregulated and widely available byproduct of gasoline refining: waste natural gas. Their hope was to save $250 a month.

Refineries pumped the waste gas back to oil rigs through networks of bleed-off lines, and rig operators were required to dispose of it. Most released it into the air through tall pipes, and the gas was burned, lighting the sky night and day with flaring orange flames.

“The practice of tapping into waste gas lines was something of an open secret in the oil patch,” Brown and Wereschagin write. Homeowners and business owners welded valves to some of the bleed-off lines, and they installed regulators to try to control gas pressures that varied widely. “With no one monitoring it, it came with no bill,” they note.

One pipeline passed 200 feet from New London’s school, and in 1937: “The [connection] crew had gone out in early January—a janitor, two bus drivers, and a welder the school had contracted….”

Blame for the blast often has been placed on the superintendent and on some of the board members he reported to. However, both of these new books highlight bad choices made by others, as well.

For example, refiners failed to enforce policies barring gas line taps, Brown and Wereschagin point out. And no one could smell the odorless gas as it leaked and collected in the school’s big basement, Rozelle emphasizes.

A single electrical spark from a basement light switch apparently set off the explosion.

Afterward, Texas quickly passed laws that might have been enacted sooner, if politics had not stood in the way. One law added a malodorant, “a distinctive, faintly repulsive scent,” to natural gas to provide as leak warning. Another law required “anyone working with gas connections be trained and certified as an engineer by the state.” Other states soon followed Texas’ action.

Today, Brown and Wereschagin stress,  most Americans “have never heard of the New London, Texas, school explosion” and have no idea how or why natural gas got its noxious smell.

These two timely books provide painful but important reminders why the New London school explosion and its grim lessons should never be forgotten.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available now in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.

 

ActionScript Developer’s Guide to PureMVC – Hands-on learning for experienced developers – #programming #bookreview

ActionScript Developer’s Guide to PureMVC
By Cliff Hall
(Adobe Developer Library and O’Reilly Media,
paperback, list price $29.99; Kindle edition, list price $13.99)

A key concept in this book is “code at the speed of thought.” And the book is written for a very specialized audience, according to Cliff Hall, architect of the Open Source PureMVC Framework.

“ActionScript developers who are interested in, or are already working with PureMVC, will gain usable insights,” Hall says, “although Adobe Flex and AIR developers will be best served, as the example application is written with AIR.”

He also notes that “developers who are using or learning any of the PureMVC ports to other programming languages could certainly use this book as a basis for understanding the framework classes and how they are used.”

ActionScript is one of the dialects of ECMAScript, which is used most often for client-side scripting of programs that are executed on users’ web browsers. (JavaScript is one of the other ECMAScript dialects.)

Where PureMVC fits into the picture is in its ability to help developers get their work done faster.

“Too often in the development of a large application,” Hall emphasizes, “the developer must stop and think about where to find some class he needs, where some new class should go, and how to wire them up in such a way that gets data from wherever it lives to a display so the user can interact with it or vice-versa.”

He continues: “Regardless of the high level complexities in your application, you will never truly be doing anything more involved at the lower levels than moving data from point A to point B and occasionally doing some calculations on it. You should not have to keep inventing ways to do it; instead, your energy should be focused on the requirements of your current use case.”

So this is where “code at the speed of thought” comes in, with help from PureMVC.

“PureMVC is a simple framework,” Hall says, “that helps reduce the amount of time spent thinking about these low level issues by providing solutions for organizing your code and an expression of the well known Model-View-Controller concept based on several time proven design patterns.”

Despite that somewhat wordy sentence of introduction, Hall generally delivers clear, concise explanations. And his paragraphs are highlighted with numerous code examples and illustrations.

His 239-page book is divided into 10 chapters:

  • Chapter 1: Introduction
  • Chapter 2: Building an Application with PureMVC
  • Chapter 3: Modelling the Domain
  • Chapter 4: Implementing the User Interface
  • Chapter 5: Proxying the Model
  • Chapter 6: Mediating the View
  • Chapter 7: Applying Business Logic
  • Chapter 8: Advanced Model Topics
  • Chapter 9: Advanced View Topics
  • Chapter 10: Onward

That final chapter includes using a debugger with PureMVC, PureMVC utilities and a listing of some other resources.

For experienced developers seeking to know more about PureMVC, this book can provide a good hands-on guide to learning its fundamentals.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available now in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.

Programming Perl, 4th Ed. – The long-awaited update has arrived – #bookreview #programming #in #perl

Programming Perl, 4th Edition
By Tom Christiansen, brian d foy and Larry Wall, with Jon Orwant
(O’Reilly, paperback, list price $54.99)

Since 1991, Programming Perl has been considered both the Bible of Perl and the go-to reference guide for those who use this popular “mixed heritage” programming language.

Publication of this newly updated edition is good news for the legions of programmers who use Perl every day or are in the process of learning it.

Programming Perl last was updated 12 years ago, just when Perl v5.6 was being released. The current Perl release is v5.14, and, as the authors note, “Perl v5.16 is coming out soon.” This 4th edition focuses on v5.14 and its major new features and improvements. But it also previews features that will be offered in v5.16.

The new edition (1130 pages) has several new chapters for Perl programmers, and a few now-out-of-date chapters and experiments have been removed. Among the updates are “greatly improved” Unicode support, “even better” regular expressions, and more emphasis on CPAN (the Comprehensive Perl Archive Network), to highlight just a few.

This is not a guide for programmers planning to tinker Perl 6. The authors contend: “Perl 6 is really a ‘kid sister’ language to Perl 5, and not just a major update to Perl 5 that version numbers have trained you to expect. This book isn’t about that other language. It’s still about Perl 5, the version that most people in the world (even the Perl 6 folks) are still using quite productively.”

Perl was “[i]nitially designed as a glue language for Unix,” they add. So there is a distinct Unix bias even at the “Hello World” level in this book, and this may leave some Windows-centric beginners lost, puzzled and turning to the web for basic tips on how to program in Perl on Windows machines.

Perl novices, in fact, should not start just with this book but add it once they know they plan to stick with Perl programming. The authors recommend beginning first with Learning Perl by Randal Schwartz, brian d foy, and Tom Phoenix. They also provide an extensive list of other documents and resources for beginning, intermediate and expert Perl programmers.

Nonetheless, the authors states that “Perl is an easy language to learn and use, and we hope to convince you that we’re right. One thing that’s easy about Perl is that you don’t have to say much before you say what you want to say.”

Easy to learn, yes. But there’s also a lot to learn, as this well-written, hefty book shows and illustrates.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available soon in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.

MongoDB and PHP – Document-oriented data for web developers – #bookreview #in #programming

MongoDB and PHP
By Steve Francia
(O’Reilly,
paperback, list price $19.99; Kindle edition, list price, $14.99)

You can’t blame Steve Francia for being vocal in his praise for MongoDB®. He’s the chief solutions architect at 10gen, Inc., which develops and supports this well-respected document-oriented database.

One consequence of the current, explosive growth of social media is that “all data and experience [needs] to be personalized – on a large scale,” he writes in his new book, MongoDB and PHP. Today, the data stores and caching techniques used over in the past three decades are losing their ability to keep pace. So: “It was out of this need that MongoDB was created. A database for today’s applications, a database for today’s challenges, a database for today’s scale.”

MongoDB, according to its 10gen, Inc., website, is “a scalable, high-performance, open-source noSQL database,” written in C++. Its features include: document-oriented storage; full index support; replication and high availability; auto-sharding (horizontal scaling with a partitioning architecture); querying; rapid in-place updates; map/reduce (for batch processing of data and aggregation); and GridFS (a specification for storing large files in MongoDb).

Francia explains that MongoDB is a document database. “At the highest level of organization, it is quite similar to a relational database, but as you get closer to the data itself, you will notice a significant change in the way the data is stored. Instead of databases, tables, columns, and rows, you have databases, collections, and documents.”

Meanwhile, in PHP (PHP: Hypertext Processor), “a document is equivalent to an array …,” for all intents and purposes.

PHP, which can be downloaded from this site, “is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML,” according to the PHP Group.

Francia notes in his book that “[i]n MongoDB, the primary object is called a document. A document doesn’t have a direct correlation in the relational world. Documents do not have a predefined schema like relational database tables. A document is partly a row, in that it’s where the data is located, but it’s also part columns, in that the schema is defined in each document (not table-wide)….The best way to think of a document is as a multidimensional array.”

Meanwhile, Francia adds: “Documents map extremely well to objects and other PHP data types like arrays and even multidimensional arrays.” So PHP users contemplating building PHP applications with MongoDB will find that “the PHP array has the closest correlation of any data type. It’s nearly a 1-to-1 correlation.”

His code examples, illustrations and succinct paragraphs show how MongoDB and PHP can work together closely and effectively when building database applications.

If you have been contemplating diving into PHP and/or MongoDB, this is a worthy book to add to your learning and reference collections.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available soon in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.

 

Mastering the Fuji X100 – A guide for photographers who are NOT beginners – #bookreview #in

Mastering the Fuji X100
By Michael Diechtierow
(Rocky Nook, paperback, list price $29.95; Kindle edition, list price $13.95)

The “premium,” meaning somewhat pricey, Fuji X100 viewfinder digital camera looks a bit like a throwback to 20th-century film snapshot photography. At first glance, you almost expect its back to pop open and reveal a roll of 35mm Tri-X film.

But the X100 has excited many photographers both for its retro styling and for what it contains: a 12.3-megapixel APS-C CMOS high-performance sensor that enables shooting with very low light levels, an F/2 aperture lens that permits manual soft focus, and a viewfinder that can display enlarged selected image areas, so you can better control what you wish to have in focus.

These and other many features are covered in the user’s manual provided with the camera. But Mastering the Fuji X100 does more than introduce and explain key features. It also offers user tips from the author and others, plus personal experiences with the X100, which he terms “a terrific camera with a slew of features that set it apart from both established DSLRs and point-and-shoot cameras.”

And it skips the traditional basics, Diechtierow notes. “This handbook is written with the assumption that readers have some basic photographic knowledge and skill. I think it’s a safe bet that anyone who forks over $1,300 for a camera knows that an aperture is.”

He uses some of his own photographs with the X100 to demonstrate many different decisions the camera user can make, such as setting sharpness levels, choosing filters, using the macro mode for extreme close-ups, selecting normal, fine or RAW image qualities, and using flash creatively.

This well-written, nicely illustrated book by an unabashed X100 enthusiast can give you “quick entry into the practical operation of the X100” and dealing with some of its quirks. It also can help you learn how to take better pictures as you go.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir available soon in paperback. He also is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.

Running Lean: Iterate from Plan A to a Plan That Works – A smart business startup guide – #bookreview

Running Lean: Iterate from Plan A to a Plan That Works
By Ash Maurya
(O’Reilly, hardback, list price $24.99; Kindle edition, list price $19.99)

Starting a business soon?
Still sketching one out on cocktail napkins but getting ready to approach potential partners and staff?

Don’t launch without spending some well-focused time with the second edition of this thought-provoking and popular book.

If you have launched already and now have doubts about what you are trying to do, it’s not too late to consult Running Lean and pivot in a better direction. (The first edition was an ebook aimed mostly at those who create web-based products. This new edition adds tested new materials for a much wider business audience.)

The book’s goal is to help you “find a plan that works before running out of resources,” by “stress testing” Plan A and quickly moving to a new plan – even all the way to Plan Z and beyond – if your original schemes flounder.

Running Lean aims to provide “a better, faster way to vet new product ideas and build successful products” so you are able to make the best use of any startup’s most critical resource: time.

The book also is “about testing a vision by measuring how customers behave.” It is “about engaging customers throughout the product development cycle.” And, Ash Maurya writes, it is about getting your butt out of the building and away from your computer and your labs.

“You have to get out and directly engage customers.”

Furthermore, you have to push that engagement in a way that avoids the “classic product-centric approach [that] front-loads some customer involvement during the requirements-gathering phase but leaves the customer validation until after the software [or other product] is released. There is a large ‘middle’ when the startup disengages from customers for weeks or months while they build and test their solution,” Maurya emphasizes.

“During this time, it is quite possible for the startup to either build too much or be led astray from building what the customer wants.”

This excellent book, the first in O’Reilly’s new “Lean Series,” pulls together ideas from Steve Blank in The Four Steps to the Epiphany, Eric Ries in The Lean Startup, and others, as well as Ash Maurya’s multiple successes with startups. Eric Ries is the series editor.

Running Lean provides a well-structured guide to putting Lean Startup ™ principles directly to work in virtually any new business venture. And it could help you revitalize an existing enterprise, while you still have time and resources, if your current Plan A needs a Plan B, Plan C, or Plan Z, ASAP.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. His latest book is Dark Signals, a Vietnam War memoir available soon in paperback. He also is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.