Friday, September 9, 2016

PHP-FIG, Quo Vadis?

The Polish writer, Henryk Sienkiewicz, was awarded the 1905 Nobel prize for Literature for his epic novel Quo Vadis, which is a Latin phrase meaning "Where are you going?". In the face of any dilemma, a brief pause and redefinition of one's goals may be therapeutic.

The PHP Framework Interoperability Group (PHP-FIG) has come of age. With the acceptance of more PHP Standards Recommendations (PSRs), PHP has attracted further positive attention and admiration of the programming community. PSRs governing coding standards, coding style guides, autoloading, logging, caching and HTTP messages have been accepted.

Other proposals at different stages of draft and review cover hypermedia links, PHPDoc standard, event management, caching and security issues. There's even one on Huggable Interfaces (PSR-8) which, among other things, talks about huggable objects and mutually-assured hugging!

However, the future isn't as bright as painted, as a recent ruckus within the organization has thrown its continuing existence under doubt.

Origin of the PHP-FIG

The seed of PHP-FIG was sown at php|tek in 2009 when some developers got together to share ideas. This was out of concern over the fragmentation within the PHP community that has congregated on different islands of frameworks and applications. FIG should be the PHP equivalent of the Java Community Process, a platform for the development of standard technical specifications for Java.

Their intention was the creation of a forum for discussing common issues faced by PHP projects and by working together, find ways of cooperation and interoperability. They wanted to make it easier to share the work done between different projects.

Continue reading %PHP-FIG, Quo Vadis?%


by Deji Akala via SitePoint

Monetizing Apps with the Google AdMob SDK

AdMob is a mobile advertising platform from Google that developers can use to generate revenue from apps through in-app advertising. AdMob provides different sets of ads like banner ads, interstitial ads, video ads, or native ads integrated with native UI components. AdMob uses the Google Mobile Ads SDK which helps maximizing revenue and achieve massive scale with Google's ad solutions. The focus of this article is to integrate AdMob with your apps, but before doing this it's a good idea to understand the best practices and policies of how to implement ads. I recommend the AdMob YouTube videos for [banner ads](https://youtu.be/yTnqcz6RJ-4) and [interstitial ads](https://youtu.be/wrZiwrkQWBw).

Continue reading %Monetizing Apps with the Google AdMob SDK%


by Valdio Veliu via SitePoint

3 MORE Clever Psychology Rules for Making Better UX Decisions

Last week I walked you through four handy rules of psychology that you can use to really improve your website results. Today I have three more rules involving color, human attention spans and reactions to change that take things to another level.

Let's get started!

Rule 1: User attention spans are shrinking each year

Goldfish

In a 2015 study, Microsoft surveyed 2,000 people and monitored the brain activity of 112 more people with electroencephalograms (EEGs). One of the highlights of the study is that our attention span has reduced; the average human now has an attention span of eight seconds, compared to an attention span of 12 seconds in 2000. We now have a shorter attention span than a goldfish (which has an attention span of nine seconds).

The fact that we are indeed becoming increasingly impatient, especially online, was further established by an Aberdeen study that found that a one second delay in website loading time will result in 40 percent of people abandoning a website and a 7 percent decrease in conversion.

Our desire to have instant gratification (which is constantly being bolstered by the seemingly instant availability of everything, thanks to technology!) has deep roots in psychology. Researchers conducted a study on students at four different universities, observed the brain activity of participants with an fMRI, and found that two areas of our brain compete for control over our behavior when we have to choose between short-term rewards and long-term goals.

The study found that parts of the brain that are heavily influenced by brain systems associated with emotion activate when we’re faced with the possibility of instant gratification, leaving us with little choice since we are not likely to logically consider our decisions. In short, we’re wired to want instant gratification, and, since it mainly has to do with our emotions, there’s little we can do about it.

How does this apply to your website design?

Principle: Use the ‘Goldfish Principle’ to Optimize Your Website for Increasingly Impatient Web Users

No matter how beautiful and appealing your web design is, it is half useless if it doesn’t load fast. Cut out the extra, unnecessary features. Clean up your code to avoid a bloated design, and follow other design best practices for making a website faster.

Rule 2: Men and Women Perceive Color Differently

H5lfQEk

If, as a designer, your use of color is based on what you “like” best or what you “think” looks better, think again. There’s a lot to research on the psychology of color, and you can use the right colors to influence the actions your users take.

According to a 2006 study titled, “Impact of Color on Marketing,” people make up their minds within 90 seconds of interacting with people or products, and 62 to 90 percent of their assessment is influenced by colors alone. The study, that reviews literature on color psychology in the context of marketing, found that it is possible to use colors to increase or decrease appetite, reduce perception of waiting time, make customers more patient and enhance people’s mood.

In fact, color is so powerful that the color of the food we eat, as well as surrounding colors, has been observed to influence the palatability of food and the appetite of the eater.

Similar research published in 2010 found that color can influence the likability and familiarity people feel towards a brand – and that the right use of color can enhance purchase intent. The study analyzed 100 brands, involved 450 non-color blind participants, and compared brand personality (which is basically the impression people have about certain brands: Nike is “cool,” Apple is “exclusive,” etc.), likability and familiarity based on a number of factors.

Participants were randomly split into three groups; the first group was shown a brand name in Arial font with a middle gray color, the second group was shown a middle gray version of the brand’s logo, while the third group was shown a full-color version of the brand logo.

The study found that color affects brand personality and likability. Since the researchers found the colors red, blue and black to be most commonly used by the brands analyzed, they did further analysis and saw that these colors elicited certain feelings about the brands; the color red elicited excitement in users about a brand, the color blue made users feel a brand was more competent and the color black made users feel a brand was more sophisticated. This was irrespective of how the brand actually is.

That said, the decision to favor one color over another shouldn’t be simplistically made. Despite our natural tendency to react in certain way to some colors over others, available research shows that color preference can easily vary among people of different gender and culture. Below is a graphic showing the most favorite colors among men and women:

[caption id="attachment_139031" align="aligncenter" width="1000"]Male and female color preference Male and female color preferences[/caption]

The following screenshot shows the least favorite colors between men and women:

[caption id="attachment_139028" align="aligncenter" width="1000"]Male and female color dislike Male and female color dislikes[/caption]

A few things are easily apparent:

  • You might have to use different colors depending on whether your audience is predominantly male or female (for example, men generally dislike the color purple compared to women)
  • There is an overlap between colors for both genders, so all hope is not lost if your design will be served to an audience of mixed male and female
  • Men generally prefer bold colors while women prefer softer colors

How does this apply to your website design?

Principle: Vary Your Usage of Color Based on Your Audience and Goals

Vary your color use based on the audience of your design; it is especially important to avoid biases influenced by your own gender and experience as a designer. As a male designer, don’t assume that a female audience will love your design and use of color because you think it is beautiful.

Instead, understand the color preference of both genders, as well as people of different backgrounds, and let that influence your design choices. It is also important to understand the emotions different colors elicit and use colors accordingly.

The discussion about colors won’t be complete without addressing the concept of sensory adaptation, though.

Continue reading %3 MORE Clever Psychology Rules for Making Better UX Decisions%


by John Stevens via SitePoint

What Are the Three Trees? Find Out in Our New Course on Git Basics

List to Graph: How to Represent Your List as a Graph In Python

How to Use `amp-img` and `amp-video` to Speed Up Your Website

AtoZ CSS Screencast: Display

This article is a part of our AtoZ CSS Series. You can find other entries to the series here.

Transcript

How elements take up space on the page is controlled by their display.

There used to be two broad display types in CSS: elements were inline or block-level.

Block vs. Inline

Block elements start on a new line and fill the width of their parent container. We saw this behaviour in "Episode 1:auto" when we looked at auto dimensions.

inline elements remain in a line and only take up the width of their contents.

HTML5

In HTML5 elements are categorised differently, the broadest categories being “flow content” and “phrasing content”. There are further categories for embedded content, interactive content and form associated content but there’s a lot of cross-overs between these different categories.

Here’s a list of flow content elements. Elements like <div>, article, section and form are block-like elements which often contain many other child elements. But this list also contains a, em, span and input which are inline elements - often found in running text where it would be undesirable for them to start on a new line.

The list of phrasing content elements doesn’t contain a lot of the block-like elements from flow content, but it does include things like em, span and input which were also in the previous list.

It turns out there is no clear mapping of block to flow content and inline to phrasing content so we better look elsewhere.

Continue reading %AtoZ CSS Screencast: Display%


by Guy Routledge via SitePoint