LED Lighting: A Primer to Lighting the Future – #bookreview

LED Lighting: A Primer to Lighting the Future
Sal Cangeloso
(O’Reilly,
paperback, Kindle)

Sal Cangeloso of Geek.com and ExtremeTech.com wants to warm you up to some really cool lighting: light-emitting diode (LED) bulbs.

His new book, LED Lighting: A Primer to Lighting the Future, encourages readers to start using more LEDs and let loose of the incandescent bulb’s 130-year-old technology, as well as the curly, tricky-to-recycle compact fluorescent light (CFL) bulbs that last longest when they are not turned off and on and off and on and.…

Lighting and lighting choices are not actually simple topics, and Cangeloso packs plenty of information, both practical and technical, into his helpful 58-page book. He includes a couple of simple, do-it-yourself experiments involving small LED lamps, resistors and batteries, as well.

LED Lighting delves into matters such as color quality, power consumption comparisons, and prices, as well as the sometimes “off-putting” fact that LED bulbs often look like yellow bug lamps, even though they produce white light. The author also explains why highly efficient LED bulbs have built-in heat sinks, while other types of light bulbs do not. “The main reason is that LEDs don’t give off heat in the form of infrared radiation. This means cooling must be handled through other means, such as conduction through a heat sink.”

LED bulbs also don’t give off ultraviolet (UV) light. So that’s one more practical reason to consider using them. As Cangeloso notes: “LED bulbs don’t attract insects, which are drawn to UV light.”

Si Dunn

Think Like a Programmer: An Introduction to Creative Problem Solving – #programming #bookreview

Think Like a Programmer: An Introduction to Creative Problem Solving
V. Anton Spraul
(No Starch Press, paperbackKindle)

Often, we “solve” problems by avoiding them. For example, if we have a clunker car, we trade it in and get a new one. Problem “solved” simply by putting a shiny new sedan in the driveway.

In software programming, however, problems generally have to be fixed, not avoided. Typically, you can’t kick a major bug to the curb and make it disappear just by adding a new function or screen. Whatever is wrong has to be repaired. And most of us are not mentally wired to quickly spout new source code that solves the dilemma.

“Problem solving is hard,” V. Anton Spraul states. And his well-structured, well-written book aims to help us rewire our heads and get a better handle on fixing problems in software.

“When solving a problem with a program, you…have constraints,” he writes. “Common constraints include the programming language, platform (does it run on a PC, or an iPhone, or what?), performance (a game program may require graphics to be updated at least 30 times a second, a business application might have a maximum time response to user input), or memory footprint. Sometimes the constraint involves what other code you can reference: Maybe the program can’t include certain open-source code or maybe the opposite—it can use only open source.”

He adds: “For programmers, then, we can define problem solving as writing an original program that performs a particular set of tasks and meets all stated constraints.”

But beginning programmers often focus too much time and effort on just making the program perform the required tasks. They don’t pay enough attention to staying within the required constraints, as well.

Think Like a Programmer begins with general strategies for solving problems and puzzles. Then it gets specific for programmers with a series of well-focused chapters:

  • Solving Problems with Arrays
  • Solving Problems with Pointers and Dynamic Memory
  • Solving Problems with Classes
  • Solving Problems with Recursion
  • Solving Problems with Code Reuse

The final chapter, “Thinking Like a Programmer,” shows how to develop a master plan that you can use “for attacking any programming problem.”

Think Like a Programmer: An Introduction to Creative Problem Solving offers a number of challenging exercises in its chapters, and the author encourages readers to attempt each one. But he provides no convenient answers at the back of the book – just as you will experience in real-life programming: no convenient answers to problems and puzzles.

One drawback for this book is that its code examples are all written in C++.

“C++ was selected for a number of reasons,” the author states. He lists several that make good sense and concludes: “…C++ is a great choice because once you have learned to solve problems in C++, you have learned to solve problems in any language. Many programmers have discovered how the skills learned in one language easily apply to other languages, but this is especially true for C++ because of its cross-paradigm approach and, frankly, because of its difficulty. C++ is the real deal—it’s programming without training wheels. This is daunting at first, but once you start succeeding in C++, you ‘ll know that you’re not going to be someone who can do a little coding—you’re going to be a programmer.”

Si Dunn

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

Illustrated Guide to Home Forensic Science Experiments – Real CSI basics – #bookreview

Illustrated Guide to Home Forensic Science Experiments: All Lab, No Lecture
Robert Bruce Thompson and Barbara Fritchman Thompson
(O’Reilly, paperbackKindle)

Movies, TV shows and detective novels have elevated forensic science to a cultural fascination. And in real life, a clue uncovered with a microscope or a chemical test frequently is the one that provides the big break toward solving a crime.

You may daydream about what it might be like to work in a crime lab. And if you write crime novels, you likely will generate mental images of crime scene investigators or detectives trying to decipher puzzling clues. You might even picture a laboratory packed with sophisticated electronic analyzers that cost hundreds of thousands or even millions of dollars.

Indeed, some labs do have that type of equipment. But this book’s authors note: “Here’s a startling fact: the vast majority of forensic work, even today, is done with low-tech procedures that would be familiar to a forensic scientist of 100 years ago.”

Indeed, they add: “You don’t need a multi-million dollar lab to do real, useful forensic investigations. All you need are some chemicals and basic equipment, much of which can be found around the home.”

You will also need “a decent microscope—the fundamental tool of the forensic scientist—but even an inexpensive student model will serve.”

The Illustrated Guide to Home Forensic Science Experiments: All Lab, No Lecture is intended for “responsible” teenagers and adults who want “to learn about forensic science by doing real, hands-on laboratory work. DIY hobbyists and forensics enthusiasts can use this book to learn and master the essential practical skills and fundamental knowledge needed to pursue forensics as a lifelong hobby. Home school parents and public school teachers can use this book as the basis of a year-long, lab-based course in forensic science.”

The hefty, 425-page book offers more than 50 lab experiments, and each session represents actual procedures used each day by professional forensic analysts.

The labs are organized into 11 groups:

  1. Soil Analysis
  2. Hair and Fiber Analysis
  3. Glass and Plastic Analysis
  4. Revealing Latent Fingerprints
  5. Detecting Blood
  6. Impression Analysis
  7. Forensic Drug Testing
  8. Forensic Toxicology
  9. Gunshot and Explosive Residues Analysis
  10. Detecting Altered and Forged Documents
  11. Forensic Biology

Even though the book says it contains “no lectures,” each lab is introduced with a short background summary, plus lab safety cautions and warnings, lists of equipment and materials, and related how-to instructions. Also, each group of labs is introduced with a short overview of its category and its importance in forensic science. The book also contains comments from Dennis Hilliard, director of the Rhode Island State Crime Laboratory.

This is not a book that young students should use without supervision. Even “responsible teens” will need close guidance. And adults, too, must be very careful to follow all safety instructions.

But this is a fascinating how-to guide for learning the basics of forensic science, whether you hope to do it as a career or hobby, gain a science credit, or merely describe some of the techniques in a mystery novel or screenplay.

Si Dunn

Build Awesome Command-Line Applications in Ruby – #programming #bookreview

Build Awesome Command-Line Applications in Ruby
David Bryant Copeland
(Pragmatic Bookshelf,
paperback)

The word “awesome” now is grossly overused in contemporary culture. And I hate it in book titles.

That being said, Build Awesome Command-Line Applications in Ruby is an excellent how-to guide, particularly if you have a little bit of UNIX and some basic Ruby programming in your background.

The book is “aimed at both developers and system administrators who have some familiarity with Ruby and who find themselves automating things on the command line (or wish they could),” David Bryant Copeland writes. And he adds: “Writing command-line apps in Ruby is also a great way to really learn Ruby and become a better programmer, since you can apply it directly to your day-to-day tasks.”

Mac and Linux users will have the easiest time with this book’s code examples. Things get a little bit more complicated for Windows users, especially those with no UNIX experience and not much programming background, either. The author, fortunately, lays out some workarounds.

For example, on UNIX systems, the first line of code commonly is called the shebang. In a piece of Ruby code, the shebang might look something like this: #!/usr/bin/ruby. (That example tells where the Ruby interpreter is installed.) But, at a Windows command prompt, if Ruby has been installed correctly and is in the path, the # character simply will be interpreted as the start of a comment line, and the rest of the shebang will be ignored when code is run directly, such as: ruby hello_world.rb.

In this book, David Bryant Copeland’s focus definitely is code. “There is a lot of code,” he says, “and we’ll do our best to take each new bit of it step by step.” As the book progresses, two command-line applications are developed, enhanced, and improved. One is a database-backup app, and the other is a command suite, “an app that provides a set of commands, each representing a different function of a related concept.”

This is not a Ruby primer, so get some experience in that language first before tackling this book. But if you are now reasonably comfortable with Ruby coding on a graphical user interface (GUI) and want some new challenges, consider moving to the command line and use this excellent book as your guide.

The requirements are minimal: a free Ruby download and a text editor or a UNIX-like shell. But the payoff is very good.

In his 10 chapters, the author discusses and illustrates “every detail of command-line application development, from user input, program output, and code organization to code handling, testing, and distribution” while the two example applications are created, tested, and enhanced.

There is plenty to learn, and Build Awesome Command-Line Applications in Ruby does a fine job of  leading you through the process in short-chapter steps.

Si Dunn

OS X Mountain Lion: The Missing Manual – Another how-to classic from David Pogue – #bookreview

OS X Mountain Lion: The Missing Manual
David Pogue
(O’Reilly, paperbackKindle)

 David Pogue knows how to produce excellent user manuals. He invented the popular “Missing Manual” series. And he continues to set high standards for other writers who also produce “Missing Manuals” and other tech books.  

Pogue’s newest, OS X Mountain Lion: The Missing Manual, is 864 pages of useful information, well presented, with clear writing and frequent sparks of humor.

It covers OS X 10.8 (which is pronounced “Oh-ess-ten, ten-dot-eight” [or “ten-point-eight”] by the way) and also covers iCloud.  Pogue cautions: “Don’t say ‘oh-ess-ex.’ You’ll get funny looks in public.”

Apple says OS X Mountain Lion has added 200 new features. But some users of previous Mac OS versions may be startled at a few capabilities that have been cut or reduced. (With this release, the term “Mac OS X” also has been reduced to “OS X” to better mesh with “iOS,” Apple contends.) Meanwhile, Pogue continues his well-known penchant for exposing and illustrating undocumented capabilities, irritants, and gotchas in software.

Still, he declares, “OS X is an impressive technical achievement; many experts call it the best personal-computer operating system on earth.”

Best OS or not, if you use OS X 10.8 and iCloud, you likely will want to have this how-to guide close at hand.

“If you could choose only one word to describe Apple’s overarching design goal in Lion and Mountain Lion, there’s no doubt about what it would be: iPad,” Pogue states.  “In this software, Apple has gone about as far as it could go in trying to turn the Mac into an iPad.”

OS X Mountain Lion: The Missing Manual is split into six parts, with 22 chapters and four appendices.

Part One: The OS X Desktop

  • Chapter 0: The Mountain Lion Landscape
  • Chapter 1: Folders & Windows
  • Chapter 2: Organizing Your Stuff
  • Chapter 3: Spotlight
  • Chapter 4: Dock, Desktop & Toolbars

Part Two: Programs in OS X

  • Chapter 5: Documents, Programs & Spaces
  • Chapter 6: Data: Typing, Dictating, Sharing & Backing Up
  • Chapter 7: Automator, AppleScript & Services
  • Chapter 8: Windows on Macintosh

Part Three: The Components of OS X

  • Chapter 9: System Preferences
  • Chapter 10: Reminders, Notes & Notification Center
  • Chapter 11: The Other Free Programs
  • Chapter 12: CDs, DVDs, iTunes & AirPlay

Part Four: The Technologies of OS X

  • Chapter 13: Accounts, Security & Gatekeeper
  • Chapter 14: Networking, File Sharing & AirDrop
  • Chapter 15: Graphics, Fonts & Printing
  • Chapter 16: Sound, Movies & Speech

Part Five: OS X Online

  • Chapter 17: Internet Setup & iCoud
  • Chapter 18: Mail & Contacts
  • Chapter 19: Safari
  • Chapter 20: Messages
  • Chapter 21: SSH, FTP, VPN & Web Sharing

Part Six: Appendixes

  • Appendix A: Installing OS X Mountain Lion
  • Appendix B: Troubleshooting
  • Appendix C: The Windows-to-Mac Dictionary
  • Appendix D: The Master OS X Secret Keystroke List

The focus stays firmly on “What’s this new feature for?” in OS X Mountain Lion: The Missing Manual. And David Pogue’s latest how-to classic makes it fun to test out a new feature with a good sense of what is supposed to happen and which choices are available or problematic .

Beats the heck out of opening up the software, randomly tinkering with selections, options and default settings, and then trying to figure out what you just did wrong.

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

Macintosh Terminal Pocket Guide and OS X Mountain Lion Pocket Guide – #bookreview

O’Reilly recently has released two compact and handy guides for Macintosh users: the Macintosh Terminal Pocket Guide and the OS X Mountain Lion Pocket Guide.

Macintosh Terminal Pocket Guide
Daniel J. Barrett
(O’Reilly, paperbackKindle)

Macintosh Terminal is termed “the Macintosh’s best-kept secret” in this conveniently organized , well-illustrated guidebook.  Terminal also is described as “one of the most powerful programs for controlling your Mac.”

The author notes: “The Terminal is an application that runs commands.  If you’re familiar with DOS command lines on Windows, the Terminal is somewhat similar (but much more powerful).”

The book begins with a short, basic tutorial for those who need to know what a “command” is and how to enter commands. It also describes how the Mac’s file system is organized, and it delves into other beginner’s aspects of working at the command line.

More experienced users, meanwhile, can go right to the 223-page book’s table of contents and index to quickly find discussions of commands and their available options.

The Macintosh Terminal Pocket Guide bills itself as “a short guide to the Terminal, not a comprehensive reference.”  But it contains explanations and how-to instructions for many OS X commands.

You may find yourself suddenly needing to know how to kill a program that won’t quit, or log in to your Mac from a remote location, or compress and uncompress files in several different formats. The paperback version of the Macintosh Terminal Pocket Guide really does fit into a pants pocket or coat pocket, and it won’t take up much room in a computer bag or purse, either. 

OS X Mountain Lion Pocket Guide
Chris Seibold
(O’Reilly, paperback – Kindle)

For new and experienced users of the OS X Mountain Lion operating system, this 252-page “quick” reference guide delivers solid how-to information that focuses on major features, system preferences, built-in applications, and utilities. It also provides common keyboard shortcuts, and troubleshooting tips.

Like the Macintosh Terminal Pocket Guide, the paperback version of this guidebook is conveniently sized to slip into a pocket, computer bag or purse without adding much bulk or weight, and it has a good index and table of contents for quick reference.

The OS X Mountain Lion Pocket Guide is divided into eight chapters:

  • Chapter 1: What’s New in Mountain Lion?
  • Chapter 2: Installing Mountain Lion and Migrating Data
  • Chapter 3: A Quick Guide to Mountain Lion
  • Chapter 4: Troubleshooting OS X
  • Chapter 5: System Preferences
  • Chapter 6: Built-in Applications and Utilities
  • Chapter 7: Managing Passwords in Mountain Lion
  • Chapter 8: Keyboard Commands and Special Characters

“With every revision of OS X, Apple leaves some Macs behind, and Mountain Lion is no exception,” the author cautions.  His book describes the Macs that can run it and gives some information about the ones that can’t. Certain upgrades may make it possible to install the software.

He adds: “So how do you find out whether your Mac is compatible with Mountain Lion? The simplest way is to try to buy the software from the App Store.  If your Mac isn’t compatible, the App Store will tell you that the software won’t run on that machine.”

The even easier way to run OS X Mountain Lion, of course, is to just buy a new Mac that already has it installed.

No matter which option you choose, however, you may need to keep this book close at hand.

Si Dunn

The Data Journalism Handbook – Get new skills for a new career that’s actually in demand – #bookreview

The Data Journalism Handbook: How Journalists Can Use Data to Improve the News
Edited by Jonathan Gray, Liliana Bounegru, and Lucy Chambers
(O’Reilly, paperbackKindle)

Arise, ye downtrodden, unemployed newspaper and magazine writers and editors yearning to be working again as journalists. Data journalism apparently is hiring.

Data journalism? I didn’t know, either, until I read this intriguing and hopeful collection of essays, how-to reports, and case studies written by journalists now working as, or helping train, data journalists in the United States and other parts of the world.

Data journalism, according to Paul Bradshaw of Birmingham City University, combines “the traditional ‘nose for news’ and ability to tell a compelling story with the sheer scale and range of digital information now available.”

Traditional journalists should view that swelling tide of information not as a mind-numbing, overwhelming flood but ”as an opportunity,” says Mirko Lorenz of Deutsche Welle. “By using data, the job of journalists shifts its main focus from being the first ones to report to being the ones telling us what a certain development actually means.”

He adds: “Data journalists or data scientists… are already a sought-after group of employees, not only in the media. Companies and institutions around the world are looking for ‘sense makers’ and professionals who know how to dig through data and transform it into something tangible.”

So, how do you transform yourself from an ex-investigative reporter now working at a shoe store into a prizewinning data journalist?

A bit of training. And, a willingness to bend your stubborn brain in a few new directions, according to this excellent and eye-opening book.

Yes, you may still be able to use the inverted-pyramid writing style and the “five W’s and H” you learned in J-school. But more importantly, you will now need to show you have some good skills in (drum roll, please)…Microsoft Excel.

That’s it? No, not quite.

Google Docs, SQL, Python, Django, R, Ruby, Ruby on Rails, screen scrapers, graphics packages – these are just a few more of the working data journalists’ favorite things. Skills in some these, plus a journalism background, can help you become part of a team that finds, analyzes and presents information in a clear and graphical way.

 You may dig up and present accurate data that reveals, for example, how tax dollars are being wasted by a certain school official, or how crime has increased in a particular neighborhood, or how extended drought is causing high unemployment among those who rely on lakes or rivers for income.

You might burrow deep into publically accessible data and come up with a story that changes the course of a major election or alters national discourse.

Who are today’s leading practitioners of data journalism? The New York Times, the Texas Tribune, the Chicago Tribune, the BBC, Zeit Online, and numerous others are cited in this book.

The Data Journalism Handbook grew out of MozFest 2011 and is a project of the European Journalism Centre and the Open Knowledge Foundation.

This book can show you “how data can be either the course of data journalism or a tool with which the story is told—or both.”

If you are looking for new ways to use journalism skills that you thought were outmoded, The Data Journalism Handbook can give you both hope and a clear roadmap toward a possible new career.

Si Dunn

Getting Started with D3 – A guide to working with data-driven documents – #bookreview #javascript

Getting Started with D3
Mike Dewar
(O’Reilly, paperbackKindle)

This focused, 58-page how-to guide introduces the basics of D3, a JavaScript library written by Mike Bostock.

The D3 library, a free download, can be used to manipulate documents based on data. According to the Data-Driven Documents website, “D3 allows you to bind arbitrary data to a Document Object Model (DOM), and then apply data-driven transformations to the document. For example, you can use D3 to generate an HTML table from an array of numbers. Or, use the same data to create an interactive SVG bar chart with smooth transitions and interaction.”

Mike Dewar’s book is aimed at “the data scientist: someone has data to visualize and who wants to use the power of the modern web browser to give his visualizations additional impact.” However, if you don’t consider yourself a data scientist, but are comfortable with coding and manipulating data, this book can still show you how to use a combination of JavaScript and SVG [Scalable Vector Graphics] “to build everything from simple bar charts to complex infographics.”

Getting Started with D3 has six chapters, and they are illustrated with code samples and examples of graphics produced using D3.

  1. Introduction
  2. The Enter Selection
  3. Scales, Axes, and Lines
  4. Interactions and Transitions
  5. Layout
  6. Conclusion

In his conclusion, Mike Dewar, a data scientist at Bitly, offers encouragement and additional resources for digging deeper into D3. “The documentation for D3 is extensive,” he writes, “and is available at http://d3js.org along with a huge gallery of examples. This is an essential resource, both for reference and inspiration.”

His book is also an essential resource, for learning the basics of using D3.

Si Dunn