meyerweb.com

Skip to: site navigation/presentation
Skip to: Thoughts From Eric

Archive: 'Writing' Category

Medium Trials

Originally published at Medium on July 30th, 2015.

Yesterday, I decided to try importing a story to Medium. I’d hunted around for a way to auto-post to Medium from WordPress, which runs the blog portion of meyerweb (the rest is mostly HTML, with a little PHP here and there), and hadn’t found one. Then I found the “Import story” feature on Medium and thought, Sure, why not?

So I tried it out on my most recent post, which also happened to have some code in it, as my posts sometimes do. The process was, as anyone who’s used it can tell you, very simple. Paste in a URL and the content gets sucked in.

Well, except for code blocks.

Everything was imported without incident except the Javascript. That seems like a metaphor for something.

I’d structured the block with a pre element, as I always do, and yet the line-breaking was stripped away. It looks like my indentation tabs were preserved, but without the linefeeds, they didn’t have nearly the same utility.

The real problem is that the importation of the code block stopped cold at the first <, dropping the rest of the code on the floor. Now, I admit, I didn’t escape or entity-ize the character in my source, and maybe that was the problem. Still, I feel like an import tool should be a little smarter about things like less-than symbols on import. Otherwise, how many less-than-threes will end up as just plain threes?

Fortunately, the fix was simple: I went back to the original post, drag-selected the whole code block, copied, went back to Medium, drag-selected the mangled code, and hit ⌘V. Done. It was properly formatted and no less-than terminations occurred.

Today, I’m experimenting with writing my post on Medium first, after which I’ll repost it at meyerweb. This is likely the only time I’ll do it in that order, given my experience over here. Captions are deucedly hard to edit (at least in my browser of choice, Firefox Nightly), the apparent inability to add simple decorations like border to images, and the apparently intentional, active enforcement of single-space-after-sentence even when editing annoy me deeply. (Yes, that’s how I roll. Let’s not have the spacing argument here, please.)

I can see why Medium appeals to so many. It’s pretty frictionless, a lot more so than almost any other tool of its kind I’ve used. I mean, my WordPress install is pretty frictionless to me, but that’s because I invested a lot of time customizing it to be that way. Much like my browser, mail client, and other essential tools.

So anyway, that’s what I found during import and authoring on Medium. Here’s hoping this posts properly, and without the stray “in” that’s somehow shown up in my post, and which I can’t select, mouse to delete or otherwise remove through non-Inspector means. If only I could prepend an “f”!

It didn’t show up when I posted, fortunately.

P.S. I discovered this was the title just before publishing. It was supposed to be just “Medium”. ¯\_(ツ)_/¯

Friday Figure

Just for fun, and maybe for a little bit of edification, I present to you one of the figures from the chapter on color, backgrounds, and gradients I’ve just finished writing for CSS: The Definitive Guide, 4th Edition.

This figure is (at the moment) captioned “Very, very tall ellipses”; it’s a diagram of what happens if you create a radial gradient with no horizontal sizing.  (Whether you also have vertical sizing is actually irrelevant.)  The ellipses all get so incredibly tall that you only see the sides at their most vertical, which results in the appearance of a mirrored horizontal linear gradient.  This is of course explained in more detail in the chapter, and builds on a whole lot of previous text.

I had a much simpler version of this figure before, and shared it with Sara Soueidan, who had some very smart feedback that helped me get to what you see above.  The figure was finished not too long before i posted it; once it was done, I realized really liked the look, so decided on the spur of the moment to post it.  Thus the late-Friday timestamp on the post.

While the figure is a PNG, it’s actually a screenshot of an HTML+CSS file displayed in a browser—Safari, in this particular case, though most are done in Firefox.  All of the figures in the book will be created using HTML+CSS whenever possible.  Doing so lets me make sure I understand what I’m illustrating, and also allows me to change the look and arrangement of figures without too much difficulty.

So that’s fun with edge cases for this Friday.  If people like it, or more likely I just feel like doing it, I’ll post more in the future.

Run, Salmon, Run

I was recently asked on Twitter about the status of the fourth edition of CSS: The Definitive Guide.  A fair question, given how long the project has lain dormant!  I have two things to announce on that front.

The first is that I’m really excited to say that Estelle Weyl has joined me as co-author for the fourth edition.  We’re working in parallel, tackling individual chapters and doing technical review of each other as we work.  Sharing the load, especially with someone as sharp and knowledgable as Estelle, will help get chapters out faster, and the overall book done sooner.

The second is that writing is once again underway, with four chapters in process.  I’ve got the transforms chapter done, and the backgrounds and gradients (and maybe foreground colors too) chapter almost done.  Estelle is nearing the end of transitions and animations, with flexbox up next.  What comes after that for each of us is a little bit up in the air, though I’ll probably tackle basic visual formatting next.  Unless I get distracted by something more interesting, of course—truth be told, I’ve been eyeing grid layout with some covetousness in my heart.

So, the book is once again underway, and actually has been for a little while now.  I can’t say with certainty when we’ll be done and ready to compile everything into the Doorstop Edition, but we’re pushing for this year or early next.

As an offshoot of this renewed push, I’ve been expanding and revising my CSS test files so that I can check my understanding of the specification, as well as test the fine details of browser support.  Over the holidays I decided, more or less on a whim, to commit the whole kit ‘n’ kaboodle to Github.  There’s no license and no readme, mostly because I didn’t think to establish either when I set up the repository.  Sorry, I guess?  In any case, I regard the CSS in the tests to be public domain, but the actual content (whether inline or replaced) of the HTML files may or may not be, so a single license would have been hard to assert anyway.  I mostly put the files up there as a form of open backup, and also to smooth out the process of managing updates to the tests between my local machine and meyerweb.  Feel free to make use of the tests for your personal education, though!

Writing for The Pastry Box

I’m beyond pleased to note that my second piece for The Pastry Box, “Words, Words”, was published last week.  The first, “Sunrise, Sunset”, was published a month before that.  (It’s not about what you might think—and yet, and the same time, it is.)

For those who aren’t familiar with The Pastry Box, it describes itself thusly:

Each year, The Pastry Box Project gathers 30 people who are each influential in their field and asks them to share thoughts regarding what they do. Those thoughts are then published every day throughout the year at a rate of one per day, starting January 1st and ending December 31st.

It’s become much more than that, in my eyes.  In a lot of ways, The Pastry Box has become a place where writers feel free to stretch themselves and their writing, and to look at themselves and what they do in new lights.  It’s an incredibly valuable resource.  There are thoughts in their archives that touched, moved, and changed me.

I was invited late last year to be a contributor to The Pastry Box in 2015, and of course I said yes.  I accepted the invitation for a couple of reasons.  The foremost reason is, of course, the honor of being a Pastry Box contributor.  Over the past few years, they’ve had some of the greatest minds and writers of our field participate.  That’s even more true of this year’s roster, and I am completely humbled to join them.  The fact that this is the last year of The Pastry Box wasn’t actually a factor, as I’d have said yes in any year.

The second reason is that I’m very interested to see how I write in an environment where there are no comments.  No doubt this marks me for an anachronism, but it has literally been decades since I wrote for an online outlet that didn’t support reader comments.  That ever-present feedback channel is something I value, which is why I still support comments here, but I’m sure it’s affected how I write.  Not negatively, or even necessarily positively—it just affects the writing, or so I believe.  Over the course of 2015, I hope to find out if I’m right about that.

If you’d like to follow along, please follow The Pastry Box via RSS or Twitter (or both, as I do).  Not just for my few thoughts, of course, but for all the amazing contributors this year.  Already there have been insightful, funny, and deeply personal stories, and a new thought comes fresh-baked every day.  That’s why I’ve followed them in year past, and why I am still amazed and honored to be a part of their final year.

Well, That Escalated Quickly

This post is probably going to be a little bit scattered, because I’m still reeling from the overwhelming, unexpected response to the last post.  I honestly expected “Inadvertent Algorithmic Cruelty” to be read by maybe two or three hundred people over the next couple of weeks, all of them friends, colleagues, and friends who are colleagues.  I hoped that I’d maybe give a few of them something new and interesting to think about, but it was really mostly just me thinking out loud about a shortcoming in our field.  I never expected widespread linking, let alone mainstream media coverage.

So the first thing I want to say: I owe the Year in Review team in specific, and Facebook in general, an apology.  No, not the other way around.  I did get email from Jonathan Gheller, product manager of the Year in Review team at Facebook, before the story starting hitting the papers, and he was sincerely apologetic.  Also determined to do better in the future.  But I am very sorry that I dropped the Internet on his head for Christmas.  He and his team didn’t deserve it.

(And yes, I’ve reflected quite a bit on the irony that I inadvertently made their lives more difficult by posting, after they inadvertently made mine more difficult by coding.)

Yes, their design failed to handle situations like mine, but in that, they’re hardly alone.  This happens all the time, all over the web, in every imaginable context.  Taking worst-case scenarios into account is something that web design does poorly, and usually not at all.  I was using Facebook’s Year in Review as one example, a timely and relevant foundation to talk about a much wider issue.

The people who I envisioned myself writing for—they got what I was saying and where I was focused.  The very early responses to the post were about what I expected.  But then it took off, and a lot of people came into it without the context I assumed the audience would have.

What surprised and dismayed me were the…let’s call them uncharitable assumptions made about the people who worked on Year in Review.  “What do you expect from a bunch of privileged early-20s hipster Silicon Valley brogrammers who’ve never known pain or even want?” seemed to be the general tenor of those responses.

No.  Just no.  This is not something you can blame on Those Meddling Kids and Their Mangy Stock Options.

First off, by what right do we assume that young programmers have never known hurt, fear, or pain?  How many of them grew up abused, at home or school or church or all three?  How many of them suffered through death, divorce, heartbreak, betrayal?  Do you know what they’ve been through?  No, you do not.  So maybe dial back your condescension toward their lived experiences.

Second, failure to consider worst-case scenarios is not a special disease of young, inexperienced programmers.  It is everywhere.

As an example, I recently re-joined ThinkUp, a service I first used when it was install-yourself-and-good-luck alpha ware, and I liked it then.  I’d let it fall by the wayside, but the Good Web Bundle encouraged me to sign up for it again, so I did.  It’s a fun service, and it is specifically designed to “show how well you’re using your social networks at a more human level,” to quote their site.

So I started getting reports from ThinkUp, and one of the first was to tell me about my “most popular shared link” on Twitter.  It was when I posted a link to Rebecca’s obituary.

“Popular” is maybe not the best word choice there.

Admittedly, this is a small wrinkle, a little moment of content clashing with context, and maybe there isn’t a better single word than “popular” to describe “the thing you posted that had the most easily-tracked response metrics”.  But the accompanying copy was upbeat, cheery, and totally didn’t work.  Something like, “You must be doing something right—people loved what you had to say!”

This was exactly what Facebook did with Year in Review: found the bit of data that had the most easily-tracked response metrics.  Facebook put what its code found into a Year in Review “ad”.  ThinkUp put what its code found into a “most popular” box.  Smaller in scale, but very similar in structure.

I’m not bringing this up to shame ThinkUp, and I hope I haven’t mischaracterized them here.  If they haven’t found solutions yet, I know they’re trying.  They really, really care about getting this right.  In fact, whenever I’ve sent them feedback, the responses have been fantastic—really thoughtful and detailed.

My point is that ThinkUp is a product of two of the smartest and most caring people I know, Gina Trapani and Anil Dash.  Neither of them comes anywhere close to fitting the Young Brogrammer stereotype; they are, if anything, its antithesis, in both form and deed.  And yet, they have fallen prey to exactly the same thing that affected the Year in Review team: a failure to anticipate how a design decision that really worked in one way completely failed in another, and work to handle both cases.  This is not because they are bad designers: they aren’t.  This is not because they lack empathy: they don’t.  This is not because they ignored their users: they didn’t.  This is such a common failure that it’s almost not a failure any more.  It just… is.

We need to challenge that “is”.  I’ve fallen victim to it myself.  We all have.  We all will.  It will take time, practice, and a whole lot of stumbling to figure out how to do better, but it is, I submit, vitally important that we do.

On Writing

Our situation, and my posts, have been the cause of sleepless nights and fallen tears for a great many people.  In some ways I feel bad about that; it occasionally feels like I’m forcing our pain onto other people, which isn’t exactly a friendly thing to do.  But I know you’re here because you want to be here for us, and here, words are how we commune.

But why, I am occasionally asked and occasionally ask myself, am I writing about Rebecca’s cancer instead of doing other things?  There are a number of reasons.

Part of it is that I’m creating a precisely timestamped chronicle for later, the historian in me asserting itself.  This is where a lot of my tweets come from, as well: the desire to record something at the moment, so that later I’ll be able to say whether X happened before or after Y or how many days apart two events actually were.

But it’s also for Joshua, if he wants to know more about his sister and what happened to her, when he’s older; and for Carolyn, if she ever wants to revisit this time or see it from my perspective, to compare against her memories.  And perhaps for others, if I ever decide to collect these fragments into some sort of longer work.

More importantly, writing about what’s happening and how I feel about it allows me to organize my thoughts and give some structure to what’s happening.  In a situation where so much is beyond our ability to do anything at all, this is something I can shape directly.  It allows me to feel some small measure of influence.  It lets me face my fears by naming them.  It helps me get a handle on a few shards of this overwhelming thing that defies any real understanding.

And of course I’m grieving online.  I do that here so that I can put it away elsewhere, so to speak.  When I’m with the kids, I can be there for them as the father I’ve always been and hope to keep being, rather than the hollowed-out ruin I sometimes feel like.  Grieving here, through the words that come to me, makes that easier to do.  So I write and tweet.  A little bit of pressure release.

But most of all, I am sharing Rebecca with you, with anyone who will listen.  We’ve always felt it’s up to our kids to become themselves and then bring themselves to the world in their own way, to meaningfully affect it and be affected by it.  In the words of Khalil Gibran:

Your children are not your children.
They are the sons and daughters of Life’s longing for itself.
They come through you but not from you,
And though they are with you yet they belong not to you.

You may give them your love but not your thoughts,
For they have their own thoughts.
You may house their bodies but not their souls,
For their souls dwell in the house of tomorrow,
which you cannot visit, not even in your dreams.
You may strive to be like them,
but seek not to make them like you.
For life goes not backward nor tarries with yesterday.

You are the bows from which your children
as living arrows are sent forth.
The archer sees the mark upon the path of the infinite,
and He bends you with His might
that His arrows may go swift and far.
Let your bending in the archer’s hand be for gladness;
For even as He loves the arrow that flies,
so He loves also the bow that is stable.

We’ve always meant for our children to fly free of their own accord, on the arc of their choosing, when they were ready.  Rebecca will almost certainly not have that opportunity.

So now we are her archers.  In the Web, I have a bow that can send her arrow all the way around the world.  If her flight is to be short, then let it be far, a trail of purest fire etched across every sky, more beautiful and wondrous than any comet could ever hope to be.

Guidepost

As a followup to the recent public-speaking post, I want to talk about what’s happening with CSS: The Definitive Guide, 4th Edition.  So I will!

As many of you know, O’Reilly and I have been trying a new serial publication approach in which pieces of the book are released as they’re finished, generally at the ratio of one chapter per “pre-book”.  There are now five such books covering the first six chapters of the final book:

  • CSS and Documents, which covers the raw basics of how CSS is associated with HTML, including some of the more obscure ways of strapping external styles to the document as well as media query syntax.  It’s free to download in any of the various formats O’Reilly offers.
  • Selectors, Specificity, and the Cascade, which combines two chapters to cover all of the various Level 3 selector patterns as well as the inner details of how specificity, inheritance, and cascade.  It’s $4.99 to download, $9.99 to get on paper, and $10.99 to get both.
  • Values, Units and Colors, which covers all the various ways you can label numbers as well as use strings.  It also takes advantage of the new cheapness of color printing to use a bunch of nice color-value figures that aren’t forced to be all in grayscale.  $2.99 to download, $7.99 to print, $8.79 for both.
  • CSS Fonts, which dives into the gory details of @font-face and how it can deeply affect the use of font-related properties, both those we use widely as well as many that are quickly gaining browser support.  $5.99 to download, $7.99 to print, $8.79 for both.
  • CSS Text, which covers all the text styles that aren’t concerned with setting the font face—stuff like indenting, decoration, drop shadows, white-space handling, and so on.  $3.99 to download, $4.99 to print, $5.49 for both.

If you’re curious to know what other people think of these pre-books, all of the above except for “CSS Documents” and “CSS Fonts” have some customer reviews; “CSS Fonts” was recently reviewed by Virginia DeBolt.  If anyone who already has one wants to leave a review here in the comments, that’s fine too, though I’ll probably ask you to submit said reviews over at O’Reilly.

Given that all those are out, what’s next?  If I were to go by final-book-table-of-contents order, the next chapter would be “Basic Visual Formatting”, but I’m not going to do that, which is one of the big advantages of this approach.  Instead, my next topics are going to be transforms, transitions, and animations, and then flexbox.  Of course, all such plans are subject to change, but those are the topics I really want to do next, and they’re probably the most relevant topics to be talking about right now.

Given everything happening in my family’s life right now, I’m not going to try to commit to a specific schedule, because I might have to drop everything at next to notice at random.  All I can say is that I’ll be getting them out as soon as I can.

Pricing ‘CSS:The Definitive Guide’

When I announced the serial publication of CSS: The Definitive Guide, Fourth Edition, I failed to address the question how pricing will work.  Well, more decided to break it out into its own post, really.  As it turns out, there are two components to the answer.

First component is the pricing of the pre-books.  Roughly speaking, each pre-book will be priced according to its length.  The assumed base for the electronic version is $2.99, and $7.99 for the print version, with significantly longer pre-books (say, one where two chapters are combined) priced somewhat higher.  How much higher depends on the length.  It’s possible that prices will drift a bit over time as production or printing costs change, but there’s no way to guarantee that.  We’re basically pricing them as they come out.

At the end of the process, when all the chapters are written and bundled into an omnibus book edition, there will be discounts tied to the chapters you’ve already purchased.  The more chapters you bought ahead, the deeper the discount.  If you bought the pre-books direct from O’Reilly, then you’ll automatically get a discount code tailored to the number of pre-book you’ve already bought.  If you bought them elsewhere, then O’Reilly’s customer service will work to create a comparable discount, though that will obviously be a slower process.

The second component is: how much will the codes cut the price of the final, complete book?  That I cannot say.  The reason is that I don’t know (nor does anyone) what minimum price O’Reilly will need to charge to cover its costs while taking into account the money already paid.  I’m hopeful that if you bought all of the pre-books, then the electronic version of the final book will be very close to free, but again, we have to see where things stand once we reach that point.  It might be that the production costs of the complete book mean that it’s still a couple of bucks even at the deepest discount, but we’ll see!  One of the exciting things about this experiment is that even my editor and I don’t know exactly how it will all turn out.  We really are forging a new trail here, one that I hope will benefit other authors—and, by direct extension, readers—in the future.

August 2015
SMTWTFS
July  
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Archives

Feeds

Extras