Agile Metrics in Action: A good how-to guide to getting better performance measurements – #programming #bookreview

Agile Metrics in Action

Christopher W. H. Davis

Manningpaperback

In the rapidly changing world of software development, metrics “represent the data you can get from your application lifecycle as it applies to the performance of software development teams,” Christopher W. H. Davis writes in his well-written, well-structured new book, Agile Metrics in Action.

“A metric can come from a single data source or it can be a combination of data from multiple data sources. Any data point that you track eventually becomes a metric that you can use to measure your team’s performance.”

The goals of agile metrics include collecting and analyzing data from almost every useful and accessible point in the software development life cycle, so team and individual performances can be measured and improved, and processes can be streamlined.

A key aspect of the data collection and analysis process is distributing the resulting information “across the organization in such a way that everyone can get the data they care about at a glance,” Davis says. He explains how and highlights some “traps” that teams can “fall into when they start publishing metrics,” such as “[s]ending all the data to all stakeholders,” many of whom won’t know what to do with most of it.

Metrics remain a controversial topic for many software developers, Davis emphasizes. So any business leader planning to rush his or her company into adopting agile metrics will need to proceed cautiously, instead. It is vital to get buy-in first from developers and their managers, he says.

“There will likely be people in your group who want nothing to do with measuring their work,” he explains. “Usually this stems from the fear of the unknown, fear of Big Brother, or a lack of control. The whole point here is that teams should measure themselves, not have some external person or system tell them what’s good and bad. And who doesn’t want to get better? No one is perfect—we all have a lot to learn and we can always improve.”

The concept of continuous development is a key topic in this book. “In today’s digital world consumers expect the software they interact with every day to continuously improve,” Davis states. “Mobile devices and web interfaces are ubiquitous and are evolving so rapidly that the average consumer of data expects interfaces to continually be updated and improved. To be able to provide your consumers the most competitive products, the development world has adapted by designing deployment systems that continuously integrate, test, and deploy changes. When used to their full potential, continuous practices allow development teams to hone their consumer’s experience multiple times per day.”

Of course, continuous development produces continuous data to measure and manage, as well, using agile metrics techniques.

Many different topics are addressed effectively in this book. And the practices the author presents are organized to work with any development process or tool stack. However, the software tools Davis favors for this book’s code-based examples include Grails, Groovy and MongoDB.

Agile Metrics in Action is structured and written to serve as a how-to book for virtually anyone associated with a software development team that relies on agile metrics. You may not understand all of the text. But if you take your time with this well-illustrated book, you can at least gain a better comprehension of what agile metrics means, how the process works, and why it is important to your employer, your group and your paycheck.

Si Dunn

Groovy in Action, Second Edition – A hefty how-to guide newly updated for Groovy 2.4 – #programming #bookreview

Groovy in Action, Second Edition

Dierik König and Paul King, with Guillaume Laforge, Hamlet D’Arcy,
Cédric Champeau, Eric Pragt and Jon Skeet

Manning – paperback

Groovy in Action, Second Edition, is not light reading. Indeed, the printed book weighs nearly three and a half pounds and has 880 pages. But it is great reading for anyone who wants to learn, or get better at, the increasingly popular Groovy scripting language that works very smoothly with Java. Indeed, Java’s creator, James Gosling, has hailed Groovy’s “smooth and efficient” integration with Java and called Groovy “an effective implementation language in its own right.” He also has praised the Groovy in Action book as “a clear and detailed exposition of what is groovy about Groovy.”

The Second Edition‘s two main authors and five assisting authors are members of the Groovy core team. And their book spent a lot of time being reviewed and tested by readers in the Manning Early Access Program (MEAP) before it was formally released. So it likely has a better preparation record than many programming books currently on the market.

Groovy in Action‘s front flap indicates that the book covers Groovy 2.4. Groovy recently was up to version 2.4.3, but the programming language has maintained a good track record for supporting backward compatibility. Indeed, I tested random selections of the book’s code samples using version 2.2.0 and its Groovy Console, and programs compiled and ran without problem.

However, if you own the first edition of Groovy in Action, you likely will want to upgrade to the new book. It is, the authors state, “a full rewrite,” with several new chapters, plus  “a few hundred additional pages of genuinely new content.” (And yes, I am upgrading my Groovy installation from 2.2.0 to 2.4.3.)

Despite its heft, the book is nicely structured and easily approached. And its many code examples are mercifully compact, for the most part, and available online, if you prefer. (I actually enjoy keying reasonably short code examples into the Groovy Console.)

The 20 chapters are organized into three major parts:

  • The Groovy Language
  • Around the Groovy Library
  • Applied Groovy

“The Groovy Language” introduces the reader to the language’s basics: its “syntax, grammar, and typical idioms,” plus how to use dynamically typed Groovy as a static language, if desired. The “Around the Groovy Library” reference section focuses on such topics as working with builders and the Groovy Development Kit (GDK), as well as Groovy’s support for database programming and the handling of JSON and XML. And “Applied Groovy” looks at “typical uses cases for Groovy,” including “a thorough exposition of how to use Groovy for test automation,” how to put Groovy to work on multi-core machines in concurrent programming situations, and “using Groovy for domain specific languages.”

In short, there is no shortage of useful content in Groovy in Action, Second Edition.

Si Dunn

——————–
Get Groovy in Action, Second Edition here, at no extra cost.
——————–

Grails in Action, 2nd Edition – A (mostly) winning how-to guide to use with a winning web app framework – #programming #bookreview

 

Grails in Action, Second Edition

Glen Smith and Peter Ledbrook

(Manning – paperback)

Grails finishes at or very near the top in almost any smackdown of full-stack web application frameworks that run on the Java Virtual Machine (JVM). And this recently updated Grails in Action how-to book is mostly a clear winner, too.

According to the Grails.org website, open-source Grails “takes advantage of the Groovy programming language and convention over configuration to provide a productive and streamlined development experience.”

Grails likewise is a world that “moves very quickly,” the authors of Grails in Action, Second Edition emphasize. “There have been substantial changes in Grails in the time it took us to develop Grails in Action, Second Edition. Even moving from Grails 2.2 to 2.3 caused us to make significant changes! Although the book targets Grails 2.3, a new version of Grails (2.4) is already available. Fortunately, everything in here is still valid for the new version.”

In the first chapter, the authors try to move very quickly through the process of getting a Grails application up, running, tested and deployed. But in taking this “Grails in a hurry” approach, they race a bit too quickly and unclearly through the installation instructions, in my opinion. (My Linux and Windows installations did not work correctly at first, and I had to seek out  information on how to sort them out.)

And, in the portion of the chapter where you are told how to get the random-quote database set up and working, it is not always clear which file you are supposed to modify and in which subdirectory. I already had a little bit of experience with Groovy, so that portion went smoothly. But the Grails database steps could have been explained and illustrated more clearly. It took me several tries to finally get the “Quote of the Day” database working and posting random quotes.

The authors take a four-part approach to explaining Grails and its underlying Groovy programming language:

  • Part 1: Introducing Grails – You are shown how to get a nicely formatted Quote of the Day (QOTD) application up and running, while also learning how to work with Groovy.
  • Part 2: Core Grails – You get a “more thorough exploration of the three core parts of the Grails ecosystem: models,
    controllers, and views.” Includes such topics as: domain modeling; query mechanisms; how to query a database in Grails without using SQL; Grails’ web-oriented features; Grails Service objects; Grails’ tags for user interface construction; and Grails support for Ajax.
  • Part 3: Everyday Grails – The focus here is on “building all the necessary pieces of a real-world application.” The chapters cover tests, plug-ins, security in Grails and working with RESTful APIs. The chapters also cover (1) Grails single-page web apps using the Angular.js framework, and (2) Spring integration in Grails.
  • Part 4: Advanced Grails – These chapters zero in on “performance tuning, legacy integration, database transactions, custom build processes, and even how to develop and publish your own plugins.”

Aside from a few small omissions of how-to information, I am happy to have the wide-ranging contents of this book. And I am certainly pleased with what I can now do with Grails and Groovy, after reading Grails in Action, Second Edition.

 —Si Dunn

 

 

Making Java Groovy – An excellent how-to guide for Java developers – #programming #bookreview

Making Java Groovy

Kenneth A. Kousen
(Manning, paperback)

I have looked at a lot of programming how-to texts in recent years, and this is one of the best I have encountered. Kenneth A. Kousen does not try to get readers to abandon aging and bloated Java in favor of a language that’s sleeker, shinier and newer. Instead, he seeks to show us how to use Groovy’s features and capabilities to help simplify Java, to make working with it easier, more efficient and–yes, even a bit more enjoyable. Indeed, Kousen proposes that we should gradually blend more and more Groovy into our Java code. Hence the title, Making Java Groovy.

(By the way, I lived through the hippie Sixties and remember how weary many of us grew of endlessly hearing the happy word “groovy”–as in “It’s groovy, man, groovy! Everything’s groovy!” I can say honestly that I resisted looking at Groovy, the programming language, for a long time, primarily because of that long-ago, wince-inspiring memory.)

Groovy is an object-oriented programming language that works on the Java platform, and it is intended to complement Java, not replace it. As Guillaume Laforge, the Groovy program manager, explains in his foreword to Kousen’s book: “The idea [behind Groovy] was to empower users to be more productive by removing the boilerplate of Java, and to simplify their programming lives by giving them compelling and straightforward APIs [application programming interfaces] to work with.”

Ken Kousen emphasizes that, among other things, Groovy “adds new capabilities to existing Java classes.” It uses Java libraries. And it makes it easier to work with XML and JSON. Kousen adds that “the Groovy version of a Java class is almost always simpler and cleaner. Groovy is far less verbose and generally easier to read.”

His book has ten chapters and two appendices and is structured into three parts. The first part, titled “Up to Speed with Groovy,” focuses on some long-time Java problems that Groovy addresses and simplifies, and it presents some ways you can use Groovy’s features in Java. The obligatory “Hello, World!” example is presented, but Kousen’s code accesses Google Chart Tools and generates a cool (okay, a groovy) “Hello, World!” 3D pie chart, to which you can add new slices and labels. (But, yes, you do first get the bland and obligatory Groovy shell command-line groovy:000>println ‘Hello, World!’ to verify that your Groovy installation works. Then you get to create the pie chart.)

Kousen is an independent consultant and technical trainer who specializes “in all areas related to Java.” He presents several Java code examples and shows how much shorter they can be made by integrating some Groovy into the mix. “Java historically hasn’t played well with others [other programming languages],” he cautions. But he demonstrates how Java and Groovy can be integrated smoothly to solve some nagging Java irritations and shortcomings.

The book’s second section highlights “Groovy Tools” and emphasizes build processes and testing, “two of the major ways Groovy is often introduced into an organization….”

The third section, “Groovy in the Real World,” describes “the sorts of challenges Java developers face on a regular basis” and how Groovy can help overcome them. The author starts with the Spring framework, “probably the most commonly used open source project in the Java world” and illustrates how “Spring and Groovy are old friends and work together beautifully.”  He also examines: (1) how Groovy interacts with persistent storage; (2) REST-ful web services, “with an emphasis on the JAX-RS 2.0 specification”; and (3) using Groovy in web application development.

The book’s instructions for downloading and installing Groovy are positioned near the back in Appendix A. and seem a bit sparse. But this is okay, since Making Java Groovy is not intended for programming beginners. And I can confirm that writers really don’t like to have to pause a well-written introduction long enough to explain how to download and install the right software for several operating systems.

Following Kousen’s instructions, I installed Groovy fairly easily on a Windows 7 PC, using a Windows EXE installer. He also mentions (too briefly) the Eclipse Marketplace. Since I have Eclipse (with Java and Scala) installed on a Linux machine, I used the Marketplace to get the Groovy and Grails plug-in, too. (My wife did not want Groovy anywhere on her precious Mac, so I did not test that installation.)

“Groovy generates Java bytecodes that are interpreted by a Java virtual machine,” Kousen states. “This means you have to have Java installed to install Groovy.”  Note also: “You need a full Java Development Kit (JDK) rather than a Java Runtime Environment (JRE).” And the Standard Edition (SE) is fine.

Appendix B, “Groovy by Feature,” expands upon Chapter 2’s “Groovy by Example,” and this one seems to be oddly placed. “While some people learn best through short, simple code examples illustrating each concept,” Kousen explains, “others prefer to see basic concepts combined to solve actual problems.” Appendix B “walks through most of the major features of Groovy and provides short snippets of code illustrating them.”

I would be happier if Appendix B had been positioned as Chapter 3, instead. Many people can learn both by feature and by example. And there should be nothing wrong with using one approach to reinforce the other.

But this is minor nitpicking. Making Java Groovy is an excellent how-to guide that I predict will go a long way to help popularize Groovy programming–even among us old guys who still shudder at the verbal excesses of our youth, when we proclaimed “everything” was “groovy.”

Si Dunn

Programming Groovy 2 – For the experienced Java developer seeking dynamic productivity – #programming #bookreview

Programming Groovy 2

Dynamic Productivity for the Java Developer

Venkat Subramaniam
(Pragmatic Bookshelf, paperback)


The programming language
Groovy has a bit of a checkered past. Before it reached Release 1 in early 2007, it was almost abandoned because of a series of development problems. But some dedicated developers reworked it, gave it new life, and helped it gain acceptance in a widening array of commercial projects. Release 2.0 became available last year, and you can download 2.1, with 2.2 in beta. Groovy is doing groovy now, thank you very much (and thank the Grails web application framework, too).

In his new book, which keys off of his 2008 Groovy 1 edition, Dr. Venkat Subramaniam  describes Groovy 2 as “lightweight, low-ceremony, dynamic, object-oriented, and runs on the JVM [the Java Virtual Machine].”

He notes: “Groovy is open sourced under the Apache License, version 2.0. It derives strength from various languages such as Smalltalk, Python, and Ruby, while retaining a syntax familiar to Java programmers. Groovy compiles into Java bytecode and extends the Java API and libraries. It runs on Java 1.5 and newer. For deployment, all we need is a Groovy Java archive (JAR) in addition to the regular Java stuff, and we’re all set.”

Groovy is not for coding beginners, nor is it a means to avoid learning Java. This book–well written and nicely illustrated with short code examples and screenshots–”is aimed at Java programmers who already know the JDK [Java Development Kit] well but are interested in learning the Groovy language and its dynamic capabilities,” Dr. Subramaniam says.

He has organized his 19-chapter, 333-page book into three major parts:

Part I: Beginning Groovy – Focuses on the fundamentals of the language but deliberately skips the basics of programming. The book, after all, is aimed at “experienced Java programmers.”

Part II: Using Groovy – Shows “how to use Groovy for everyday coding–working with XML, accessing databases, and working with multiple Java/Groovy classes and scripts….” Also delves into Groovy extensions and additions to the JDK.

Part III: “MOPping Groovy” – The odd title may conjure up a brief image of mopping up spilled gravy. But this part deals with “Groovy’s metaprogramming capabilities….” The coverage includes: (1) metaobject protocol (MOP); (2) “how to do AOP-like operations in Groovy” [AOP = “aspect-oriented programming”]; and (3) “dynamic method/property discovery and dispatching,” as well as Groovy’s “compile-time metaprogramming capability….”

If you are a Java developer seeking new tools. new challenges, and new horizons, this could be the right time and right way to get your groove on: with Groovy 2 and Dr. Venkat Subramaniam’s fine how-to guide.

“Groovy is an attractive language for a number of reasons,” the author says, naming four key ones:

“It has a flat learning curve.”

“It follows Java semantics.”

“It bestows dynamic love.”

“It extends the JDK.”

“Groovy,” he adds, “feels like the Java language we already know, with a few augmentations.”

Si Dunn

Book Brief – Programming Grails – A new, solid guide for experienced developers – #programming #bookreview

Programming Grails
Burt Beckwith
(O’Reilly – paperback, Kindle )

Burt Beckwith is an experienced core developer on the Grails software team at SpringSource. His new book, Programming Grails, is written primarily for experienced Grails developers “who want to dig deeper into the architecture and understand more about how Grails works its magic and how it integrates with Groovy, Spring, Hibernate, and other technologies.”

Beckwith adds that “[d]evelopers with experience in similar frameworks such as Spring MVC, JEE, or Ruby on Rails should find this book useful in understanding how Grails implements features to which they are accustomed.”

He cautions that Programming Grails “should not be your first Grails book, since it presumes a good deal of previous experience and understanding, so be sure to read a more comprehensive Grails book first.”

The 12-chapter, 344-page book focuses on the inner workings of the Grails 2.0 feature set and emphasizes “best practices for building and deploying Grails applications,” including topics such as “performance, security, scaling, tuning, debugging, and monitoring.” It is written clearly, and its text is kept reasonably short between topic headings. Numerous short code samples and other illustrations are included.

Grails’ creator, Graeme Rocher, has given this book a solid thumb’s up, stating that “it goes much deeper than any other Grails book I have seen.”