Posts in the Tech Category

Gradient Flags

Published 10 years, 11 months past

With the news today of the Supreme Court’s decision in Obergefell v. Hodges, and my recent completion of the part of CSS:The Definitive Guide that deals with gradients, I thought I’d create a couple of flags using linear gradients.

First, I’ll define the basic box of the flags.  The dimensions are the same as those specified for the U.S. flag, 1:1.9.  I added a couple of box shadows for visual constrast with the background.

div {height: 10em; width: 19em; margin: 3em;
    box-shadow: 0 0 0.5em rgba(0,0,0,0.25),
        0.4em 0.6em 0.5em rgba(0,0,0,0.25);}

Okay, with that set, first up is what’s often called the pride flag, which is to say the “rainbow flag”.  There’s an interesting history to the design of the flag, but I’m going to stick with “the six-color version popular since 1973”, as Wikipedia puts it.

For such a flag, we just need color stripes with hard stops between them.  That means putting the color stops right up against each other, like so:

div#rainbow {
    background: linear-gradient(180deg,
        red 0%, red 16.7%, 
        orange 16.7%, orange 33.3%,
        yellow 33.3%, yellow 50%, 
        green 50%, green 66.7%, 
        blue 66.7%, blue 83.3%, 
        purple 83.3%, purple 100%);
}

The first red 0% isn’t really necessary, nor is the last purple 100%, but I left them in for the sake of consistency.  You could remove them both in order to make the CSS a little smaller, and still get the same result.  I decided to go from red to purple, as the spectrum is usually described, which meant having the gradient ray point from top to bottom.  Thus 180deg, although to bottom would be completely equal in this case.

Now for the US flag.  In this case, things get a little more interesting.  I’ll note right up front that I’m not going to put in any stars, in order to keep this simple and gradient-focused, and yet it’s still interesting.  We could use a repeating linear gradient, like so:

repeating-linear-gradient(180deg,
    #B22234, #B22234 0.77em, white 0.77em, white 1.54em)

That would then cause each red-white pair of stripes to repeat vertically forever.  Because the specified stripes are manually calculated to be 1/13th of the height of the overall flag (10em), they’ll just fit like they should.

The problem there is that if the overall flag size ever changes, like if the height and weight are converted to pixels, the stripes will get out of sync with the dimensions of the flag.  Fortunately, we don’t have to rely on ems here; we can use percentages.  Thus:

repeating-linear-gradient(180deg,
    #B22234, #B22234 7.7%, white 7.7%, white 15.4%)

Ta-da!  The stripes are the right sizes, and scale with any changes to the height and width of the flag, and repeat as required.

That’s all well and good, but we still need the blue canton (as it’s called).  Since the canton will be on top of the stripes, it actually needs to come first in the comma-separated value list for background-image.  That gives us:

background-image:
    linear-gradient(0deg, #3C3B6E, #3C3B6E),
    repeating-linear-gradient(180deg,
        #B22234, #B22234 7.7%, white 7.7%, white 15.4%);

Wait.  A blue-to-blue gradient?  Well, yes.  I want a consistent blue field, and one way to create that is a gradient that doesn’t actually grade.  It’s a quick way to create a solid-color image that can be sized and positioned however we like.

So, now we size and position the canton.  According to the official design specifications for the flag, the canton is the height of seven stripes, or 53.85% the height of the overall flag, and 40% the width of the flag.  That means a background-size of 40% 53.85%.  The stripes we then have to size at 100% 100%, in order to make sure they cover the entire background area of the flag.  Finally, we position the canton in the top left; the stripes we can position anywhere along the top. so we’ll leave them top left as well.

The final result:

div#usa {
    background-image:
        linear-gradient(0deg, #3C3B6E, #3C3B6E),
        repeating-linear-gradient(180deg,
            #B22234, #B22234 7.7%, white 7.7%, white 15.4%);
    background-size: 40% 53.85%, 100% 100%;
    background-repeat: no-repeat;
    background-position: top left;
}

And if you, like Bryan Fischer, believe that morally speaking “6/26 is our 9/11”, you can move the canton from top left to bottom left in order to invert the flag, which is permitted “as a signal of dire distress in instances of extreme danger to life or property”.

(Of course, it’s a lot easier to do that with background positioning since I didn’t include the stars.  If the stars were there, then we’d have left the canton’s position alone and done a rotateX() transform instead.)

So, there you go: two gradient flags.  You can see both (along with the “distress” variant) on this test page.  If you’ve any desire to use any or all of them, go ahead.  No copyright, trademark, patent, etc., etc. is asserted, implied, etc., etc.  I just wanted to have a little fun with gradients, and thought I’d share.


Warning Hashflags

Published 11 years, 1 month past

Over the weekend, I published “Time and Emotion” on The Pastry Box, in which I pondered the way we’re creating the data that the data-miners of the future will use to (literally) thoughtlessly construct emotional minefields — if we don’t work to turn away from that outcome.

The way I introduced the topic was by noting the calendar coincidence of the Star Wars-themed tradition of “May the Fourth be with you” and the anniversary of the Kent State shootings in 1970, and how I observe the latter while most of the internet celebrates the former: by tweeting some song lyrics with a relevant hashtag, #maythe4th.  I did as I said I would…and Twitter blindly added a layer of commentary with a very simple little content filter.  On twitter.com and in the official Twitter app, a little Stormtrooper helmet was inserted after the hashtag #maythe4th.

So let’s review: I tweeted in remembrance of a group of National Guardsmen firing into a crowd of college students, wounding nine and killing four.  After the date hashtag, there appeared a Stormtrooper icon.  To someone who came into it cold, that could easily read as a particularly tasteless joke-slash-attack, equating the Guardsmen with a Nazi paramilitary group by way of Star Wars reference.  While some might agree with that characterization, it was not my intent.  The meaning of what I wrote was altered by an unthinking algorithm.  It imposed on me a rhetorical position that I do not hold.

In a like vein, Thijs Reijgersberg pointed out that May 4th is Remembrance of the Dead Day in the Netherlands, an occasion to honor those who died in conflict since the outbreak of World War II.  He did so on Twitter, using the same hashtag I had, and again got a Stormtrooper helmet inserted into his tweet.  A Stormtrooper as part of a tweet about the Dutch remembrance of their war dead from World War II on.  That’s…troublesome.

Michael Wiik, following on our observations, took it all one step further by tweeting a number of historical events collected from Wikipedia.  I know several of my British chums would heartily agree with the 1979 tweet’s added layer of commentary, but there are others who might well feel enraged and disgusted.  That could include someone who tweets about the election in celebration, the way people sometimes do about their heroes.

But what about appending a Stormtrooper helment to an observance of the liberation of the Neuengamme concentration camp in 1945?  For that matter, suppose someone tweets May-4th birthday congratulations to a Holocaust survivor, or the child of a Holocaust survivor?  The descendant of a Holocaust victim?

You might think that this is all a bit much, because all you have to do is avoid using the hashtag, or Twitter altogether.  Those are solutions, but they’re not very useful solutions.  They require humans to alter their behavior to accommodate code, rather than expecting code to accommodate humans; and furthermore, they require that humans have foreknowledge.  I didn’t know the hashtag would get an emoji before I did it.  And, because it only shows up in some methods of accessing Twitter, there’s every chance I wouldn’t have known it was there, had I not used twitter.com to post.  Can you imagine if someone sent a tweet out, found themselves attacked for tweeting in poor taste, and couldn’t even see what was upsetting people?

And, as it happens, even #may4th wasn’t safe from being hashflagged, as Twitter calls it, though that was different: it got a yellow droid’s top dome (I assume BB-8) rather than a Stormtrooper helmet.  The droid doesn’t have nearly the same historical baggage (yet), but it still risks making a user look like they’re being mocking or silly in a situation where the opposite was intended.  If they tagged a remembrance of the 2007 destruction of Greensburg, Kansas with #may4th, for example.

For me, it was a deeply surreal way to make the one of the points I’d been talking about in my Pastry Box article.  We’re designing processes that alter people’s intended meaning by altering content and thus adding unwanted context, code that throws pieces of data together without awareness of meaning and intent, code that will synthesize emotional environments effectively at random.  Emergent patterns are happening entirely outside our control, and we’re not even thinking about the ways we thoughtlessly cede that control.  We’re like toddlers throwing tinted drinking glasses on the floor to see the pretty sparkles, not thinking about how the resulting beauty might slice someone’s foot open.

We don’t need to stop writing code.  We do need to start thinking.


Time and Emotion

Published 11 years, 1 month past

This coming Monday, as has become tradition, a significant fraction of the Twitter user base will send out Star-Wars-themed tweets tagged #maythe4th or #maythefourthbewithyou, because saying the day in that way makes for a handy bit of wordplay.  There will be cosplay pictures, Yoda-esque inversions of sentence structure, and probably (this year) a fair bit of squeeing about the upcoming sequel and its brilliantly fan-service trailer.

Also this coming Monday, as has become tradition for me, I will send out a tweet containing the opening lines of “Ohio” by Crosby, Stills, Nash & Young, tagged #maythe4th, because it was on May 4th, 1970 that National Guardsmen fired a volley into a crowd of Kent State college students, wounding nine and killing four.

Anniversaries are potent psychological markers.  We reflect on historical events, both global and personal, that have particular meaning to us.  We celebrate the days of our birth, of first meeting our loved ones, of all manner of wonderful life-changing moments.  We mourn the days of our losses, of our betrayals, of all manner of terrible life-changing moments.  In every heart, a secret calendar.

There are only so many days in the year; pile enough things together on a calendar, and some of them will coincide.  Some of those alignments will coalesce into rays of remembered joy, warming us from the past.  Others will form spears of relived pain, lodging afresh in our hearts.  A few may do both, comforting and piercing all at once.

The longer we spend online, the more traces of those secret calendars will take public shape.  The dates of my first marriage and divorce are not, to the best of my recollection, recorded anywhere online, but the date of my second (and current) marriage is there, thanks to some early blog posts.  The date of my first professional award is there.  The dates of our children’s placements and adoptions are there.  The dates of my daughter’s illness and death are there.

The more we build online networks, not physical networks but social and emotional networks, the more pieces we leave lying around for algorithms to gather together and present to us with no real thought for what those pieces actually mean, or for how they should or shouldn’t fit together.  A human can glance through a pile of photos and tell which are emotionally or even narratively out of place.  Code cannot.  A human can quickly determine which scraps of text and pixels were happy at the moment of their creation, only to be transformed into talismans of sorrow by later events.  Code cannot.

We’re collectively creating strata of data, adorned with easy bits of metadata like time and date and sometimes place, but lacking all the truly important metadata like feeling and meaning.  As we share with each other, we share with the future.  We share with the companies that help us share with each other, because it’s easy to store it all.  Content in the old network was ephemeral, and in the older networks was tangible but private.  In the new networks, everything we create is easy to retrieve — if not for us, as users of the network, then at least for the code that runs on the same machines which accept all that we share.

And so, more and more with every passing day, code is written to reach back into everything we’ve created, assembling it along easily-identified axes like Likes or Faves or geographic coordinates or the day of the year, in order to show it to us again.  Sometimes it’s code we invite into our lives, but not always.  Sometimes we find the code that drives the networks we use resurrecting our past without warning.

This will not always be welcome.

There are things we can do to make our remorselessly remembering routines more humane, and most of those things are rooted in experience design.  We can design compassionate consent requests ahead of introducing new functionality, and easy ways to mark which dates and memories and bits of data should be avoided, and even design thoughtful expressions of remorse and apology.  We can and should add this very human layer of thoughtfulness to cushion us from literally unthinking code that yields results which may harm as easily as they may heal.

It won’t be easy, and we’ll make mistakes no matter how hard we try.  Our very attempts to be thoughtful may backfire and make things worse, but we’ll learn from those mistakes and do better the next time.

Nothing could be more human than that.

This article was originally published at The Pastry Box Project on 2 May 2015.


Heard and Received

Published 11 years, 1 month past

A week ago today, I stood on a stage in San Francisco and told a couple thousand developers they were doing it wrong.  I mean, I got up there at O’Reilly’s Fluent, The Web Platfom conference, and gave a talk with a slide that literally said, “The Web is NOT a Platform”.  You can see it here, all fifteen minutes of it, in which I borrowed liberally from Jeremy Keith, added a splash of Mike Monteiro, and mixed it all together with things I’ve been saying and thinking for the past, oh, decade or more.

As it turned out, and a little bit to my surprise, a fair number of people completely agreed with what I had to say, judging by the reactions I got both online and in person.  Only a few people disagreed with me in person, which was fine; I actually hoped that there would be some pushback, since I’m not the smartest person in the world by any stretch.  The best part was, our disagreements were friendly, well-sourced, and collegial.  I love having conversations like that.  I don’t know that any of us changed our minds, but we were able to test our assumptions and viewpoints against each other.  In one case, I shook hands on a friendly, no-stakes bet over which of us would prove to be right, five or ten years down the line.

What made it really fun is that not twenty minutes after I stepped off the stage at the end of that talk, I stepped back on to accept a 2015 Web Platform Award alongside Sara Soueidan, Mark Nottingham, and Mikeal Rogers.  Those are some amazing people to stand with, and that it came from O’Reilly made it even more humbling.  In fact, Sara said it best: “This is my first time ever winning a web award, and I feel privileged to have won it from such a prestigious company.”  To which I would only add, and in such prestigious company.

I do want to note that what I said at the very end of my acceptance remarks was woefully insufficient.  What I should have said, and would have said if I hadn’t suddenly felt completely overwhelmed, is that the web has meant more to me, done more for me, and given more to me in the past two years than any one person could ever have any right to expect.  The web and what it makes possible, the ability to reach out and share and hear from you and stay in touch — that kept me sane, and may very well have kept me alive.

Thank you all.


Talk Talk

Published 11 years, 2 months past

If you prefer hearing voice to reading text, I was on a couple of podcasts recently and would like to share; also, I have some live appearances coming up soon.

The first podcast is a 16-minute segment on the eHealth Radio Network, talking about designing for crisis.  This was recorded shortly before AEA Seattle and HxRefactored, which is why I talk about HxRefactored in the future tense.  Much as was the case with my talk at HxRefactored, this concentrates on the topic of designing for crisis in a medical/health care context, and as it turns out, it’s only slightly shorter than was my HxR talk.

The second is both longer and a bit more recent: I talked for an hour with Chris and Dave at Shop Talk Show about flexbox, inline layout, the difficulties of the past two years, and how I’ve changed professionally.  It doesn’t shy away from the emotional side, and some listeners have described it as “heart-rending” and “sobering”.  So, you know, fair warning.  On the other hand, I call Chris Coyier a “newb” about a minute in, so there’s that.

In the Shop Talk episode, we talk briefly about Facebook’s On This Day feature, which had just launched but I hadn’t seen at that point.  Yesterday, it finally popped up in my Facebook timeline.  I had observations, and will probably write about them soon.  First, though, I need to finish up my slides for Fluent, where I’ll be giving my talk “This Web App Best Viewed By Someone Else”.  I get 13 minutes to tell the audience that they… well, I don’t want to spoil it for anyone.  (Plus there’s another slide deck I need to finish up for next week, but that’s for a private engagement, so never mind that now.)

In May, I’ll once again be presenting the hour-long version of “Designing for Crisis” at An Event Apart Boston.  There are still some seats left if you’d care to join us; it’s a pretty great lineup, and as usual I’m feeling a wee bit intimidated by the brilliance.  Attendees have been telling us that this year’s lineup is one of the best they’ve seen, making AEA worth every penny and then some, so you’d get way more out of the show than just hearing me.

In case you’re wondering (and I also mentioned this on ShopTalk), I won’t be at AEA San Diego in June.  Part of me very much wants to be, but an accident of scheduling made it inadvisable: the show starts June 8th, the day after the first anniversary of Rebecca’s death and what would have been her seventh birthday.  I don’t know that I’ll be in any shape to hold brief conversation, let alone stand on stage in front of a few hundred people and give an hour-long talk, in the days immediately following.  Rather than risk it, we (the AEA team and I) decided to have someone else take my place at the San Diego show, and that show only.  I intend to be at all our other shows this year.

Hopefully, I’ll get a chance to write about attending not-web-design conferences in the near future.  I find such experiences entertainingly, and in some ways refreshingly, different.  I recommend it.


The Pivotal Ways

Published 11 years, 2 months past

Five years ago yesterday, the suave and debonair Ethan Marcotte debuted a talk titled “A Dao of Flexibility” at An Event Apart Seattle.  I still remember the feeling in the room.  Those of us who were there realized that it was a pivotal moment for the web, even before Ethan had left the stage.  It was the moment that responsive web design burst forth into the world.

The title, and content, of Ethan’s talk explicitly paid homage to the rugged and handsome John Allsopp’s “A Dao of Web Design”, published fifteen years ago today at A List Apart.  It’s hard to overstate how much wisdom and prescience is distilled into that deceptively short piece.  As I said in the testimonial I contributed to ALA’s remembrance:

John’s insights are as sharp and relevant as ever, especially when we realize the web’s inherent flexibility isn’t just about layout — that, in fact, layout flexibility is one of the web’s least important features. I try to reread “A Dao of Web Design” at least once a year. You should, too.

There’s not much more I can add, and honestly, anything I tried to add to these seminal works of brilliance would only cheapen them.  Go, read; go, watch.  Remember where we’ve come from, and use that foundation to chart where we’re going.


On This Day

Published 11 years, 2 months past

Earlier today, Facebook announced a new feature called “On This Day”.  With On This Day, you see pictures, posts, and other events that occurred on a given day.  If you’re familiar with Timehop, it seems very much like a Facebook-only Timehop.  That will probably seem limited and broken to actual Timehop users, but for the vast majority of Facebook users, it will be a new and potentially very welcome feature.

As you can imagine, given what happened with Year in Review, I’m very interested by On This Day.  I haven’t interacted with the actual product yet, so I don’t know what kinds of opt-in or opt-out features will be present.  If any.  From the screenshots in the Facebook announcement, it looks like they’ve taken a much more neutral direction with the visual design.  There are calendar pages and abstract photos, with few of them expressing much in the way of emotional content.  An exception is seen at the top center of the banner image on the announcement, depicting what appears to be a woman in love, but that’s actually a decoration on the banner, instead of a UI component.  Whether those sorts of things will show up in the UI, I don’t know.

But this is what I wonder: is Facebook about to hurt a bunch of people?  From the announcement:

To see your On This Day page, you can click on the On This Day bookmark, search for “On This Day,” or visit facebook.com/onthisday. You might also see a story in your News Feed.

Putting “a story in the News Feed” is exactly how Year in Review became a viral news story.  And it’s what distinguishes On This Day from Timehop or ThinkUp (which has “your most popular update” features).

If I install Timehop, for example, I know what I’m getting into.  I’m actively, consciously deciding to revisit events from past years by way of Timehop.  I can decide not to launch it at all on certain days, if I know what I see would be too painful.

On This Day, on the other hand, is part of an existing ecosystem.  Dropping On This Day into the Facebook news feed without consent is very much like having Timehop install itself onto your smartphone and then auto-launch, all without asking.  If this happened, we’d (rightly) take the responsible parties to task.  Patronizing dismissals that “you use a smartphone, you get what you deserve” would be relatively thin on the ground, whereas I’m sure there will be plenty of that directed toward any Facebook user upset by what an On This Day new feed entry shows them.  That was certainly the leading line of condescension around the Year in Review news feed post.

There isn’t much more to go on in the announcement, though I did notice:

…you can choose to subscribe to notifications so you’ll be alerted when you have memories to look back on. You can also edit and delete old posts, or decide to share your memories with friends.

Editing or deleting old posts is interesting, if a bit troubling to the historian in me, and the ability to sign up for notifications is a welcome sign of opt-in ethics, but what I notice here is what’s missing:  I don’t see any reference to an ability to opt out of On This Day, either for certain days or altogether.  It might be there and simply not referred to in the product announcement, but I wonder if this is something that Facebook users will simply have to get used to.

The timing of this has a personal resonance.  As I wrote about yesterday, we just passed the first anniversary of the day Kat and I were told about Rebecca’s second tumor.  For the next eleven weeks, both our posts and pictures from last year, wherever they’re housed, will form a chronicle of the last days of our daughter’s life.  How will we react to Facebook, how will we feel about our experience there, if On This Day constantly reminds us of those events?  Will this product increase our affinity with Facebook, or our antipathy?  Perhaps we might go to Facebook to catch up with friends and joke around with them a bit, as a form of mental respite.  Or, perhaps, we would have done that, but now will be unable to do so.  We’ll soon find out.

Lest anyone misunderstand, this isn’t just about Facebook.  It’s about every service or product that seeks to increase user affinity, and avoid user antipathy.  Facebook just happens to be providing some very obvious grounds on which to base these conversations.  Given their line of business and scale of operation, that’s probably to be expected.  I’ll be following this with great professional and personal interest.


Taking Steps

Published 11 years, 3 months past

Not too long ago, I got Step Nined on Facebook.

If that didn’t parse as regular English for you, Step Nine is part of the twelve-step program offered by Alcoholics Anonymous. It states, with edits for out-of-context clarity:

“[Make] direct amends to [people you have harmed] wherever possible, except when to do so would injure them or others.”

And so someone I knew back in the town where I grew up, a classmate all throughout my pre-college education who I’ll call John, sent me a private message on Facebook apologizing for how he’d treated me, stating that he’d had no reason other than just having been a mean kid, and hoping that things were going well for me and my family.

I’ve pondered this message quite a bit in the interim. The message brought me neither upset nor relief, though I can well imagine that many people in such a situation would feel one or both. I bore no mental or physical scars with his signature upon them. There was no need of closure, or of re-opening, or really of anything, at least from my point of view. He and his actions toward me, positive or negative, are one thin thread in the complex skein that was my childhood, lost in the overall pattern.

In truth, John’s message aroused more pity in me than anything else. I thought as I read it, What must he have endured as a child, that hurting other people seemed normal to him?  And in that thought, I felt an echo from the past, as though the question had come to me before. Perhaps my parents made the observation, as I struggled through growing up, and I was finally able to hear it now. I’m not sure. It doesn’t really matter. If his message is anything to go by, whatever John did has been far more damaging to him than it ever might have been to me.

Still, I keep coming back to John’s message and pondering it further. What I’ve thought about, far more than its contents or the history it references, has been the simple fact of how it happened, and what that means.

Had John wanted to offer amends in, say, the late 1990s, he would have had to actively seek me out. It would have taken the effort of calling my parents to ask for contact information, or other people he thought might have it, and then making that call to me. The social distance would have been a barrier to contact, one whose surmounting signified the importance of the act to him. And then, when he did make that call, he would have talked to me, able to gauge my reaction. There would have been a feedback loop to tell him whether or not his amends were injurious in some way.

And yes, of course, John could have done exactly that today. He could have kept his process entirely off Facebook and gone through those efforts, as an act of personal penance or just as a useful social signifier. Or, perhaps, he could have contacted me on Facebook to ask for my phone number, with a brief statement as to why he was asking for it, and then let my decision to allow the contact or not be a measure of whether it would in fact be injurious.

But he didn’t. Because the internet has disintermediated social effort.

What I wonder about, as I ponder this small signal, is the depth of his remorse. How much does John really mean it, and how much is he going through the motions, trying to get through Step Nine as quickly as possible so that he can reach Step Twelve sooner? Is he working through his personal pain, or is he grinding the leveling process? It’s impossible for me to say. I know it’s a lot easier to send a bunch of “sorry” messages to your contacts than it is to talk to each person you feel you’ve wronged, one on one, one by one, and go through that painful process over and over and over again.

I wonder if that simple ease of contact has robbed him of a critical component of his healing process.

Or, if you want to be more accurate, I wonder if that simple ease of contact lured him into a course of action that was harmful to his healing process.

The things we build are almost always meant to make things faster, more efficient, easier. Perhaps, sometimes, they should be harder.

This genie will not go back into the bottle. The internet isn’t going away and Facebook still has a long way to go before its fall. Even then, something will have replaced it. There’s no reason to think these sorts of connections will become more difficult to make, technologically speaking.

I wonder if they will become more difficult, socially speaking — if an act like that will become frowned upon, as we might frown upon a form letter condolence note. I wonder what sort of protocols and expectations, what social mores, will emerge over time in response to the disruptions our work has caused and will cause, and how they will shape personal interactions at all levels.

I wonder how much effort we should be putting into influencing the evolution of those emergent social constructs, whether through our work or our personal interactions, and how much of that effort would be ultimately fruitless.

I wonder how intentional people are about what they do, online as well as off; and how intentional they should be.

I wonder what I should say to John.

This article was originally published at The Pastry Box Project on 2 March 2015.


Browse the Archive

Earlier Entries

Later Entries