CoffeeScript in Action – A pleasant, thorough, language-centered how-to guide – #programming #bookreview

 

CoffeeScript in Action

Patrick Lee

(Manning - paperback)

 

CoffeeScript compiles to JavaScript, that awkward, quirky mashup which remains–because of its central role in the World Wide Web–one of the world’s most heavily utilized programming languages.

When beginners first hear this about CoffeeScript, they often think: Ah, ha! I could learn that and skip having to learn JavaScript!

Nope. Sorry.

“CoffeeScript is not about avoiding JavaScript–it is about understanding JavaScript,” Patrick Lee writes in his comprehensive and pleasant new book, CoffeeScript in Action. “Learning CoffeeScript helps people to understand JavaScript.”

Lee notes: “CoffeeScript is a simple language, and there are two simple reasons for learning it. First, it fixes some problems in JavaScript that are unpleasant to work with. Second, understanding CoffeeScript will help you learn new ways of using JavaScript and new ways of programming in general.”

So, learn JavaScript and learn CoffeeScript. And, if you are hired to work with JavaScript, be very glad you took the time and effort to also learn CoffeeScript. It will come in handy.

CoffeeScript increasingly is being used to write complete applications. (Just one example: the CoffeeScript compiler used to be written in Ruby. Now it is implemented in CoffeeScript.) Likewise, CoffeeScript can work smoothly with Node.js and Ruby on Rails.

CoffeeScript is out there, and, increasingly, it is being put to work in the workaday world.

CoffeeScript in Action definitely lives up to its title. Lee’s book takes the reader from the foundations and basic building blocks of the language all the way to thoughts on the future of CoffeeScript as ECMAScript 5 and ECMAScript 6 keep bringing changes to JavaScript.

I have read and used several smaller books on CoffeeScript, including The Little Book on CoffeeScript and Jump Start CoffeeScript. These are good, and numerous other books are available. But if you want a reasonably deep understanding of CoffeeScript as a programming language, I recommend starting with, or moving up to, CoffeeScript in Action.

Patrick Lee says that his book “doesn’t try to comprehensively detail libraries, frameworks, or other ancillary matters. Instead, it concentrates only on teaching the CoffeeScript programming language from syntax, through composition, to building, testing, and deploying applications.”

The three-part, 13-chapter, 408-page (in print format) book offers dozens of short, concise code examples that illustrate such diverse aspects as objects, functions, mixins, tests, event loops, compiling, creating animations, using CoffeeScript with domain-specific languages, and deploying applications. The book also serves up some CoffeeScript cartoons, as well as practical illustrations for key points.

How long will JavaScript be around–and, with it, the impetus to learn CoffeeScript?

Lee contends that “you should count on it being around for a long time–long enough, at least, that it will probably outlast your career as a programmer.”

Si Dunn

 

The Nature of Truth – Sergio Troncoso’s intelligent thriller is now in paperback – #bookreview

The Nature of Truth

Sergio Troncoso

(Arte Público Press – paperback )

 

Yale graduate student Helmut Sanchez is a man unsure of who he really is.  He feels “neither American nor German nor Mexican.”

Indeed, as this absorbing, intelligent, world-wise thriller unfolds, Helmut is wrestling with a question “that had tormented him all his life,” Sergio Troncoso writes.

“Helmut Sanchez had always hoped his Mexican blood would save him from a free-fall into his German heritage. Yet certain parts of this heritage also captivated him, especially German philosophy and poetry. So instead of saving him outright, these mixed legacies confused him. He had never really felt at home with German culture, but in the many ways he harbored the same doubts about American culture.”

He is, in short, stuck with the vague feeling that he is “neither here nor there.”

Suddenly, amid his graduate school academic research, Helmut makes a startling discovery about one of his professors. It is a finding that unsettles both his life and his views even more. Soon afterward, when the professor is killed, Helmut finds himself drawn into a murder investigation where the borders between good and evil and right and wrong quickly get fluid and murky.

The Nature of Truth, first published in hardback in 2003 by Northwestern University Press, is now available for the first time in paperback, from the University of Houston’s Arte Público Press. Sergio Troncoso, who lives and works in New York City, has won numerous awards for his writing. He is now a resident faculty member of the Yale Writers’ Conference.

Troncoso’s previous books include Crossing Borders: Personal Essays, From This Wicked Patch of Dust, and The Last Tortilla and Other Stories.

Si Dunn

 

 

Mastering Gamification – A 30-day strategy to enhance customer engagement – #business #bookreview

 

Mastering Gamification

Customer Engagement in 30 Days

Scot Harris and Kevin O’Gorman

(Impackt Publishing – Kindle, paperback)

 Gamification is now a popular buzz word in many parts of the business world. This book wisely does not try to cover every angle, but stays focused on one application: “Marketing and sales people are using gamification to improve customer loyalty and engagement, knowing that it will lead to increased profitability,” the authors write.

They emphasize that “gamifying does not mean turning your business or website into a game. As Gamification.org defines it, gamifying is:

‘The presence or addition of game-like characteristics in anything
that has not been traditionally considered a game.’

 “Take particular note of the word ‘characteristics’ in this phrase,” the authors point out . “The purpose of gamifying is not to turn something into a game, but to apply understanding and knowledge about the basic human desires we all have that make us like games to a non-gaming environment, and hopefully to improve our businesses.”

 You may not finish all of the exercises, nor follow all of the suggestions in this well-written book. Yet the well-structured, 30-day plan offered by Harris and O’Gorman still can help you think harder about your business, how customers see it and how they engage–or don’t engage–with the products or services you offer.

 Even if you operate a small enterprise where you are the entire staff, this book can offer some good ideas and useful tips that can help you make more sales and keep customers coming back.

 What the authors aim to do is help you create and “launch a long-range, ongoing, continuous process of attracting the attention of a target audience, drawing them into a social space built around you and your products or services, encouraging them to evangelize about your products or services, and instilling in them an unshakable sense of loyalty.”

 In other words, you learn how to use some gamification techniques to get customers’ attention, keep their attention, and keep them coming back for more of whatever you are selling–three major keys to long-term survival and growth in business.

Si Dunn

Mule in Action, 2nd Edition – Want to be an integration developer? Here’s a good start – #bookreview

 

Mule in Action, Second Edition

David Dossot, John D’Emic, Victor Romero

(Manning – paperback)

 

An enterprise service bus (ESB) can help you link together many different types of platforms and applications–old and new–and keep them communicating and passing data between each other.

“Mule,” this book’s authors note, “is a lightweight, event-driven enterprise service bus and an integration platform and broker.  As such, it resembles more a rich and diverse toolbox than a shrink-wrapped application.”

Mule in Action, Second Edition, is a comprehensive and generally well-written overview of Mule 3 and how to put its open-source building blocks together to create integration solutions and develop them with Mule. The book provides very good focus on sending, receiving, routing, and transforming data, key aspects of an ESB.

More attention, however, could have been paid to clarity and detail in Chapter 1, the all-important chapter that helps Mule newcomers get started and enthused.

This second edition is a recent update of the 2009 first edition. Unfortunately, the Mule screens have changed a bit since the book’s screen shots were created for the new edition. Therefore, some of the how-to instructions and screen images do not match what the user now sees. This gets particularly confusing while trying to learn how to configure a JMS outbound endpoint for the first time, using Mule Studio’s graphical editor. The instructions seem insufficient, and the mismatch of screens can leave a beginner unsure how to proceed.

The same goes for configuring the message setting in the Logger element. The text instructs: “You’ll set the message attribute to print a String followed by the payload of the message, using the Mule Expression Language.” But no example is given. Fortunately, a reviewer on Amazon has posted a correct procedure. In his view, the message attribute should be: We received a message: #[message.payload]  –without any quote marks around it. (It works.)

Of course, this book is not really aimed at beginners–it’s for developers, architects, and managers (even though there will be Mule “beginners” in those ranks). Fortunately, it soon moves away from relying solely on Mule Studio’s graphical editor. The book’s examples, as the authors note, “mostly focus on the XML configurations of flows.” Thus, there are many XML code examples to work with, plus occasional screen shots of the flows as they appear in Mule Studio. And you can use other IDEs to work with the XML, if you prefer.

Indeed, the authors note, “no functionality in the CE version of Mule is dependent on Mule Studio.”

Overall, this is a very good book, and it definitely covers a lot of ground, from “discovering” Mule to becoming a Mule developer of integration applications, and using certain tools (such as business process management systems) to augment the applications you develop. I just wish a little more how-to clarity had been delivered in Chapter 1.

Si Dunn

South, America – Action, mystery and gritty Southern noir – #bookreview

South, America

A Jack Prine Novel

Rod Davis

(New South Books – paperback, Kindle)

Here’s one way to get yourself into deep trouble: Try to perform a simple act of kindness.

Jack Prine, the central character in this gritty, well-written new mystery novel, reluctantly tries to help a young woman understand what has happened to her brother. And from there, the favor quickly goes downhill, to fear, violence, threats, gunfire and the need to make quick escapes.

Prine lives in New Orleans, and he is, in his own words, “trying to figure out a line on my future….”

As he tries to sort out just what that “line” might be, he has been “doing some freelance writing and the occasional unlicensed PI investigation for a divorce lawyer/ex-Army buddy….”

Early one Sunday morning, Prine has nothing much on his mind except his hangover and a strong need for some Guatemalan coffee. But as he is walking to get the cup of coffee, he discovers a dead body. A man has had the back of his head bashed in. Prine dutifully calls the police and answers the investigator’s questions. Later, Prine gets a phone call from the victim’s sister, Elle Meridian. Reluctantly, he agrees to meet her, so he can tell her more about what he saw and show her where her brother died.

Once they do meet, their attraction for each other develops fairly quickly. And as Jack Prine’s relationship with Elle grows, he soon finds himself drawn into circumstances and dangers he could never have imagined when he first heard her voice on the telephone.

Suddenly, the “unlicensed PI” is having to be a hard-boiled detective. And he and Elle wind up on the run from the vicious and tenacious Dixie Mafia. They race through Alabama and Mississippi on their way back to New Orleans– where no safety awaits them.

South, America is an engrossing tale alive with Southern landscape, thugs, family secrets, voudou, art treasures, racial tensions, sex…and love. And the book’s ending offers an excellent setup for the next Jack Prine novel, hopefully coming soon from Rod Davis.

Si Dunn

 

Software Testing Foundations, 4th Edition – Updated study guide for Certified Tester Exam – #bookreview

Software Testing Foundations, 4th Edition

A Study Guide for the Certified Tester Exam

Andreas Spillner, Tilo Linz, Hans Schaefer

(Rocky Nook - paperback, Kindle

 

Worldwide, more than 300,000 software testers now have certifications recognized by the International Software Testing Qualifications Board (ISTQB).

“The ISTQB Certified Tester qualification scheme has three steps,” the authors note. “The basics are described in the Foundation Level curriculum (syllabus). Building on this is the Advanced Level certificate, showing a deeper knowledge of testing and evaluation. The third level, the Expert Level, is intended for experienced professional software testers and consists of several modules about different special topics.”

This newly updated study guide covers subjects on the Certified Tester Exam at the Foundation Level. The major topics are:

  • Fundamentals of Testing
  • Testing in the Software Life Cycle
  • Static Test
  • Dynamic Analysis – Test Design Techniques
  • Test Management

Appendices cover standardized test plans, offer exercises for each chapter that follow the introduction, and provide a glossary of terms, many of which are recognized by the ISTQB.

“Testing has no tradition for using standardized terminology,” the writers caution. “Thus, the test plan should contain an explanation of the testing terms used in the project. There is a high danger that different people will have different interpretations of testing terms. For example, just ask several people involved in the project for the definition of the term load testing.”

The three writers point out that “[t]he Certified Tester Foundation Level syllabus version 2011 forms the basis of this book . A few updates to the syllabus, which is due to be released in 2015, are noted in the book. The respective national boards may create and maintain additional national versions of the syllabus. These may contain minor deviations from the English original, such as, for example, references to local standards. The national boards coordinate and guarantee mutual compatibility of their curricula and exams. In this context, the responsible board is the International Software Testing Qualifications Board.”

Whether you plan to seek formal ISTQB certifications or just up your game as a software tester, Software Testing Foundations can be an excellent how-to guide. Many aspects of software testing–a complex and often underappreciated field–are covered. Overall, the book is well-organized and written clearly, and its illustrations, while somewhat sparse, are adequate to the task.

Si Dunn

 

Play for Java – Good intro to the Play 2 Java web framework – #programming #bookreview

Play for Java

Nicolas Leroux and Sietse de Kaper

(Manning, paperback)

 

“There are,” co-author Nicolas Leroux writes, ” many Java web frameworks, but most of them have a key flaw: they try to hide the web behind an abstraction layer, rather than embracing it. That is the most important difference between Play and most other Java web frameworks (Servlets, we’re looking at you!).”

His writing partner, Sietse de Kaper,  adds: “Play ‘gets it.’ For ‘it,’ in this case, a lot of things can be substituted. Play ‘gets’ HTTP and the web in general, how developing web application works, what makes a nice and clean API, and more. This was clear from the early Play 1 beta versions, and that’s why we’ve used it on many projects since 1.0 came out. It didn’t disappoint. Now, with Play 2, Play continues to improve web development for the Java platform.”

Their new book from Manning is nicely written, adequately illustrated and structured properly to help newcomers get started with Play and with basic web application development. Play for Java also can help experienced web app developers quickly get up to speed quickly with this powerful development platform.

You start by creating and modifying the ubiquitous “Hello world!” application. Then you spend the remaining chapters developing, expanding and enhancing a warehouse management application, one designed to meet specific requirements within a made-up company. “Enterprise applications usually live inside the IT department and are usually hosted within the organization,” Leroux and de Kaper explain. Indeed, businesses may have several or many enterprise applications serving specific purposes, and those apps often do not communicate with each other.

As both writers note: “Web developers are used to interacting with their applications through the browser. With Play, you can also use the console to interact with your web application’s development environment and build system. This is important for both quick experiments and automating things.”

The web app framework Play is, indeed, fun to play with–and work with. For example, it is very good at showing you exactly (ona browser screen) where you have made a keystroke mistake or other blunder in your code. And the words  “Compilation error” on the screen display can’t be missed. Indeed, they can be read from across a room. (Fortunately, in my office, so no one sees them but me.)

If you decide to download Play and give it a try, be sure you (1) have Java installed correctly and (2) know how to set PATHs correctly on your Windows, Linux, or Mac machine. (I had a lingering Java glitch in one of my machines, and I nearly flung a Windows 7 PC into a wall in frustration. But I finally found the problem and fixed it, and Play immediately popped to life as shown in the book. Meanwhile, Play installed smoothly on a Windows 8.1 machine and an ex-XP PC now running Ubuntu.) 

The authors show how to use Play with three IDEs: Eclipse, NetBeans and IntelliJ. Or, if you prefer, you can stick with the Play console and a text editor such as Notepad++ (my current favorite). And they repeatedly emphasize that (1) you should not worry that their Java framework called Play actually is written in Scala and (2) you will encounter some bits of Scala while working with template files.

“Any template language has structures you need to know to build your templates, and Scala templates are no different,” they explain. “Once you know what you have to do to, for example, iterate over a collection or insert a variable value somewhere, you know all you have to know to use that feature. You don’t have to think of it as Scala if you don’t want to. Think of it as another template language.” (Actually, Scala is not scary at all once you’ve spent a little time with it or taken an online class.)

Play supports the optional use of some compiled assets, and “[o]ut of the box, Play 2 comes with support for LESS, CoffeeScript, and Google’s Closure compiler,” the co-authors note.

According to Playframework.org, Play is built on Akka and offers “a lightweight, stateless, web-friendly architecture.” It also offers built-in testing tools and speedy “hit refresh” workflow capabilities.

Whether you are an experienced web app developer, a newcomer, a student or a hobbyist programmer, it can be serious fun to work with–or play with–Play. And Nicolas Leroux’s and Sietse de Kaper’s Play for Java can be exactly the well-tuned guide you need to learn Play 2.

 – Si Dunn

 

 

 

 

 

 

Enterprise Application Development with Ext JS and Spring – (And a lot more!) – #programming #bookreview

Enterprise Application Development with Ext JS and Spring

Develop and deploy a high-performance Java web application using Ext JS and Spring

Gerald Gierer

(Packt Publishing paperback, Kindle)

A powerful JavaScript web framework such as Ext JS deserves a powerful platform for enterprise desktop application development. Gerald Gierer delivers a good one in his well-crafted new how-to book from Packt Publishing.

Gierer’s book is a bit unusual in today’s pare-it-down marketplace. It contains many before, during and after screen prints to illustrate the actions and outcomes of steps and commands. The 446-page book also has lengthy code listings that enable you to check and verify the outcomes of code changes you have made.

Ext JS and the Spring framework, however, are just a few of the packages that you work with as you set up your development tools and create, modify, expand, test and deploy a sample enterprise application (a task time tracker).

The other programs and tools include MySQL, the Java SE development kit (with the new Java API for JSON), NetBeans, Maven, Glassfish, and JUnit. And, with Ext JS, you learn to work with the Sencha Cmd tool and the Ext JS Software Development Kit (SDK).

But please note, particularly if you are new to some of this : You must pay careful attention to each paragraph as you load and configure software and as you keep building and enhancing your enterprise application.

In this book, it is easy start jumping from one screen print to the next, or from one code listing to the next, while skipping the intervening text. When you do, you can miss key steps that sometimes are buried without highlights in the wording.

This was my first time to work with some of the required software packages, so I had to force myself to really slow down and pay close attention to each paragraph, as well as each graphic.  My initial development attempt went off the rails when I discovered, more than 100 pages into the book, that I had misconfigured a couple of tables, skipped a couple of data changes, and generally screwed up the database. And, being new to some of the software, I couldn’t figure out to repair everything. So I simply started over from scratch and this time moved carefully from one page to the next, closely checking code entries and the book’s text before clicking “Enter.” That made all the difference in my results.

If you are looking to do enterprise application development with a JavaScript framework, definitely consider Ext JS and definitely consider Gerald Gierer’s fine Enterprise Application Development with Ext JS and Spring.

And definitely take your time as you work your way through his book.

Si Dunn

Optimizing Hadoop for MapReduce – A practical guide to lowering some costs of mining Big Data – #bookreview

Optimizing Hadoop for MapReduce

Learn how to configure your Hadoop cluster to run optimal MapReduce jobs

Khaled Tannir

(Packt Publishing, paperback, Kindle)

Time is money, as the old saying goes. And that saying especially applies to the world of Big Data, where much time, computing power and cash can be consumed while trying to extract profitable information from mountains of data.

This short, well-focused book by veteran software developer Khalid Tannir describes how to achieve a very important, money-saving goal: improve the efficiency of MapReduce jobs that are run with Hadoop.

As Tannir explains in his preface:

“MapReduce is an important parallel processing model for large-scale, data-intensive applications such as data mining and web indexing. Hadoop, an open source implementation of MapReduce, is widely applied to support cluster computing jobs that require low response time.

“Most of the MapReduce programs are written for data analysis and they usually take a long time to finish. Many companies are embracing Hadoop for advanced data analytics over large datasets that require time completion guarantees.

“Efficiency, especially the I/O costs of MapReduce, still needs to be addressed for successful implications. The experience shows that a misconfigured Hadoop cluster can noticeably reduce and significantly downgrade the performance of MapReduce jobs.”

Tannir’s well-focused, seven-chapter book zeroes in on how to find and fix misconfigured Hadoop clusters and numerous other problems. But first, he explains how Hadoop parameters are configured and how MapReduce metrics are monitored.

Two chapters are devoted to learning how to identify system bottlenecks , including CPU bottlenecks, storage bottlenecks, and network bandwidth bottlenecks.

One chapter examines how to properly identify resource weaknesses, particularly in Hadoop clusters. Then, as the book shifts strongly to solutions, Tannir explains how to reconfigure Hadoop clusters for greater efficiency.

Indeed, the final three chapters deliver details and steps that can help you improve how well Hadoop and MapReduce work together in your setting.

For example, the author explains how to make the map and reduce functions operate more efficiently, how to work with small or unsplittable files, how to deal with spilled records (those written to local disk when the allocated memory buffer is full), and ways to tune map and reduce parameters to improve performance.

“Most MapReduce programs are written for data analysis and they usually take a lot of time to finish,” Tannir emphasizes. However: “Many companies are embracing Hadoop for advanced data analytics over large datasets that require completion-time guarantees.” And that means “[e]fficiency, especially the I/O costs of MapReduce, still need(s) to be addressed for successful implications.”

He describes how to use compression, Combiners, the correct Writable types, and quick reuse of types to help improve memory management and the speed of job execution.

And, along with other tips, Tannir presents several “best practices” to help manage Hadoop clusters and make them do their work quicker and with fewer demands on hardware and software resources. 

Tannir notes that “setting up a Hadoop cluster is basically the challenge of combining the requirements of high availability, load balancing, and the individual requirements of the services you aim to get from your cluster servers.”

If you work with Hadoop and MapReduce or are now learning how to help install, maintain or administer Hadoop clusters, you can find helpful information and many useful tips in Khaled Tannir’s Optimizing Hadoop for Map Reduce.

Si Dunn

The Troubles Trilogy: Adrian McKinty’s Northern Ireland crime novels are powerful, engrossing reading – #bookreview

In the Morning I’ll Be Gone

Book Three: The Troubles Trilogy

Adrian McKinty

(Seventh Street Books, paperback)

I wish I had discovered The Troubles Trilogy and Detective Sean Duffy much sooner than Book Three. I really don’t like reading trilogies in reverse.

But Adrian McKinty is an amazingly good crime novelist. And now that I have also read his two other books in ThTroubles Trilogy,  I can honestly say that it is pleasingly easy to read these works in any order you wish.

In the Morning I'll Be Gone cover

Yes, Book One: The Cold Cold Ground and Book Two: I Hear the Sirens in the Streets are tied together by some of the same characters and settings found in Book Three: In the Morning I’ll Be Gone. Each novel, however, stands solidly on its own.

Detective Sean Duffy is an Irish Catholic cop working for the Royal Ulster Constabulary, Northern Ireland’s decidedly unpopular police force. The three novels unfold during the early 1980s, amid some of the most violent times in a small-scale but deadly civil war that has been raging for decades. On one side are the mostly Protestant Unionists and Loyalists, who want Northern Ireland to stay part of the  United Kingdom. On the other side are the mostly Catholic Nationalists and Republicans who want Northern Ireland to become part of the Republic of Ireland again.

Duffy, caught in the middle and working for a mostly Protestant police force, must try to solve grisly murder cases while not getting blown up by Irish Republican Army car bombs–he never goes anywhere without first looking beneath his vehicle–or killed by bullets fired by snipers on both sides.

There are neighborhoods where it’s deadly to be a Protestant or a Catholic and neighborhoods where it’s equally deadly to be one of Her Majesty’s cops, or “peelers,” in the local argot.  (Sir Robert Peel, a 19th century British prime minister, is credited with creating the concept of a metropolitan police force. As a result, police officers became known as “bobbies” in England and “peelers” in Northern Ireland.)

Sometimes, in pursuit of leads and suspects, Duffy finds himself on streets that are British territory on one side of the center line and Irish territory on the other. And, a classic tough-guy detective, Duffy seldom hesitates if he needs to sneak into Ireland, where he has absolutely no jurisdiction except his fists and his guns. Also, he sometimes crosses that dark, ill-defined border between good cop and bad cop, in the name of justice as he defines it.

Adrian McKinty has been compared, deservedly so, to Raymond Chandler and a few other leading crime novelists. He is a native of Northern Ireland, and his taut, well-written, realistic prose makes excellent use of that region’s cultures, languages and longstanding sectarian tensions. He draws you in quickly and doesn’t let you escape –not until after gritty Detective Sean Duffy finally has tracked down and confronted the killer face to face.

Si Dunn