The Book of Ruby: A Hands-On Guide for the Adventurous – #ruby #programming #software #bookreview

The Book of Ruby: A Hands-On Guide for the Adventurous
By Huw Collingbourne
(No Starch Press, $39.95, paperback; $31.95, Kindle) 

Ruby, first introduced in 1995, is “a cross-platform interpreted language that has many features in common with other ‘scripting’ languages such as Perl and Python,” says Huw Collingbourne,  who is director of technology for SapphireSteel Software and has 30 years’ experience in computer programming.

“Many people are attracted to Ruby by its simple syntax and ease of use. They are wrong,” he cautions in his new book. “Ruby’s syntax may look simple at first sight, but the more you get to know the language, the more you will realize that it is, on the contrary, extremely complex. The plain fact of the matter is that Ruby has a number of pitfalls just waiting for unwary programmers to drop into.”

Collingbourne  has written The Book of Ruby to help those new to the programming language successfully jump over the hazards. Ruby, he notes, can look a bit like Pascal at first glance. But: “It is thoroughly object-oriented and has a great deal in common with the granddaddy of ‘pure’ object-oriented languages, Smalltalk.”  

He cautions programmers to get a good handle on Ruby by itself before rushing ahead to use the popular web development framework known as Ruby on Rails.”Understanding Ruby is a necessary prerequisite for understanding Rails,” he warns.

“Indeed, if you were to leap right into Rails development without first mastering Ruby, you might find that you end up creating applications that you don’t even understand. (This is all too common among Ruby on Rails novices.)”

Collingbourne’s well-written 373-page book covers Ruby 1.8 and 1.9. He takes a “bite-sized chunks” approach, so that each chapter “introduces a theme that is subdivided into subtopics.” And: “Each programming topic is accompanied by one or more small, self-contained, ready-to-run Ruby program.”

 The chapter line-up shows the book’s structure:

  •  Introduction
  • 1: Strings, Numbers, Classes, and Objects
  • 2: Class Hierarchies, Attributes, and Class Variables
  • 3: Strings and Ranges
  • 4: Arrays and Hashes
  • 5: Loops and Iterators
  • 6: Conditional Statements
  • 7: Methods
  • 8: Passing Arguments and Returning Values
  • 9: Exception Handling
  • 10: Blocks, Procs, and Lambdas
  • 11: Symbols
  • 12: Modules and Mixins
  • 13: Files and IO
  • 14: YAML
  • 15: Marshal
  • 16: Regular Expressions
  • 17: Threads
  • 18: Debugging and Testing
  • 19: Ruby on Rails
  • 20: Dynamic Programming
  • Appendix A: Documenting Ruby with RDOC
  • Appendix B: Installing MySQL for Ruby on Rails
  • Appendix C: Further Reading
  • Appendix D: Ruby and Rails Development Software
  • Index

The author gives links for downloading the latest version of Ruby, plus the source code for all of the programs used in this book.

Collingbourne notes that The Book of Ruby “covers many of the classes and methods in the standard Ruby library – but by no means all of them! At some stage, therefore, you will need to refer to documentation on the full range of classes used by Ruby.” He provides links to the online documentation for both Ruby 1.8 and Ruby 1.9.

True to his word, he begins at the “hello world” level of Ruby:

puts 'hello world'

From there, he keeps surging forward in small, careful steps, offering good examples to illustrate each new topic. In each chapter except the Introduction, he also includes a subsection known as “Digging Deeper.”

“In many cases, you could skip the ‘Digging Deeper’ sections and still learn all the Ruby you will ever need,” he states. “On the other hand, it is in these sections that you will often get closest to the inner workings of Ruby, so if you skip them, you are going to miss out on some pretty interesting stuff.”

Collingbourne previously has released two free ebooks on Ruby: The Little Book of Ruby and The Book of Ruby.

He knows his Ruby – and he wants you to know this elegant and unique programming language, too.

Si Dunn

#

Introducing Microsoft WebMatrix – #bookreview

Introducing Microsoft WebMatrix
By Laurence Moroney
(Microsoft Press, $39.99, paperback)

Introducing Microsoft WebMatrix is aimed (1) at readers who may be first-time web developers and (2) at readers who want to learn how to build active web pages or learn how to customize open source web applications to their own needs.

WebMatrix is a free, downloadable web development “solution” from Microsoft that promises to prove “all the tools you need for server-side programming.”

Lawrence Moroney’s book illustrates the use of templates, cascading style sheets (CSS), helper libraries and other tools in WebMatrix. His goal is to help show you how to build and customize data-driven websites using Microsoft’s new web development product.

He provides steps and illustrations that show how to add email, video, web forms and other features to a site, using WebMatrix.  He includes tips and steps for using the product’s helper libraries to expand a site’s reach via social media such as Twitter, StumbleUpon and LinkedIn, as well as Xbox Gamercards.  

The book, written during WebMatrix’s beta,  is a good, compact and convenient introductory tutorial.

However, to keep up with the newest WebMatrix changes and to fill in some knowledge gaps, you will also need to refer to online sources such as Microsoft’s ASP.NET site, the WebMatrix site and the “Web Development 101″ pages for WebMatrix, while following the processes in this book.

Certain requirements must be met to use Microsoft WebMatrix.

1.  The supported operating systems are: Windows 7, Windows Vista, Windows Vista SP1, Sindows XP SP2+, Windows Server 2003 SP1+, Windows Server 2008, and Windows Server 2008 R2.

2. An Internet connection is needed to install WebMatrix  via the Web Platform Installer.

3. To run the Web Platform Installer on your computer, you must have administrator privileges.

Code samples can be downloaded for all of the projects in the book.

The book’s chapter lineup gives a good view of its coverage range.

  • Introduction
  • Chapter 1: Introducing WebMatrix
  • Chapter 2: A Tour of WebMatrix
  • Chapter 3: Programming with WebMatrix
  • Chapter 4: Using Images in WebMatrix
  • Chapter 5: Using Video in WebMatrix
  • Chapter 6: Forms and Controls
  • Chapter 7: Databases in WebMatrix
  • Chapter 8: Exposing Your Site Through Social Networking
  • Chapter 9: Adding Email to Your Site
  • Chapter 10: Building a Simple Web Application: Styles, Layout, and Templates
  • Chapter 11: Building a Simple Web Application: Using Data
  • Chapter 12: WebMatrix and Facebook
  • Chapter 13: WebMatrix and PayPal
  • Chapter 14: Building Your Own Web Helpers
  • Chapter 15: Deploying Your Site
  • Chapter 16: WordPress, WebMatrix, and PHP
  • Appendix A:  WebMatrix Programming Basics
  • Index (11 pages)

The author, Laurence Moroney, is a “Senior Technology Evangelist” at Microsoft. He has more than 10 years of experience in software development and implementation, and has written numerous articles and books.

Moroney’s new book is written in clear, straightforward style and contains ample steps, code samples and screenshots to help simplify the process of learning how to get comfortable with Microsoft WebMatrix.

But keep in mind that it is truly an “Introduction,” a good how-guidebook to get you started, not a comprehensive handbook containing everything you will need to know.

Si Dunn

Two Microsoft Certification Training Kits – #bookreview

In today’s tough and fiercely competitive IT job market, you never outgrow your need for certifications. Microsoft Press recently has released two self-paced training kits that you may need to study, if they apply to your areas of information technology. And you may need to keep these books close at hand in your technology library once you are certified.

The two training kits are: Accessing Data with Microsoft .NET Framework 4 (MCTS Exam 70-516) and Windows Server Enterprise Administration (MCITP Exam 70-647).

Short reviews of each book are posted below. In general, however, both are hefty, handsome and well-organized volumes that include practice tests on their accompanying CDs. The practice tests contain hundreds of questions and come with “detailed explanations for right and wrong answers.” Each of the books includes a certification exam discount coupon from Microsoft. 

Accessing Data with Microsoft .NET Framework 4
(MCTS Exam 70-516)
By Glenn Johnson
(Microsoft Press, $69.99)

“This training kit,” the author writes, “is designed for developers who write or support applications that access data written in C# or Visual Basic using Visual Studio 2010 and the Microsoft .NET Framework 4.0 and who also plan to take the Microsoft Certified Technology Specialist (MCTS) exam 70-516.”

Before you plunge into this self-paced training kit, be sure you have “a solid foundation-level understanding of Microsoft C# or Microsoft Visual Basic and be familiar with Visual Studio 2010.”

Also, be sure your available equipment meets the minimum requirements: 2.0 GB – and preferably more – of RAM; at least 80 GB of available hard disk space; a DVD-ROM drive; and Internet access.

The software requirements are Windows 7, SQL Server 2008 Developer Edition and SQL Server 2008 Express Edition. Links are provided to download evaluation copies of Windows 7 and SQL Server 2008 Developer Edition. A link also is provided to download a full release of SQL Server 2008 Express Edition.

A “virtualized environment” can be used, rather than configuring a machine specifically for the training kit, the author states. He notes that virtualization software is available from Microsoft, Oracle andVMware.

The CD supplied with Accessing Data with Microsoft .NET Framework 4 includes practice tests, all of the Visual Basic and C# code samples in the book, and a “fully searchable” eBook version of the printed book.

Directions are provided for installing, using and uninstalling the practice tests.

The 647-page training kit is structured as follows:

  • Introduction
  • ADO.NET Disconnected Classes
  • ADO.NET Connected Classes
  • Introducing LINQ
  • LINQ to SQL
  • LINQ to XML
  • ADO.NET Entity Framework
  • WCF Data Services
  • Developing Reliable Applications
  • Deploying Your Application

The final sections are the Answers appendix and a detailed and apparently thorough index.

This training kit’s chapters generally contain one to three lessons, with code examples, practice exercises, plus a lesson summary and lesson review. Accessing Data with Microsoft .NET Framework 4 provides more than 250 practice and review questions to help you prepare for the certification exam.

 #

Windows Server Enterprise Administration
(MCITP Exam 70-647)
By Orin James, John Policelli, Ian McLean, J.C, Mackin, Paul Mancuso, and David R. Miller, with GrandMasters
(Microsoft Press, $69.99)

This training kit for Windows Server Enterprise Administration is intended for “enterprise administrators who have several years’ experience managing the overall IT environment and architecture of medium to large organizations.”

To run the lab exercises in this self-paced training kit, you will need at least two computers or virtual machines. One must be a server running Windows Server Enterprise 2008, and it must be configured as a domain controller. The book provides a link for obtaining an evaluation copy of Windows Server 2008 Enterprise from Microsoft’s download center. The other computer or virtual machine must run Windows Vista (Enterprise, Business or Ultimate).

“You can complete almost all practice exercises in this book using virtual machines rather than real server hardware,” the authors state. But you must be aware of the minimum hardware requirements for running Windows Server 2008:

1. Processor: 1GHz (x86), 1.4GHz (x64) – But 2GHz or faster is recommended.
2. 512MB RAM, with  2GB recommended.
3. 15 GB of disk space, with 40 GB recommended.

The book also explains how to set up networking and how to install and use (and later uninstall) the practice tests.

The 572-page Windows Server Enterprise Administration training kit is organized as follows:

  • Introduction
  • Planning Name Resolution and Internet Protocol Addressing
  • Designing Active Directory Domain Services
  • Planning Migrations, Trusts, and Interoperability
  • Designing Active Directory Administration and Group Policy Strategy
  • Designing Network Access Strategy
  • Design a Branch Office Deployment
  • Planning Terminal Services and Application Deployment
  • Server and Application Virtualization
  • Planning and Designing a Public Key Infrastructure
  • Designing Solutions for Data Sharing, Data Security, and Business Continuity

The chapters generally have two to three lessons each, as well as lesson summaries, lesson reviews, chapter reviews, chapter reviews, chapter summaries, suggested practices and a practice test.

The remaining sections of the training kit include answers to the practice tests, a somewhat modest glossary, and a hefty and well-detailed index.

The supplied CD provides more than 275 practice and review questions, a “fully searchable” eBook version of the training kit, case scenarios, best practices, and exercises. 

– Si Dunn

#

Captain John R. Hughes: Lone Star Ranger

 

Captain John R. Hughes: Lone Star Ranger
Chuck Parsons

(University of North Texas Press, $29.95)

 John R. Hughes is often considered one of the Texas Rangers’ “Four Great Captains,” alongside William Jesse McDonald, James A. Brooks and John H. Rogers. (Chuck Norris, as Walker, Texas Ranger, figures nowhere in this equation.)

Before Hughes became a Ranger in 1887, he tracked down and killed several thieves who had stolen horses from his ranch and and some neighbors’ ranches.

This well-written biography by Western historian Chuck Parsons describes how Hughes intended to be a Texas Ranger for just a few months after he signed up. But he stayed on and eventually served almost 30 years, chasing horse thieves, sheep thieves, fence cutters, train robbers, bank robbers and others.

Hughes also helped provide security for three presidents who visited Texas: William H. Taft, Theodore Roosevelt and Porfirio Diaz of Mexico.

The Ranger tried to keep a low profile, but writers hailed him in newspaper and magazine articles, particularly after he retired. And novelist Zane Grey dedicated a novel, The Lone Star Ranger, to Hughes and other Rangers.

Chuck Parsons has written several other books, including The Sutton-Taylor Feud: The Deadliest Blood Feud in Texas.

Si Dunn

Faking It in the School for Tricksters

School for Tricksters: A Novel in Stories
By Chris Gavaler
(SMU Press, $23.95)

Amazon Link: http://amzn.to/fjgemh

Pennsylvania’s Carlisle Indian Industrial School remains a controversial chapter in U.S. history, more than 90 years after the school was shut down and converted to a military hospital. Later, it became the site of the U.S. Army’s War College.

The Carlisle campus is the central location in author and playwright Chris Gavaler’s engaging new novel, School for Tricksters, set in the early 1900s. The book was published recently by Dallas-based Southern Methodist University (SMU) Press.

Between 1879 and 1918, nearly 12,000 Native American children from more than a hundred tribes were sent to Carlisle for “education.” The campus followed strict military rules, and its administrators and teachers were supposed to try to strip away Native American cultures, customs, languages and religions. Students took Caucasian names and followed customs and religions of white Americans. They wore contemporary clothing when not wearing Carlisle uniforms.

Carlisle soon became the model for other Indian boarding schools sponsored by the U.S. government. The schools also became places where orphanages and parents sometimes dumped children who, in reality, had little or no tribal blood. This is the circumstance for several characters in School for Tricksters.

“You know how much white trash we got in here?” the school’s head disciplinarian, Mr. Henderson, asks Sylvester Long, a new arrival from North Carolina, just after Sylvester gives him a fake Cherokee name instead of his real name. “Kids with barely any Indian blood. Trying to steal an education from the government.”

Henderson, in Gavaler’s tale, is unaware that Sylvester has white and African-American relatives, as well as Native American blood, and is the son of a black janitor. In the early 1900s, having any black heritage at all is grounds for immediate expulsion from Carlisle.

Another new student, Iva Miller, arrives from the Oklahoma Territory believing she is part Cherokee or possibly Shawnee, whatever her father told the orphanage when he abandoned her. In truth, she has no Indian roots.

School for Tricksters becomes an engrossing coming-of-age story as Sylvester and Iva forge new identities built on falsehoods, while others around them also try to build new lives or maintain careers, sometimes with help from lies, deceptions or corruption. One of the book’s underlying themes is that we are all tricksters to some degree, at some point in our lives.

Significantly, the book’s main characters are real people used fictionally. Along with Sylvester and Iva, they include: Jim Thorpe, Carlisle’s stellar Sac and Fox football player who won gold medals at the 1912 Olympics; William Henry “Lone Star” Dietz, a Carlisle athlete of questioned heritage who achieved college and professional gridiron coaching greatness; Glenn Scobey “Pop” Warner, Carlisle’s athletic coach who became a national sports icon; and Marianne Moore, a Carlisle typing teacher who became one of America’s leading poets.

Chris Gavaler’s fiction is drawn from extensive factual research and interviews. Also, each chapter is a separate short story that provides different perspectives of key characters as they adjust to Carlisle and Caucasian-dominated culture.

The real Iva Miller became Jim Thorpe’s first wife while he was a major-league baseball player. The real Sylvester Long achieved fame as a journalist, author and actor known as “Chief Buffalo Child Long Lance.” His tribal claims, however, eventually were disproved, and his 1932 death was ruled suicide.

Despite its underlying grimness, School for Tricksters is refreshingly unusual fiction. It also is another stark reminder of how Native Americans have been treated, feted, mistreated and exploited.

Si Dunn

#

Neptune’s Inferno: The U.S. Navy at Guadalcanal

 Neptune’s Inferno: The U.S. Navy at Guadalcanal
By James D. Hornfischer
(Bantam Books, $30.00)
Amazon Link: http://amzn.to/giTclq
Kindle Link: http://amzn.to/fKzayj

Guadalcanal typically is remembered as a small Pacific island where U.S. Marines stayed locked in savage combat for months with tenacious, desperate Japanese defenders during World War II. U.S. Army troops, however, also fought heroically in the battle for Guadalcanal, which stretched from Aug. 7, 1942, to Feb. 9, 1943.

But as military historian James D. Hornfischer makes starkly clear in his new book Neptune’s Inferno, the U.S. Navy actually bore the biggest brunt of the fighting. The Navy also made the greatest sacrifices during the protracted campaign that is now remembered as a turning point in the Pacific theater of the war. 

“When it was all said and done at Guadalcanal,” Hornfischer notes in his book, “three sailors would die at sea for every infantryman who fell ashore.”

Much of the fighting focused on Guadalcanal’s airfield, which could be used to threaten or protect key sea lanes between the United States, Australia and New Zealand. U.S. Marines seized the airfield and part of the island in a surprise landing that drove Japanese defenders inland.

During the next six months, seven major sea battles ensued as the Imperial Japanese Navy attempted to destroy American planes and reinforce Guadalcanal’s Japanese troops, so they could retake the airfield.

Five of the encounters were fearsome, grinding night clashes. And, more than once, American ships blasted each other, as well as enemy warships, in the chaotic darkness. In the two daylight battles, carrier-based and land-based aircraft ultimately won the day for the Allies.

The toll of ships, men and aircraft was horrific on both sides. As Hornfischer makes grimly clear, torpedoes and shells ripped through hulls and thick armor plates and ended dozens or even hundreds of lives in an instant. The U.S. Navy lost 25 major warships, including two aircraft carriers and several cruisers and destroyers, as well as numerous smaller vessels. Australia’s losses included its heavy cruiser Canberra. Japanese ship losses included an aircraft carrier, two battleships, several cruisers and other vessels, including six submarines.

Thousands of Allied and Japanese sailors and officers died, and hundreds of planes were shot down. Meanwhile, Guadalcanal’s Japanese defenders never retook the airfield. Instead, their counterattacks were repulsed, and they suffered massive casualties from air assaults, naval gunfire and Marine and Army ground attacks.

Much of Hornfischer’s book focuses on officers and crews of individual battleships, aircraft carriers, cruisers and destroyers, recounting how they veered into combat, absorbed savage hits and valiantly kept fighting and struggling to stay afloat. But he also zeroes in on the strategies, indecisions, failures and heroics of task force commanders and ship captains.

“The campaign,” he writes, “featured tight interdependence among warriors of the air, land, and sea.” Yet that interdependence was tenuous and troubled at best. Lives and ships were lost because of inter-service rivalries, jealousies and stubborn attitudes among key admirals and generals.

Some American warship captains made efficient use of a new technology, radar, while others failed to embrace its early-warning capabilities, with fatal consequences.

Another vital technology, radio, also was not used effectively. Ships, aircraft and ground units frequently could not communicate with each other. And important alerts often were delayed, misrouted or ignored.

Neptune’s Inferno is well written, rich with scene-setting details and very clearly the product of extensive research, as well as interviews with some of the battle’s now-aged survivors.

The author’s two previous WWII books, The Last Stand of the Tin Can Sailors and Ship of Ghosts, brought him into the major leagues of American military history writers. Neptune’s Inferno is solid proof that he deserves to be there.

Si Dunn

#

Lone Star Noir: Deep in the (Dark) Heart of Texas

 Fans of noir fiction prefer their stories dark and gritty.

They relish harsh tales told from troubled viewpoints: crime victims, serial killers, suspects, witnesses.

A private eye may be snooping around somewhere nearby. But cops and sheriff’s deputies are not yet on the scene. A terrible act central to the story is just about to be discovered. Or it is just minutes away from happening.

Lone Star Noir fits this story pattern almost perfectly. Fourteen hardboiled short stories, set deep in the darkest heart of Texas, take the book’s readers to life’s ragged edges. You move along grim roads leading “to the tail end of everything,” to places where “a plain bare bulb swings overhead, casting a dizzying light,” and into the company of people who understand “guns and dope and greed and hatred and delusion…” probably better than they understand anything else.

Published by Akashic Books, Lone Star Noir is edited by Bobby Byrd and Johnny Byrd, the co-publishers of Cinco Puntos Press in El Paso.

The book cuts the state into three regions: Gulf Coast Texas, Back Roads Texas, and Big City Texas. Each region in the book, of course, has its own flair for sinister settings.

The stories are new, and most of the 15 writers (one story has two authors) have some kind of connections to the Lone Star State, which Bobby Byrd contends “bleeds noir fiction.”

A cautionary notice: Lone Star Noir is alive with raw language and murderous events. It is definitely not for the easily offended, nor the faint of heart.

Noir fiction can bring you face to face with people you would never want to meet, nor be. And it reminds readers how humanity’s darkest possibilities lie just beneath everyday life’s thin veneer.

Lisa Sandlin’s short story “Phelan’s First Case” focuses on a rookie Beaumont private detective who tries to solve a missing-person mystery in the gloomy Big Thicket north of Houston. Meanwhile, another mystery that could get somebody killed starts unfolding back at his office while he is away.

In “Bottomed Out,” Dean James’ gruesome tale, a Dallas company’s German “troubleshooter” gets a manager fired but also frames him for another employee’s murder.

And Jessica Powers’ short story “Preacher’s Kid” takes the reader inside the mind of a West Texas preacher. He tries and fails to stop his son from drinking, but he has to confront a much deeper and more painful truth about his family.

Akashic Books started its original noir anthology series in 2004 with Brooklyn Noir. Since then, approximately 40 noir story collections have been published, ranging from Chicago Noir to Paris Noir and Wall Street Noir. More are scheduled, including Cape Cod Noir and Pittsburgh Noir.

According to Bobby Byrd, many people arrive in Texas expecting to see J.R. Ewing or Larry McMurtry characters lurking behind every oil rig and cattle herd.

“The real Texas,” he insists, “hides out in towns and cities like you’ll find in Lone Star Noir.

Maybe, maybe not. In any case, it is infinitely safer to read the book and not go looking for proof — and trouble — at the end of dark Texas roads.

Si Dunn

#