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