Tuesday, April 5, 2016

Browser Trends April 2016: Samsung’s Surge

There was little to report last month so do the latest StatCounter statistics show more exciting events…

Worldwide Desktop & Tablet Browser Statistics, February to March 2016

The following table shows browser usage movements during the past month.

Browser February March change relative
IE (all) 13.38% 12.54% -0.84% -6.30%
IE11 9.78% 9.40% -0.38% -3.90%
IE10 1.02% 0.80% -0.22% -21.60%
IE9 1.03% 0.87% -0.16% -15.50%
IE6/7/8 1.55% 1.47% -0.08% -5.20%
Edge 1.83% 1.98% +0.15% +8.20%
Chrome 55.47% 56.51% +1.04% +1.90%
Firefox 14.66% 14.29% -0.37% -2.50%
Safari 4.20% 4.17% -0.03% -0.70%
iPad Safari 5.24% 5.25% +0.01% +0.20%
Opera 1.97% 1.87% -0.10% -5.10%
Others 3.25% 3.39% +0.14% +4.30%

Continue reading %Browser Trends April 2016: Samsung’s Surge%


by Craig Buckler via SitePoint

10 Tips for Effective Collaboration in Remote Teams

I’ve worked remotely for most of my career; as a designer, a developer, and now as a writer. I’ve also worked in an office, and I have to say that neither is more dynamic than the other — it’s about the individual effort you bring to the team and how effectively you include team members into the conversation.

Aside from carefully articulating your words, you also need to find ways to inspire informative, contextual, high-value responses that everybody in the team can benefit from.

Let’s take a look at 10 ways to ensure effective collaboration.

Effective collaboration

1. Be Available

Communication is the ultimate key to collaboration. More often than not, communication is nothing more than a simple question, a clarification, or a request for information. In a real office you would tip your head over your computer and simply speak to a colleague, but in remote teams it can be hard to determine if somebody is available, and in most cases, you’d likely forget about it and try to find an answer by yourself.

Your team should always try to use a core messaging app and remain “available” or “online”. You don’t have to be chatty at all times, but be available in case anybody else needs help.

2. Prepare Your Messages

You know that your time is valuable, so don’t forget that everybody else’s time is valuable too. Any time spent communicating is time spent not-working. One of the main reasons for “going remote” may have been to avoid meetings and have enough “alone time” to actually do some work — don’t waste those opportunities by sending vague messages back and forth.

[author_more]

Because we’re not having face-to-face conversations, and even more so because of timezone differences, we can receive responses to our communications hours later. Always offer the correct information and be clear about what you’re saying or asking; too much information is better than not enough information. Send images, code examples and source files to supplement your messages.

3. Communicate When Necessary

Like I said, communicating takes you away from actually doing work. Don’t use your core messaging app to chit-chat all day, and only ever include others in the conversation when it concerns them. Other team members don’t want to be CC’d into every email, every response and every sub-comment connected to it.

Instead of trying to “read” the room, communicate facial expressions verbally, or when messaging online, use emoticons so that everyone is confident about the overall vibe in the “room”.

4. Schedule Non-Work Related Hangouts

Working remotely can be lonely and it’s totally natural to want to engage in some normal, work-unrelated banter. However, it can be terribly counterproductive to open up the core dialogue to free discussion. Instead, schedule some time on Google Hangouts or Skype (at certain intervals in the day) to facilitate free, healthy discussions. It’s a bonding moment for the team too.

5. Use Apps That Make Communication Productive

Slack has made a significant impact on the future of team communication. Some, however, have said that the “always online” approach results in far too much communication and day-long meetings. I don’t think that’s Slack’s fault, but there certainly are drawbacks to look out for.

Making communication too accessible can result in fruitless back-and-forth conversations, but many apps these days have a way to set up integrations — Slack included. Essentially, this is a way of taking data from your favourite apps (Wunderlist, Trello, Dropbox, Zeplin, InVision — the list is endless) and including contextual information with your messages.

HipChat is another option to consider, which has a tonne of integrations as well.

Productive communications

Continue reading %10 Tips for Effective Collaboration in Remote Teams%


by Daniel Schwarz via SitePoint

5 Ways to Lift Your Game in Accessible Design

Over the past couple of years, the term ‘inclusion’ has been spoken about through out the design industry. Whether it’s company culture, the media, neighborhoods and politics, we like to be able to see reflections of ourselves. If you’re anything like me, you don’t fit neatly into one or two categories on society’s check boxes […]

Continue reading %5 Ways to Lift Your Game in Accessible Design%


by A'Nita Evans via SitePoint

6 jQuery Infinite Scrolling Demos

Infinite scrolling is now a common feature and there are several cases where it is really useful. For instance there are some websites where we simply can't imagine a good pagination system, like Twitter or even Facebook. Another example of where infinite scrolling can be useful is for a search engine: you'll want to continue viewing new links while you don't find the one you want, and a pagination system can slow you down in your research.

[author_more]

If you need to use infinite scrolling for your project, here are six demos that you can use as inspiration to implement it.

Note that, except for the last one, all these demos are written with jQuery and some examples are using jQuery plugins. However, other examples can easily be adapted for vanilla JS without any problem.

1. Infinite Scrolling and Grids

This demo uses the jQuery Masonry plugin together with the Infinite Scroll plugin. The Masonry plugin is good for obtaining fluid grid layouts. The Infinite Scroll plugin by Paul Irish is good at loading pages that already exist (so it is good for your SEO). You can use it to load static pages such as page2.html, page3.html, etc., but this plugin also handle generated pages, such as page.php?p=2, page.php?p=3. However, to use it you need to have a page number to increment in your URLs so, if you have pages such as page.php?data=xxx, then this plugin is not for you.

Usage - HTML

[html]
<div class="grid">
<div class="grid-item grid-item-2">
<p>content</p>
</div>

</div>

<!-- The next page which content will be loaded when scrolled -->
<nav id="pagination">
<p><a href="page-2.html">Page 2</a></p>
</nav>
[/html]

Usage - jQuery

[js]
$(document).ready(function() {
var grid = $('.grid');

grid.masonry({
itemSelector: '.grid-item',
columnWidth: 200
});

grid.infinitescroll({
// Pagination element that will be hidden
navSelector: '#pagination',

// Next page link
nextSelector: '#pagination p a',

// Selector of items to retrieve
itemSelector: '.grid-item',

// Loading message
loadingText: 'Loading new items…'
},

// Function called once the elements are retrieved
function(new_elts) {
var elts = $(new_elts).css('opacity', 0);

elts.animate({opacity: 1});
grid.masonry('appended', elts);
});
});
[/js]

2. Infinite Scrolling through Blog Posts

This demo doesn't use any plugin or library to handle the infinite scrolling feature. Each time the end of the page is reached by the user, it loads a new post, generated by a PHP script that echoes the corresponding HTML code. The demo never reaches the end of content but you can achieve this by, for example, echoing an empty string when there is no more posts to show. We display a loading image at the end of the page, in the spirit of Twitter.

Note that, in the live demo below, the new posts are generated by a JavaScript function, as we can't use a PHP script in CodePen.

See the Pen Infinite Scrolling through Blog Posts by SitePoint (@SitePoint) on CodePen.

Usage - HTML

[html]
<ul id="posts">
<li>
<article>content</article>
</li>


</ul>

<p id="loading">
<img src="images/loading.gif" alt="Loading…" />
</p>
[/html]

Usage - jQuery

[js]
$(document).ready(function() {
var win = $(window);

// Each time the user scrolls
win.scroll(function() {
// End of the document reached?
if ($(document).height() - win.height() == win.scrollTop()) {
$('#loading').show();

$.ajax({
url: 'get-post.php',
dataType: 'html',
success: function(html) {
$('#posts').append(html);
$('#loading').hide();
}
});
}
});
});
[/js]

3. Infinite Scrolling through Images

This demo loads in images on infinite scroll and never reaches the end. It uses the jQuery Endless Scroll plugin which can be customized to trigger loading x number of pixels from the bottom of the screen. The demo clones the same images and inserts them at the end of the list and so on, but the script can be customized to load the images from different sources quite easily.

See the Pen Infinite Scrolling through Images by SitePoint (@SitePoint) on CodePen.

Usage - HTML

[html]
<ul id="images">
<li>
<a href="http://ift.tt/1fX21J1">
<img src="http://ift.tt/1MQEqJN" alt="" />
</a>
</li>


</ul>
[/html]

Usage - jQuery

[js]
$(document).ready(function() {
$(window).endlessScroll({
inflowPixels: 300,
callback: function() {
var last = $('#images li:last');
last.after(last.prev().prev().prev().prev().clone());
}
});
});
[/js]

Continue reading %6 jQuery Infinite Scrolling Demos%


by Jérémy Heleine via SitePoint

A Working SVG Workflow for Accessible Icons

It has been commonly admitted that using fonts for icons is a bad practice. It’s bad for rendering (sizing, positioning, etc.), it has weird failures (proxy browsers, CORS, etc.), it conveys poor semantics, can hurt accessibility, and the list goes on. CSS-Tricks has an insightful piece on the matter.

That being said, I always find it a bit complex to deal with SVG. Let’s be honest, I’m no Sara Soueidan. SVG is not really my thing. All these paths, weird tags, and attributes, ugh. I don’t really know how to use them. Still, I have to. And still, I like to do things properly.

So I came up with an SVG workflow for icons that is both simple and automated. Took me a bit of time to end up here, but I’m happy to write about it now that it works pretty well. Hopefully, it will be useful to some of you.

[author_more]

What’s the Gist?

CSS-Tricks has a very nice article by Chris Coyier about how to build an icon system with SVG sprites. Given that this article is a direct application of Chris’s article, I suggest you read it if you haven’t already.

Here is roughly how it works.

  1. Source icons are gathered in individual SVG files in a dedicated folder.
  2. A sprite is generated with spritesh.
  3. The sprite is included in the main layout for future reference.
  4. Icons are displayed through a small component.
  5. ???
  6. Profit.

The setup depends a bit on the type of project you are working on (Jekyll, React, Rails…) but the gist of it stays the same. In this article, I’ll walk you through the steps so you can start using it today.

Gathering Icon Files

If you ask me, this is somewhat of a hard part, because having correct SVG files is not an easy topic. Depending on which tool is used to export the icon, the markup looks different, can be bloated, and so on. And don’t get me started on viewBox issues…

If you can avoid designing your own icons, I’d recommend you do that. Icomoon has a very decent collection of lovely icons that are free to use and exportable as SVG. You could not wish for more. Which is why we will go this way in this article.

Icomoon icon picking

First, select the icons you need. Once you are done, click on “Generate SVG & More”. You should see listed all the icons you chose. Now you can download the bundle from Icomoon. The generated zip contains everything you need for the icons you picked (PNG files, SVG files, CSS, JavaScript, demo…). I recommend you copy the content of the SVG sub-folder (containing individual icon files), and paste it into your icon folder.

Before moving on, you will have to clean up the SVG files a bit. It is not entirely necessary per se, but I’d recommend you do that nevertheless to avoid bloating your SVG sprite with a lot of junk. Here is what the fire icon from Icomoon looks like when downloaded:

Continue reading %A Working SVG Workflow for Accessible Icons%


by Hugo Giraudel via SitePoint

Cash – Lightweight jQuery Alternative for Modern Browsers

Cash is a small library for modern browsers that provides jQuery style syntax to wrap modern Vanilla JS features.


by via jQuery-Plugins.net RSS Feed

PredictionIO and Lumen: Building a Movie Recommendation App

In the intro, we covered the basics of PredictionIO and installed its dependencies. In this part, we’re going to build the movie recommendation app.

Final app screenshot

Environment Config File

Inside your app directory, create a .env file and add the following configuration:

APP_ENV=local
APP_DEBUG=true
APP_KEY=some-random-key

PIO_KEY=your-pio-app-key
TMDB_KEY=your-tmdb-api-key

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=database

Make sure to replace the value of APP_KEY with a unique random key. Since we’re using Lumen, you can generate one by executing php artisan key:generate. Also, replace the value for PIO_KEY with the key of the PredictionIO app that you created, and the TMDB_KEY with the API key provided by the TMDB website.

Importing Data from TMDB

We will be importing the data using the PredictionIO SDK, so we first need to tell Lumen to use it. Create a Classes directory under lumen/app. Then inside it, create a Pio.php file and add the following code.

<?php
namespace App\Classes;

use predictionio\EventClient;
use predictionio\EngineClient;

class Pio
{

    public function eventClient()
    {

        $pio_accesskey = env('PIO_KEY');
        $pio_eventserver = 'http://127.0.0.1:7070';

        return new EventClient($pio_accesskey, $pio_eventserver);

    }

    public function predictionClient()
    {

        $pio_predictionserver = 'http://127.0.0.1:8192';

        return new EngineClient($pio_predictionserver);

    }

}

This class will serve as a container for the PredictionIO event client and engine client. This way, we don’t have to instantiate those classes every time we need to use them.

Continue reading %PredictionIO and Lumen: Building a Movie Recommendation App%


by Wern Ancheta via SitePoint