Book Review: Douglas Adams' "The Hitchhiker's Guide to the Galaxy"

Rating: 5 out of 5

This will be part one of a six part review of Douglas Adams' The Ultimate Hitchhiker's Guide. All five novels (The Hitchhiker's Guide to the GalaxyThe Restaurant at the End of the UniverseLife, the Universe and EverythingSo Long, and Thanks for All the Fish, and Mostly Harmless) plus a bonus story (Young Zaphod Plays It Safe) are present in the book, and as I read through each story, I will put up another review. I am a fan of the Hitchhiker's Guide through the short six episode television series on BBC and the 2005 movie, but have never got around to reading the books (or listening to the radio shows). So, for part one in this review, I bring you: The Hitchhiker's Guide to the Galaxy.

Don't Panic

The Hitchhiker's Guide to the Galaxy begins on just another normal day on Earth. It happens to be a Thursday, and our protagonist, Arthur Dent, does not like Thursdays. He is awakened to monstrous bull-dozers ready to demolish his house in order to make way for a highway bypass. Unbeknown to any man on Earth, except for Ford Prefect (Arthur's best friend, who happens to be from a small planet somewhere in the vicinity of Betelgeuse and a roaming editor of the best-selling Hitchhiker's Guide to the Galaxy), the Earth itself was about to be demolished by a Vogon construction fleet to make way for a hyperspatial express route. Luckily for Arthur, Ford Prefect was able to hitch them a ride from the Vogon's cooking staff. Arthur and Ford narrowly escape death from hearing Vogon poetry and ejection into space thanks to the President of the Imperial Galactic Government, Zaphod Beeblebrox, and an Earth-woman, Trillian, who happen to be riding along in the newly stolen Heart of Gold spaceship with its' Improbability Drive.

The story continues with Arthur, Ford, Zaphod, Trillian, and Marvin (a manically depressed robot) who all happen to find themselves at the center of an improbable quest which uncovers the true purpose for why the Earth was built: to find the question to the ultimate answer to the life, the universe, and everything. The ultimate answer, of 42, was determined by the second greatest computer ever built, Deep Thought, about 10 billion years ago. But, in finding an answer, the question remained. Deep Thought then designed and commissioned the Earth to be built to determine the ultimate question. The program would have finished running if not the Vogon destroyed the Earth 5 minutes before completion.

Will our heroes find out the ultimate question to life, the universe, and everything? Wondering why I have the phrase "Don't Panic" as the section header? Is man only the third most intelligent being on Earth? Answers to these questions and more await you in The Hitchhiker's Guide to the Galaxy.

As a fan of satire and science fiction, Douglas Adams' Hitchhiker's Guide to the Galaxy is a very fun read. Even having some knowledge of how the series is shaped through the BBC show and 2005 movie, I did not want to put this book down. Even while at work, the guide pulled at my subconscious making me want more. I highly recommend this book if you have not yet read it.

Equal Height for Division (div) Elements using JavaScript

On problem I run into on a regular basis when developing web sites is that I have 2 or 3 divisions on a page that need to be the same height. This is no problem to accomplish with style sheets, just set the height property to whatever you need: height: 100px;. This becomes more difficult with dynamic text or across multiple pages. This is where JavaScript comes in handy:

function adjustHeight(elem1, elem2)
{
  var e1 = document.getElementById(elem1);
  var e2 = document.getElementById(elem2);
  if (e1 && e2)
  {
    var h1 = e1.offsetHeight;
    var h2 = e2.offsetHeight;
    if(Math.max(h1, h2) == h1)
    {
      e2.style.height = h1 + "px";
    }
    else
    {
      e1.style.height = h2 + "px";
    }
  }
}

The adjustHeight(elem1, elem2) function above takes in the id of two elements, checks to see if they actually exist, determines which element has a greater height, and sets the height of the smaller element. The offsetHeight attribute of an element is read-only (meaning we cannot assign a value to it) and returns the height of the element (including scrolling) as an integer value in pixels. We actually set the height of the element through manipulation of the elements style: e1.style.height. Theheight property must have a unit of measurement, and since offsetHeight returns pixels, we assign pixels (“px”) to the property: e2.style.height = h1 + "px";

To use this function in you code, place this script within the <head> tag of you page, being sure to identify the script as JavaScript: <script type="text/javascript">. You can then call the function using: adjustHeight("left","right"); where left and right are the elements you want equal size.

One further note: make sure this function is called after the elements have been loaded on the page. Otherwise, you will not see anything happen. One way to ensure this is putting a <script> block immediately after the elements you want resized. Another way is to attach an event to the page load that triggers the function: <body onload="adjustHeight("left","right");"> (there are better ways to attach events, this is just the simplest to write here)

Book Review: "Bruce Lee: Artist of Life"

Rating: 4 out of 5

Bruce Lee: Artist of Life is a collection of letters, journals, and drafts crafted by Bruce Lee throughout his life. John Little organizes the essays in this book into eight categories: Gung Fu, Philosophy, Psychology, Poetry, Jeet Kune Do - The Liberation, Acting, Self-Knowledge, and Letters. Throughout the book, Bruce Lee stresses one fact above all others: I cannot teach you; only help you to explore yourself. Nothing More. Through the writings, we learn that Bruce Lee valued self-knowledge and self-actualization first and foremost. Even in his martial arts, Jeet Kune Do (the way of the intercepting fist), focuses on using your skills to break through the mental blocks and demons inside oneself to gain a better understanding of who one is.

I enjoyed reading this book. I have been a fan of Bruce Lee even since my dad showed me Enter the Dragon as a little kid. This peek into who Bruce Lee was, his mental processes and plans, adds a warmer glow to the martial arts expert. The way he lived his life and the inspiration he gave to others is a model that should be more prevalent today.

But [to] those who kept saying
"It can't be done,"
Never are the victories
Or the honors won.
But, rather,
By the believing, doing kind,
While the doubters
Watched from far behind.

-- excerpt from Which Are You?, a poem by Bruce Lee, page 255

Book Review: Michael Crichton's "Electronic Life"

Rating: 3 out of 5

Michael Crichton's Electronic Life is a non-fiction piece of work that aimed to educate people who were looking into buying a computer for the first time in 1983. Crichton talks about the practical matters when it comes to deciding what computer to buy in his discussion of everything from A (Afraid of Computers) to Z (Zenith: The Final Days).

An interesting piece of knowledge I picked up while reading this book is that the 1973 movie, Westworld, that Michael Crichton wrote and directed, was the first feature film to digitally process film. They obtained a sort of blocky, animated effect as the point-of-view for a robot.

I have taken a course about the history of computing, so I am familiar with all the technical advances that have happened over the years. But the books I had to read did not give a good first-hand view of computing. That is what this book did. It presented a first-hand view of the state of computing in 1983. Reading the book in 2007, there were a few pretty funny exerts:

Buying a Computer: Specifically, think carefully before you buy a machine that can't run under CP/M. -- Page 25

Memory: The earliest machines had only 4K; most machines are now sold with at least 16K, and many users feel unhappy without at least 64K. -- Page 93

Monitor: Color monitors are generally unsatisfactory for text displays. If you want to view both color graphics and text, you probably need two monitors. -- Page 99

Notebook: Keep a notebook for your machine. -- Page 101

Operating System: Some operating systems, such as CP/M, are referred to as "popular," as if the operating system were a thing to be embraced in its own right. -- Page 101

Even though Michael Crichton wrote Electronic Life almost 25 years ago, some points he makes do still apply to buying a machine today:

Debugging: Programs never work the first time. -- Page 50

Documentation: Many otherwise excellent programs have astoundingly bad instructions. -- Page 59

Parents: You've just bought a home computer, but before you've even figured out how to turn the damn thing on, your seven-year-old daughter starts banging away at it, making it do all kinds of tricks. -- Pages 104-105

Computer Widow: The little machines are incredibly compelling, and one can work them long into the night. [...] She's back in two hours, stamping her foot, insisting you come to bed. [...] She's a computer widow, and you have a problem. -- Pages 133-134

The first computer I remember growing up with was a Wang Labs computer running a 80386 processor and Windows 3.11. I can remember upgrading the memory, adding an external CD-ROM drive, and connecting to the "Internet" through a 14.4Kbps modem. And, throughout my life, I have worked on a few monochromatic monitors.

Electronic Life was a good nostalgic book to read. If you are interested in the state of computers in 1983, I suggest you read this book.

Book Review: Ian Fleming's "On Her Majesty's Secret Service"

Rating: 4 out of 5

The 11th book in Ian Fleming's James Bond series begins with Bond drafting his third attempt on a letter of resignation. For the past year in Bond's life, he has been playing detective trying to track down Blofeld, the former number 2 in the SMERSH organization (before SMERSH was disseminated after operation Thunderball). After going no were with the case and repeated attempts to return to his normal double-oh work, Bond figures his only way out of his monotonous nightmare is to resign. On his way back to headquarters, Bond makes a stop at Casino Royale and falls in love with a beautiful girl, Tracy, who happens to be the daughter of the head of the largest European crime syndicate, Marc-Ange Draco. Marc-Ange, after finding out how Bond saved his daughter's life at the hotel casino, does a favor for Bond by finding out Blofeld is alive and living in a remote area of Switzerland.

With this new information, Bond's faith in his service is renewed. He must go undercover as an officer of the College of Arms (a heraldic authority in Europe) in order to gain access to Blofeld's secret hideaway. Bond barely escapes with his life thanks, in part, to the help of Tracy (to whom which he eventually becomes engaged). After learning that Blofeld is involved with Biological Warfare, Bond must meet with Marc-Ange to come up with a plan to stop Blofeld once and for all...

Overall, On Her Majesty's Secret Service was a great book with a few interesting twists that are not present in the other books of the series. A good rebound from the The Spy Who Loved Me interlude.