The dRuby Book – A fine new intro to distributed Ruby – #bookreview #in #ruby #programming

The dRuby Book: Distributed and Parallel Computing with Ruby
Masatoshi Seki (translated by Makoto Inoue)
(Pragmatic Bookshelf,
paperback, list price $35.00)

Looking to expand your Ruby horizons? Distributed Ruby, or dRuby, may be precisely the challenge you are seeking. And this new how-to book can get you started.

The author, Japan’s well-known Ruby master, Masatoshi Seki, previously has published two books (in Japanese) involving dRuby: Distributed Object Programming with dRuby and Distributed Web Programming with dRuby.

The dRuby Book from Pragmatic Bookshelf, is an updated and expanded translation of Seki’s Distributed Web Programming with dRuby.

Do not let the word “translation” stop you from considering this new how-to guide. Makoto Inoue has done an excellent job of rendering Masatoshi Seki’s text into clear, smooth English, with editing help from Susannah Davidson Pfalzer.

Seki has rewritten his book to include “the latest dRuby information and new libraries.” He notes: “Stateful web servers are a core concept of dRuby. dRuby lets you pass normal Ruby objects and call their methods across processes and networks seamlessly. With dRuby, you’ll experience the world of dirtributed computing as a natural extension of Ruby.”

He adds: “You don’t need to know much about distributed systems as a prerequisite for reading this book, but you should know the basic Ruby syntax, know the standard Ruby classes, and be able to write some simple code.”

dRuby is “one of the standard libraries that comes with the Ruby core code, and you can use it to write distributed programming apps without the hassle of installing and configuring additional components,” the author points out.

But be sure you have worked with Ruby a bit before jumping into this 253-page book. Its requisite “Hello, world” example – with no preliminary how-to instructions – shows (1) how to create a server that prints out strings and (2) how to code a simple client that can make the server print “Hello, World” – and each process is run from a separate terminal window. Code-wise, it’s not a big deal, but don’t try this at home without learning the basics of Ruby first.

Seki’s book is organized into four major parts:

  • Introducing dRuby
  • Understanding dRuby
  • Process Coordination
  • Running dRuby and Rinda in a Production Environment

The 12 chapters utilize short, to-the-point paragraphs and offer numerous short code examples.

If you thinking of diving into distributed systems, client-server network programming, or concurrent programming, or maybe just seeking “a more lightweight alternative to Ruby on Rails or Sinatra,” definitely check out The dRuby Book.

Si Dunn

#

Advertisements

Node: Up and Running – A fine intro to Node.js, the new 799-pound gorilla in the room – #programming #bookreview #in

Node: Up and Running
Tom Hughes-Croucher and Mike Wilson
(O’Reilly, paperback, list price $34.99; Kindle edition, list price $27.99)

Node.js is often described as “the dominant player” in the world of server-side JavaScript development. Whether that’s completely true or boastful hype, big players such as Google, LinkedIn, eBay, Walmart and Microsoft now are using it. And so are countless smaller players and startups. If Node.js is not yet King Kong, it has at least grown into a 799-pound, but reasonably tame, programming gorilla for those who want to write scalable server-side code using JavaScript.

In today’s weird, challenging job market for programmers, it would not hurt you to feed this new gorilla a few bananas and gain at least passing familiarity with it. You never know when you may need to ramp up some Node.js skills in a hurry, to get or keep a job or land a contract.

I like O’Reilly’s “Up and Running” book series for that very ramp-up reason. They do a good job of introducing a programming language and showing how to use key aspects of it. And they point you to additional resources for skills and knowledge you can pick up on the fly.

According to the two authors of Node: Up and Running,“Node.js is many things, but mostly it’s a way of running JavaScript outside the web browser.” They add: “Many people use the JavaScript programming language extensively for programming the interfaces of websites. Node.js allows this popular programming language to be applied in many more contexts, in particular on web servers. There are several notable features about Node.js that make it worthy of interest.”

For example: “Node is a wrapper around the high-performance V8 JavaScript runtime from the Google Chrome browser. Node tunes V8 to work better in contexts other than the browser, mostly by providing additional APIs that are optimized for specific use cases.”

The two authors point out that “JavaScript is an event-driven language, and Node uses this to its advantage to produce highly scalable servers. Using an architecture called an event loop, Node makes programming highly scalable servers both easy and safe.” Node.js also features non-blocking I/O.

Node.js “runs on Windows, Linux, Mac, and other POSIX OSes (such as Solaris and BSD),” the authors state. And this is the second Node book I’ve reviewed that claims the installation process is “extremely simple.” The previous book did not give enough information for beginners. This one follows “extremely simple” with instructions and screen displays spread across nearly four pages. But – a hurried beginner may miss this at first – the steps are only for those who choose to do a source install rather than use one of the Node.js installer links.

The first time I used a Windows link to install Node.js (trying to follow the previous book), I somehow ended up with stuff scattered and duplicated in several subdirectories  –. an “extremely simple” mess.)  This time, my installation did seem “simple,” if not quite “extremely simple.” (Once it completed, I had to go to a command prompt and run “node” rather than just click on a brand new Windows icon — my definition of “extremely simple.” )

Of course, you are expected to have some JavaScript knowledge and programming experience before tackling this book, so you may not want to get ahead of yourself on the learning curve. If you’re currently a JavaScript novice, put this one on the shelf for a little bit later. But definitely get it.

Node: Up and Running offers plenty of code examples, and the paragraphs between them are well-written and kept reasonably short. Thus, knowledge and skills can be gained in manageable small chunks. Only a few other illustrations are offered, and, unfortunately, they tend to be more goofy than helpful.

The 184-page book has eight chapters:

  1. A Very Brief Introduction to Node.js
  2. Doing Interesting Things
  3. Building Robust Node Applications
  4. Core APIs
  5. Helper APIs
  6. Data Access
  7. Important External Modules
  8. Extending Node

Some readers have noted that this book does not contain the traditional appendix giving links and referrals to other sources of more information on Node.js, and that’s a fair criticism. However, the book’s Chapter 6, “Data Access,” does have links to, and discussions of, “the basic ways to connect to common open source database choices and to store and retrieve data.” The topics covered include using Node.js with CouchDb, Redis, MongoDB and relational databases such as MySQL and PostgreSQL. The chapter also looks at connection pooling and message queuing (MQ) protocol.

“The Node project is still very young,” the two authors state, “and yet rarely have we seen such fervor around a project. Both novices and experts have coalesced around the project to use and contribute to Node, making it both a pleasure to explore and a supportive place to share and get advice.”

Their new book, Node: Up and Running, can help you get friendly fast with this new 799-pound gorilla in the room, Node.js.

— Si Dunn

#

PayPal APIs: Up and Running – How to monetize your apps – #programming #bookreview #in

PayPal APIs: Up and Running, 2nd Edition
Matthew A. Russell
(O’Reilly,
paperback, list price $29.99; Kindle edition, list price $23.99)

The focus of this book is “monetizing your application with payment flows.” That’s a high-toned way of saying Click here to spend some money or Click here to pay your bill or Click here to donate.

PayPal APIs: Up and Running, 2nd Edition shows how to work with PayPal’s platform, which “offers a vast number of API-based products that allow you to monetize your ideas as seamlessly as possible.” (APIs are application programming interfaces.) The book is written clearly and is well illustrated with diagrams, code examples, screen shots and tables.

According to the author, PayPal’s Name-Value Pair (NVP) Application Programming Interfaces (APIs) make it “simple to integrate payments into your applications.  As the merchant, your web application constructs an NVP string and transmit(s) it via HTTPS (HTTP Secure) to the PayPal authorization server, and PayPal sends back an NVP-formatted response that your web application parses for the information relevant to the payment.”

What Matthew A. Russell’s book does not do is “provide complete or exhaustive documentation on all of PayPal’s products or even provide very specific direction on handling some of the most common idiosyncrasies that you might encounter.” But it does “aim to present some of the most popular products in fully integrated realistic scenarios with sample project code that you can study and adapt for your particular needs.” It shows you how to get started and points you toward sources of more advanced information.

Rather than introduce a new, “distinct sample application” in each chapter, the author’s approach is to use a single, simple application “as a foundation,” and “customize it in various ways according to the content of each chapter….” And the chapters are structured to be mostly standalone.

Early in the opening chapter, the foundation application is built using Python and Google App Engine (GAE). And you begin working with PayPal’s APIs.

The 135-page book is organized as follows:

  • Chapter 1: PayPal API Overview
  • Chapter 2: Express Checkout (Including Mobile Express Checkout)
  • Chapter 3: Express Checkout for Digital Goods
  • Chapter 4: Adaptive Payments (Simple, Parallel, and Chained Payments)
  • Chapter 5: Website Payments Pro (Direct Payment)
  • Chapter 6: Instant Payment Notifications (IPNs)
  • Appendix A: Overview of Tweet Relevance – Tweet Relevance is the book’s sample application, “implemented in Python (one of the easiest-to-read programming languages), runs on Google App Engine (a web application platform that is mature and extremely well documented), and munges data from Twitter (an accessible and extremely rich source of information),” Russell writes.
  • Appendix B: Mobile Payment Libraries (MPLs) – Goes beyond the scope of this book. Contains brief information on PayPal’s MPLs, including creating “in-app purchases for iOS, Android, and BlackBerry,” and gives guidance for finding more information.

Each chapter also contains recommended exercises, and the book’s code examples are available online.

The first edition of PayPal APIs: Up and Running was written by Michael Balderas. PayPal APIs: Up and Running, 2nd Edition builds upon his foundation and covers some new aspects and products of PayPal.

If you are a programmer who wants to accept payments for goods or services through PayPal or help a client accept online payments or donations, you should consider getting this useful and well-focused book.

— Si Dunn

#

Security and Privacy for Microsoft Office 2010 Users – #bookreview #in

Security and Privacy for Microsoft Office 2010 Users
Mitch Tulloch
(Microsoft Press,
paperback, list price $9.99; Kindle edition, $0.00)
 

If you work for a company that uses Microsoft Office products, or if you have them in your own business, you may be concerned about security and privacy as you publish documents, download documents or collaborate on projects online. Indeed, there may be formal security and privacy restrictions in place.

At the same time, because of workload, you may have little time for formal training in Word, Excel, and PowerPoint. And you may not get much guidance on how you are supposed to comply with your employer’s restrictions. Indeed, you may be required and expected to just learn this stuff on your own.

This handy 84-page guidebook can help. Using typical office scenarios, it covers a number of everyday topics. These include working with Protected View, removing private information from documents, signing documents digitally, marking documents as final so they can’t be modified, encrypting documents, password-only access to documents, and restricting who can edit a document.

Security and Privacy for Microsoft Office 2010 Users is recommended for intermediate-level users of Microsoft Word, Excel, and PowerPoint. But the examples and illustrations are clear enough for Microsoft Office newcomers, as well.

Si Dunn

#

Steven Saylor’s ‘The Seven Wonders’ – A fine intro to Gordianus the Finder, famous sleuth of ancient Rome – #bookreview #in #mystery #fiction

The Seven Wonders: A Novel of the Ancient World
Steven Saylor
(Minotaur Books, hardback, list price $25.99; Kindle edition, $12.99)

To be honest, until I picked up this book, I had paid zero attention to best-selling author Steven Saylor’s long-running Roma Sub Rosa series of mysteries set in ancient times, in the Roman Empire. The hero in that series’ 10 novels and two short story collections is Gordianus the Finder, Rome’s most sought-after investigator.

I’ve never been keen on stories (or movies) where people run around in togas and sandals, swear upon assorted gods and goddesses, and kill each other with swords or poisons.

Also, my notion of private detectives has tended to go back only as far as Sherlock Holmes. I’ve mainly been a Spenser/Marlowe/Hammer kind of guy. You know, fists and firearms, not swords and sandals.

The Seven Wonders, the new “prequel” to the Roma Sub Rosa series, has, however, just expanded my horizon quite a bit. Saylor has created a mystery- and adventure-packed tale that introduces Gordianus as a young man, before he has assumed the mantle of “The Finder” from his father.

The tale is set in 92 B.C., a time when the Roman Empire still dominates Greece. But rumors of war are afoot (literally), spies are everywhere, and even the most seemingly trustworthy friend cannot really be trusted amid all of the anti-Roman political intrigue.

It is also the year when Gordianus has reached – and at last crossed – the dividing line between childhood and getting to wear the “manly toga” of an adult. He’s now ready to leave home – Rome – and have some adventures.

He soon gets much more than he expects as he travels with his tutor and travel guide, the aging Antipater of Sidon, “one of the most celebrated poets in the world, famed not only for the elegance of his verses but for the almost magical way he could produce them impromptu, as if drawn from the aether.”

A real figure in history, Antipater has been given at least some of the credit for coming up with the famous list of the Seven Wonders of the World.

In the novel, the poet leaves Rome under mysterious circumstances but takes Gordianus along as he revisits each of the Seven Wonders. He carefully tutors the young Roman, yet things quickly and repeatedly go awry. At their first stop, for example, the Greeks’ wondrous Temple of Artemis at Ephesus, a young girl drops dead unexpectedly during a major celebration. And Gordianus stealthily investigates, using skills learned from his father, a man who “called himself Finder, because men hired him to find the truth.”

The Finder’s son soon determines that the young girl was murdered. Meanwhile, another young girl has been blamed and will die if Gordianus can’t solve his first case fast enough. He succeeds in a clever way, kills his first bad guy, and also has his first sexual encounter, thanks to the sensuous generosity of a beautiful slave woman who has helped him trap the murderer.  

There are then six more Wonders to see, and at each stop, Saylor provides the reader with mysteries rich in history, legend, danger, plot twists and engrossing entertainment as the youthful Gordianus struggles to puzzle them out.

Steven Saylor, who lives in Berkeley, California, and Austin, Texas, is a rare kind of writer, one who deftly blends scholarly detail with fast-paced fiction and makes dead worlds seem to come alive again.

I’m now a Spenser/Marlowe/Hammer/Gordianus kind of guy when it comes to detective fiction. And, thanks to this clever prequel, I’m ready to stop ignoring and start reading the Roma Sub Rosa series.

The Seven Wonders will be available starting June 5, 2012 and can be pre-ordered on Amazon.com.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir. He is the author of an e-book detective novel, Erwin’s Law, now also available in paperback, plus a novella, Jump, and several other books and short stories.

Fitness for Geeks – A book that will knock you OFF your butt – #bookreview

Fitness for Geeks: Real Science, Great Nutrition, and Good Health
Bruce W. Perry
(O’Reilly,
paperback, list price $34.95; Kindle edition, list price $27.99)

You know it’s true: You spend way too much time at home and at the office just sitting on your back pockets, staring at computer screens.

You do have some mobile devices. But, to use them, you mostly just carry them into your favorite free WiFi coffee shop and then sit, eat bagels and drink coffee while you poke, occasionally twitch a finger and squint.

 Not much of a healthy workout, is it?

 Many of us now spend most of our days and nights engaged in what Bruce W. Perry calls “a marathon bout of sitting.” Indeed, toss in the time spent sitting in your car as you commute to and from work, and you are a perfect example of a modern lifestyle that some scientists now term “chair living.”

It’s time, says Perry, to move, to skip the elevator and take the stairs (two at a time, if possible) on your way to and from those chairs.

 It’s time to find the company fitness center and start using it. It’s time to pay closer attention to what and how much you are eating, especially while sitting, computing and commuting. And it’s time to realize that you are spending too much time in front of your computer or TV when you should be sleeping.

Perry, a software engineer, journalist and self-described “fitness geek” has written an entertaining, inspiring and downright helpful book that draws from “the many parallels between software design and fitness geekdom, such as the whole concept of antipatterns, or learning how to do something by studying how not to do it first.”

There are, he notes, many apps, websites and devices now that can help you track, calculate and chart effort, calories, distances, sleep and other fitness factors.  He even tosses in a few bits of code that can help you, for example, display the route and distance that you just covered on a bike ride

Now is the time for all good geeks to come to the aid of their chair-shaped, digitally softened bodies.

Fitness for Geeks is organized into 11 standalone chapters that you can read in any order, Perry says. The chapters are:

  1.  Fitness and the Human Codebase: Reboot Your Operating System
  2. Fitness Tools and Apps
  3. Food Chemistry Basics: Proteins, Fats, and Carbs
  4. Micronutrients: Vitamins, Minerals, and Phytochemicals
  5. Food Hacks: Finding and Choosing Food
  6. Food Timing: When to Eat, When to Fast
  7. The Other World: A.K.A Outside
  8. Hello, Gym! Finding Your Way Around the Fitness Facility
  9. Randomizing Fitness and the Importance of R & R
  10. Code Maintenance: Human Fueling and Supplements
  11. Lifestyle Hacks for Fitness

 There is no complete escape from chair living, of course. We still have to sit at our home computers, sit in front of our TVs, sit in our cars, sit at coffee shops, and sit, sit, sit at the office.

But chair living does not have to consume us and kill us. We can find the time to make better choices: Skip the escalator and the éclair; eat a carrot and take the stairs. And we can find tools that can help us enhance those choices – digital and physical. They are already out there. 

Mainly, we just have to make ourselves get off our butts for a little while each day and do something healthful with the time out of chair.

Bruce W. Perry’s new book can help you discover – yes, even program – a workable path to better living.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir. He is the author of an e-book detective novel, Erwin’s Law, now also available in paperback, plus a novella, Jump, and several other books and short stories.

Learning iOS Programming, 2nd Ed. – Updated to cover iOS 5, iPad, iPhone, iPod Touch – #programming #bookreview

Learning iOS Programming, 2nd Edition
By Alasdair Allan
(O’Reilly, paperback, list price $34.99; Kindle edition, list price $27.99)

Alasdair Allan’s popular iOS programming book recently has been updated to cover iOS 5. And it has a new name. (The first edition was titled Learning iPhone Programming.)

“The changes made in this second edition reflect the fact that a lot has happened since the first edition was published: the release of the iPad, a major release of Xcode, two revisions of the operating system itself, and the arrival of Apple’s iCloud,” the author notes. “This book has therefore been refreshed, renewed, and updated to reflect these fairly fundamental changes to the platform, and all of the example code was rewritten from the ground up for Xcode 4 and iOS 5 using ARC.”

Allan’s book – well-written and appropriately illustrated – is structured to provide “a rapid introduction to programming for the iPhone, iPod touch, and iPad,” and it assumes that you have some familiarity with C or a C-derived language, as well as a basic understanding of object-oriented programming.

And the pace is fast. By chapter 3, you are building the requisite “Hello, World” application and running it in iPhone Simulator.

In that same chapter, Allan also introduces the basic syntax of Objective-C and highlights some of the “rather strange” ways that it deals with method calls. He discusses how the Cocoa Touch framework underlying iOS applications “is based on one of the oldest design patterns, the Model-View-Controller pattern, which dates from the 1970s.” And he warns that “[a]ttempting to write iOS applications while ignoring the underlying MVC patterns is a pointless exercise in make-work.”

Learning iOS Programming, 2nd Edition does not emphasize web-based applications. It centers, instead, on creating native applications using Apple’s SDK. “The obvious reason to use the native SDK,” Allan states, “is to do things that you can’t do using web technologies. The first generation of augmented reality applications is a case in point; these needed close integration with the iPhone’s onboard sensors (e.g., GPS, accelerometer, digital compass, and camera) and wouldn’t have been possible without that access.”

He emphasizes a financial reason, as well. “Consumers won’t buy your application on their platform just because you support other platforms; instead they want an application that looks like the rest of the applications on their platform, that follows the same interface paradigms as the rest of the applications they’re used to, and is integrated into their platform.”

He adds: “If you integrate your application into the iOS ecosphere, make use of the possibilities that the hardware offers, and make sure your user interface is optimized for the device, the user experience is going to be much improved.”

Hard to argue with that.

Learning iOS Programming, 2nd Edition provides the steps necessary to develop and market your first iOS application. Allan notes: “Until recently, the only way to obtain the iOS SDK was to become a registered iOS developer. However, you can now download the current release of Xcode and the iOS SDK directly from the Mac App Store.”

Of course, if you intend to distribute your applications “or even just deploy them onto your own device, you will also need to register with Apple as a developer and then enroll in one of the developer programs.”

You may need some system upgrades, as well. To develop apps for the iOS, you’ll need an Intel Mac running OS X 10.6 (“Snow Leopard”) or later. If you plan to create apps that use Apple’s iCloud, you’ll need OS X 10.7 (“Lion”) or later.

One other recommendation from Allan: If you’re truly serious about being an iOS developer, consider also registering with the Mac Developer Program.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. He also is a former newspaper and magazine photojournalist. His latest book is Dark Signals, a Vietnam War memoir. He is the author of an e-book detective novel, Erwin’s Law, now also available in paperback, plus a novella, Jump, and several other books and short stories.