Manning’s ‘MongoDB in Action’ has been updated for version 3.0 – #programming #bookreview

MongoDB in Action, Second Edition

Covers MongoDB version 3.0

Kyle Banker

Manning, paperback

Yes, this updated edition of MongoDB in Action is aimed at software developers. However, the book wisely does not ignore those of us who are more casual users of MongoDB.

Indeed, this is a fine how-to book for MongoDB newcomers and casual users, too, particularly if you are patient and willing to read through an introductory chapter focusing on “MongoDB’s history, design goals, and application use cases.”

Many people, of course, just want to jump straight into downloading the software, running it, and playing with it for a while before getting down to any serious stuff such as application use cases. So this book’s Appendix A is the place to go first, so you can get MongoDB onto your Linux, Mac, or Windows computer.  Then, after MongoDB is installed, you can jump back to Chapter 2 to start learning how to use the JavaScript shell.

After that, things quickly  start getting more “practical.” For example, Chapter 3 introduces “Writing programs using MongoDB.” Here, Ruby is employed to work with the MongoDB API. But the author notes: “MongoDB, Inc. provides officially supported, Apache-licensed MongoDB drivers for all of the most popular programming languages. The driver examples in the book use Ruby, but the principles we’ll illustrate are universal and easily transferable to other drivers. Throughout the book we’ll illustrate most commands with the JavaScript shell, but examples of using MongoDB from within an application will be in Ruby.”

I won’t try to sum up everything in this well-written, 13-chapter book. I have used older, 2.X versions of MongoDB in MEAN stack applications. And, separately, I have worked a bit with Ruby and MongoDB. But in each case, I haven’t needed to learn all that much about MongoDB itself, mainly just ensure that it is storing data that can be accessed in the right place and updated, saved or deleted as needed. So this book, written for 3.0.X (and earlier and later) MongoDB releases is an eye-opener for me and one that I will keep around for reference and more learning now that I have upgraded to 3.2.

Part 1 of MongoDB in Action, 2nd edition “provides a broad, practical introduction to MongoDB.” Part 2 delivers “a deep exploration of MongoDB’s document data model.” Part 3, meanwhile, examines MongoDB “from the database administrator’s perspective. This means we’ll cover all the things you need to know about performance, deployments, fault tolerance, and scalability.”

The book’s author knows that readers with some MongoDB experience will not read the book straight through. Instead, they will tackle chapters in many different orders and will even skip some chapters. And this is okay. MongoDB in Action: Second Edition is a book many of us will be happy to have handy whenever we need to get a better grip on some new aspect of working with this very popular open-source document database.

One cautionary note: The author points out that “as of MongoDB v3.0, 32-bit binaries will no longer be supported.” Of course, some 3.X 32-bit binaries are still out there, and you can install them. But you will get a lot of warning messages from MongoDB. So, download a 64-bit binary if your system will support it.

Si Dunn

‘A Brilliant Death’ – Murder mystery, coming of age and homage to 1960s small-town Ohio – #bookreview

A Brilliant Death

Robin Yocum

Seventh Street Books – paperback, Kindle

Writers often are advised to “Write what you know.” Author Robin Yocum clearly has heeded that advice. This is a well-written mystery that also is a coming-of-age story, plus a fine portrait of simpler times in the American heartland during the mid-1960s.

A Brilliant Death is set in a real-life but now unincorporated village, Brilliant, Ohio. Brilliant is a settlement on the Ohio River near the West Virginia border, in an area where steel mills, coal mines and a glass factory once held sway and Polish and other immigrant names are common.

Yocum’s novel focuses on two teenage friends, Mitch Malone and Travis Baron, as they near adulthood in Brilliant and start trying to uncover the truth behind the death of Travis Baron’s mother when he was still an infant. Along the way, the two youths, both promising athletes, continue growing up, getting into typical teenage scrapes, and nearing the time when they will go off to college or off to the Vietnam War.

They do manage to discover the terrible truth behind Travis’s mother’s death. And what they learn puts both of their lives immediately into danger.  Now they must make difficult choices from options they  hoped they would never have to consider.

Si Dunn

“Rain Dogs” – Adrian McKinty’s best Sean Duffy murder mystery? #bookreview

Rain Dogs

A Detective Sean Duffy Novel

Adrian McKinty

Seventh Street Books – paperback, Kindle, audible

Now that I have suckered you into this review with a question, I’m going to give you something of a cop-out answer: Rain Dogs is the best Sean Duffy detective story I have read…since the last Sean Duffy detective story I read, which is Gun Street Girl. I have now read all five Sean Duffy mysteries, and I am a rock-solid fan of each one. Adrian McKinty is one hell of a good novelist, and his Sean Duffy series is first-rate police-procedural fiction.

Rain Dogs did unnerve me for the first few pages–it got off to a bit of a plodding, unexpected start. What? Detective Inspector Sean Duffy is helping protect Mohammed Ali from adoring crowds in Belfast?

And, it takes a while for the mystery Duffy must solve to come into focus. Yet, there is also plenty of introspection and unease on Sean Duffy’s part, and this keeps the reader engrossed and the story moving forward. Duffy has reached a point in his career when midlife crisis suddenly is in full-tilt boogie mode.

He has grown weary of the sameness in his job, weary of the Troubles that keep Protestants, Catholics, and paramilitaries in violent conflict, weary of constantly having to check under his car for mercury tilt switch bombs placed there by one side or the other or by criminals wanting him dead. Meanwhile, it keeps raining, raining, dreary raining. And Beth, the latest woman in his life, has broken off with him and moved out, taking most of what’s left of his heart with her.

Meanwhile, things keep going from really bad to really worse for Duffy, a suburban cop in the Carrickfergus branch of the Royal Ulster Constabulary (RUC). He suddenly finds himself investigating the second “locked room” violent death of his checkered career. This time, it looks a lot like a case of suicide. And there is high-level pressure to wrap up the case quickly and put it away. A big business project with many potential jobs for Northern Ireland is on the line.

But Duffy, even when depressed, drunk or beaten down, cannot let go of the suspicions and strong sense of justice that keep him moving forward.

As a detective and empathetic human being, he never stops pushing against the rising tides of bureaucracy, burnout and self-doubt.

“I stared down at the body again. There was something not quite right about this crime scene, something that I was missing, but try as I might I couldn’t figure out what it was. Had Beth’s departure frazzled me, or was it just thirteen long years of this exhausting profession in this exhausting land?”

Not even pressure and criticism from British government agencies can turn him aside once he has a theory and starts following it.

At one point, after chasing a lead into Finland and back, he is confronted by a shadowy representative of an unnamed British agency that is trying to get him to quit the case, in the name of fifteen hundred potential jobs for Belfast and Northern Ireland:

“You must be aware of your RUC record. A less-than-stellar police career, no real high-profile convictions. The fact that you never found out who killed  Lizzie Fitzpatrick in that other so-called ‘locked room’ incident when you were with Special Branch. The fact that, for the last six years, you’ve been treading water here. A constant source of embarrassment to your superiors, a disappointment to your friends.”

To which Duffy retorts: “Maybe I’m not a great detective, maybe I ‘m not even a good detective, but I am fucking persistent….The UK government might not like it, the Irish government might not like it, but if I can make a case, the RUC will support me and the police down south will support me, too. Cops everywhere love nicking villains.”

Sean Duffy indeed is persistent. That is why he is able to solve cases that many other cops would not recognize, nor have the desire, energy and drive to pursue.

But, again, the strongest driver in Duffy’s life is his personal sense of justice. He will bend rules, strain budgets, knock heads, disobey orders, and sometimes even go around or straight through a few laws to get his hands–or his bullets–on a murderer.

Adrian McKinty fans and readers new to McKinty will find much to relish in Rain Dogs. Duffy is at his driven-down-but-rise-above-it best in this book. And some surprising changes occur in his life. If, with this book, you are new to the Sean Duffy series, get “the Troubles Trilogy” ASAP: The Cold, Cold Ground; I Hear the Sirens in the Street; and In the Morning I’ll Be Gone. Oh, and don’t miss the trilogy’s fine sequel, Gun Street Girl. One Sean Duffy tale, you may agree, is not enough.

Si Dunn

‘Spring Boot in Action’ can help you push aside the old drudgeries of configuring Spring applications – #programming #bookreview

Spring in Action

Craig Walls

Manningpaperback

If you have worked with the decade-old Spring framework, you know well that it has a long history of providing configuration headaches for developers. The new Spring Boot framework, on the other hand, literally brings much-needed simplification and automation to the process of using Spring. And it can put some refreshing fun back into application development.

“Spring Boot,” Craig Walls states in his new book, “is an exciting new way to develop Spring applications with minimal friction from the framework itself. Auto-configuration eliminates much of the boilerplate configuration that infests traditional Spring applications. Spring Boot starters enable you to specify build dependencies by what they offer rather than use explicit library names and version. The Spring Boot CLI takes Spring Boot’s frictionless development model to a whole new level by enabling quick and easy development with Groovy from the command line. And the [Spring Boot] Actuator lets you look inside your running application to see what and how Spring Boot has done.”

You do not need a lot of Spring experience to benefit from this book. You do need some Java background, and it is helpful to have used Groovy, Gradle and Maven a few times. But the book’s text is written smoothly, and it is well illustrated, with numerous code examples and a few screen shoots. So Java developers who are fairly new likely can use it and pick up new skills.

While going through the book, you develop a reading-list application using Spring Initializr, Spring Boot, Spring Tool Suite, and other tools. In the project, you “use Spring MVC to handle web requests, Thymeleaf to define web views, and Spring Data JPA to persist the reading selections to a database,” Craig Walls explains. Initially, at least, “an embedded H2 database” is employed during development.

Walls’s book is divided into eight chapters:

1. Bootstarting Spring
2. Developing your first Spring Boot Application
3. Customizing configuration
4. Testing with Spring Boot
5. Getting Groovy with the Spring Boot CLI
6. Applying Grails in Spring Boot
7. Taking a peek inside the Actuator
8. Deploying Spring Boot applications

Four appendices also are presented: Spring Boot developer tools, Spring Boot starters, Configuration properties, and Spring Boot dependencies.

Bottom line: with Spring Boot providing much of the heavy lifting, you likely will gain better feelings about the venerable Spring framework. You may even wind up with a healthy new respect for it. And Spring Boot certainly should add more years to Spring’s usefulness and viability in the marketplace.

Si Dunn

Attack of the Killer Parentheses: ‘Clojure in Action, 2nd Edition’ – #bookreview

Clojure in Action, 2nd Edition

Amit Rathore and Francis Avila

Manning – paperback

Clojure seems to be afflicted with a measles-like outbreak of parentheses, and it generally just looks strange to many software developers. And there’s a good reason for that, as this book’s two author point out in their recently released second edition.

“Clojure’s syntax is derived from its Lisp roots: lots of parentheses. It’s alien to most developers with experience in languages with Algol-inspired syntax like C, C++, Java, Python, Ruby, Perl, and so on.”

But Clojure also is an intriguing and powerful choice for many software development projects, Amit Rathore and Francis Avila insist. Clojure is “a functional Lisp on the JVM” (the Java Virtual Machine), and: “It is impossible to separate the Lisp, functional programming, and JVM features of Clojure. At every step they play on each other and tell a compelling software development story….”

I have been tinkering with Clojure on the side, at random spare moments, for more than two years, using a disorganized approach of looking at web postings, building and modifying simple projects that others have posted, and sometimes looking at Clojure how-to books as time permits.

From my perspective, Clojure in Action, 2nd Edition fills a beginner’s need for a friendly, well-organized approach to learning the language and putting it to work effectively. Developers already working with Clojure can benefit from having this book, too, as a handy reference. It covers a lot of ground, using reasonably short paragraphs and offers many short code examples to illustrate its key points.

Clojure in Action, 2nd Edition “assumes no prior experience with Lisp or with any functional programming language,” the authors emphasize. “It starts out with the absolute basics and slowly layers on the different features of the language in  a way to make it all fit together in an intuitive way. It takes a first-principles approach to all the topics, first explaining why something needs to be done a certain way, and only then talking about the Clojure way.”

Clojure is not a language for absolute beginners. The authors assume “you’re familiar with an OO [object-oriented] language like Java, C++, Ruby, or Python, but no background in Java, Lisp, or Clojure is required.” They also assume you have downloaded Clojure and gotten it working on your PC. You can read more about Clojure and download it here.

This expanded 2nd edition states that it covers the “new” features of Clojure 1.6. Of course, Clojure already is up to 1.8, but I have tried many of the code examples at various points in the book and have not encountered problems while running 1.8.

Si Dunn

Getting started with 3D printing? Consider these two new Maker Media books – #bookreview

Many people who want to jump into 3D printing have almost no idea what they actually want to make. Or, they may have projects in mind that far exceed their abilities to fabricate as beginners.

If 3D printing is on your mind (or arriving soon in some shipping boxes and downloads), here are two new books to consider: 3D Printing Projects and 3D CAD with Autodesk 123D.

3D Printing Projects

Toys, Tools, and Contraptions to Print and Build Yourself

Brook Drumm & James Floyd Kelly, with John Baichtal, Rick Winscot, Brian Roe, John Edgar Park, Steven Bolin,
Nick Ernst, and Caleb Cotter

(Maker Media, paperback)

Maker Media’s 3D Printing Projects is written by a team of professionals who have 3D printing newcomers in mind, at first. But their book also includes several more challenging projects that require Arduino or Raspberry Pi boards, motors, servos, or video cameras and other devices. Importantly, all of the projects are designed to be fabricated with small, desktop 3D printers.

The book starts by showing how to fabricate a simple gooseneck lamp that uses an LED light powered by a 9-volt “wall wart.” From there, the projects increase in complexity, to fabricated devices such as a two-axis camera gimbal and a flower-care robot that monitors soil moisture and adds water when the soil gets dry. Numerous photographs, illustrations and how-to steps are provided.

This well-written book shows that much can be done, even at the hobby level, with just a few custom 3D printed parts and some electronics.

 

3D CAD with Autodesk 123D

Design for 3D Printing, Laser Cutting, and Personal Fabrication

Jesse Harrington Au & Emily Gertz

(Maker Media, paperback)

The first steps to 3D printing include “learning how to design for three dimensions using a computer” and having an idea “where to start,” the authors of this useful book point out.

“Many makers who are accustomed to creating by hand view CAD [computer-aided design] software suspiciously. They may worry that digital design will lack soul, or be perceived as cheating. Neither is true,” Jesse Harrington Au and Emily Gertz insist. “A good CAD program can be just that: an aid in realizing your vision for your project.”

Autodesk 123D is one of several popular “parametric design” software packages on the market. The authors note: “The term parametric refers to the use of design parameters, such as measurements, to construct and control the 3D model. This means you will first create a sketch that has measurements attached to it. Those measurements will be used to construct your solid model using different features such as extrude, revolve, or loft.

“This being said, 123D is also capable of ‘tinkering’: using loosely based measurements while fleshing out the look and feel of your design. The power of this is that it allows you to tweak your model during the design process based on actual measurements.”

The book shows how to navigate CAD programs, and it covers how to work with the cloud-based Autodesk 123D “family of programs that allow you to share models between the different apps.”

3D CAD with Autodesk 123D is richly illustrated and well written, with much of the how-to text contained in short paragraphs that offer clear steps.

Si Dunn

 

 

 

 

Step away from the ‘smartphone’ and try using your hands and mind to make something – #bookreview

The Make: Series of How-to Books

A British scientist made headlines a few years ago when she warned that young people no longer make or repair things. It has become all too easy for them now, she cautioned, to simply throw away old or broken devices and buy new ones.

A key point was that many things currently being discarded could be fixed or refurbished and put to new uses. It would just take a little effort, a little learning, and some imagination.

I ran into some of that “no longer make or repair things” attitude a few years ago while working temporarily as a substitute teacher. If you have ever been a substitute in a public high school or middle school, you likely know that students often view “subs” as an excuse to pay absolutely no attention to anything he or she says.

When I could get no interest or response to the day’s assigned work in a science class, I tried introducing a challenge: Imagine you have become stranded on a desert island in the Pacific Ocean, and you have just a few items with which to try to survive and attract the attention of a passing ship. The items ranged from coconuts and palm fronds to a pocket mirror, a small magnifying glass, a couple of cups, some string and a safety-pin.

I figured the kids might come up with some clever ways to (1) crack open the coconuts for food and liquid, (2) start a fire using a magnifying glass and dried palm fronds, (3) use the string and safety-pin to catch a fish to cook over the fire, (4) use the cups to boil seawater and capture the steam to make a little drinking water, and (5) prepare a separate pile of palm fronds to burn as a rescue signal to a passing ship.

Ha. At first, the students seemed intrigued and engaged by the challenge. They immediately started calling out survival “strategies.” Unfortunately, most of their ideas started with two concepts: “First, I’d go to the mall and buy…” or “First, I’d go online and buy….”

The reality of being stranded in isolation without immediate communication did not even register with them at first. When they did begin to try to imagine surviving without their smartphones, they quickly ran out of ideas and became sullen or antagonistic toward me.

This experience also became the straw that finally broke the back of my desire to continue as a substitute teacher. I had grown up at a time when making, tinkering, building, and repairing all were noble pursuits for a teenager interested in science, electronics, space and engineering. If I wanted a shortwave radio or a new type of model airplane or a small rocket I could launch in my back yard, I built them from scratch or combined pieces of previous projects. None of this experience registered with my students. And my next attempts to stir up enthusiasm for making and repairing things similarly fell flat.

Make It So?

Do you worry that your kids are growing up not knowing how to make things or fix things? Do you fret that you no longer remember how to make things or fix things?

Working with your hands, eyes and brain – and not just mindlessly swiping an index finger across a tiny screen – can be both physically and mentally rewarding.

Of course, the web is alive with “how to” information for making or repairing almost anything. And I make occasional pilgrimages to public libraries and bookstores to find reference materials and instruction books related to specific projects.

I am an unabashed fan of the “Make:” series of books from Maker Media. I don’t build all of their projects, but I do try out some of them. And I enjoy reading about zany, yet sometimes practical, stuff such as (1) how to use a magnet to tell if money is counterfeit, (2) how to create artwork that actually does something, using just a handful of electronic components, (3) how to generate electric power with several lemons connected in series, or (4) how to make some really good paper airplanes and paper helicopters. The “Make:” books consistently feature clear, well-organized instructional text, illustrations and photographs of how things go together.

Books such as Tinkering: Kids Learn by Making Stuff (2nd edition), Easy 1+2+3 Projects, and Planes, Gliders, and Paper Rockets can appeal to parents and children who are in elementary school or older. For older kids and their parents, or for would-be engineers, Make: books such as Bluetooth, Getting Started with Intel Edison, and 3D Printing Projects can be helpful and enlightening how-to guides. Books on numerous other topics also are offered.

Do your kids (and/or you) seem unhealthily addicted now to clutching and staring at smartphones all day? You may want to try putting the devices aside and seeing what you can create with your hands, your mind, some household materials and a few readily available gadgets that don’t require pricey data plans and contracts.

You can do it! Power off now! (Okay, for just a few minutes at first if you insist and if you have a really bad case of smartphone withdrawal.)

— Si Dunn