The most dangerous sounding book in the world

I think I’ve just found the most dangerous sounding book in the world on Amazon: Plumbing for Dummies.

I’m surprised on that page it doesn’t have

People who bought this book also bought:

  • CPR for Dummies
  • How to survive a flood
  • Electricity and Water: Practical Experiments for Everyone
  • How to completely invalidate your home insurance in one afternoon

The Abs Diet

In my last issue of Men’s Health magazine I got a flyer inviting me to

Send for your 14-day FREE-PREVIEW COPY of The Abs Diet…

If I decided to keep the book the flyer told me that “I’ll pay four easy instalments of just £6.99” which included postage and handling. A total of £27.96.

You can buy the same book on Amazon for £3.14. A saving of £24.82 before postage.

For £24.82 you could probably have it delivered to the Moon.

Joomla!

Yesterday I picked up a book at Borders bookstore in Edinburgh. Actually, I went further than that: I also took it to the cashier and paid for it. It’s mine now. I got to take it home, and everything™!

The book was (and still is) Joomla! A User’s Guide: Building a Successful Joomla! Powered Website by Barrie M. North.

I’m only on chapter 4 at the moment, learning about creating content but already I’m discovering that this is a rather good book.

The thing that gets me about alot of CMS books is that they don’t take the time to explain the concepts behind how the CMS organises itself (content, taxonomies, categories, sections, articles, posts, pages, etc.).

What I really want to know when I approach a new CMS is: how does it think? how does it all fit together? because a lot of CMSs operate with very different models, and it’s not always clear how to translate your understanding of one CMS onto another. It doesn’t always work like that.
This is — so far — a very clear book that takes the time to explain these basics very well, and with plently of real-life examples.

There’s an accompanying website too: Joomlabook.com.

Learning jQuery

Did you get anything exciting and geeky for Christmas? I got a copy of Learning jQuery: Better Interaction Design and Web Development with Simple JavaScript Techniques by Jonathan Chaffer and Karl Swedberg (Packt Publishing, 2007).

jQuery is an open-source JavaScript library that makes adding cross-browser compatible effects to your website really simple.

It’s written in such a way that it makes it really easy for web designers (rather than being aimed simply at experienced JavaScript code monkeys) to understand and write as most of its concepts are borrowed from the structure of HTML and CSS.

Example

Here’s a quick example: say you have a table of data to which you wish to apply a striping-effect to alternate rows. All odd rows you wish to display with a pale yellow background, all even rows with a pale blue background.

The traditional, coding-by-hand HTML method you’d manually have to add a class to each table row. If you were then to add a new row in the middle of the table you’d then have to again manually re-edit the code in each and every row.

You could, of course, write a PHP or JavaScript solution, but that would take quite a while, particularly if your 1337 g33k 5killz aren’t up-to-scratch or are in a hurry to get the job done.

jQuery offers the following solution:

  1. Download the jQuery library (about 14 KB compressed) and link it to your HTML document
  2. Write a new JavaScript file containing your striping code and link it to your HTML document
  3. Create new classes in your CSS file for styling the .odd and .even rows.

Here’s the jQuery code you’d need:

$(document).ready(function() {
$('tr:odd').addClass('odd');
$('tr:even').addClass('even');
});

Four lines of code is all it takes, and it’s almost self-explanatory too.

The code says:

  1. Wait until the DOM is ready then execute the code
  2. Then add class=”odd” to all odd table rows
  3. Add class=”even” to all even table rows

The book

The book is very easy to read, taking everything step-by-step and arranged in a very logical and easy to follow way.

Chapter 1 introduces the reader to jQuery

Chapter 2 covers selectors, the building-blocks of a jQuery function

Chapter 3 looks at events: when to start your jQuery code (e.g. on page load, when you click a link, etc.)

Chapter 4 examines Effects, e.g. fading in and out

Chapter 5 covers DOM manipulation: how to change your page on command

Chapter 6 promises to make your website buzzword-compliant with AJAX

The following chapters cover table manipulation, enhancing forms, shufflers and rotators, and extending the built-in functionality of jQuery with plug-ins.

You can see the book examples in action at http://book.learningjquery.com.

I can’t wait to get started and incorporate some of these techniques into my websites.