Instant Handlebars.js – A short but effective how-to guide – #programming #bookreview

Instant Handlebars.js

Learn how to create and implement HTML templates into your projects using the Handlebars library
Gabriel Manricks
(Packt Publishing – e-book, paperback)

“Short, fast, and focused.” These are the three promises offered for Gabriel Manricks’ new book, Instant Handlebars.js, from Packt Publishing. And, at just 62 pages in print format, it lives up to those vows.

Manricks explains and demonstrates Handlebars using five well-structured sections. First, he introduces Handlebars.js and describes what a templating engine is and does. He notes that “[t]he purpose of using a templating engine such as Handlebars is to generate some kind of viewable content (usually HTML pages), dynamically.” He then shows how to download the Handlebars library and create a “Hello {{name}}” template and a simple helper.

His “Top 6 Features you need to know about” section goes to the heart of Handlebars.js and shows how you can organize large projects and pre-compile templates.

The Top 6 topics include: (1) Expressions—“the core of templates”; (2) Helpers—“[t]hese are where Handlebars gets its extendibility”; (3) Partials—“the building blocks of the template world” and important for modular design; (4) Structuring a Handlebars app—the pros and cons of various potential structures; (5) Pre-compilation—which can lead to “a more optimized and efficient site”; and (6) Logging and comments—“writing clear and debug-able templates and helpers, so you can easily test and maintain them in the future.”

In the book’s final section, “People and places you should get to know,” Manricks describes some individuals and websites you should follow so you can “stay up to date and dive deeper into the Handlebars community.”

Despite its small page count, the book contains numerous short code examples that show how to put Handlebars.js to work in HTML files.

You need at least some modest experience with JavaScript and HTML to get full benefit from this book. You also will make brief use of Node.js to install Handlebars.js.

If you have done any work with Ember.js, you already have picked up some Handlebars.js experience. However, even here, this short, handy guide can help you get a better understanding of how to use Handlebars, with or without Ember.

Instant Handlebars.js can be ordered in e-book or paperback format direct from Packt Publishing’s website. Or, the Kindle version and the paperback can be ordered via Amazon.

Si Dunn

Software Requirements, Third Edition – A major, long-needed update of a classic book – #software #business #bookreview

Software Requirements, Third Edition

Karl Wiegers and Joy Beatty
(Microsoft Press – paperback, Kindle)

A lot changes in 10 years, particularly in the world of software development. The previous edition of this book appeared in 2003, and I never knew about it while I struggled over software requirements documents and user manuals as a technical writer for several big and small companies.

In those days, pulling information out of software engineers was on par with pulling their wisdom teeth using needle-nosed pliers. And management seldom was helpful. Sometimes, I would be sitting at my desk, working on some project, and a high-level delegation suddenly would arrive.

“We are releasing a new software update tomorrow,” the delegation leader would announce. “And we need some documentation written. Here is the latest requirements document. We need for you to expand it into a release document. Oh, and some kind of user manual.”

Fortunately and unfortunately, the software release almost always slipped from tomorrow to the next week and then to the next month as bugs emerged during final testing. While the customer grumbled or screamed, I had time to produce new documents from the software requirements, plus interviews with any engineer I could grab and threaten to name in the materials that I would send out to customers.

It was all seat-of-the-pants stuff. Now, after retiring several years ago, I can only wish I had had this well-written “best practices” guide to creating, managing, and making best use of software requirements documents.

Software Requirements, Third Edition covers a lot of ground in its 637 (print-edition) pages. The 32 chapters are organized into five major parts:

  • Part I – Software Requirements: What, Why, and Who
  • Part II – Requirements Development
  • Part III – Requirements for Specific Project Classes
  • Part IV – Requirements Management
  • Part V – Implementing Requirements Engineering

The book’s two authors, each an expert in software requirements development, emphasize that a software requirements document can be a shining beacon of guidance and clarity or a confusing array of ill-defined features and functions–or it can be something that hovers perilously between good and bad.

The writers emphasize: “Many problems in the software world arise from shortcomings in the ways that people learn about, document, agree upon and modify the product’s requirements….[C]ommon problem areas are information gathering, implied functionality, miscommunicated assumptions, poorly specified requirements, and a casual change process. Various studies suggest that errors introduced during requirements activities account for 40 to 50 percent of all defects found in a software product….Inadequate user input and shortcomings in specifying and managing customer requirements are major contributors to unsuccessful projects. Despite this evidence,” they warn, “many organizations still practice ineffective requirements methods.”

Indeed, they add: “Nowhere more than in the requirements do the interests of all the stakeholders in a project intersect….These stakeholders include customers, users, business analysts, developers, and many others. Handled well, this intersection can lead to delighted customers and fulfilled developers. Handled poorly, it is the source of misunderstanding and friction that undermine the product’s quality and business value.”

The intended primary readership for the book includes “business analysts and requirements engineers, along with software architects, developers, project managers, and other stakeholders.”

In my view, Software Requirements, Third Edition should be read by an even bigger audience. This includes anyone who works in software development, anyone who manages software developers, anyone who sells software development services, plus other key personnel in companies that create, sell, or buy specialized or customized software products or services. The buyer must understand the software requirements process just as keenly as the seller. Otherwise, the software development company may try to hide behind certain jargon or definitions or introduce new processes or changes previously undefined as a delaying tactic, particularly if it has fallen behind schedule or otherwise is failing to deliver what it has promised.

A well-structured, well-worded, well-managed requirements document can help save time, money and, most importantly, the reputations of the companies and people on all sides of a software project. This important, newly updated book shows exactly how such documents can be created, managed, and maintained.

Si Dunn

Data Science for Business – A serious guide for those who need to know – #bigdata #bookreview

Data Science for Business

What You Need to Know about Data Mining and Data-Analytic Thinking
Foster Provost and Tom Fawcett
(O’Reilly – paperback, Kindle)

This is not an introductory text for casual readers curious about the hoopla over data science and Big Data.

And you definitely won’t find code here for simple screen scrapers written in Python 2.7 or programs that access the Twitter API to scoop up messages containing certain hashtags.

Data Science for Business is based on an MBA course Foster Provost teaches at New York University, and it is aimed at three specific, serious audiences:

  • “Aspiring data scientists”
  • “Developers who will be implementing data science solutions…”
  • “Business people who will be working with data scientists, managing data science-oriented projects, or investing in data science ventures….”

Provost’s and Fawcett’s book  “concentrates on the fundamentals of data science and data mining,” the two authors state. But it specifically avoids “an algorithm-centered approach” and instead focuses on “a relatively small set of fundamental concepts or principles that underlie techniques for extracting useful knowledge from data. These concepts serve as the foundation for many well-known algorithms of data mining,” the authors note.

“Moreover, these concepts underlie the analysis of data-centered business problems, the creation and evaluation of data science solutions, and the evaluation of general data science strategies and proposals.”

The book is well-written and adequately illustrated with charts, diagrams, mathematical equations and mathematical examples. And the text, while technical and dense in some places, is organized into short sections. Most of the chapters end with insightful summaries that help the lessons stick.

Both authors are experienced veterans in the use of data science in business.  Their new book includes two helpful appendices. One shows how to “assess potential data mining projects” and “uncover potential flaws in proposals.” The second appendix presents a sample proposal and discusses its flaws.

“If you are a business stakeholder rather than a data scientist,” the authors caution, “don’t let so-called data scientists bamboozle you with jargon: the concepts of this book plus knowledge of your own business and data systems should allow you to understand 80% or more of the data science at a reasonable enough level to be productive for your business.”

They also challenge data scientists to “think deeply about why your work is relevant to helping the business and be able to present it as such.”

Si Dunn

The LEGO Build-It Book 1: Amazing Vehicles – Creating with 1 brick collection – #bookreview

The LEGO Build-It Book 1: Amazing Vehicles

Nathanaël Kuipers and Mattia Zamboni
(No Starch Press, paperback)
ISBN: 978-1-59327-503-7

Using just one collection of LEGO bricks and this colorful how-to guide, you can build 10 different model vehicles, starting with a simple go-kart and working your way up to a muscle car, a street rod, and a rescue truck, among others.

No Starch Press recently has launched its LEGO Build-It Book series with this well-crafted volume, aimed at readers age 7 and up. Volume 2, due out in September 2013, will offer another group of 10 construction projects that can be built from just one collection of LEGO bricks.

Many young readers will appreciate the new LEGO book because it has many illustrations that mostly just show,  step by numbered step, how each vehicle goes together.

Nathanaël Kuipers is a Dutch design professional who spent several years working for the LEGO Group in Denmark, where he was mainly responsible for engineering LEGO Technic models. Co-author Mattia Zamboni has a background in graphic design, photography, and LEGO, as well as electrical engineering.

A key message from this book and the evolving Build-It Book series, Kuipers says, is: “You don’t need to buy the really expensive products or lots and lots of sets to make interesting models. With a little creativity and some useful techniques, you can build endless models from a simple collection of bricks.”

Si Dunn

The Ides of April – An entertaining new Lindsey Davis detective series debut – #mystery #bookreview

The Ides of April

A Flavia Albia Mystery

Lindsey Davis

(Minotaur Books, hardback, paperback, Kindle, Audio CD)

Many fans of the Marcus Didius Falco mysteries set in first-century Rome will delight in this new spin-off series by London author Lindsey Davis. Readers eagerly seeking another unusual detective to follow may relish this series debut, as well.  

In The Ides of April, Flavia Albia, the adopted daughter of Falco and Helena Justina, makes her series debut as a private informer in Rome during the reign of Domitian, an emperor who later will be ranked somewhere in the safe middle between the best and worst rulers of the Roman Empire.

The year is A.D. 89, and a young widow named Flavia Albia has taken over Falco’s old apartment and is struggling to build up her business as an investigator. Flavia is British-born and served as nursemaid to Falco’s children before Falco and his “unofficial” wife Helena Justina adopted her.

The pay scale for a private informer is “no win, no fee.” Also: “As a female, I had no rights at all in matters of law, but why let that stop me?” Flavia has two other qualities that work in her favor as a detective in Rome: She doesn’t like to be defeated, and her adoptive parents taught her how to comfortably blend into virtually all levels of society.

Of course, it’s never easy to be a female detective in ancient Rome. As Flavia points out: “Fortune never favoured me and the problem with being a woman was that sometimes I could only obtain business that all the male informers had sniffed and refused.”

One of those “refused” cases, of course, starts out simple and soon turns into a murder investigation that includes the hunter being hunted by the killer.

The cast of characters in The Ides of April extends for two pages, and new readers of a Lindsey Davis novel likely will find themselves frequently flipping back to it for reminders of who exactly Junillus or Robigo or Felix or Serena is.

Indeed, if this is your first exposure to Lindsey Davis’s well-detailed, history-based fiction, you might consider photocopying the extensive cast list and keeping it close at hand so you won’t have to keep flipping back to the front of the book.

One other note. While the setting is ancient Rome, many of the descriptions, attitudes, and dialogue exchanges would not seem out of place in a 21st century English detective novel. This can be at least momentarily jarring for new readers of a Lindsey Davis mystery. However, we must remember that English had not yet been cobbled together in A.D. 89. And, thankfully, the author does not throw a lot of Latin at us.

Fans of Marcus Didius Falco may grumble about Falco being downsized to a much smaller character in this tale. Yet as Lindsey Davis points out on her website:

“After 20 novels, I need a break and have no current plans for a new Falco novel. I am enjoying the ‘spin-off’ series about Flavia Albia….” (The one that will follow The Ides of April will be titled Enemies at Home).

“I am also excited to be writing a ‘QuickRead’ for 2014. These are a special series of short books for adults who came to reading late or who don’t read very much. Mine is called A Cruel Fate and is set in the Civil War.”

So Marcus Didius Falco is not dead. He has just been put out to pasture while Flavia gets an entertaining and engrossing chance to make her mark in the family business.

Si Dunn

Realm of Racket: Learn to Program, One Game at a Time – #Racket #game #programming #bookreview

Realm of Racket
Learn to Program, One Game at a Time!

Matthias Felleisen, David Van Horn, Conrad Barski, M.D., Forrest Bice, Rose DeMaio, Spencer Florence, Feng-Yun Mimi Lin, Scott Lindeman, Nicole Nussbaum, Eric Peterson, and Ryan Plessner
(No Starch Press – paperback, Kindle)

Formerly known as PLT Scheme, Racket is an offshoot of the Lisp/Scheme family of programming languages. (Lisp, which was first specified in 1958, is the second-oldest high-level programming language, behind FORTRAN).

The (numerous) authors of this 294-page book call Racket “a friendly mutation of Lisp” and tout it as “perfect for all, from those who want to launch their education in computer science to those looking to expand their knowledge and experience in programming.”

Lisp has a long learning curve, so the writers have taken special pains to try to make Racket (“a weird-looking programming language,” they concede) approachable and fun by using comics and games built from short code examples.

Their well-written book is aimed at college freshmen readers. But they emphasize “that doesn’t mean you should drop this book if you are a sophomore or an industry professional.” Nor if you are still in high school or simply like to tinker with programming languages for fun and challenge.

“Regardless of your programming background,” they state, “many of the topics in this book will be new to you, and much of what you’ve learned before will appear in a new light.”

Realm of Racket is structured so that you start out programming very simple games and gradually tackle games that are more complex, while learning about such topics as functions, recursion, lambda, lists, structures, loops, testing, and more.

If you are interested in developing special-purpose computer languages that require specific knowledge of specialized fields, Realm of Racket’s  final chapter briefly delves into the field of language engineering. It notes that Racket “makes it particularly easy to create new programming languages, including special-purpose languages.”

Not surprisingly, some people who program in Racket call themselves Racketeers. The open source language and its program development environment (PDE), DrRacket (“Doctor Racket”), can be downloaded from http://racket-lang.org. “Racket can run on Windows, Mac, and *nix* systems,” the authors note.

Realm of Racket can be a fun, challenging book for computer-savvy teens nearing the end of high school or in their first years of college to study computer science or gaming. Younger readers likely won’t stick with it unless they have some helpful, patient guidance from knowledgeable older siblings or adults. Wait until they’ve gotten reasonably good at another language, such as Python, Ruby, C#, or Java, first.

Si Dunn

Hands-on Testing with PHPUnit How-to – A short, well-focused guide – #programming #bookreview

Instant Hands-on Testing with PHPUnit How-to
A practical guide to getting started with PHPUnit to improve code quality
Michael Lively
(Packt Publishing – paperback, Kindle)

PHPUnit is considered by many to be the leading tool for testing PHP code. This “Short, Fast, Focused” book (82 pages digital, 69 pages in paperback) is a recent addition to Packt Publishing’s “Instant” series. It zeroes in on how to install and use PHPUnit to create and run “easy-to-maintain tests.”

One strength of Michael Lively’s new book is his experience with PHP and PHPUnit. Another strength is the book’s step-by-step structure. It rates each key step as “Simple”, “Intermediate”, or “Advanced” and provides subheadings such as “Getting ready…”, “How to do it…”, “How it works…”, and “There’s more…” to help keep descriptions short and clear.

Code examples and screenshots also help the reader get comfortable with running tests using the PHPUnit framework.

Aside from skipping commas in some of the text, Michael Lively’s writing is clear and concise, and his descriptions and code examples have been reviewed by two experienced software developers.

The book is “written for anyone who has an interest in unit testing but doesn’t necessarily know where to start in integrating it with their project,” Lively states.

“It will provide useful tips and insights into how PHPUnit can be used with your projects and it should give you enough information to whet your appetite for the various features offered by PHPUnit.”

The code examples in Lively’s book “were written using PHP 5.3.24 and PHPUnit 3.7. All code samples were verified against a Linux box with Ubuntu 12.04 LTS.”

As with several other Packt books recently reviewed, if you use a Windows PC or a Mac instead of a Linux system, you pretty much are left on your own to figure out the installation process and certain commands.

—   Si Dunn

Book Briefs: Four Works of Fiction & Nonfiction from the American Southwest – #bookreview

A Texas Jubilee: Thirteen Stories from the Lone Star State
James Ward Lee
(TCU Press – paperback, Kindle)

James Ward Lee, former English department chairman at the University of North Texas, has earned his membership in the Texas Literary Hall of Fame the hard way. He has written numerous books, short stories and other well-received works.

A Texas Jubilee, his entertaining and absorbing new short story collection, focuses on life in fictitious Bodark Springs, a small East Texas town, in the 1930s and 1940s.

The interconnected stories often have colorful characters, richly detailed local conflicts, and troubling events such as the arrival of an aged man claiming to be Jesse James and the occasional appearance of a bike messenger who delivers World War II death-notice telegrams. One of the best stories, “A Blue and Gray Christmas,” reflects on a grandmother’s early childhood memories of the Civil War.

Unsolved Mysteries of the Old West
W.C. Jameson
(Taylor Trade – paperback, Kindle)

Many of  writer and treasure hunter W.C. Jameson’s books and articles have entertained readers who love “the Old West and a good mystery.” This second edition contains 21 “baffling” tales that still stir up people’s imaginations and sometimes continue a few disputes.

One of the best of the “unsolved mysteries” in Jameson’s book involves an alien spacecraft that may–or may not–have crashed north of Fort Worth, Texas, in 1897, in the tiny town of Aurora.

On the Edge: Water, Immigration and Politics in the Southwest
Char Miller
(Trinity University Press – paperback, Kindle)

The American Southwest is a hotbed of water-supply controversies and immigration disputes, plus sharp political clashes over how to deal with both major issues.

In On the Edge, former Trinity University history professor Char Miller’s taut, insightful essays zero in on “the American Southwest, a region I have known, loved and misunderstood.” He reflects on San Antonio and Los Angeles and what is happening to “the borderlands that stretch between them.”

He puts special emphasis on sustainability and “the environmental pressures, judicial struggles, social injustices, and economic disparities that have troubled the communities I have resided in.”

Our Lost Border: Essays on Life Amid the Narco-Violence
Edited by Sarah Cortez and Sergio Troncoso
(Arte Publico Press – paperback)

Mexico’s gruesome narcotics wars and heightened U.S. border security efforts have disrupted many economic, cultural and personal ties between the American Southwest and Mexico.

This  eye-opening book’s 12 bilingual essays highlight key losses, including the casual ease with which tourists used to cross the border. One writer notes: “The typical American tourist (including Mexican Americans) had no passport; it wasn’t needed. They often did not plan ahead. People walked or drove across the border at El Paso/Ciudad Juarez, San Diego/Tijuana and…Nogales/Nogales…and found a vibrant restaurant with delicious food and even better music. This happenstance border crossing allowed for adventures and exploring for the day….”

While some of the essays are dispiriting, hope also emerges within this important collection.

Si Dunn

Arduino Workshop – An excellent hands-on guide with 65 DIY projects – #arduino #bookreview

Arduino Workshop
A Hands-On Introduction with 65 Projects
John Boxall
(No Starch Press – paperback, Kindle)

If you’ve been wanting to tinker with a tiny Arduino computer, this excellent book can show you how to do much more than simply get started.

Indeed, John Boxall’s Arduino Workshop can keep you busy, challenged and intrigued for a long time as you work your way through basic electronics, basic Arduino programming, and a big selection of interesting and useful projects. The book’s instructions are written clearly, and they feature numerous close-up photographs, diagrams, screenshots, code listings, and other illustrations that can help you perform the how-to steps for each project.

The devices you can build with the open source Arduino microcomputer platform range from a battery tester for single-cell batteries to a GPS logger that records your travels and displays them on Google Maps. Some other examples include a digital thermometer that displays temperature changes on an LCD screen, a device that reads radio-frequency identification (RFID) tags, and a remote-controlled toy tank that you steer with an infrared TV remote. You can even create and program your own breadboard Arduino microcontroller using a handful of parts and Boxall’s instructions, diagrams, and photographs.

If that isn’t enough projects, the book also shows how to create a couple of games, plus an Arduino texter that sends your cell phone a text message when a particular event occurs. And you can rig up a simple Arduino device that will allow you to control its digital output pins by sending it a text message from your phone.

With Arduino projects, you not only do some computer programming (to create the “sketches” that control the microcomputer), you likewise learn to work with electronic components such as resistors, capacitors, LEDs and LCDs, oscillator crystals, voltage regulators, and other small parts and devices.

You also can meet and learn from other Arduino enthusiasts, Boxall notes in Arduino Workshop. “The Arduino project has grown exponentially since its introduction in 2005,” he writes. “It’s now a thriving industry, supported by a community of people united with the common bond of creating something new. You’ll find both individuals and groups, ranging from interest groups and clubs to local hackerspaces and educational institutions, all interested in toying with the Arduino.”

Si Dunn

Puppet 3 Beginner’s Guide – Automate configuration management & become a better system admin – #programming #bookreview

Puppet 3 Beginner’s Guide
John Arundel
(Packt Publishing – paperback, Kindle)

If you administer a small network built around just a few servers, you may still be doing at least some of the configuration management by hand. You literally move from machine to machine, manually entering updates, changes, or fixes. And your small network may be running several different brands–and vintages–of hardware and software, which complicates the update and repair process.

However, infrastructure consultant John Arundel warns, once you get “[b]eyond ten or so servers, there simply isn’t a choice. You can’t manage an infrastructure like this by hand. If you’re using a cloud computing architecture, where servers are created and destroyed minute-by-minute in response to changing demand, the artisan approach to server crafting just won’t work.”

In his new book, Puppet 3 Beginner’s Guide, Arundel emphasizes: “Manual configuration management is tedious and repetitive, it’s error-prone, and it doesn’t scale well. Puppet is a tool for automating this process.”

Among “UNIX-like systems,” there are at least three major configuration management (CM) packages, including Puppet. The others are Chef and CFEngine, plus a few more competitors. Arundel calls them “all great solutions to the CM problem…it’s not very important which one you choose as long as you choose one.” But he hopes, of course, you will favor Puppet and his well-written how-to guide.

Puppet 3 Beginner’s Guide is structured to help system administrators “start from scratch…and learn how to fully utilize Puppet through simple, practical examples,” he writes.

He places important emphasis on the rapidly closing “divide between ‘devs,’ who wrangle code, and ‘ops,’ who wrangle configurations. Traditionally, the skills sets of the two groups haven’t overlapped much,” he notes. “It was common until recently for system administrators not to write complex programs, and for developers to have little or no experience of building and managing servers.”

Today, system admins are “facing the challenge of scaling systems to enormous size for the web, [and] have had to get smart about programming and automation.” Meanwhile, “[d]evelopers, who now often build applications, services, and businesses by themselves, couldn’t do what they do without knowing how to set up and fix servers,” he says.

Therefore, “[t]he term ‘devops’ has begun to be used to describe the growing overlap between these skill sets…Devops write code, herd servers, build apps, scale systems, analyze outages, and fix bugs. With the advent of CM systems, devs and ops are now all just people who work with code.”

Arundel’s 184-page Puppet 3 Beginner’s Guide offers 10 chapters smoothly structured with headings, short paragraphs, code examples, and other illustrations. He has generated his code examples using the Ubuntu 12.04 LTS “Precise” distribution of Linux. But he explains how to load the software using “Red Hat Linux, CentOS, or another Linux distribution that uses the Yum package system,” as well.

The chapters are:

  • Chapter 1, Introduction to Puppet
  • Chapter 2, First Steps with Puppet
  • Chapter 3, Packages, Files, and Services
  • Chapter 4, Managing Puppet with Git
  • Chapter 5, Managing Users
  • Chapter 6, Tasks and Templates
  • Chapter 7, Definitions and Classes
  • Chapter 8, Expressions and Logic
  • Chapter 9, Reporting and Troubleshooting
  • Chapter 10, Moving on Up

That final chapter covers a range of topics, including how to make Puppet code “more elegant, more readable, and more maintainable.” The author offers “links and suggestions for further reading.” And he describes several projects to help you “improve your skills and your infrastructure at the same time.” Those projects, he says, “provide a series of stepping-stones from your first use of Puppet to a completely automated environment.”

Besides Linux, Puppet will run on other several platforms, including Windows and Macs. But there is almost no help for those in Arundel’s book. Essentially, it’s Linux or bust. For other operating systems, you will need to refer to the Puppet Labs website.

It can take a bit of work to get Puppet installed and properly configured. But once you have Puppet running, the Puppet 3 Beginner’s Guide can help you become both a proficient Puppet user and a more efficient, knowledgeable, and versatile system administrator.

Si Dunn