Phew, what a week! Due to an HTML-parsing bug, Cloudflare experienced a major data leak, and the first practical collision for SHA-1 was revealed as well.
We should take these events as an occasion to reconsider if a centralized front-end load balancer that modifies your traffic is a good idea after all. And it’s definitely time to upgrade your TLS-certificate if you still serve SHA-1, too. Here’s what else happened this week.
You might have heard of RxJS, or ReactiveX, or reactive programming, or even just functional programming before. These are terms that are becoming more and more prominent when talking about the latest-and-greatest front-end technologies. And if you’re anything like me, you were completely bewildered when you first tried learning about it.
ReactiveX is a library for composing asynchronous and event-based programs by using observable sequences.
An array is a collection of elements, such as [1, 2, 3, 4, 5]. You get all the elements immediately, and you can do things like map, filter and map them. This allows you to transform the collection of elements any way you’d like.
Now suppose that each element in the array occurred over time; that is, you don’t get all elements immediately, but rather one at a time. You might get the first element at 1 second, the next at 3 seconds, and so on. Here’s how that might be represented:
This can be described as a stream of values, or a sequence of events, or more relevantly, an observable.
An observable is a collection of values over time.
Just like with an array, you can map, filter, and more over these values to create and compose new observables. Finally, you can subscribe to these observables and do whatever you want with the final stream of values. This is where RxJS comes in.
<!-- the latest, minified version of RxJS -->
Once you have RxJS in your project, you can create an observable from just about anything:
const aboutAnything = 42;
// From just about anything (single value).
// The observable emits that value, then completes.
const meaningOfLife$ = Rx.Observable.just(aboutAnything);
// From an array or iterable.
// The observable emits each item from the array, then completes.
const myNumber$ = Rx.Observable.from([1, 2, 3, 4, 5]);
// From a promise.
// The observable emits the result eventually, then completes (or errors).
const myData$ = Rx.Observable.fromPromise(fetch('http://example.com/users'));
// From an event.
// The observable continuously emits events from the event listener.
const mouseMove$ = Rx.Observable
Note: the dollar sign ($) at the end of the variable is just a convention to indicate that the variable is an observable. Observables can be used to model anything that can be represented as a stream of values over time, such as events, Promises, timers, intervals, and animations.
As is, these observables don’t do much of anything, at least until you actually observe them. A subscription will do just that, which is created using .subscribe():
// Whenever we receive a number from the observable,
// log it to the console.
myNumber$.subscribe(number => console.log(number));
// > 1
// > 2
// > 3
// > 4
// > 5
From the mouseMove$ observable, every time a mousemove event occurs, the subscription changes the .innerHTML of the titleElm to the position of the mouse. The .map operator (which works similar to the Array.prototype.map method) can help simplify things:
With a little math and inline styles, you can make the card rotate towards the mouse. Both pos.y / clientHeight and pos.x / clientWidth evaluate to values between 0 and 1, so multiplying that by 50 and subtracting half (25) produces values from -25 to 25, which is just what we need for our rotation values:
Now let’s say you wanted this to respond to either mouse moves or touch moves, on touch devices. Without any callback mess, you can use RxJS to combine observables in many ways. In this example, the .merge operator can be used. Just like multiple lanes of traffic merging into a single lane, this returns a single observable containing all of the data merged from multiple observables.
As neat as the rotating card is, the motion a bit too rigid. Whenever the mouse (or finger) stops, the rotation instantly stops. To remedy this, linear interpolation (LERP) can be used. The general technique is described in this great tutorial by Rachel Smith. Essentially, instead of jumping from point A to B, LERP will go a fraction of the way on every animation tick. This produces a smooth transition, even when mouse/touch motion has stopped.
Let’s create a function that has one job: to calculate the next value given a start value and an end value, using LERP:
Short and sweet. We have a pure function that returns a new, linearly interpolated position value every time, by moving a current (start) position 10% closer to the next (end) position on each animation frame.
Schedulers and .interval
The question is, how do we represent animation frames in RxJS? Turns out, RxJS has something called Schedulers which control when data is emitted from an observable, among other things like when subscriptions should start receiving values.
Using Rx.Observable.interval(), you can create an observable that emits values on a regularly scheduled interval, such as every one second (Rx.Observable.interval(1000)). If you create a tiny interval, such as Rx.Observable.interval(0) and schedule it to emit values only on every animation frame using Rx.Scheduler.animationFrame, a value will be emitted about every 16 to 17ms, within the animation frame, as expected:
Now, smoothMove$ is a new observable that emits the latest values from move$only whenever animationFrame$ emits a value. This is desired — you don’t want values emitted outside animation frames (unless you really like jank). The second argument is a function that describes what to do when combining the latest values from each observable. In this case, the only important value is the move value, which is all that’s returned.
Transitioning with .scan
Now that you have an observable emitting the latest values from move$ on every animation frame, it’s time to add linear interpolation. The .scan() operator “accumulates” the current value and next value from an observable, given a function that takes those values.
This is perfect for our linear interpolation use-case. Remember that our lerp(start, end) function takes two arguments: the start (current) value and the end (next) value.
RxJS is not an animation library, of course, but handling values over time in a composable, declarative way is such a core concept to ReactiveX that animation serves as a great way to demonstrate the technology. Reactive Programming is a different way of thinking about programming, with many advantages:
It is declarative, composable, and immutable, which avoids callback hell and makes your code more terse, reusable, and modular.
It is very useful in dealing with all types of async data, whether it’s fetching data, communicating via WebSockets, listening to external events from multiple sources, or even animations
“Separation of concerns” – you declaratively represent the data that you expect using Observables and operators, and then deal with side effects in a single .subscribe() instead of sprinkling them around your code base.
There are implementations in so many languages – Java, PHP, Python, Ruby, C#, Swift, and others you might not have even heard of.
It is not a framework, and many popular frameworks (such as React, Angular, and Vue) work very well with RxJS.
You can get hipster points if you want, but ReactiveX was first implemented nearly a decade ago (2009), stemming from ideas by Conal Elliott and Paul Hudaktwo decades ago (1997), in describing functional reactive animations (surprise surprise). Needless to say, it’s battle-tested.
This article explored a number of useful parts and concepts of RxJS – creating Observables with .fromEvent() and .interval(), operating on observables with .map() and .scan(), combining multiple observables with .merge() and .withLatestFrom(), and introducing Schedulers with Rx.Scheduler.animationFrame. There are many other useful resources for learning RxJS:
Vincent De Oliveira has written an epic post that details pretty much everything you might ever want to know about the line-height and vertical-align properties. If you’ve ever had trouble aligning things next to text or wondered why two fonts look so wildly different from one another then this post is certainly for you.
More and more websites choose to use Google’s search engine instead of the native WordPress search. The Google search is supposed to be much better, as well as deliver more precise results. But is this really the case? Is the WordPress search function really so bad that it should be replaced? Here’s my report.
Google Custom Search is considered to be a great alternative to the native WordPress Search, as it’s said to simply deliver better results. On top of that, the displayed ads even allow you to make money off of it.
This is the advertising promise made by Google. But what does the reality look like? Are the results actually more precise, and is it really possible to make money off of the ads?
Making Money Via Google Search
I’m sure there are websites that earn one or two bucks off the ad blocks. But this won’t make you rich. I know lots of websites with a rather good amount of traffic that have barely earned a penny off these ads.
If you happen to be the owner of a website like the Smashing Magazine, it may be different for you.
But even with 300,000 unique visitors a month, you’ll struggle to get a penny from the ads. It’s just not worth it. Dr. Web, and Noupe have used the Google’s Custom Search for years. There was no notable revenue. By now, they have switched back to native WordPress Search on both websites.
Setting Up Custom Search for Your Website
You can easily set up Custom Search for your blog, and quickly change back to the regular search if you just want to try it. A test doesn’t hurt.
I have written a tutorial on setting up the Google custom search engine. Simply follow the guide, the setup only takes a few minutes.
Here’s a Video to Give You an Impression:
The Search Results: Google vs. WordPress
As you can easily switch between the two engines, I have put in the effort to compare the two with one search term. Under optimal circumstances, there is no difference at all.
Screenshot of Custom Search:
Screenshot of the WordPress Search:
I could use a different search term, and there wouldn’t be much of a difference in the results. The WordPress search is certainly better than its reputation. And the Google search doesn’t always deliver optimal results.
Relevance is Crucial. Does Google Have the Edge Here?
I have tested the two engines in-depth on my own website. To me, the relevance of the search results that my visitors get to see is important. I want every person that is looking for something on my website to find the desired information.
That’s the only way a random visitor could turn into a regular user of my blog.
Up to this point, it’s clear that both searches deliver good results. To test which of the two has the better ones, I have entered a search term that was supposed to lead to a single result.
Both search engines have delivered the optimal result, followed by a couple completely useless results.
The Final Result of the Comparison
I consider both search variants to be suitable. Both searches have delivered top results for the tested keywords. When looking for terms with lots of search results, both engines will deliver good and relevant ones.
When searching for terms where only one result is possible, both functions give you the correct result, followed by useless entries.
To me, WordPress Search is the winner nonetheless, as the results simply look better, and are optimally integrated into the theme’s design.
Improving WordPress Search
The result of the WordPress Search can be improved visually. When the keyword is highlighted in the search result, users will be able to know that the result is what they are looking for right away.
Since we have to edit a template file to make changes to WordPress Search, you should create a child theme. Then, the changes will remain even after a theme update.
Important: Always make a backup of the theme files before working on them. Additionally, you should never work with the WordPress editor, but always directly alter the files via FTP. This lets you replace flawed files with the originals quicker.
Depending on the theme, one or two files need to be adjusted. To figure this out, download the search.php to your desktop via FTP. Open it with an HTML editor. If you don’t have one, pick one from our lists.
Now, replace with in the heading. Replace the tag with .
Now load the file or files into your (child-) theme folder via FTP, and you’re done. Now try your search. If it is highlighted in color, everything’s fine. If not, your theme CSS is missing the designation for the element.
Add the following CSS to your style.css, if it’s missing:
Google Custom Search is pretty good, while the WordPress Search is better than its reputation. With a small modification, it’s even better, as the user is able to see the relevance of the results right off the bat. I have already made the switch to the native WordPress Search.
Colors influence our whole life from the very beginning. They could attract or distract attention, set a mood, or even influence our emotions and perceptions. As we know, “an image worth more than 1000 words”. Therefore, the professionals involved in the communication area use the colors to send, support or to highlight a message.
However, sometimes it could be hard to know where to start when choosing the color palette for your design projects. Which could be the best option? Using the pairing colors or the contrast ones?
Well, there is not just one right answer or a magic formula for this. You should try different color schemes and combinations to see which of them appeal you the most and transmit the right message. But before doing this, you should know the basics of the colors and their combination. In this post, we will focus on the contrast (or complementary) colors and their usage, with some case studies.
So, let’s start with the basics.
Contrast is more than opposites like black and white or large and small. Contrast is a design principle that should be a part of every design project. Why? Because it helps you organize the design and establish a hierarchy, showing the viewers which parts of your design are more important and help them focus on those. On the other hand, the contrast adds to visual more interest, regardless if we are talking about the logo design, print or online ads, website design, indoor or outdoor signage.
In the color theory, the contrasting (or complementary) colors are directly or almost directly positioned across one from another on the color wheel. For example, purple and yellow, red and green, or blue and orange. As you can see below, the complementary colors provide the maximum contrast.
In terms of contrasting colors, we can also talk about Hue, Saturation and Color’s temperature.
Hue is a specific term for colors, traditionally one of the 12 found on the color wheel. But the color theory also can provide some handy information for graphic and web designers. Besides the traditional complementary colors, some other options include
Split-Complementary: any color on the color wheel plus the two that flank its complement; this scheme still has strong visual contrast, but is less dramatic than a complementary color combination.
Triadic: any three colors that are evenly spaced on the color wheel.
The saturation of colors refers to the color intensity, comparing to the black – white spectrum (the complete absence of a hue). A color in its purest and brightness form is 100% saturated. The more you desaturate a color, the closer you are to gray (or black, or white, depending also on the brightness of the color). Therefore, using bright and saturated colors can be a strategic plan to highlight the important parts of a design project.
As we know, based on their temperature, all colors can be categorized into groups, based on their temperature: cool, worm and neutral. Reds, yellow and oranges are considered warm colors; blues, and greens are cool; black, white and gray shades are neutral. Depending on how they are used, the beiges and browns can be considered neutrals. You can get a high contrast by mixing the color temperatures in a design, especially warm and cool colors.
Using the contrast colors
In logo design:
The companies use many times contrasting colors in order to underline and emphasize their branding messages. But before choosing your color palette, you should start with the following elements: your brand persona, your brand message, the color psychology and meaning. Let’s take a look, for example, to the following logo designs:
Mountain Dew uses green and red. Right away, a name like “Mountain Dew” evokes images of the great outdoors. Green works for the Mountain Dew’s logo because it nods to the brand’s connection to nature. But the red brings the kick that’s so central to the brand persona.
Visa uses yellow-orange and blue. They are definitely complementary colors. But besides the positions of the colors on the color wheel, let’s have a closer look to the meaning of the colors. Blue is a color often associated with trust, loyalty, royalty, friendliness, wisdom and peace. Yellowevokes positivity. So, the general message is trust, loyalty, positivity and wisdom. What else can we ask from a company at whom we throw wads of cash?
In web design:
On the web, color contrast is about finding colors that not only provide maximum contrast, but also provide enough contrast between content and the background for anyone. This doesn’t mean you have to limit your colors to complementary colors, but the contrast should be kept in mind all the same. You can combine different saturated and desaturated colors, to enhance the drama.
For example, the primary objective for this website is to reflect the adventure and wildness through the design, by combining different colors, textures and layering. In order to do this, the designer not just used the vibrant orange-red letter on the forest green, but also used contrasting levels of the saturation.
Using contrasting colors in web design helps you not just add more appeals to your design, but also organize your message and highlight the important parts of the design.
For example, the Mint website. The designer used one of the powerful combinations of contrasting colors. The white text, the orange color used for the call-to-action buttons and the bright green logo contrast with the dark background and stand out. Again, the designer used not just complementary colors, but also played with the dark and bright colors in order to highlight different elements of the website page.
In print design
For print design, the principles of the contrast are the same as for the web design. Whether you are working on a flyer, a brochure, a poster or have to publish an ad into a magazine, establishing the contrast is one of the most important things to consider. If it’s done properly, the contrast should be really noticed. It helps you separate the things, but it’s also the bond that puts the things together. Not only that a page is more attractive when contrasting colors are used, but the purpose and organization of the document are much clearer.
For example, the Hilton/F&B Brochure.
They use contrasting colors in their brochure design in order to highlight not just the pictures, but also the copy. Both of them are important, so the designer created the contrast playing with the colors.
On the other hand, let’s take a look to the Relic’s ad. They used tonnes of complementary and pairing colors in order not to just organize their design, but also highlight the message and create a summer feeling.
As in the web design, using the contrasting colors in print design helps you create a focus. For example, the adverts from the iPod used contrasting colors to focus the viewer’s attention on the music player. The ad featured a black silhouette character on a brightly green background. The iPod and the earphones appear in white and stands out from the black silhouette and the bright background.
In indoor and outdoor signage
Because business signage is the first visible advertisement for any company’s services or products, you should give a special attention to the colors used for them. It’s true that the colors used have to match to your brand colors in order to provide a unified image of your company, but there are also other things you should take into consideration. One of them is the level of the visibility that will be created. By contrasting a light color on a dark background or a dark font or graphic on a light background, the viewers will be more drawn to your signage.
For example, Starbucks uses white text on dark green background; and the signage can be viewed during the days and nights. Staples uses white text on the dark red. Although the white is a neutral color, combined with the dark red, it pops up!
With LEDs signs, it’s important to use contrasting colors. Contrasting colors do not only make colors eye-catching and more vibrant, it forces eyes to gaze at it. This is the key to getting the most marketing power out of your color choices – add some contrasting colors in the message that you’re trying to send.
As we said in the beginning, there is no magic formula for using the contrasting colors. You have to try and experiment by mixing different colors, using not just the primary colors, but also tones, shades and tints, because each concept and color combination can drastically change what you are trying to say with your project design.
Besides the user’s needs, what’s another vital aspect of an app? Your first thought might be its design. That’s important, correct, but before you can even think about the design, you need to get something else right: the data.
Data should be the cornerstone of everything you create. Not only does it help you to make more informed decisions, but it also makes it easier to account for edge cases, or things you might not have thought of otherwise.
Thanks largely due to the fact that more information is at our fingertips now than at any point in human history, we’ve entered into an age where both of the following statements are true: People are consuming more content online than ever before; Fewer and fewer people are actually willing to spend time reading that content.
According to a study reported on by Slate, roughly 38% of people who click on an article or blog post online don’t actually make it past the headline. Of those that remain, a further 5% only ever read the first paragraph—if they don’t have to scroll, that is. If they do have to scroll, they don’t even make it that far.
A study from The Washington Post confirms this—only 41% of people in the United States said that they invested the time in consuming any in-depth content in the last week, even if that content was on a subject they were actively interested in pursuing.
As marketers, this presents something of a challenge to say the least. Quality content is more important than ever, as marketers all over the Web strive to “one up” each other in terms of the value they’re able to provide; both in terms of what users are looking for and to satisfy the needs of entities like Google.
So how do you check off both of these boxes at the same time, so to speak? Thankfully, the solution is simple—you lean heavily on the principles of visual communication and data visualization to repackage your marketing message in the form of stunning presentations and infographics, the likes of which people can’t seem to get enough of.
The most important thing to keep in mind in that regard, however, is that the chasm between an infographic and a quality, successful infographic is a deep one indeed. It you truly want to design the perfect Infographic that will capture the attention of your target audience, you’ll need to keep a few key things in mind.
Perfect infographics start with a thesis
The number one thing to understand about designing successful infographics is that it cannot just be “a bunch of stats or other figures arranged visually on a page.” Infographics, like any other marketing collateral, are used best when they’re telling a story.
In this particular case, that story just happens to be told primarily with figures and data as opposed to good, old-fashioned text.
Because of this, before you even get into the visual element of your Infographics you’ll need to settle on a thesis statement: What exactly are you trying to say? What impression do you want the reader to take away when they finally get to the end?
The answer to this question will dictate every choice you make moving forward, so it’s an important one to settle on as quickly as possible.
Structuring your infographic
Once you’ve settled on the story you’re trying to tell, the next thing to do is to nail down your structure.
Think of it a bit like telling a joke: First you introduce the setup, meaning the context that people need to understand what is to come; then, you expand on that setup and offer the hook (the thing that keeps people interested); finally, you hit them with the punch line (the surprise at the end of the joke that generates the laugh).
If you don’t have these core elements, or if they’re not in the appropriate order, your joke (or in this case, your infographic) won’t be nearly as successful as you need.
In terms of infographics, the ideal structure is as follows:
Introduce your topic, either by way of a short block of text or by a bold opening fact or figure.
Introduce a complication. This is a problem that you’re offering a solution to, or an idea that you’re going to be expanding on.
Expand on that complication. Your reader should learn why this topic is important and should slowly be able to get an idea of what you’re trying to say about it.
Finally, the conclusion. This is the period on the end of your sentence that sums up what someone has learned, what they can do with this information and where they can find more if they so choose.
All of the data that you collect for your infographic should be neatly placed within this framework, allowing you to see exactly where a particular point needs to go for maximum effect.
If something doesn’t fall in line with these core areas, it probably has no business being on your infographic at all.
Don’t forget about design
Just because you can make an infographic without a graphic design degree, doesn’t mean you can throw out all the tried-but-true rules of visual communication.
The data you arrange should naturally flow from top to bottom. These elements should be presented in a way that guides the reader from one point to the next, often without them even realizing you’re in control in the first place.
Each data point should build and expand on the one that came before it, eventually leading the reader directly to the beautiful climax (or punch line) that they were after in the first place.
Some of you might be familiar with the Diffusion of Innovation. It is a theory that seeks to explain how new ideas and technology spread and is typically used to explain consumers’ adoption of technology.
Through our course of work, we’ve come to realise this theory can also be used to describe the readiness of a business for innovation.
First we have the Innovators. They are companies that view innovation as a driver for their business. They constantly look at what they can do next, investing in R&D to create new technology, products and services to better serve their customers needs. They have a great creative culture, experiment often and learn from failure.
For them, being so ahead of the curve, they need to educate others on the benefits that their new product or services offer.
Early adopters are open to, but cautious about innovation. They are typically very aware of what leading businesses in their industry and similar industries are doing. After doing their homework, they create their own products and services inspired by what the innovators are doing.
Being earlier on the curve, their challenge is to convince customers of the value they provide and to adopt the solutions offered.
They try new ways of doing things, but are less consistent with doing so. They know they should innovate and are driven to do so due to a competitive business environment.
They typically innovate from outside in, focusing more on products and services they deliver, sometimes forgetting to change their internal processes to support what they deliver. They need to look their businesses not just from the front-end but also the back-end, so they continue to deliver what they aspire to do.
Being less open to innovation, they wait to see what works and what doesn’t work, enabling them to avoid the common pitfalls. They focus their energies on providing those products and services they are sure people need, but in a more efficient and streamlined manner.
As they arrive later on the market, gaining market share is a challenge as the innovators, early adopters and early majority have taken up a good chunk of market share.
Typically the most risk averse, they wait until almost all their peers and competitors have moved ahead before they realise “I need to do something”. They may not keep up with technology, often updating their processes only because the old way is far too inefficient and the new way is the norm.
They are often caught in a situation where they have to compete with other more innovative businesses. Due to their lack of innovation, they find it hard to survive. A vicious cycle of daily fire-fighting drains time and money, affording them little capacity for innovation.
What do you all think? We love to hear your thoughts, let us know in the comments below!
Our partners Methodology.sg is running an awesome Masterclass workshop called: DESIGN LEADERSHIP: How to Identify and Communicate the Value of Design.
Details as follows:
Design as a Strategy is the next big thing. Enlightened companies such as Apple, Dyson and PepsiCo have bet on Design and won. But to bet on something you need to know its value, unfortunately many designers and creatives find it hard to identify and put a value on design. Thus communicating and articulating this value to business stakeholders becomes a big challenge.
Our next Masterclass Workshop Design Leadership – Identifying and Communicating the Value of Design was created to solve this challenge.
Delivered by expert and renown Design Leaders, Robb Ziegler & Deb Mrazek, this workshop is ideal for Creatives, Policy Makers, Design Managers, Account Directors, Design Educators or Design Thinkers who want to bridge the gap between their passion in Design and the value of their work.
Date: 9 – 10 March 2017
Time: 9.00am – 5.30pm
Price: $1,200 nett (Original Price $1,700)
Spaces are limited, so email firstname.lastname@example.org to reserve your place now!