Designing for Moral Mornings and Naughty Nights

morning-morality-2

Are you a moral person?

It’s a silly question, of course. We all have our own moral framework. That framework might be very similar to some – very different to others.

But how flexible is your moral framework?

For instance, if I asked you a question today, you wouldn’t expect to give a different answer a week later, right?

Apparently our moral compasses are not as fixed as we’d like to think – even within the course of a single day.

Now when we talk about morals, we’re not talking about the big ones. The vast majority of us undestand it’s wrong to injure or kill. But what about those little sins?

  • Do you always scoop after your dog poops?
  • Go to the gym or watch Netflix?
  • Muesli or donuts for breakfast?
  • Tell the truth about why you were late – or not…?
  • Leave that cup on the sink or wash it?

There are a million little tests in a day.

According to a recent study – The Morning Morality Effect (Maryam Kouchaki & Isaac H. Smith) – our decisions change over the course of a normal day. Early in the day we’re far more likely to stick to moral and ethical code more stringently and choose the muesli.

But as the day wears on, we’re increasingly likely to let our guard slip and take an easy option over the ‘right’ option. That’s dialing the pizza instead of cooking what’s in the refrigerator.

According to the strength model of self-regulation
(Baumeister et al., 1998; Muraven & Baumeister, 2000),
the capacity for self-control is like a muscle and requires
rest after use for its strength to be restored. All acts of
self-control thus draw from the same finite resource, and
the depletion of that resource hinders a person’s ability
to subsequently exert self-control.

Interesting stuff.

What Does This Mean to Application Design?

We can’t always know the local time for our users, but when we do, this could help us decide what to offer them and when. There are times when we want to appeal to their sense of duty and purpose. That’s an AM thing.

There are other times when we might want to appeal to their sense of self indulgence or escapeism

For instance, booksellers like Amazon might get better results in the morning by making ‘7 Habits of Highly Effective People‘ very visible. People are motivated and intent on doing the right thing.

But as the afternoon wears on and people tire, perhaps ‘Fifty Shades of Chicken‘ increases its appeal (yes it’s a real book).

choices

What about a fitness app like Strava or Runkeeper?

Runkeeper has always used well-written messages to motivate users (and maintain their engagement).

runkeeper

This study tells us these messages will be much more effective if you send them before lunch.

However, later in the day – when they’re tired and looking for a taste of sugar – is the perfect time to pat them on the back for what they’ve already done. “Hey, we just noticed that you’ve done 25 miles since August 1st. You’re killing it!“.

A little love goes a long way after a long day.

The Last Remnants of the Old Republic Have Been Swept Away

Liftoff

The path of a cosmonaut is not an easy, triumphant march to glory. You have to get to know the meaning not just of joy but also of grief, before being allowed in the spacecraft cabin.

Space, the final frontier. These are the voyages of the Starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before.

Failure is not an option.

Never in all their history have men been able truly to conceive of the world as one: a single sphere, a globe, having the qualities of a globe, a round earth in which all the directions eventually meet, in which there is no center because every point, or none, is center — an equal earth which all men occupy as equals. The airman’s earth, if free men make it, will be truly round: a globe in practice, not in theory.

When I orbited the Earth in a spaceship, I saw for the first time how beautiful our planet is. Mankind, let us preserve and increase this beauty, and not destroy it!

Buy why, some say, the moon? Why choose this as our goal? And they may as well ask why climb the highest mountain?

If you could see the earth illuminated when you were in a place as dark as night, it would look to you more splendid than the moon.

The Adventure of Human Space Exploration

Rocket

Science cuts two ways, of course; its products can be used for both good and evil. But there’s no turning back from science. The early warnings about technological dangers also come from science.

You know, being a test pilot isn’t always the healthiest business in the world.

We want to explore. We’re curious people. Look back over history, people have put their lives at stake to go out and explore … We believe in what we’re doing. Now it’s time to go.

We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard, because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win.

NASA is not about the ‘Adventure of Human Space Exploration’…We won’t be doing it just to get out there in space – we’ll be doing it because the things we learn out there will be making life better for a lot of people who won’t be able to go.

You know, being a test pilot isn’t always the healthiest business in the world.

Science cuts two ways, of course; its products can be used for both good and evil. But there’s no turning back from science. The early warnings about technological dangers also come from science.

Problems Look Mighty Small From 150 Miles Up

Failure is not an option

Science has not yet mastered prophecy. We predict too much for the next year and yet far too little for the next 10.

To go places and do things that have never been done before – that’s what living is all about.

Problems look mighty small from 150 miles up.

Where ignorance lurks, so too do the frontiers of discovery and imagination.

Buy why, some say, the moon? Why choose this as our goal? And they may as well ask why climb the highest mountain?

As I stand out here in the wonders of the unknown at Hadley, I sort of realize there’s a fundamental truth to our nature, Man must explore . . . and this is exploration at its greatest.

Failure is not an option.

She’s the Fastest Hunk of Junk in the Galaxy

space-8

We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard, because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win.

The dreams of yesterday are the hopes of today and the reality of tomorrow.

When I orbited the Earth in a spaceship, I saw for the first time how beautiful our planet is. Mankind, let us preserve and increase this beauty, and not destroy it!

We are all connected; To each other, biologically. To the earth, chemically. To the rest of the universe atomically.

Never in all their history have men been able truly to conceive of the world as one: a single sphere, a globe, having the qualities of a globe, a round earth in which all the directions eventually meet, in which there is no center because every point, or none, is center — an equal earth which all men occupy as equals. The airman’s earth, if free men make it, will be truly round: a globe in practice, not in theory.

Problems look mighty small from 150 miles up.

Failure is Not an Option

Mz 3, BD+30-3639, Hen 3-1475, and NGC 7027: Planetary Nebulas - Fast Winds from Dying Stars

Across the sea of space, the stars are other suns.

You know, being a test pilot isn’t always the healthiest business in the world.

Science cuts two ways, of course; its products can be used for both good and evil. But there’s no turning back from science. The early warnings about technological dangers also come from science.

Dinosaurs are extinct today because they lacked opposable thumbs and the brainpower to build a space program.

Never in all their history have men been able truly to conceive of the world as one: a single sphere, a globe, having the qualities of a globe, a round earth in which all the directions eventually meet, in which there is no center because every point, or none, is center — an equal earth which all men occupy as equals. The airman’s earth, if free men make it, will be truly round: a globe in practice, not in theory.

Houston, Tranquillity Base here. The Eagle has landed.

As I stand out here in the wonders of the unknown at Hadley, I sort of realize there’s a fundamental truth to our nature, Man must explore . . . and this is exploration at its greatest.

Botox and the Art of Designing Empathy

We all know that the internet has its share of trolls – and likely always will.

But in the early days of SitePoint, we noticed an interesting trend: Articles with author faces beside them were almost always treated more fairly in the comments thread than those without.

We found writers using caricatures or cartoon avatars faired better than those with nothing. Writers using logos or non-facial graphics were much more likely to attract aggressive and impolite feedback.

That didn’t mean photographic avatars completely shielded the author from criticism – nor would you want it to. But criticism tended to be much more even-handed and constructive.

What’s happening here?

Testing subjects

In a 2011 study for Social Psychological & Personality Science Journal, test subjects were asked to view a series of faces and then describe what emotion they saw in each face. The idea was to test their ability to imagine what another human is feeling – the characteristic we call empathy.

Although results naturally varied from person to person, most people showed good skill at correctly identifying the facial expression they saw.

Microexpressions around mouth

The interesting part came when analyzing the video recording of each user test. High-speed cameras revealed that, before answering, each test user momentarily copied the expression they saw in the photo.

These so-called ‘microexpressions‘ were completely involuntary, unconscious and often barely perceptible to the naked eye, but seemed to help the subject make sense of what they were seeing.

The obvious question: what would happen if we blocked these microexpressions?

Botox is Only Skin Deep

botox injection

A few months later, the same test subjects were treated with botox before sitting another round of testing. As you might know, botox works by paralyzing the small facial muscles around the eyes and mouth. This reduced the appearance of wrinkles but also works to block micro-expressions.

Amazingly, these ‘botoxed’ test subjects were significantly less able to interpret the faces they were seeing. Some kind of feedback loop was broken and their ability to empathize declined.

It seems that when we physically mimic a facial expression, it triggers a memory of what that emotion feels like. You could say, we get into their mind by getting into their face.

Building Empathy into our UIs

Dorothy Parker poem

When we associate words with a nearby face, the ‘internal voice’ we hear when we read is changed. I’ve animated the example below to show this in action. This sublime Dorothy Parker quote is presented:

  1. as pure text
  2. beside a vibrant, glowing Parker
  3. beside a sad, almost broken Parker

You can see that the same quote feels quite different each time the imagery alters. Something changes in our head.

We all use lots of faces in our design work but I think there are two places where engaging user empathy is particularly useful.

  1.  Any Kind of Editorial Text: Blogs, reviews, forums, comment threads, etc. Include a face any time you present ideas that you’d like your users to give attention and respect to. Obviously, a relaxed, confident smiling author is more likely to trigger relaxed, smiling, confident readers.
  2. Testimonials and Quotes: Testimonials are all about social proof. The more we can help a user with the testimonial author, the more weight they’ll place in the words.

The Catch

Everyone is a product of the world they grew up in and brings their own set of preferences and prejudices. It’s an imprecise science, but – if you have choice – displaying content from similar users to the reader (age, gender, and locality) is likely to get a more empathetic response.

And, of course, lay off botoxing your users (if you can).

Originally published in the SitePoint Design Newsletter.

Revealing Elements with scrollReveal.js

CSS is the language we all use on the web to style websites since its creation in 1996. Today we’re able to create awesome effects using CSS and it’s becoming more powerful everyday thanks to the introduction of shapes, flex-box, and animations. This is of course true apart from the well-known joke that we can create animations but until few years ago we could not easily vertically center elements (and this is still true in some versions of Internet Explorer).

Despite CSS being the language to accomplish certain tasks, from a long time now, JavaScript has been used to create nice animations. There are even entire JavaScript libraries dedicated to creating animations. In this article I’ll cover one of these libraries named scrollReveal.js.

What’s scrollReveal.js?

scrollReveal.js is a library to easily reveal elements as they enter the viewport. It’s very small in size, as its weight is roughly 3Kb if minified and gzipped. It has no dependencies, so you don’t need to add other libraries to use it like jQuery. In addition to the nice effects it supports, what I really like about this library is that you can use natural language to define the animation you want to run. We’ll come back to this feature in a few moment, but first I want to show you a simple example of what this library can do for you:

Nice, isn’t it? And this demo is created with very few lines of code. The code for this demo is available as a JSFiddle.

Now that I’ve hopefully interested you, let’s proceed in an orderly fashion.

Getting Started with scrollReveal.js

In order to use scrollReveal.js in our web pages, we have to obtain a copy of the library. As usual this can be done either by downloading it from its GitHub repository, or through Bower using the following command:

bower install scrollReveal.js

Once downloaded, you have to include the library in your page by adding a script element as shown in the following code:

<script src="path/to/scrollReveal.min.js"></script>

In case you have downloaded it using Bower, the path should resemble the following:

<script src="bower_components/scrollReveal.js/dist/scrollReveal.min.js"></script>

With the library in place, we need to add or modify some elements that the library will animate. Specifically, scrollReveal.js searches for elements on the page with an attribute named data-sr. As we’ll see in the next section you can change the animations applied by setting a value for this attribute, but in its simple use, having the attribute is enough.

So, let’s say that you have the following HTML code in your page:

<body> <div data-sr>This is the first div</div> <div data-sr>This is the second div</div> <div data-sr>This is yet another div</div> </body>

With this simple code in place, all you need to do is to add the following JavaScript code:

new scrollReveal();

With this last step performed, we’re now ready to open the page. The library will execute a simple fade in on all the divs . The result of this code, with a bit of style to be more pleasant, is displayed below and also available as a JSFiddle:

Let’s now take a look at some of the effects that are available.

Configurations and Effects

By default scrollReveal.js lets your elements enter the viewport from the bottom of the page but you can change this effect on a per-element basis by using the enter keyword followed by the direction. So, you can write enter left. You can also specify how many pixels a given element has to be moved using the move keyword followed by the number of pixels, for example move 15px. In between these directives you can place any text you like. For example you can define an element as follows:

<div data-sr="please, can you enter left and then move 15px ?">This is the first div</div>

Please don’t go too wild with this thing because you may end up writing words in between the keywords, obtaining an unintended result. For example, this definition is incorrect:

<div data-sr="please, can you enter left and then move of 15px ?">This is the first div</div>

Can you see the word “of” between “move” and “15px”? Good! Let’s continue our discussion.

With scrollReveal.js you can also let your elements scale up or down of a given percentage. You can create this effect by using the scale keyword followed by the word up if you want the element to grow, or down if you want the element to be smaller, followed by the percentage itself.

In case you want the effect to take place after a given amount of seconds, you can use the wait keyword followed by the amount of seconds to wait. An example of use of these two directives is reported below:

<div data-sr="hey bro! wait 2s and then scale up 20% this element">This is another div</div>

As I said, you can also perform a basic animation without specifying a value for the data-sr attribute. This happens because the library has a set of default values for the keywords we’ve discussed in this section and more. We can also change these default values by passing a configuration object when we invoke the scrollReveal() method. Here is the complete list of default values associated with their properties:

defaults: { enter: 'bottom', move: '8px', over: '0.6s', wait: '0s', easing: 'ease', scale: { direction: 'up', power: '5%' }, opacity: 0, mobile: false, reset: false, viewport: window.document.documentElement, delay: 'once', vFactor: 0.60, complete: function( el ) {} }

In the next example we’ll put some of the properties of the configuration object and the keywords I’ve described in this section into action. First, we’ll write the HTML code. We’ll define three divs: one will perform the default animation with some default values changed while the other two will have their own specific properties:

<div data-sr id="d1"> <h1>I run the default animation</h1> </div> <div data-sr="wait 1s and enter bottom" id="d2"> <h1>I have specific values</h1> </div> <div data-sr="scale down 10% and then ease-in-out 100px" id="d3"> <h1>I have specific values too</h1> </div>

To change the default values, we’ll set a configuration object and pass it to the scrollReveal() method as shown below:

var config = { enter: 'right', wait: '0.5s', move: '20px' } new scrollReveal(config);

The final result of this code is shown below and available as a JSFiddle:

Conclusion

In this article we’ve discussed scrollReveal.js, a small and nice library to create animations on a website. As you’ve seen, using this library is very easy. As always remember not to abuse animations, as they can quickly become annoying and distracting. Let your users focus on your content and then improve, where possible, their experience with some nice effects.

Template: Sticky

Amazing Spider-Man

Orphaned as a baby when his parents were killed overseas in a plane crash as U.S. government spies, only child Peter Parker was raised by his elderly Uncle Ben and Aunt May. Academically gifted, Peter displayed an uncanny affinity for science that was nothing short of genius. Socially, however, he was painfully shy and the target of much cruelty by his peers at Midtown High School. Attending a public science exhibit when Peter was 15-years old, he was bitten on the hand by a radioactive spider accidentally irradiated by a particle beam, empowering Peter with the arachnid’s proportional strength and agility, and the ability to cling to almost any surface.

Continue reading