Tag Archives: content_variables

Humanizing Dates and Times

Content often relates to time in some way.  How to present time most effectively involves design decisions. Previously I discussed why content designers should think in terms of slices of time rather than specific dates.  In this post I want to elaborate on how audiences think about time, and how to humanize temporal information and present it in a way that fits everyday thinking.  Never mistake a deadline for the real goal.  Temporal information must support goals, rather than become the center of attention. It should be synchronized with our needs.

The Decline of Schedules

Twenty years ago many households had a VCR.  The only notable aspect of the VCR’s mundane appearance was its digital clock, which was often blinking after the electric power was interrupted, and no one could figure out how to reset the time. The blinking VCR clock, vainly calling for attention, became the butt of many commentaries about poor usability.  But why VCR clocks might go unset for so long went less remarked.  The VCR can tell us the time, but it didn’t tell us what we needed: when programs were being broadcast that we wanted to record.  Eventually interactive program guides provided the information users wanted, and they could choose the program, rather than the time.

Even today we have digital clocks that serve little purpose. Many microwaves have them. People have stopped wearing watches because time-displays are available on so many devices.  We synchronize our lives by pinging each other, rather than scheduling dates. We automate our calendars to pay our bills, and so doing worry less about today’s date.  For many activities,  audiences consider time as a choice to manage, rather than an obligation to fulfill.  People want the convenience of on-demand services, and scheduling is a barrier to that.  The more people fall out of the habit of scheduling, the harder the task of scheduling becomes.

Despite this big behavioral shift, content designers for the most part have not yet developed alternative paradigms to the clock- and calendar-centric expressions of temporal information.  Times and dates tend to be opaque: obstructing answers that audiences may be seeking.

Time as Information

How time can be used as a way to reveal options is an emerging challenge.  This weekend I was considering a visit to a storied landmark in Rome, the Castel Sant’Angelo. When I Googled to get details about an exhibit there, Google presented the following visual of times when the landmark was most busy.

Google search results displays popular times for visits to a tourist attraction.
Google search results displays popular times for visits to a tourist attraction.

The visual provided me with a rare moment of online delight.  I received useful information that I did not expect.  Tourist attractions in Rome can be busy on weekends, when budget airlines bring weekend visitors from across Europe.  Knowing when the landmark would be less busy is helpful.

The genius of the popular times display is that is answers a question that, while related to time, prioritizes the more important consideration: the experience associated with different times. It’s an example of the kind of temporal contextual information that will be increasingly common with the deployment of IoT sensors capturing time-stamped ambient information.

Dates as Proxies for Goals and Motivations

When people notice a date, they associate a meaning with that date.  If they fail to associate a meaning with the date, they will ignore the date entirely — it is just another abstract number.  An important question arises: Why does this date matter?  What’s significant about it?

Dates are often proxies for goals and motivations.  Does the date, or more specifically, the duration associated with the date, signify our ability to achieve a goal, or does it indicate a lack of progress?  It’s not the date per se that matters. It’s what it symbolizes to us. The date is just an ID number that we translate mentally into a signal of hope or despair.

range of goals and motivations according to time granularity
Range of goals and motivations according to time granularity

Some dates become symbols of us as individuals: they indicate where we are in the passage of time.  Other dates and times express the behavior of something we are interested in.  Dates embody events, which we evaluate with respect to a specific point in time. What that symbolizes to us will vary.

Events are bookmarked by a start and finish.  Those attributes shape four generic questions about events:

  • How long from beginning to end? (Duration)
  • How long since? (Relative time past)
  • How long until? (Relative time forward)
  • Is the event within a defined period? (Defined time period)
Goals associated with generic time-based events
Goals associated with generic time-based events

Embedded within a start date or an end date is a user goal. Users scan for information that would indicate how well they are meeting their goals.  The progress or deterioration of a situation is frequently a function of an event’s duration.  The urgency of the situation can be a function of how long it has been since something happened in the past.  The effort involved with a situation can be shaped by how far the end goal is in the future.  The length of time is a characteristic that can imply significant consequences to users.

The defined time period is a complex situation that arises surprisingly often.  Businesses, universities, and government departments all seem to love time-base eligibility requirements.  People want to know if they are eligible for a rebate, a scholarship, a tax credit or if their product warranty is still valid.  Instead of finding a simple answer, they are forced to compare how their activities comply with some arbitrary qualifying start and end dates.

Translating and Transforming Temporal Information

Focus on how audiences attach significance to time-related information. Provide it in a format that audiences will notice and use.

The presentation of temporal information needs to take advantage of intrinsic capabilities of digital formats — without making audiences focus on the arcane presentation native to those formats.  Content designers should translate temporal information into the language of the audience, and transform temporal data into answers that audiences care about.

Computer time and date formats are precise and granular — forcing audiences to think what the information means in everyday terms. Fortunately, software libraries are available to translate computer dates into more intelligible language.  Among the most useful is Moment.js, a JavaScript library.  Moment can translate time and date information between different locales (non-English as well as different English language variants).  It contains a function called “humanize” which translates numeric values into verbal phrases.  In instead of seeing “1 day” or “24 hours,” audiences can see “a day.”

Moment.js humanize function (via Moment.js)
Moment.js humanize function (via Moment.js)

Moment also reduces complexity by rounding times to whole units that audiences will be able to notice and grasp more readily.  Few people want to see that something happened 27 hours ago; they’d rather see it displayed as happening yesterday.

Moment.js value ranges (via Moment.js)
Moment.js value ranges (via Moment.js)

These capabilities come together to allow Moment to perform near-natural language calculations on dates.  Users can add two months to a date, without worrying about how many days the intervening months have.  They can subtract days from a date, and get an answer expressed as “Last Wednesday.”  The granularity of units can be adjusted, so that information can be rounded to whatever level of detail is most appropriate.  This capability is helpful when users need to know if two dates might fall in the same time period.  For example, if I delay doing something by 45 days, will the activity still be in the same year, or be pushed into the following year?

Moment recognizes concepts such as the beginning and end of the day.  It also has capabilities to parse natural language date inputs to convert them into computer-friendly date formats.  These capabilities will be increasingly important as people interact with computers through voice interfaces.  Calendars don’t work well with voice input and output. People need common language ways to transform temporal information.

Moment.js calendar and relative time options (via Moment.js)
Moment.js calendar and relative time options (via Moment.js)

Framing Time to Support Goals

Humans frame events according to periods that are significant to them.  Organizations sometimes insist on making their customers adapt to the organization’s schedule, resulting in maddening situations involving proration.  Instead of basing schedules linked to one’s own life events, people are expected to follow the schedule and calendar of the service provider.  A better approach comes (ironically) from the DMV [division of motor vehicles], who link driver’s license renewals to birthdays.

We can support audience goals and motivations when we synchronize time-related information around their perspective. People often define cultural artifacts in terms of their decade (e.g., music or TV shows from the 1980s).  Let’s imagine you and a friend both went to university together in the 1990s.  You are both film buffs, and enjoyed watching movies together.  You get in a debate about who was the best actor in the 1990s.  Many questions about superlatives involve time frames. We don’t care who won the most awards ever; we care about who won or was nominated for awards in the time period that’s most significant to us.

You and your friend remember Michael Caine and Tom Hanks were nominated for Bafta awards in 1998.  So which got more recognition during the entire decade?  A seemingly straightforward question, trying to identify the actor who got the most nominations, becomes an involved research project.  Googling the question doesn’t generate an answer: it only generates links that must be read and assessed.

Questions involving superlatives often involve needing to transform date-related values.
Questions involving superlatives often involve needing to transform date-related values.

Film trivia might seem like a pale example to illustrate how poorly content is structured to help people frame their time-related questions. While low in importance, it can be high in the motivation it elicits.  Some people want to know such details, and have trouble getting the answers.  But consider the opposite situation: something serious, but where motivation is low.  When does one need a twice-a-decade medical screening, that promises no fun?  This is the kind of issue that doesn’t align with a specific calendar date.  People need to see a realistic window in which they can schedule the event.  When they go beyond that window they need to receive an appropriately worded communication about how overdue the person is, and the significance of that delay.

Linking Events, Temporal Information, and Actions

When we need to do something is closely linked to what we will be doing and why we are doing it.  Event-related content is intimately linked to temporal information.   Temporal information can trigger user actions.  Temporal information is the glue tying together what’s significant to the audience, and what they may need to do.

When something happens should be secondary to what happens and why it happens.  Temporal information needs to be presented in the most motivating format possible.  It needs to reflect the context of the user, not the context of the clock or calendar.  It needs to be humanized, so people can understand the importance of the time mentioned.  That requires us to think like the audience: to know if they think about the topic in terms of minutes, hours, days, weeks, months, or years.  And it requires us to help them see what’s typical or should be expected.

—Michael Andrews

Content Variables in Content Engineering

Content engineering is an important new approach that can offer greater precision and flexibility in how content is delivered to audiences.   It defines how content is developed, and how it is made available to audiences in different situations.  Much of the flexibility and precision of content engineering comes of its use of content variables.  However, the topic of content variables has received limited discussion thus far.  I want to offer some ideas to advance thinking about this important dimension.

Prevailing Concepts of Variables in Content

Discussions of variables in content tend to treat variables as a list of items that can be reused.  For example, according to MadCap software, a popular tool for managing technical content: “Variables are pre-set terms that you can use in your project over and over.” They elaborate: “Variables are used for brief, non-formatted pieces of content (such as the name of your company’s product or your company’s phone number).”  This explanation assumes the term is “pre-set” and implies a simple substitution of a word or phrase in a location. The problem with looking at a variable as a “term” is that is doesn’t distinguish between what something is called, and what its value is.

Another common form of substitution is to swap out big sections of content to create different versions.  But treating an entire section as a single variable falls short of the precision and flexibility promised by content engineering.

The function of variables in content management systems can be opaque to authors.  In Drupal, for example, some variables may be unique to particular templates, while others are common to all.  Authors don’t have control over where variables can be used in many CMSes. Variables are often administrative in character. A variable might represent “last updated,” which is supplied by the system. There may not be a clear distinction between which variables are strictly backend variables, and which are audience-facing.

Discussion of variables has largely focused on making things simpler for authors, relieving them from having to recreate snippets of content.  While that’s a solid motivation, it focuses on business efficiency rather than on business growth.  The goal should be to consider the business value of a content variable, and offer specific content that offers the highest value to customers and the brand.

photo of bird
This bird is called a variable oystercatcher.  I would see them when I lived in Wellington.  Seemed fitting to have a bird named “variable” looking to catch oysters to inspire us to poke around to find something valuable.  Photo by Tony Wills via Wikipedia.

Application of Content Variables

Content engineering evaluates different content needs, and translates these needs into requirements and designs that support the goals of both audiences and brands. Designated variables reflect the needs of the audience, the business, and the design of the content incorporating the variable. The specification of variables is a core ingredient of content engineering.

  • Audience requirements: From an audience perspective, variables can highlight aspects of content that are engaging.  Our visual perception is drawn to what’s changed, because it might be interesting, or be of concern.  We want content that seems relevant, which is often related to dimensions of time, geography, or frequency.  We desire content that’s personalized, tailored to our specific needs.
  • Business requirements: Brands want to present different content in different situations.   They don’t want their content to be wooden: it needs to respond both to whom the audience is, and to different operational needs of the brand.  Variables enable optimization of content.  With variables, content can change dynamically based on usage, or customer and business analytics.  The variables can reflect — and express — the brand’s business model.
  • Content design: Content design translates the audience and business requirements into specifications that are implemented to deliver content as desired.  These specifications define elements, and associated metadata and business rules, to display different content elements in various circumstances. Variables in these specifications delineate what precise content appears within what section of content.

Variables in Declarative and Imperative Content Objects

Rather than viewing variables as simple text snippets, the content engineering approach considers variables as living content objects, a bit like a Tamagotchi.  Content professionals can benefit by leveraging ideas about variables from computer programming.  While there are differences between how backend systems process variables and how they need to be displayed to audiences, there are broad similarities. Because I want to locate useful common ground, I am going to highlight these similarities in a simplified manner.

Computer programs typically rely on either declarative statements (a statement of what happens) or imperative statements (a statement of what should happen).  Ideally, variables will support not just declarative content (e.g., place content with a given mark up in this place, such as <place author’s name here>.) It will also support imperative content — content exhibiting some novelty when generated through the use of a sequence flow, a test condition, and a calculation.

Declarative statements specify what information to show, rather than how to develop information.  It says “SELECT  {item}… FROM {set of items}….WHERE {qualifying criteria}…”   The qualifying criteria tends to be simple, using an attribute that already exists.  Sometimes there is a compound criteria (e.g., include this but not that), but the filtering still uses known criteria. Declarative programs are typically simpler than imperative ones, and are used when the kind of information that is available is already known. The best examples are SQL database queries, or instructions for accessing content available through an API.

Imperative statements specify how to develop the information to show. Most programming languages that use a sequence of instructions rely on imperative programming. Unlike declarative statements, imperative ones produce derived variables.  Such scripts use content variables to deliver fresh information to audiences. A simple example of a derived variable is a list of the top five most popular articles for a given week. The list represents an imperative variable, telling the computer how to create the list, but not knowing in advance what the information will be.  The information is recalculated each week: the content itself subject to change. A more complex example would be showing what articles are popular with your neighbors.  The list has to respond to an abstract concept of a neighbor, which might be based on visitors to an app or site whose IP address or GPS location indicate they are within 20 kilometers of your current location.

Scripts support business goals as well. Content variables can work with marketing automation and predictive analytics technologies. Digital content is becoming more dynamic, optimized based on known and inferred preferences and predicted behaviors. Such calculation requires imperative programs, and will be essential for personalization of content in the future.

Discussions of structured content, particularly within the technical writing community, have focused on declarative content rather than imperative content. In addition to supporting complex but static publishing of multiple versions of a document, content engineering also produces imperative content to address an infinite range of scenarios, and to provide dynamic, realtime information. We need to be able to support both forms of content: content that’s predetermined, as well as content that’s a more fluid and adaptive. Declarative statements are easier to implement, but imperative ones enable more flexibility and customization.

How can content engineers, who are responsible for developing audience and business requirements, identify needed content variables?  Concepts in programming suggest a framework for thinking about audience uses of variables that can be broadly related to the needs of backend systems.  How backend systems need to handle variables efficiently will be different from how audiences think about them, and even among developers and between programming languages, terminologies can vary. The terrain at times can seem confusing, but I believe the foundations center on three elements.

Framework for Content Variables: Labels/Values/Context

Variables need to be considered in three parts:

  1. The labels used to describe them
  2. The values associated with them
  3. The context in which they are used.

The diagram below introduces a content variable framework addressing the relationship between labels, values, and context.

diagram: content variables
A framework for considering variables in content engineering

Variables are a combination of a label (an attribute identifier) and a value.   The label is the variable’s name. The term label is more helpful than name, because it captures how audiences perceive the identity of what they see.

Values are bound to labels.  The nature of the binding can be subtle: some values can change, others can’t.  Labels for an attribute can potentially change as well.  And differing contexts can redefine both labels and values.

To understand the difference between what something is called, and what its value is, consider two situations.  In one case, people are interested in knowing how many times a given thing appears — counting the number of instances of an item that is labeled in a certain way. For example, how many articles have been written by a given author? In another case, audiences are interested in knowing how many different items (items having distinctly different labels) share the same value.  For example, how many other items have been shared on Facebook as frequently as this article? These examples  are admittedly trivial, but one can highlight interesting and meaningful relationships when content items have multiple attributes.

Range: How Variables Vary

Some attributes have persistence, while other attributes are fluid.  We describe the difference in character as attributes with fixed values, and attributes with mutable (changeable) values.  Knowing whether the range of values for a variable is fixed, or mutable, is a central question.

Fixed variables have values that are frozen. They are identifiers — any ID-type value needs to be fixed. They express discrete (non-continuous) properties. Fixed variables are predefined, rather than being dynamically defined. Text variables are generally fixed: think of a value of a state or province. Other textual variables, the word that describe colors of clothing, or the name of a conference event, are fixed as well. Predefined numeric variables such as postal codes or phone numbers are also fixed — they don’t fluctuate over time. Due to their role as identifiers, fixed values often have rules for what values are considered valid.  Fixed variables are constrained according to these rules, and entries may be validated.  Because their value doesn’t vary over time, they can be counted, and one can count the number of instances of a variable, and determine sets of content items having these defined characteristics. Fixed values are handy for declarative variables: show items with a value of X that does not have a value of Y.

Fixed values can be “keys” that can be mapped to other content. If a content item has an author of a given name, that name is a fixed value.  The author’s name can be mapped to other articles she has written. If there are several fixed values associated with the content, one can find a set of items having common keys. Some fixed values, such as an ISBN number for books, are unique, allowing the attribute to identity the larger item with which it is associated.

Another kind of fixed value is an ordered sequence. The order will never change: the forth U.S. President will always be number four on the list.

Mutable variables are the opposite of fixed ones: the value mutates over time. Mutable variables are dynamic — we expect the value to change. Suppose you are looking for content about vacation destinations that are warm, or stocks that are undervalued. The values associated with those attributes are in constant flux, depending on the weather or the stock market. Many content variables fluctuate in relation to other variables, responding to interactions with other content and with audiences.

Mutable variables are often numeric, representing a continuous range of values. They may relate to the content itself: a count of content items, or analytical data about the audience’s use of the content. Alternatively, the values can represent real world properties that can change, such as prices or inventory levels.

The other major type of mutable content is lists. Lists are collections of items, and items can be added, deleted and reordered. The total number of items will fluctuate. List variables can contain text items that are described with fixed values, but the collection of values in the list itself is open to change.

Mutation Verses Reassignment

Time now to address a technical aspect of variables that can cause confusion: the difference between the assignment of values, and the behavior of values.  It may sound somewhat contradictory to speak of a fixed variable: what varies if the value is fixed?  The answer is the assignment of the fixed value to the label of the attribute.  I have a phone number with a fixed value, a series of digits.  It is different from your phone number, so it is a variable.  But my phone number does not change from day to day. It is not mutable.

Now, suppose I move house. I might speak about changing my phone number, but strictly speaking I am not changing the number itself (its value). I am having a different number assigned to me. My old phone number has a fixed value, and continues to exist, ready to be assigned to someone else. Meanwhile, I acquire a new phone number because an existing number has been reassigned to me from an inventory of numbers not being used.

When two things are related to each other, and both have fixed identities, to make a change, they must be reassigned.

Because of the significant difference between reassignment and mutation, it is best to avoid speaking generically about “changing” a variable.

Scope: Where Variables Can Be Applied

Another key aspect of variables is where they can be used, and what precisely they refer to.  Some variables are comprehensive variables: they refer to the brand as a whole, and all people who interact with the brand. Other variables are more limited in their scope. Scope determines both where a variable can be used, and how a variable is presented. We can think of variable scope in three buckets;

  • Global variables
  • Behaviorally framed variables
  • Local variables

Global variables are the simplest to understand.  They can be used anywhere, and wherever they appear, they mean the same thing. So if an article is listed as the most visited article, it is the most visited article for all platforms, the most visited by all audiences. Everyone sees the same information, regardless of who they are, or what platform they are viewing.

Behaviorally framed variables are the most complex. They are variables where the value is dependent on conditional characteristics, such as time period, audience segment, promotional campaign, or other behavior that is at least partly extrinsic to the content item. The variable is placed within a context: the time frame, the person, or reference group the variable relates to. Consider the seemingly straightforward variable of price. The price shown of an airline ticket can depend on many factors, external and internal. It may depend on timing: different times of year command different prices.  Externally defined variables may have different business rules governing them, reflecting demand and supply.  But other factors are less impersonal. The value presented can depend on who the person is: people who have certain characteristics such as past buying behavior or presumed willingness to pay a given price will be offered different prices.  People who use certain browsers, or who are based in certain locations, may be presumed to pay more or less for an item, and accordingly be shown a different price. The variation in content values can be extended well beyond literal values such as prices to more experientially-focused content variations (such as what order of a list of items to present) that depend on a host of behavioral characteristics. For now, I just want to introduce the notion that a variable relates not just to the label it is associated with, but also the context in which it is viewed. That context may not be explicitly identified to the person viewing the variable.

Finally, local variables apply to how and where content is shown in different content types. For simplicity, let’s consider content types as being a distinct page section, widget, card, or tile, that displays content. The values shown in each of these may be specific to these elements, such as when you present the “most popular <content type>.” Local variables can be more impactful when used to populate specific content types with specific variable content. Suppose you designate some content as a “special promotion for this week.” That designation may trigger a discount (a behaviorally framed adjustment) and also invoke a rule concerning where the content should appear. Designated items might be displayed in a special section of tiles dedicated to promotions, in addition to its default content type location. Content that meet certain criteria can be promoted in various content types to amplify how often it is seen. Viewed from a pull perspective, a content type will include content variables that satisfy certain criteria.

Label Morphing: Getting Microcopy Right

We like to think of the name of our variable as being reliable.  While information architects and copywriters understand the importance of having clearly worded labels, there hasn’t been much attention given to how labels should change in different circumstances. Labels need to adapt to two factors: values, and context. There are two types of label adaption:

  1. Label – value agreement
  2. Label aliasing

Label-value agreement specifies how the label needs to change to accommodate differences in values associated with the label.  The most common example is pluralizing a label, though sometimes the label reads better when the entire label wording changes: for example, one person changes into two people. Some developers squawk at the extra effort required for such label changes, and copywriters lacking an understanding of variables have defaulted to work-arounds that avoid using words that trigger agreement changes. But as personalized, dynamic content becomes more ubiquitous, it is important to build the capability to have labels adapt dynamically with changes in value. Although English is less complex than some languages when it comes to rules for pluralization, it does have numerous special cases: words ending in -o, ending in -y, or ending in -f, proper nouns, and compound nouns. Rather than try to develop a complex rule set to generate plurals imperatively, it is easier to approach the problem declaratively by stating that content should display the proper singular or plural form of a countable noun, and supply the exact wording for each.

Another dimension is how labels may need to adapt to time. For labels involving status-related verbs, the wording needs to change dynamically according to the period of time specified. Differences between past tense and past particle need to be indicated. “You gave $100 in 2012” needs to be rewritten “You have given $200 since 2012” when the user changes her query.  This example highlights how labels themselves can be interactive elements.

Aliases are necessary when an attribute needs to be referred to by different names in different contexts. While consistent labeling is beneficial for helping people learn and understand quickly what you say, rigidly consistent labels are often a hindrance. Adaptive content implies that content labels should adapt to different contexts. The same value, representing the same attribute may be used in many different contexts, and needs to be referred to in slightly different ways. The most obvious example is the limited space on a small mobile device: even if a longer label might be ideal, such a label would interfere with the presentation of content. Tables often use short labels or even abbreviations. Labels adapt not only to space constraints, but also to address the degree of potential ambiguity. Labels for commonly recurring variables can be shorter, as they will be familiar.

Alias names used may be longer or shorter or abbreviated, and may be more formal or less formal.  For example, a label saying “vehicle” is shorter, but more formal, than one saying “cars and trucks.” Consider the scope in which a variable will appear, and develop appropriate alias options for different content types.


The three elements of variables — labels, values, and context — work in concert. How something is labeled can depend on its value and the context in which it appears. Dynamic, mutable values are often likely to be behaviorally framed, considering the context of who is viewing the variable, or changing according to a when the variable is viewed.  Such mutable values also need to have labels that agree with the values presented.

There are many more dimensions to content variables, particularly prioritization of content and the dynamics of whether to show variables, or not, depending on audience behaviors — issues of sequencing and level of detail. In practice, personalization is accomplished through how a collection of variables are presented together.

Because the topic of content variables is not well-developed, it is especially tricky to get the terminology right, making it understandable to content creators and software developers alike. I’ve tried my best to avoid existing jargon that carries diverse meaning or no meaning to different stakeholders.  I would welcome suggestions for improvements.

— Michael Andrews