Posts in the Books Category

Code Constraints

Published 13 years, 8 months ago

Chris Adamson has an interesting post over at the O’Reilly Network about code in books and articles.  In summation: should code be given a special license, separate from the actual text?

While CSS isn’t code, exactly, the same basic questions apply to the stuff I’ve written.  Let’s take my most recent title, More Eric Meyer on CSS.  It contains a copyright statement that says, in effect, you can’t reproduce the book’s text, in part or in whole, without permission.  There is no distinction there between the explanatory text (“Margin collapsing is an interesting problem in some cases, and here’s why, blah blah blah…”) and the styles.  Taken literally, the copyright statement says that you can’t re-use any of the CSS I created in your own designs.

This is clearly in opposition to what I think most of us would agree is the expectation, which is that you can use styles (or code) as you see fit but you can’t take the ‘narrative’ text and pass it off as your work.  But where’s the dividing line?  Suppose that, for whatever reason, you really like one of the designs in Project 4.  We can agree that you should be able to re-use the styles presented, but a whole design?  Is that fair?  I can imagine many arguments both for and against, many of them variants on the classic slippery-slope argument.

In my particular case, the situation is even less clear.  As anyone who drops by the book’s site will discover, the project files are freely available for anyone to download.  You aren’t even expected to own the book as a condition of using them.  That makes them less protected, I would think, than if they were on a CD that accompanied the book—but how much sense does that make?  Again, I can envision several arguments on both sides of the issue.  The same questions would arise for any author that provided code samples for download, as many do.

There’s also the question of what rights can or should be granted to the reader with regard to code.  I might hypothetically make the styles all freely available to anyone, but only under the condition that attribution be given to the source (either me, the book, or both).  Wouldn’t you, as a reader, find that rather annoying?  I would.  “You mean I have to give Eric credit just to use two CSS rules that create this cool effect?”

I’ve always operated on the principle that any markup or CSS I write about is fair game, because otherwise what would be the point of writing about how to use it?  I can see it now: “use of the CSS presented in this tutorial, including any derivative works, without the written consent of the author is prohibited.”  Yeah, right!  That would be something like a dictionary prohibiting you from using any words you look up, including all modifications and misspellings.

So should books contain an explicit license regarding use of the code?  If so, what kind?  I expect readers and publishers will have different viewpoints, although the more clueful publishers probably won’t be too far away from the typical reader perspective.  There’s a part of me that wonders why we even have to be explicit about this at all—after all, there’s been a sort of tacit acceptance of code re-use to date—but in a litigious DMCA world, this is an issue that probably has to be addressed sooner or later.

As I ponder the subject, I’m currently contemplating putting all my code samples under a Creative Commons ShareAlike 1.0 license, both now and into the future, just to make sure the bases are covered.  Then again, perhaps an explicit Public Domain license would make more sense.  Which one would be better, or is there a superior approach I haven’t considered?  Let me know.

MEMoC Under Review

Published 13 years, 9 months ago

Andy King, author of the excellent Speed Up Your Site and purveyor of fine content at the new Optimization Week, has posted a very nice review of More Eric Meyer on CSS.  I think this might be the first official review of the book, and if he posts it over at Amazon it will very likely be the first review there as well be one of the first few reviews over there (someone posted the first review some time today!).

According to Andy, Jeffrey Zeldman (who just launched a superfine redesign over at The Daily Report) and I “actually make standards sexy.”  Oh, yes, big boy… mark up my content, you style stud, you…

Okay, I promise never to do that again.

If there are other reviews out there and I’ve missed them, please let me know!

Wow, Is My Book Red!

Published 13 years, 10 months ago

I got my first paper copy of More Eric Meyer on CSS this morning, so I had to accelerate my update process for the companion site; the project files are now online.  Apparently on many machines, the cover and site colors are a startling dark pink, which isn’t the intent.  On my machine, the color is a deep red, as is the actual book.  Imagine a fire engine made out of tomato soup—that’s pretty much the shade of red.

Either way, it’s still fairly startling.

It’s kind of a weird feeling to have two books come out at almost the same time.  CSS:TDG, Second Edition, arrived just two weeks ago.  Now here’s MEMOC, forming something of a weird acronym duet.  So now I have this small stack of two new books.  The covers are still shiny and creaseless.  They have that hot-off-the-presses crispness.  I almost hate to open them.  I’m always afraid I’ll break their spines, and then I won’t be able to move them any more.

It’s On Every Channel!

Published 13 years, 10 months ago

I got word yesterday that More Eric Meyer on CSS has already come back from the printers, so it ought to be available within a week or so.  Woo hoo!  I’ve put up a companion site with the table of contents; the project files will be online soon.  And yes—that really is the cover.

Speaking of books, the second edition of Cascading Style Sheets: The Definitive Guide is now available pretty much everywhere.  Over at Amazon, its sales rank has been hovering around 200 for a couple of weeks now, so that’s pretty cool.  I’ve heard from a few readers who already have their copies, and some errata reports have started to come in.  Joy!  It’s always frustrating to finish a book, because I know that the errors that got missed will immediately be spotted by all the readers.  No matter how hard we tried, some errors are going to slip through.  The perfectionist in me quails at that knowledge.

But then, releasing a new book does afford me the chance to be amused by reader reviews.  Here’s one that had me chuckling:

i understand the basics of css already, i just needed something to outline the syntax and concepts in css2 and then just function as a reference. this book did neither, and i’ve found it to be a complete waste.

Yeah, I guess you probably would.  Say it with me, sparky: “Definitive Guide.”  Not “Reference.”  It’s not an outline, and wasn’t when the first edition came out.  If you need a reference with a quick outline, you could always try the CSS2.0 Programmer’s Reference, which has, of all things, an outline of the syntax and concepts of CSS2 and provides a full property reference.  Amazing.

I know you aren’t supposed to judge a book by its cover, but sometimes you can get a little guidance from its title.

Anyone who reads Italian might be interested in an interview with me conducted by Marco Trevisan.  For those who don’t do as the Romans do, the English version should be available in the near future.

Update: Gini‘s sister is doing better, although she was evicted from the hospital even though still suffering a lot of pain.  Ferrett tells me that it looks like some of meyerweb’s readers did contribute to the support fund, and again, Kat and I both thank you for reaching out.

Return of the Fish

Published 13 years, 11 months ago

An image of the cover of Cascading Style Sheets, Second Edition I have in my hands a physical copy of the second edition of Cascading Style Sheets: The Definitive Guide, bound with a RepKover lay-flat spine and everything.  So I figure it should be shipping out to folks within the next week or two.  If you’ve pre-ordered, there ought not be long to wait!  (And if you haven’t, then what are you waiting for?)

As I mentioned yesterday, the ‘diagnosis’ favelets I used during my SXSW04i presentation generated a lot of comment, so I now have the underlying style sheets on a “Favelets” page in my “Tools” section.  For those of you who know how favelets work, just grab any or all of the style sheets you want and go for it.  For those who need some assistance, I wrote a “Favelet Creator.”  You plug in the URL of a style sheet you want to have applied to whatever page you’re viewing and the name of the favelet as you want it to appear in your toolbar.  Then you drag the resulting link into your favorites toolbar.

All this really does is create a javascript: link that, when invoked, will dynamically write a link element into the head of whatever document you’re viewing.  That link points to a style sheet, and so the styles are applied.  As an example, you could point it to a style sheet that sets borders for tables and table cells.  When you click on the favelet, all of the tables and table cells in the currently-viewed page become visible.  Figuring out exactly how a table-based page is laid out thus becomes a snap.

So if you don’t like the styles I created, you can write your own (or modify the ones I provided) and create your own diagnostic style sheets.  The favelet creator should make it even simpler.  Either way, I hope these will be helpful.

Sign, Sign, Everywhere A Sign

Published 13 years, 11 months ago

So I’m on the book-signing schedule at SXSW04 as part of a five-person signature cage match that will last until only one person is left standing!  Er, or something.  Actually, I assume they’re going to kick us out of there by 1:15pm to clear enough space for all of Cory Doctorow‘s screaming fans.  But hey, if you have a book you want to have signed by any of us, bring it along.  I imagine you’ll also be able to buy Eric Meyer on CSS at the Borders booth where the signing will be held, as well as any of the other books listed.  This signing comes just fifteen minutes after the panel in which I’m participating, so it looks like I’ll have to dash from one to the other.

When they asked me if I was game for a book signing, I did recommend that they get copies of Eric Meyer on CSS because it seemed beyond scummy to have them stock up the first edition of Cascading Style Sheets: The Definitive Guide when the second edition will be coming out within a week or two of the signing.  Hey, I’m lookin’ out for ya.  Now all I have to do is think up some witty phrases to inscribe.

(If you’re in the Austin area but aren’t going to be attending SXSW04, you can still drop by and heckle us for free by getting an iF! pass.)

In the past three weeks, I’ve tried to hack (with varying levels of success) XSLT, Perl, and JavaScript.  Since I’m no better than a middling-fair programmer in any of those languages, I suppose some confusion was inevitable, but it seems like it’s always XSLT that gets me.  Thankfully, Chriztian Steimeier provided a solution for my XSLT problem.  The way that templates get called and nest and interact with each other continues to befuddle me, but I hope that it will one day make a modicum of sense.

Fishing For Style

Published 13 years, 11 months ago

As a followup to yesterday’s entry, I thought I’d share some details on what will be in Cascading Style Sheets: The Definitive Guide, 2nd Edition (now available for pre-order!).  Here’s the Table of Contents, or at least a core subset of it:

  1. CSS and Documents
  2. Selectors
  3. Structure and the Cascade
  4. Values and Units
  5. Fonts
  6. Text Properties
  7. Basic Visual Formatting
  8. Padding, Borders, and Margins
  9. Colors and Backgrounds
  10. Floating and Positioning
  11. Table Layout
  12. Lists and Generated Content
  13. User Interface Styles
  14. Non-Screen Media
  1. Property Reference
  2. Selector, Pseudo-Class, and Pseudo-Element Reference
  3. Sample HTML 4 Style Sheet

Owners of the first edition will notice that the chapters have been rearranged a bit.  Thanks to the expansion of selectors in CSS2, it made sense to rearrange things so that they got their own chapter (which you can read in beta form from O’Reilly), and the parts about how CSS relates to document structure were folded into the chapter about specificity and the cascade.  The consolidation of floating and positioning into one chapter really helped cut down on redundancies, although that is the longest and most-enfigured chapter in the book.  (In second place, “Basic Visual Formatting.”)  “Table Layout” talks about how tables are laid out and styled, not how to do layout with tables.  The last two chapters are basically overviews with some detail, since user interface styles are almost certainly going to change radically in CSS3 and non-screen media support is limited or largely theoretical at this stage.  There’s still enough detail to satisfy, I think.

As for the other chapters, they’re largely the same as in the first edition in terms of topical coverage.  They’ve just been updated and expanded to match what’s in CSS2.1.  As an example, “Text Properties” covers everything that it did in the first edition, now updated for 2004; plus it adds information on text-shadow, direction, and unicode-bidi.

The technical reviewers for the second edition were Tantek Çelik and Ian Hickson, who were just as tough and thorough as I’d hoped.  Ian’s one of the people who pounded the inline layout model into my head until I got it when writing the first edition, actually.  I got similar treatment from both reviewers over the interaction of generated content with non-generated elements this time around, not to mention when I tried to figure out the value syntax for text-decoration.  It used to be simple, but oh no… they had to go makin’ it all fancy.

Anyway, I hope that will give some idea of what lies ahead for those of you who do me the honor of purchasing the book.

I occasionally toy with the idea of setting up a Cafépress store with CSS-related merchandise.  If anyone out there has bought stuff (particularly T-shirts and other articles of clothing) from Cafépress, kindly let me know what you thought of it in terms of quality and durability.