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