Specificity, Selectors, and the Cascade: Applying CSS3 to Documents – #bookreview

Selectors, Specificity, and the Cascade: Applying CSS3 to Documents
Eric A. Meyer
(O’Reilly, paperbackKindle)

If you know some basic CSS but wonder how the “cascade” part of Cascading Style Sheets works, here is a useful guide.

Actually, this is a 73-page, two-chapter excerpt from the upcoming fourth edition of Eric A. Meyer’s CSS: The Definitive Guide. If you are learning CSS, dealing with CSS issues, or moving to CSS3, this small book can provide you with numerous how-to examples to apply to right now.

The first chapter focuses on “Selectors.” Selectors are not clearly defined at the beginning. But they generally are described elsewhere as “patterns” that can be used to select the element or elements you want to style in a document, such as headings of a certain font sizes or paragraphs with text in specific colors.

Fortunately, the first chapter’s code examples, descriptive paragraphs, and illustrations quickly clarify how to put selectors to work in a document. “[D]ocument structure and CSS selectors allow you to apply a wide variety of style to elements,” the author notes.

The second chapter’s topics are “Specificity and the Cascade.” And the initial technical definitions get a bit dense. For example: “When determining which values should apply to an element, a user agent must consider not only inheritance but also the specificity of the declaration, as well as the origin of the declarations themselves. The process of consideration is what’s known as the cascade.”

Uh, okay.

Once again, fortunately, the second chapter’s code samples, illustrations, and follow-up paragraphs quickly clarify what is going on. And they enable you to learn by doing, seeing the outcome, and applying what you’ve learned to documents of your own.

Si Dunn

Practical Vim: Edit Text at the Speed of Thought – #programming #bookreview

Practical Vim: Edit Text at the Speed of Thought
Drew Neil
(Pragmatic Bookshelf,

Vim is a popular, free text editor used by programmers, web developers, and others. If you are a reasonably good touch typist and know just two commands, i and :w, you can create simple code files and text files in a hurry. For serious Vim users, however, there is a fairly long learning curve that includes a large array of features and configurable settings.

Practical Vim: Edit Text at the Speed of Thought is for Vim users who have been through the basic tutorial offered through the program and now want to step up their skills.

The book focuses on “the core functionality of the editor…[m]aster Vim’s core, and you’ll gain portable access to a text editing power tool,” author Drew Neil promises.

Neil has structured his content as “a recipe book. It’s not designed to be read from start to finish.”

Instead, Practical Vim follows its opening chapter, “The Vim Way,” with 20 additional chapters separated into six parts:

  • Part 1 – Modes (Normal, Insert, Visual, Command Line)
  • Part 2 – Files (Manage Multiple Files, Open Files and Save Them to Disk)
  • Part 3 – Getting Around Faster (Navigate Inside Files with Motions, Navigate Between Files with Jumps)
  • Part 4 – Registers (Copy and Paste, Macros)
  • Part 5 – Patterns (Matching Patterns and Literals, Search, Substitution, Global Commands)
  • Part 6 – Tools (Index and Navigate Source Code with ctags; Compile Code and Navigate Errors with the Quickfix List; Search Project-Wide with grep, vimgrep, and Others; Dial X for Autocompletion; Find and Fix Typos with Vim’s Spell Checker; Now What?

There is one appendix, and its focus is: Customize Vim to Suit Your Preferences.

The book is well written, and it provides numerous how-to steps, illustrated sequences of commands, tips, explanations, and suggestions.

If you are a Vim novice and serious about getting good at using the program, Drew Neil’s Practical Vim can show you how to do it.

Si Dunn

Practical Vim: Edit Text at the Speed of Thought

For more information:  paperback

New Programmer’s Survival Manual – #programming #bookreview

New Programmer’s Survival Manual: Navigate Your Workplace, Cube Farm, or Startup
By Josh Carter
(Pragmatic Bookshelf, paperback, list price $29.00)

“It’s day one on the job. You have programming chops, you’ve landed the job, you’re sitting at your workstation…now what?”

In the New Programmer’s Survival Manual, veteran coder Josh Carter lays out the possibilities in informative and entertaining ways. And he quickly gets to his book’s key message: “Your programming skills are only one part of what you’ll need in these first years on the job.”

In your long efforts to learn programming, you likely have accumulated stacks of books focusing on several hot languages.

Carter’s manual moves straight to the heart of what you likely don’t know yet and what you’ll need to master very quickly once you sit down at your first professional workstation and get your first assignment.

The 237-page book has seven chapters:

  1. Program for Production – This chapter starts you “close to the code” and emphasizes the importance of writing code that is “production-ready.” You may find yourself assigned to a huge project that is full of bugs. You must learn how to do a range of tests on your code and on the overall product and find as many bugs as you can before angry customers start finding them for you. You also must write code with “good style.” Carter shows how.
  2. Get Your Tools in Order – “The right tools multiply the productivity of a great programmer,” Carter emphasizes. This chapter covers the importance of many tools, ranging from simple text editors to debuggers to using open source code. You also must become fluent in the programming languages you are using and learn how to manage version control and coordinate with other programmers.
  3. Manage Thyself – The corporate world expects you to be a team player. But you have to know how to take care of yourself and your needs, too. Carter offers sage advice on finding a mentor, projecting a professional image, doing well in performance reviews, coping with stress, and taking care of your body with ergonomics.
  4. Teamwork – “Much of what you’ll so in the professional world requires interacting regularly with others,” Carter emphasizes. He acknowledges that many programmers tend to be introverts, so he offers some good tips on overcoming this and working together, as well as surviving “the much-dreaded corporate meeting.”
  5. Inside the Company – You may want to just hunker down in your cube and write code. But you will have to understand how the company that employs you is organized. Along understanding the business and  knowing what each department does, you will need to know how to find and retain allies and locate resources.
  6. Mind Your Business – As much as you may want to avoid the arcane details of corporate finance and operations, “the master programmer has to know a thing or two about business,” the author insists. He notes that “it pays to understand the context of your work: When is my product going to ship? Who’s going to buy it? How does the company make money from it?”
  7. Kaizen – This chapter focuses on applying the Japanese philosophy of continuous improvement. It is imperative that you keep developing new skills and new knowledge. Believe it or not, you someday may want to advance from programming to product management or other positions.

By the way, you do not have to be a new programmer to benefit from this book.

Maybe you have been on the job for a while, and now you feel the need to put more professionalism into your efforts. You might be angling to become a team leader or move up into management. Or, maybe you have been pushed into a leadership position by recent layoffs, attrition or changes in business structure, and you want to hang onto your job.

Josh Carter’s well-written, entertaining survival manual can help you mount a better, more focused campaign for long-term success in the increasingly essential world of computer programming.


Si Dunn‘s latest book is a novel, Erwin’s Law. His other published works include Jump, a novella, and a book of poetry, plus several short stories, all available on Kindle. He is a freelance book reviewer for the Dallas Morning News and a former technical writer and software QA tester.