Tag Archives: books

HTML and CSS: Develop with Tomorrow’s Standards Today by Brian P. Hogan

HTML5 and CSS3: Develop with Tomorrow's Standards TodayI recently unearthed a review copy of a book that somehow got lost in the shuffle a couple of years ago, HTML5 and CSS3: Develop with Tomorrow’s Standards Today by Brian P. Hogan, which is too bad, since it’s one of the better books I’ve seen on the subject. It’s a comprehensive primer on the changes in HTML5 and CSS3. I enjoyed reading through the book after I unburied it last week.

It features a chapter on logically marking up page structure with the new semantic tags (header, nav, section, article, etc.), which explains the contexts they should be used in with a hands-on example of restructuring a blog without excessive divs. A lot of online tutorials make the error of suggesting the aside element for a blog sidebar, which the book helpfully points out as wrong. The section element is the proper tag for the job, as it denotes an arbitrary section of the page, whereas aside is for broken-out sections of your article content, such as pullquotes or diagrams.

From there the author moves on to some CSS3 tricks using newly-added selectors. He shows some simple methods to add zebra-striping to tables with pseudo-classes and add visible URLs to links via a print stylesheet with :after. There’s a brief section demonstrating media queries, as well some on the new JavaScript APIs—localStorage and history pushState, for example. There’s even a bit on using cache manifests to set up offline access.

Oh, and the deprecations. HTML5 deprecates a good many tags and attributes. There is a section listing those, as well as some modern alternatives, such as opening links in new windows without the deprecated target attribute. It can be done cleanly and semantically by using JavaScript, without impacting the user’s ability to middle-click a link and open a new tab…which far too many sites still do today. If you do that, you need to read this book just for that reason.

Eloquent JavaScript: A Modern Introduction to Programming

It’s amazing how much JavaScript has changed over the years. What was once mainly used for creating pop-up windows, rollover images and the like is now an integral part of the modern web, making web applications like GMail and Twitter possible. I first learned JavaScript from the old No Star Press title The Book of JavaScript, published back in 2000. As was typical back in those days, it began with a good into to variables, functions and loops, then taught you how to do common tricks like open new windows and manipulate HTML framesets.

For nostalgia’s sake, and because I enjoyed it’s older predecessor, I jumped at the chance to read No Starch’s fresh new book, Eloquent JavaScript: A Modern Introduction to Programming. Upon opening it for the first time, it was pleasant to see that No Starch uses the same characteristic typesetting and layout.

Marijn Haverbeke takes an unusual approach for a JavaScript book. Instead of focusing on scripting web pages, he teaches you how to program, and JavaScript just happens to be the language. The book, in addition to covering the usual “here’s how to do arrays and stuff,” features more advanced topics like recursion, object-oriented programming, modularity, and other interesting bits of programming theory. It’s examples are even more advanced than is normal, one chapter focusing on how to split input text into paragraphs and extract relevant data from the sentences.

The book also has a wonderful introduction, one that captures the spirit of programming quite well (besides making you feel like a “mighty wizard”).

To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, it is weightless, and it grows easily under our typing hands. If we are not careful, its size and complexity will grow out of control, confusing even the person who created it. This is the main problem of programming: keeping programs under control. When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity.

All in all, a JavaScript book and programming primer that stands apart from the rest. A good book for people who want to learn more than how to copy code snippets, and an interesting read more those who already know what they’re doing.

The Pragmatic Guide to JavaScript

There are plenty of books that teach JavaScript from a basic introductory angle. The Pragmatic Guide to JavaScript is a bit different. It’s a lightweight guide (around 130 pages) for those of us who already know a programming language or two. Instead of covering boring stuff like variables and functions—let’s face it, they’re not all that different from language to language—it shows you some real-world use cases in convenient byte-size portions.

The book’s format is interesting. Each chapter is a two-page spread with the text on one side and code samples on the other. Each of the chapters deals with a single practical usage of JavaScript, such as:

  • Dynamically selecting methods and properties
  • Using the Module Pattern to prevent naming collisions
  • Optional function arguments
  • Dynamically styling content
  • Preloading images
  • Form validation and dynamic form fields
  • AJAX, JSON, JSON-P and cross-domain AJAX
  • An introduction to mashups

Another neat feature is the way it shows examples using straight JavaScript as well as with different frameworks.

Overall the book seems like a great way to dive right into JavaScript, providing you already have some scripting experience with another language. It was quite useful to me, as by grounding in JavaScript isn’t nearly as good as with PHP. I learned a few new tricks.

Have You Tried “The Smashing Book” Yet?

Smashing BookHave you tried Smashing Magazine’s The Smashing Book yet? I haven’t, but the full-color 313 page paperback is very tempting at it’s $29 price. Most computer-related books are much costlier than that, and they’re not by an online publication notorious for “smashing you with the information.”

The topics covered include “The Art And Science Of CSS Layouts,” web typography, “User Interface Design In Modern Applications,” usability principles, color theory, branding, and a brief history of Smashing Magazine.

They have some scans and a PDF sample chapter on the website, which look pretty good to me.

Have any of you read the book? Is it worth the money? It seems like a promising book to me, and I’ve been wondering about it lately. (Digging into WordPress, as well, as caught my attention.)

40+ Invaluable PHP Tutorials and Resources

My newest post on Net.Tuts+ was published yesterday: 40+ Invaluable PHP Tutorials and Resources

It is a roundup of articles, tutorials and tools of interest to PHP coders, on topics such as security, OOP, frameworks, and WordPress.

PHP is one of the most popular scripting languages on the internet today, and one of the easiest to get into. Whether you’re a PHP newbie, or an experienced code-slinger, there is always something new to discover. A function you’re unfamiliar with a killer timesaving tool, a technique that you forgot about…

Head over to Net.Tuts+ to read the full article.

Quotable Books

I recently built a fun little application for BookAdvice.net. It is called Quotable Books.

Quotable Books

Continue reading →

Learning MySQL [Book Review]

Almost anyone who’s played around with PHP before has run into the subject of databases. MySQL databases are the most common method of storing massive amounts of data to later be sorted through and retrieved for display via script. WordPress stores all of it’s posts and settings in MySQL tables, forum scripts are powered by databases, sites like Amazon, YouTube, and of course IMDB make extensive use of databases. If you think about it, most modern websites are just pretty user interfaces for databases.

As common as they may be, databases sure are mysterious critters. It look me awhile to grasp the concept of them at first, and even longer for me to pick-up the skills required to make use of them. In addition to knowing a scripting language like PHP or Perl, and how to submit a query to the DB server, you also need to know the SQL language.

I just finished a great book on MySQL. Learning MySQL by Seyed M.M. Tahaghoghi and Hugh Williams is a comprehensive and well-explained book that teaches you from the ground up about MySQL databases and how to work with them. It introduces the concept of a database, walks you through installing the MySQL server software (if you’re not already running it), explains querying, then moves on to the real meat of the book: Structured Query Language, or SQL. It covers basic SELECTS and INSERTs, JOINS, nested queries, table and column types, and really everything you need to know to get started.

Following chapters cover topics like using PHP or Perl to interact with databases (as opposed to using a MySQL prompt) and securing web applications. There are also sections on planning database structures optimally, optimizing performance.

The book is written in a manner that should make it easy to follow, it’s full of code examples to try out, and overall is enough to give you a general to intermediate knowledge of MySQL. It also works as a handy reference.

ProBlogger: Secrets Blogging Your Way to a Six-Figure Income

I was at a Barnes & Noble store a couple days ago, and I saw a few copies Darren Rowse and Chris Garrett’s book ProBlogger: Secrets Blogging Your Way to a Six-Figure Income sitting on the shelf in the Computers and Internet section (the spot I always head directly for whenever I’m in a book store).

I picked up a copy of the book and started to skim through it. I didn’t read it quite as thoroughly as I would have had I bought the book, but I spent a half hour or so giving it a good look.

The 240-page book covers quite a bit of ground. It spends a couple chapters introducing the concepts of blogging and “ProBlogging,” and guides you through setting up a blog. Dispensing with the “start a blog in ten minutes” mentality that so many blogging books take, it teaches you to think about things more, to plan before you run out a create a shiny new blog. They keep that part of the book to a minimum though, instead focusing on what you do after you have a blog.

Continue reading →

Website Optimization by Andrew B. King [Book Review]

O’reilly Press puts out some really good tech books. So I grabbed Andrew B. King’s Website Optimization when I saw it at the library a few days ago. It was pretty good, though not my favorite of their books. I enjoy the ‘Hacks series (PHP Hacks, Podcasting Hacks, etc) more, but they have some other good books too.

Website Optimization is worth a read if you’re trying to get more from your website. The book covers several aspects of optimization. Search engines, loading times, conversion rates, and a little bit on accessibility. There is a heavy emphasis on Search Engine Optimization of course.

It’s a pretty good book, and is very informative, but I have to disagree with some of the SEO advice. The book seems to promote the idea of being stingy when linking to external sites, in an effort to hoard PageRank, linking reciprocally, and making use of the nofollow attribute excessively. Then the book goes and tells you that blogs are a good way to get more inbound links.

I can tell you that an attitude like that regarding links will get you nowere fast. If you want to get links, you must give them first. Link to things that you think will be of interest to your users. The sites you link to will then learn about your site when they find some traffic coming in from your site. Nofollow shouldn’t be used to cripple links you place on your site either. It should be for things like blog commenters’ posted URL’s, which weren’t added by you, and therefore you may not want to recieve PageRank points. As for reciprocal linking, don’t bother. Google thinks reciprocal linking schemes are generally of little interest to the end user, and are therefore discounted when ranking pages.

Other than my minor complaints about some of the linking advice given, it’s a pretty good book.

The PHP Anthology: 101 Essential Tips, Tricks & Hacks [Book Review]

About a year ago, I purchased a copy of Sitepoint‘s book The CSS Anthology, which I enjoyed. While browsing through the “Computers” shelf in the local library’s New Books room, I came across a copy of The PHP Anthology.

This isn’t your garden variety teach yourself PHP-type book. This is intended for people who already know their way around PHP moderately well, and have some experience with it. Instead of teaching you the language, it’s a respository of “101 Essential Tips, Tricks, & Hacks.”

It’s a good book, informative and easy to read. It gives examples on how to deal with dates, secure your scripts, create thumbnails effectively, built an HTTP authentication system, and much more. While you can read the book all the way through (I did), it works well as a reference, and a way of learning some new techniques.

Like a lot of computer books, it’s a little pricey, with a list price of about $40 (though Amazon has new copies for around $25).