Blog

Later Ctrl + ↑

Emerge.js with a new spinner and scrolling support

In 2013, I’ve released Emerge.js, a framework for coordinated page loading:

Normally, when a complex web page is loading, images appear in random order, causing unpleasant flashing. To replace it with nice and coordinated animations, programming is required. Emerge.js simplifies the task by removing the need to write any JavaScript code. The framework uses a declarative approach, where you specify a desired behaviour for each element and do not think about the implementation.

See also the introductory blog post. I’ve since updated it with new features.

Spinner stuff

In version 1.1 I’ve added a built-in loading spinner. Emerge.js no longer requires spin.js for that. But you can use a custom spinner, including spin.js, if you like.

As before, to display a spinner while an element loads, use data-spin="true". Use the new attributes data-spin-size, data-spin-color, data-spin-direction to control the appearance of the spinner (see documentation on the Emerge.js’s page).

To use another indicator (i.e. one of the nice ones by Sam Herbert) just wrap it into a named div and tell Emerge.js to use the contents of the div as an indicator:

<div id="cool-spinner" style="display: none">
  <svg> ... </svg>
</div>

<div class="emerge" data-spin-element="cool-spinner">
  <!-- while this loads, the cool spinner will be displayed -->
</div>

To use spin.js, make it run inside your div and align as necessary:

<script src="/path/to/spin.js"></script>

  ...

<div id="spinjs-spinner" style="display: none">
  <div style="position: absolute; left: 50%; top: 50%; margin: -8px"></div>
</div>

<script>
  var spinner = new Spinner ({
    lines: 12,
    length: 4,
    width: 2,
    radius: 8,
    corners: 0,
    rotate: 0,
    color: 'rgba(96, 96, 96, .75)',
    hwaccel: true
  })
  spinner.spin ($ ('#spinjs-spinner div')[0])
</script>

  ...

<div class="emerge" data-spin-element="spinjs-spinner">
  <!-- while this loads, spin.js will be displayed -->
</div>

Scrolling stuff

In Version 1.2 with the new data-expose attribute you can make an element emerge only when the user scrolls enough for it to get into view.

<div class="emerge" data-expose="true">
  <!-- this will emerge only when within view -->
</div>

Of course you can combine it with other attributes and effects. This div will emerge with a zoom effect in a quarter second after the users scrolls enough for it to become visible:

<div class="emerge" data-effect="zoom" data-hold="250" data-expose="true">
  <!-- this will emerge quickly after getting into view -->
</div>

For an example, see my Projects page. The data-hold value varies slightly between elements there to add a nice randomness effect.

Update for free

If you’ve bought Emerge.js, you get the updates for free. Drop me a line if you have any questions.

Jony Ive on blunt criticism

I am listening to an audiobook on Steve Jobs. A quote about blunt criticism:

That’s why “That’s shit!” was as common response from Steve as a pointed question or a thoughtful discussion. He wanted smart answers and he didn’t want to waste time on niceties when it was simpler to be clear, no matter how critical his response.

“The reason you sugarcoat things is that you don’t want anyone to think you are an asshole. So, that’s vanity”, explains Jony Ive […] “As a design chief, I was on a receiving end of Steve’s blunt criticisms as much as anyone”. Whenever he felt abused he would tell himself that someone who sugarcoats his true opinions might not really even be all that concerned about the other person’s feelings, he just doesn’t want to appear to be a jerk. But if he really cared about the work, he would be less vain and would talk directly about the work.

That’s the way Steve was. That’s why he’d say “That’s shit!”, but then the next day or the next after he also would just as likely come back saying, “Jony, I’ve been thinking a lot about what you’ve showed me, and I think it’s very interesting after all. Let’s talk about it some more”.

Steve put it this way: “You hire people who are better than you are at certain things and then make sure they know that they need to tell you when you’re wrong”.

Promo mix: Domino

Here is my new promo mix, Domino:

The cover says “techno”, but half of the tracks I would rather describe as tech house. Tech house and techno play together well though.

Tony Kairom, Axel Karakasis, Sam Paganini, Florian Meindl, Nicole Moudaber and others. Places I dig: 9:54, 19:16, 28:11 (Sam Paganini: Domino), 31:18, 37:37, 54:04, 1:04:43, 1:10:14, 1:21:15. The mix is also available on Mixcloud.

Don’t disable Undo after saving

There are programs where after saving an edited document you no longer have an Undo option. Ableton Live, for example, is guilty of this.

This is crazy. I don’t know what the developers of these programs are thinking, but this demonstrates a complete misunderstanding of the raison d’être of Undo.

Don’t do this.

Hand holding as a web design approach

To create a successful web page about a product, try hand holding. In addition to saying what product you have, help the reader start using it: explain, guide, convince, clarify, warn.

Let’s say you are a bank and a you have a page about your savings account options. There are people who don’t know what deposits are or why they might want one. Others are afraid of having large amounts of cash on them and don’t want to go to the bank with it. Or they are just unsure which office to go to, what documents to have and how long the thing will take. Your job is to alleviate their anxiety, to raise their self-confidence and to help them make an informed choice. To get clients, help people become clients by hand holding. Explain why a deposit may be useful. Visualise the interest rate. Say how to transfer the money online from another bank. Show the nearest office on the map (include the business hours). Publish the contract with useful comments on the margins. Acquaint the reader with your managers.

Or suppose you install windows and you have a page with options for fittings and glass coating. Well, most people have no idea on how windows are installed. Or even what elements they consist of. What should I consider before ordering windows? How to gauge a window opening? Who will disassemble the old windows? How long will it take to do the whole house? Can this be done in winter? What if a new window does not fit? Can I pay with a Visa? To get clients, help people become clients by hand holding. Explain the whole process from step one to step done. Connect the options to real-life cases (the inner windowsill for kitchen could be made of a heat-resistant material). Say in advance what can go wrong and how to avoid it. Publish the contract with useful comments on the margins. Acquaint the reader with your managers.

Or maybe you are a web hosting provider and you have a page that lists services, plans and options. This may be good for an experienced web administrator. But if someone makes their first website, they probably don’t even know that a domain name and web hosting are separate services. They have no idea if they need CGI, SSL or mod_whatever. They have no clue how to make email work. To get clients, help people become clients by hand holding. Help them figure out which set of services will fit them depending on why they came. Explain what steps are necessary from subscribing to a hosting service to opening the website. Help understand and configure DNS, choose and set up an FTP-client. Publish the contract with useful comments on the margins. Acquaint the reader with your support team.

Yes, the answers can be found online. But if you rely on that, you didn’t do your job well. Your website should work like an experienced and attentive manager, not like an indifferent price tag.

Many people suffer from professional deformation: they think everybody understand their technical terms and work principles. I’ve even heard an opinion that such “hand holding” shows disrespect to a client by treating them like a child.

This is an error. Everybody likes feeling taken care of. If your hand holding feels patronising, your are just not caring sincerely enough.

Save as Untitled-1.psd? Oops, no

It is 2015, and computers still suck. Here, Photoshop suggests saving a file as Untitled-1.psd:

Save as Untitled-1.psd?

I press Enter and get slammed in the face:

Oops, no

Hey, wasn’t that you who suggested the name? How about figuring out in advance that the name was occupied and suggesting, I don’t even know, Untitled-2.psd?

Ångström: the Watch and dictation

The new version of Ångström codenamed Plato is available. We now support the Apple Watch. You can talk to your Watch about all the stuff related to unit, currency or timezone conversion. A picture from our lab:

Ångström: the Watch and dictation

We don’t have a Watch, so it’s all theory. If you do, let us know what you think.

For this to work we’ve improved dictation significantly. This works on the phones, too. Press the mic button on the keyboard to try the magic.

Say “five kilograms in pounds” or “seventy-eight Fahrenheit in Celsius”. Ask a question: “What time is it in San-Francisco when it’s five o’clock in London”. Or even: “What time is it now in Beijing” (we had to support this for the watch).

We also no longer automatically paste stuff from pasteboard (this confused many people). Tap the from value to get the Paste option. We will show the popup automatically if there’s anything new in the pasteboard when you open the app.

If you are not yet using Ångström, you should:

Download in the App Store for free

Earlier Ctrl + ↓