Make something new, with MakerBot or Raspberry Pi – #bookreview #programming #diy

O’Reilly has released two new books to help you get started with two hot new products: the MakerBot desktop 3D printer and the Raspberry Pi, a tiny, inexpensive computer the size of a credit card.

Here are short reviews of the two how-to guides:

Getting Started with MakerBot
Bre Pettis, Anna Kaziunas France & Jay Shergill
(O’Reilly –
paperback, Kindle)

The MakerBot 3D printer has captured worldwide attention for its ability to replicate objects such as game pieces, knobs and other plastic parts no longer available from manufacturers, and its use also to produce small art works.

“In our consumer-focused, disposable world, a MakerBot is a revitalizing force for all your broken things,” the authors state. (One of them, Bre Pettis, is one of MakerBot’s creators.)

The MakerBot machine, however, also can be a revitalizing force for artistic endeavors and, in some cases, dreams of self-employment. It is, after all, essentially a small factory in a box.

Getting Started with MakerBot introduces the machine and things you can make with it from your own designs or from designs downloaded from the web. “Though the underlying engineering principles behind a MakerBot are quite complex, in a nutshell, a MakerBot is a very precise, robotic hot glue gun mounted to a very precise, robotic positioning system,” the three writers point out.

In 213 pages, the book covers the basics, from history to set-up, and then shows you how to “print 10 useful objects right away.” It also introduces how to design your own 3D objects, using SketchUp, Autodesk 123D, OpenSCAD, and some other tools.

Getting Started with MakerBot is well-written, heavily illustrated, and organized to help you advance from unboxing a MakerBot to turning out products and creations and becoming a significant citizen of the “Thingiverse”—where “one must share designs…but all are welcome to reap the bounty of shared digital designs for physical objects.”

***

Getting Started with Raspberry Pi
Matt Richardson & Shawn Wallace
O’Reilly –
paperback, Kindle)

The Raspberry Pi “is meant as an educational tool to encourage kids to experiment with computers.” But many adults are latching to the tiny device as well, because it comes preloaded with interpreters and compilers for several programming languages, including Python, Scratch, C, Ruby, Java, and Perl. Its operating system is Linux Raspbian.

The Raspberry Pi is not plug-and-play, but it can be connected to – and control –a number of electronic devices. And the list of uses  for the microcomputer keeps growing.

Some owners have made their Raspberry Pi devices into game machines. Others have connected many of the units together to create low-budget supercomputers. Some are using them as web servers. And still others work at the  “bare metal” of a Raspberry Pi to create and test new operating systems. Intriguing new roles for the Raspberry Pi keep appearing, and the surge will continue as more adults and kids start working with the tiny but powerful device.

Getting Started with Raspberry Pi covers the basics of hooking up, programming and running the device. It also provides several starter projects, including how to use a Raspberry Pi as a web server or in other roles.

Once you know what you’re doing, “You can even create your own JSON API for an electronics project!” the authors promise.

The well-written book packs a lot of how-to information into its 160 pages, including working at the command line in Linux, learning to program the device, and creating simple games in Python and Scratch.

— Si Dunn

Advertisements

Intermediate Perl, 2nd Edition – An excellent guide to pushing well beyond the basics – #programming #bookreview

Intermediate Perl, 2nd Edition
Randal L. Schwartz, brian d foy & Tom Phoenix
(O’Reilly, paperback)

Attention, Perl programmers. Particularly those of you who write Perl programs with 100 lines of code or fewer but want to expand your limits. This popular intermediate guide, first published in 2006, has just been updated.

Intermediate Perl, 2nd Edition covers Perl 5.14. And: “It covers what you need to write programs that are 100 to 10,000 (or even longer) lines long,” the authors state.

This excellent book by three well-known Perl gurus does indeed cover a lot of ground. It shows you, for example, “how to work with multiple programmers on the same project by writing reusable Perl modules that you can wrap in distributions usable by the common Perl tools.”

It also shows you “how to deal with larger and more complex data structures….”

And it gets into some “object-oriented programming, which allows parts of your code (or hopefully code from others) to be reused with minor or major variations within the same program.”

It delves into two other important aspects of team programming: “…having a release cycle and a process for unit and integration testing. You’ll learn the basics of packaging your code as a distribution and providing unit tests for that distribution, both for development and for verifying that your code works in your target environment.”

One very important addition in the new edition is a chapter on references. “References,” the authors emphasize, “are the basis for complex data structures, object-oriented programming, and fancy subroutine handling. They’re the magic that was added between Perl versions 4 and 5 to make it all possible…” to handle “complex data interrelationships.”

The authors write in a lighthearted style that helps the coding medicine go down. And there are plenty of code examples and illustrations, plus a link to a website with downloads. They also provide exercises at the ends of chapters, with suggested completion times in minutes.

“If you take longer,” they add, “that’s just fine, at least until we figure out how to make ebooks with timers.”

However, if you take longer than “longer” or if you just get stumped, the answers conveniently are provided at the back of Intermediate Perl, 2nd Edition.

Si Dunn

Introducing Regular Expressions – Finding your perfect match…in strings – #bookreview

Introducing Regular Expressions
Michael Fitzgerald
(O’Reilly, paperbackKindle)

“Regular expressions are specially encoded text strings used as patterns for matching sets of strings,” Michael Fitzgerald writes in this example-rich new book that focuses on learning by doing.

Veteran programmers who work with Perl, Java, JavaScript, C# and a number of Unix utilities often consider regular expressions to be an important part of their toolkit. Ruby 1.9 and Python 3 also support regular expressions.

“Regular expressions have a reputation for being gnarly,” Fitzgerald notes. However, using the online Regexpal JavaScript regular expression tester, he shows you how to dive right into the very basics and start working your way up.

He introduces several other applications that let you work with regular expressions. And his chapters smoothly take you from matching single digits to matching text strings, number strings, boundaries such as the beginnings or endings of words, character classes, and beyond, including white-space patterns and Unicode. He also shows how to perform some fairly esoteric operations such as “negative lookaheads,” where you verify that a certain pattern of text or digits does not appear in a string ahead of certain other text, numbers, or other qualifiers.

The 136-page book has ten chapters:

  1. What Is a Regular Expression?
  2. Simple Pattern Matching
  3. Boundaries
  4. Alternation, Groups, and Backreferences
  5. Character Classes
  6. Matching Unicode and Other Characters
  7. Quantifiers
  8. Lookarounds
  9. Marking Up a Document with HTML
  10. The End of the Beginning

An appendix provides a regular expression reference, listing such items as control characters, Unicode whitespace characters, metacharacters, and others. There is also a glossary of regular expression terms, such as “greedy match” and “zero-width assertions.”

Fitzgerald recommends his book for those who are “new to regular expressions or programming…the reader who has heard of regular expressions and is interested in them but who really doesn’t understand them yet.”

Those who are a bit beyond the beginner level, however, likewise can benefit from Introducing Regular Expressions and its handy examples and how-to summaries.

Si Dunn

Programming Perl, 4th Ed. – The long-awaited update has arrived – #bookreview #programming #in #perl

Programming Perl, 4th Edition
By Tom Christiansen, brian d foy and Larry Wall, with Jon Orwant
(O’Reilly, paperback, list price $54.99)

Since 1991, Programming Perl has been considered both the Bible of Perl and the go-to reference guide for those who use this popular “mixed heritage” programming language.

Publication of this newly updated edition is good news for the legions of programmers who use Perl every day or are in the process of learning it.

Programming Perl last was updated 12 years ago, just when Perl v5.6 was being released. The current Perl release is v5.14, and, as the authors note, “Perl v5.16 is coming out soon.” This 4th edition focuses on v5.14 and its major new features and improvements. But it also previews features that will be offered in v5.16.

The new edition (1130 pages) has several new chapters for Perl programmers, and a few now-out-of-date chapters and experiments have been removed. Among the updates are “greatly improved” Unicode support, “even better” regular expressions, and more emphasis on CPAN (the Comprehensive Perl Archive Network), to highlight just a few.

This is not a guide for programmers planning to tinker Perl 6. The authors contend: “Perl 6 is really a ‘kid sister’ language to Perl 5, and not just a major update to Perl 5 that version numbers have trained you to expect. This book isn’t about that other language. It’s still about Perl 5, the version that most people in the world (even the Perl 6 folks) are still using quite productively.”

Perl was “[i]nitially designed as a glue language for Unix,” they add. So there is a distinct Unix bias even at the “Hello World” level in this book, and this may leave some Windows-centric beginners lost, puzzled and turning to the web for basic tips on how to program in Perl on Windows machines.

Perl novices, in fact, should not start just with this book but add it once they know they plan to stick with Perl programming. The authors recommend beginning first with Learning Perl by Randal Schwartz, brian d foy, and Tom Phoenix. They also provide an extensive list of other documents and resources for beginning, intermediate and expert Perl programmers.

Nonetheless, the authors states that “Perl is an easy language to learn and use, and we hope to convince you that we’re right. One thing that’s easy about Perl is that you don’t have to say much before you say what you want to say.”

Easy to learn, yes. But there’s also a lot to learn, as this well-written, hefty book shows and illustrates.

#

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 available soon in paperback. He is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.