Showing posts with label SitePoint. Show all posts
Showing posts with label SitePoint. Show all posts

Wednesday, 27 July 2016

20 Social Networking Sites for Business Professionals

Networking

This article was updated on 27th July, 2016 to modernize the list of suggestions and improve formatting.

Almost all of us use different social media networks to promote our businesses, such as Twitter, Facebook, and Instagram. While we use these networks to connect with our future and current customers, there are also social networks that allow you to chat with other like-minded business professionals.

While LinkedIn may be the leader in social networking for professionals, there are a variety of other networks that allow for community and networking in different ways. With existing networks and new networks, there are plenty to chose from that all fit your needs and wants in finding a community of professionals to network with.

Here are 20 social networking sites for entrepreneurs, business owners, freelancers, bloggers, and other professionals that are worth looking at and joining to help your networking and promoting efforts, along with learning from other professionals.

AngelList

AngelList

AngelList is a social network that connects startups with investors to help raise funding; also allows for browsing of jobs at startups.

AngelList

Beyond

Beyond

Beyond helps millions of professionals network with each other and find jobs to advance their careers.

Beyond

Black Business Women Online

Black Business Women Online

Black Business Women Online is a blog and online community for black women entrepreneurs and professionals.

Black Business Women Online

Data.com Connect

Data.com Connect

Data.com Connect is an online community to share ideas, get feedback, and discuss industry best practices.

Data.com Connect

E.Factor

E.Factor

E.Factor is an online community paired with a virtual marketplace designed for entrepreneurs by other entrepreneurs.

E.Factor

Gadball

Gadball

Gadball is a LinkedIn alternative that features profile and resume creation and job searching.

Gadball

Gust

Gust

Gust connects startups with a large pool of investors across the world to help raise early-stage funding.

Gust

LinkedIn

LinkedIn

LinkedIn is a professional network that allows you to be introduced to and collaborate with other professionals.

LinkedIn

Meetup

Continue reading %20 Social Networking Sites for Business Professionals%



from SitePoint http://ift.tt/2axIIch
via https://ifttt.com/ IFTTT

Higher Order Components: A React Application Design Pattern

In this article we will discuss how to use Higher Order Components to keep your React applications tidy, well structured and easy to maintain. We’ll discuss how pure functions keep code clean and how these same principles can be applied to React components.

Pure Functions

A function is considered pure if it adheres to the following properties:

  • All the data it deals with are declared as arguments
  • It does not mutate data it was given or any other data (these are often referred to as side effects).
  • Given the same input, it will always return the same output.

For example, the add function below is pure:

function add(x, y) {
  return x + y;
}

However, the function badAdd below is impure:

var y = 2;
function badAdd(x) {  
  return x + y;
}

This function is not pure because it references data that it hasn’t directly been given. As a result, it’s possible to call this function with the same input and get different output:

var y = 2;
badAdd(3) // 5
y = 3;
badAdd(3) // 6

To read more about pure functions you can read “An introduction to reasonably pure programming” by Mark Brown.

Whilst pure functions are very useful, and make debugging and testing an application much easier, occasionally you will need to create impure functions that have side effects, or modify the behavior of an existing function that you are unable to access directly (a function from a library, for example). To enable this we need to look at higher order functions.

Higher Order Functions

A higher order function is a function that when called, returns another function. Often they also take a function as an argument, but this is not required for a function to be considered higher order.

Let’s say we have our add function from above, and we want to write some code so that when we call it we log the result to the console before returning the result. We’re unable to edit the add function, so instead we can create a new function:

function addAndLog(x, y) {  
  var result = add(x, y);
  console.log('Result', result);
  return result;
}

We decide that logging results of functions is useful, and now we want to do the same with a subtract function. Rather than duplicate the above, we could write a higher order function that can take a function and return a new function that calls the given function and logs the result before then returning it:

function logAndReturn(func) {  
  return function() {  
    var args = Array.prototype.slice.call(arguments);
    var result = func.apply(null, args);
    console.log('Result', result);
    return result;
  }
}

Now we can take this function and use it to add logging to add and subtract:

var addAndLog = logAndReturn(add);
addAndLog(4, 4) // 8 is returned, ‘Result 8’ is logged

var subtractAndLog = logAndReturn(subtract);
subtractAndLog(4, 3) // 1 is returned, ‘Result 1’ is logged;

logAndReturn is a HOF because it takes a function as its argument and returns a new function that we can call. These are really useful for wrapping existing functions that you can’t change in behavior. For more information on this, check M. David Green’s article “Higher-Order Functions in JavaScript which goes into much more detail on the subject.

Additionally you can check out this CodePen, which shows the above code in action.

Higher Order Components

Moving into React land, we can use the same logic as above to take existing React components and give them some extra behaviours.

In this section we're going to use React Router, the de facto routing solution for React. If you'd like to get started with the library I highly recommend the React Router Tutorial on GitHub.

React Router’s Link component

React Router provides a <Link> component that is used to link between pages in a React application. One of the properties that this <Link> component takes is activeClassName. When a <Link> has this property and it is currently active (the user is on a URL that the link points to), the component will be given this class, enabling the developer to style it.

This is a really useful feature, and in our hypothetical application we decide that we always want to use this property. However, after doing so we quickly discover that this is making all our <Link> components very verbose:

<Link to="/" activeClassName="active-link">Home</Link>
<Link to="/about" activeClassName="active-link">About</Link>
<Link to="/contact" activeClassName="active-link">Contact</Link>

Notice that we are having to repeat the class name property every time. Not only does this make our components verbose, it also means that if we decide to change the class name we’ve got to do it in a lot of places.

Continue reading %Higher Order Components: A React Application Design Pattern%



from SitePoint http://ift.tt/2aKWjJA
via https://ifttt.com/ IFTTT

Digging Deeper into WordPress Hooks and Filters

WordPress comes loaded with a series of hooks and filters that let you hook into specific parts of when WordPress operates. For example, you can attach a custom function so that it executes when the WordPress save_post action is called, giving you access to the post being saved. Plugins and themes are an area where […]

Continue reading %Digging Deeper into WordPress Hooks and Filters%



from SitePoint http://ift.tt/2ae9aSA
via https://ifttt.com/ IFTTT

Prisma: The Rise and Fall and Rise of the One-Trick-Pony Filter

Hassle-Free Filesystem Operations during Testing? Yes Please!

When working with the filesystem in our tests suites, a big concern is cleaning up the temporary files after each test runs. However, if for any reason the test's execution is interrupted before the cleanup phase, further tests might fail, as the environment has not been cleaned up.

In this post, we will use a library named vfsStream to create filesystem mocks. It's little more than a wrapper around a virtual filesystem, which also works very nicely with PHPUnit.

Note This post requires a basic understanding of unit testing and PHPUnit.

To have something to test, we'll write a simple class for creating files:

<?php
// FileCreator.php
class FileCreator {

    public static function create($path, $name, $content)
    {
        $file_name = rtrim($path, '/') . '/' . $name;

        if (file_put_contents($filename, $content)){
            return true;
        }
        return false;
    }
}

Inside the class, we have a create() method, which accepts the filename, content, and a path to which to save it.

To test the class, we first take the traditional approach, and create a test class without using a virtual filesystem. Then, we'll bring vfsStream into the game to see how it can simplify the testing process for us.

Traditional Approach

<?php

class FileCreatorTest {

    protected $path;

    public function setUp()
    {
        $this->path = sys_get_temp_dir();
    }

    public function tearDown()
    {
        if (file_exists($this->path . '/test.txt')) {
            unlink($this->path . '/test.txt');
        }
    }

    public function testCreate()
    {
        $this->assertTrue(FileCreator::create($this->path, 'test.txt', 'Lorem ipsum dolor sit amet'));
        $this->assertFileExists($this->path . '/test.txt');

    }

In the above, we define the temporary directory (in setUp()) which we'll use for our temporary files by using PHP's sys_get_temp_dir(). The function returns the system's directory path for temporary files.

Continue reading %Hassle-Free Filesystem Operations during Testing? Yes Please!%



from SitePoint http://ift.tt/2avK9Z0
via https://ifttt.com/ IFTTT

Adaptive SVG or putting the ‘S’ into ‘SVG’

Here’s a question: ‘Why do we even like CSS, anyway?’ To answer that question, let’s set our time machine dial thingey back to 1998. When we arrive, we know it’s 1998 because we notice: Google is a hot new startup Britney is hitting her baby one more time Lumbering tables and primitive spacer GIFs roam […]

Continue reading %Adaptive SVG or putting the ‘S’ into ‘SVG’%



from SitePoint http://ift.tt/2aJ2AVY
via https://ifttt.com/ IFTTT

Tuesday, 26 July 2016

The 10 Best Chrome Extensions for Freelancers

A person working in a café

It’s no secret that us freelancers are productivity junkies, always looking for clever ways to make the best use of our time. Personally, I happily welcome any tips and tricks that help me churn out the words. But did you realize that the key to being more efficient might be located right in your browser?

Google’s Chrome Web Store is packed full with tens of thousands of useful extensions. Unfortunately, unless you know exactly what you are looking for, it can be pretty difficult to navigate.

In the hopes of helping to narrow things down, I’ve highlighted 10 Chrome extensions for freelancers looking to improve their workflow and boost productivity.

1. Noisli

Noisli - Chrome Extensions for Freelancers

The right ambient noise can be a lifesaver when it comes to staying focused. Noisli has a variety of noises to choose from and an option to customize your own. You can choose your favorite noise, set a timer, and control the volume, all from your web browser.

We recently took a closer look at Noisli.

Noisli

2. ColorZilla

If you’re a graphic designer, this Chrome extension is about to become your best friend. ColorZilla is an advanced eyedropper that provides color readings in RGB and hexadecimal format. It allows you to easily pull color data from any website on-the-go and without having to open another application.

ColorZilla

3. Boomerang for Gmail

Boomerang - Chrome Extensions for Freelancers

Being a digital nomad has a lot of benefits, but it can also make it difficult to stay atop correspondence. This extension changes everything when it comes to email.

Boomerang allows you to schedule emails to arrive in someone’s inbox precisely when you need them to. This is especially useful for when you are traveling, corresponding with someone in a different time zone, or if you are catching up on emails late at night.

Boomerang also allows you to schedule emails back to yourself, which can be an incredibly useful tool for goal setting, meeting deadlines, invoicing and follow ups. It even has the capability to alert you when you haven’t responded to important messages. The productivity possibilities are endless. It’s surprising that we ever went without it.

Boomerang for Gmail

4. Web Developer

This chrome extension is for those developers that love a good shortcut. It provides an incredible amount of useful dev tools, all conveniently located right in your browser. The Web Developer extension makes viewing responsive layouts, disabling styles, and outlining elements quick and easy.

Web Developer

5. Taco

Taco - Chrome Extensions for Freelancers

Don’t let the name fool you: this Chrome extension is a powerful hub for productivity. For most of us, on any given day we use up to 20 different apps and services — if not more. From Gmail to Trello to Salesforce, you name it.

Taco works by pulling all of your incoming tasks and notifications from various apps into one central location. It may sound unnecessary, like just another to-do list application. But think of how much time it’ll save you to have all of your tasks and notifications in one comprehensive list. It makes prioritizing tasks a whole lot easier.

Taco

6. StayFocusd

Being a freelancer requires a lot of discipline and working on the web makes it all too easy to get distracted and lose focus. We’ve all been there: you step away from your work for five minutes to check Twitter and catch up on some trending topics. Next thing you know, two hours have passed and your motivation has plummeted.

Continue reading %The 10 Best Chrome Extensions for Freelancers%



from SitePoint http://ift.tt/2a2RCsZ
via https://ifttt.com/ IFTTT

Build a JavaScript Command Line Interface (CLI) with Node.js

As great as Node.js is for "traditional" web applications, its potential uses are far broader. Microservices, REST APIs, tooling, working with the Internet of Things and even desktop applications—it's got your back.

Another area where Node.js is really useful is for building command-line applications—and that's what we're going to be doing today. We're going to start by looking at a number of third-party packages designed to help work with the command-line, then build a real-world example from scratch.

What we're going to build is a tool for initializing a Git repository. Sure, it'll run git init under the hood, but it'll do more than just that. It will also create a remote repository on Github right from the command line, allow the user to interactively create a .gitignore file and finally perform an initial commit and push.

As ever, the code accompanying this tutorial can be found on our GitHub repo.

Why Build a Command-line Tool with Node.js?

Before we dive in and start building, it's worth looking at why we might choose Node.js to build a command-line application.

The most obvious advantage is that if you're reading this, you're probably already familiar with it—and indeed, with JavaScript.

Another key advantage, as we'll see as we go along, is that the strong Node.js ecosystem means that among the hundreds of thousands of packages available for all manner of purposes, there are a number which are specifically designed to help build powerful command-line tools.

Finally, we can use npm to manage any dependencies, rather than have to worry about OS-specific package managers such as Aptitude, Yum or Homebrew.

That said, that's not necessarily true, in that your command-line tool may have other external dependencies.

What We're Going to Build—Introducing ginit

Ginit, our Node CLI in action

For this tutorial, We're going to create a command-line utility which I'm calling ginit. It's git init, but on steroids.

You're probably wondering what on earth that means.

As you no doubt already know, git init initializes a git repository in the current folder. However, that's usually only one of a number of repetitive steps involved in the process of hooking up a new or existing project to Git. For example, as part of a typical workflow, you might well:

  1. Initialise the local repository by running git init
  2. Create a remote repository, for example on Github or Bitbucket; typically by leaving the command-line and firing up a web browser
  3. Add the remote
  4. Create a .gitignore file
  5. Add your project files
  6. Commit the initial set of files
  7. Push up to the remote repository

There are often more steps involved, but we'll stick to those for the purposes of our app. Nevertheless, these steps are pretty repetitive. Wouldn't it be better if we could do all this from the command-line, with no copying-and-pasting of Git URLs and such-like?

So what ginit will do is create a Git repository in the current folder, create a remote repository—we'll be using Github for this—and then add it as a remote. Then it will provide a simple interactive "wizard" for creating a .gitignore file, add the contents of the folder and push it up to the remote repository. It might not save you hours, but it'll remove some of the initial friction when starting a new project.

With that in mind, let's get started.

The Application Dependencies

One thing is for certain—in terms of appearence, the console will never have the sophistication of a graphical user interface. Nevertheless, that doesn't mean it has to be plain, ugly, monochrome text. You might be surprised by just how much you can do visually, while at the same time keeping it functional. We'll be looking at a couple of libraries for enhancing the display: chalk for colorizing the output and clui to add some additional visual components. Just for fun, we'll use figlet to create a fancy ASCII-based banner and we'll also use clear to clear the console.

In terms of input and output, the low-level Readline Node.js module could be used to prompt the user and request input, and in simple cases is more than adequate. But we're going to take advantage of a third-party package which adds a greater degree of sophistication—Inquirer. As well as providing a mechanism for asking questions, it also implements simple input controls; think radio buttons and checkboxes, but in the console.

We'll also be using minimist to parse command-line arguments.

Here's a complete list of the packages we'll use specifically for developing on the command-line:

  • chalk - colorizes the output
  • clear - clears the terminal screen
  • clui - draws command line tables, gauges and spinners
  • figlet - creates ASCII art from text
  • inquirer - creates interactive command line user interface
  • minimist - parses argument options
  • preferences - manage CLI application encrypted preferences

Additionally, we'll also be using the following:

  • github - Node wrapper for the GitHub API
  • lodash - JavaScript utility library
  • simple-git - runs Git commands in a Node.js application
  • touch - implementation of the *Nix touch command

Getting Started

Although we're going to create the application from scratch, don't forget that you can also grab a copy of the code from the repository which accompanies this article.

Create a new directory for the project. You don't have to call it ginit, of course.

mkdir ginit
cd ginit

Create a new package.json file:

npm init

Follow the simple wizard, for example:

name: (ginit)
version: (1.0.0)
description: "git init" on steroids
entry point: (index.js)
test command:
git repository:
keywords: Git CLI
author: [YOUR NAME]
license: (ISC)

Now install the depenencies:

npm install chalk clear clui figlet inquirer minimist preferences github lodash simple-git touch --save

Alternatively, simply copy-and-paste the following package.json file—modifying the author appropriately—or grab it from the repository which accompanies this article:

{
  "name": "ginit",
  "version": "1.0.0",
  "description": "\"git init\" on steroids",
  "main": "index.js",
  "keywords": [
    "Git",
    "CLI"
  ],
  "author": "Lukas White <hello@lukaswhite.com>",
  "license": "ISC",
  "dependencies": {
    "chalk": "^1.1.3",
    "clear": "0.0.1",
    "clui": "^0.3.1",
    "figlet": "^1.1.2",
    "github": "^2.1.0",
    "inquirer": "^1.1.0",
    "lodash": "^4.13.1",
    "minimist": "^1.2.0",
    "preferences": "^0.2.1",
    "simple-git": "^1.40.0",
    "touch": "^1.0.0"
  }
}

Now create an index.js file in the same folder and require all of the dependencies:

var chalk       = require('chalk');
var clear       = require('clear');
var CLI         = require('clui');
var figlet      = require('figlet');
var inquirer    = require('inquirer');
var Preferences = require('preferences');
var Spinner     = CLI.Spinner;
var GitHubApi   = require('github');
var _           = require('lodash');
var git         = require('simple-git')();
var touch       = require('touch');
var fs          = require('fs');

Note that the simple-git package exports a function which needs to be called.

Adding Some Helper Methods

In the course of the application, we'll need to do the following:

  • Get the current directory (to get a default repo name)
  • Check whether a directory exists (to determine whether the current folder is already a Git repository by looking for a folder named .git).

This sounds straight forward, but there are a couple of gotchyas to take into consideration.

Continue reading %Build a JavaScript Command Line Interface (CLI) with Node.js%



from SitePoint http://ift.tt/29XBjSI
via https://ifttt.com/ IFTTT

A Lesson on ES2015 with Darin Haener – Live!

ECMAScript, ES6, ES2015 — you may have heard these terms in JavaScript communities around the world. Why wouldn’t you, they’re regarded as the future of JavaScript! With that in mind, a couple of months ago we had released Diving into ES2015, a course which covered the essentials in this must know JavaScript language. This week we'll run through the course with teacher Darin Haener in our Live Lesson!

Continue reading %A Lesson on ES2015 with Darin Haener – Live!%



from SitePoint http://ift.tt/29XlKdO
via https://ifttt.com/ IFTTT

Use React Native to a Create a Face Recognition App

In this tutorial I'll use the Microsoft Face API to create a face recognition app with React Native. I'm going to assume that you've already built a React Native app so won't cover all parts of the code. If you're new to React Native, I recommend you read my previous tutorial on "Build an Android App with React Native". You can find the full source code for the app for this tutorial on Github.

Continue reading %Use React Native to a Create a Face Recognition App%



from SitePoint http://ift.tt/2aun71y
via https://ifttt.com/ IFTTT

4 Ways Uber Wins UX by Killing Friction

Uber_NY_request-screenshot

Whether you're turning up the volume on your car stereo, or swiping right on Tinder, user interfaces are limited to control panels, touchscreens, and displays.

User experience is not.

Smartphones have expanded the jurisdiction of UX. Now on-demand services are stretching the scope of user experience beyond the confines of your pocket-sized touchscreen.

Uber, Instacart, DoorDash - the list of services that leverage GPS tracking and cashless transactions is growing. As a result, it's changing our day-to-day experience as people, not just users.

What Did Uber Accomplish?

Public transportation (often) sucks. You have to wait for a scheduled service, you have to pay with cash, and there's never anywhere to sit.

Traditional taxis aren't much better. You still have to wait, you often have to pay with cash, and you're charged a premium for the luxury of riding by yourself.

Uber improved upon traditional taxis by identifying and resolving friction in the rider's user experience. Now they're attempting to compete with public transportation through UberPOOL - a ride-sharing service.

Uber have had their well-documented issues but their heady global expansion tells you they've done something right.

What real-world UX problems did Uber solve to get here?

Problem #1: Wait time

Whether booking a cab the night before a big trip or sneaking out before dessert to call a cab company, the wait between requesting a ride and receiving a ride has always been a pain point.

Even standing out in the middle of the street, scanning the oncoming traffic stream for an empty cab can be a soul-destroying waste of time.

Uber used good tech to attack that challenge. Thanks to smartphones, equipped with GPS, on-demand ride-sharing services can use software to pair riders and drivers.

This pairing can be instantaneous, but not always. Uber's efficiency is a testament to how the company regulates its marketplace, not the UX of its mobile app.

Surge pricing announcement

Uber famously raises their prices during peak times - surge pricing - to help offset demand. Riders don't like surge pricing, but the feature ensures there are enough available rides by both decreasing demand and drawing off-duty drivers back onto the road.

There's no doubt that surge pricing has been a difficult PR challenge for Uber. Certainly, some users have fallen victim to surge pricing in the past, so Uber will soon display the approximate fare before you agree to ride, whether surge pricing is active or not.

A highly data-driven system allows Uber to tackle the issue of high demand by analyzing the proximity of one route to another and attempting to pair riders. This carpooling feature (UberPOOL) lowers rider costs, increases network capacity (which reduces wait time), and even provides a social solution for daily commutes.

Set Pickup Location

Problem #2: Contact

Motumbo confused - Zoolander -2001

Placing an order over the phone can be rough because vital information (i.e. credit card numbers, addresses, times, dates, etc.) have to be communicated and reviewed.

Whenever I have to book a dentist appointment or anything else that is scheduled the old-fashioned way, there's always this moment of "Umm.. I guess we're good" that I hate. Did I hear the time right? Did they write the time down right? Could there have been a miscommunication?

All vital details are stored and easy to update and share in the Uber app. Of course, this trait is shared by all app-based services, but the pain point is eliminated all the same.

Problem #3: Directions

Directions used to be a huge pain. Cab drivers are human and they can miss exits if you don't provide careful instructions and pay close attention.

With ride-sharing, GPS takes you where you need to go. Type in an address and the driver has directions.

Also, when you share a ride with a friend and you have different destinations, directing the driver can become the primary focus of your ride. Uber overcomes this problem by sending the destination to the driver and allowing riders to submit subsequent destinations as needed.

Uber payment function

Continue reading %4 Ways Uber Wins UX by Killing Friction%



from SitePoint http://ift.tt/2abkfUy
via https://ifttt.com/ IFTTT

Monday, 25 July 2016

How Did You Get Started? A Look at the Best & Worst Web Design Tools

Recently, I got a blast from the past when I read that Adobe's Dreamweaver is making a comeback. I was a regular Dreamweaver user in my time, but since moving on (when I made the switch to Linux) I had more or less forgotten about its existence. This made me curious as to which other web authoring tools I have used throughout my career, so I decided to take a look.

A quick rummage in my bookshelf produced this gem — Frontpage 2000 Made Simple. Frontpage (now discontinued) was an editor by Microsoft and the tool I used to create my first ever web page. Its WYSIWYG approach made it appealing to novices (and in those days, most people were novices), as did its tight integration with Microsoft's range of Office products. Unfortunately, it produced very messy and invalid code, with pages tending to be optimized for Internet Explorer. As soon as I realized that I was serious about web development, I knew it was time to move on.

Continue reading %How Did You Get Started? A Look at the Best & Worst Web Design Tools%



from SitePoint http://ift.tt/2aejbDV
via https://ifttt.com/ IFTTT

Can We Have Static Types in PHP without PHP 7 or HHVM?

Now that PHP 7 has been out for a while with interesting features like error handling, null coalescing operator, scalar type declarations, etc., we often hear the people still stuck with PHP 5 saying it has a weak typing system, and that things quickly become unpredictable.

Vector illustration of programmer's desktop

[author_more]

Even though this is partially true, PHP allows you to keep control of your application when you know what you're doing. Let's see some code examples to illustrate this:

function plusone($a)
{
    return $a + 1;
}

var_dump(plusone(1));
var_dump(plusone("1"));
var_dump(plusone("1 apple"));

// output

int(2)
int(2)
int(2)

Our function will increment the number passed as an argument by one. However, the second and third calls are passing a string, and the function still returns integer values. This is called string conversion. We can make sure that the user passes a numeric value through validation.

function plusone($a)
{
    if ( !is_numeric($a) )
    {
        throw new InvalidArgumentException("I can only increment numbers!", 1);
    }

    return $a + 1;
}

This will throw an InvalidArgumentException on the third call as expected. If we specify the desired type on the function prototype...

function plusone(int $a)
{
    return $a + 1;
}

var_dump(plusone(1));
var_dump(plusone("1"));
var_dump(plusone("1 apple"));

// output

PHP Catchable fatal error:  Argument 1 passed to plusone() must be an instance of int, integer given, called in /vagrant/test_at/test.php on line 7 and defined in /vagrant/test_at/test.php on line 2

This error seems a bit weird at first, because the first call to our function is using an integer!

If we read the message carefully, we'll see that the error message says "must be an instance of int" - it assumes that integer is a class, because PHP prior to version 7 only supported type hinting of classes!

Things get even more awkward with function return arguments in PHP 5. In short, we can't lock in their types automatically and we should check the expected value after the function call returns a value.

Augmented Types

Prior to the release of PHP 7, the team at Box came up with a nice idea to solve the typing safety problem on their PHP 5 application. After using assertions, type hints, etc., they decided to work on a cleaner solution for this problem.

We've seen how Facebook pushed PHP a little bit forward by launching HHVM and Hack, but the team at Box didn't want to fork the PHP source code or modify anything in the core. Their solution was to create a separate extension called augmented types to parse the method's phpDoc and assert types on runtime.

Continue reading %Can We Have Static Types in PHP without PHP 7 or HHVM?%



from SitePoint http://ift.tt/2a69nNE
via https://ifttt.com/ IFTTT

Gemfile Mining: A Dive into Bundler’s Gemfile

Bundler is fantastic, which is why it has become the de facto package and dependency manager for Ruby applications. I have used npm and golang vendoring and other language dependency managers, but none of them can even hold a candle to the simplicity Bundler offers. As I am sure you know, at the root of […]

Continue reading %Gemfile Mining: A Dive into Bundler’s Gemfile%



from SitePoint http://ift.tt/2aoyE5C
via https://ifttt.com/ IFTTT

Saturday, 23 July 2016

What Is Digital Marketing?

Cover

This post originally appeared on Single Grain, a growth marketing agency focused on scaling customer acquisition.

“Digital marketing” is a relatively new term that has rapidly come into prominence over the last decade, and as Ron Burgundy might say… “It’s kind of a big deal.”

To provide the simplest definition, digital marketing is an umbrella term for the marketing of products or services using digital technologies.

Online marketing is by far the most important segment of digital marketing. As traditional channels like TV and radio become less and less valuable, online marketing continues to take up bigger and bigger segments of companies’ marketing budgets, with millions of businesses marketing exclusively via the Internet.

Consider this post an introduction to digital marketing—Digital Marketing 101, if you will—which breaks down the most common channels and gives you a comprehensive framework for understanding this ever-evolving industry.

What Is the Purpose of Digital Marketing?

Like any form of marketing, the purpose of digital marketing is to promote and sell a product or service. More specifically, the purpose of digital marketing is to connect a business or organization with its target audience via digital channels.

There are currently over 3.3 billion Internet users worldwide, with this number increasing every day. Technological device ownership continues to increase as well, with 92% of U.S. adults owning at least a cellphone.

What Is Digital Marketing(1)

The goal of digital marketing is to utilize these numerous devices, often via the Internet, to connect segments of users with relevant businesses. Marketers will use a variety of methods to target and reach out to users in order to grab their attention and begin the process of selling to them.

And thanks to the increased use of these digital devices, businesses around the globe are increasingly making digital marketing their primary focus:

  • 71% of companies plan to increase their digital marketing budgets this year (Source: Webbiquity)
  • On average, 60% of a marketer’s time is devoted to digital marketing activities, fueling demand for digital marketing skills (Source: Smart Insights and Ecommerce Expo)
  • One third of businesses are planning to introduce a Digital Transformation program and one third already have (Source: Smart Insights and TFM&A)
  • Digital content creation and management now claim the second-largest share of digital marketing budgets (Source: KaPost)
  • 28% of marketers have reduced their traditional advertising budget to fund more digital marketing (Source: CMO Council)
  • 73% of B2B marketers use video as a content marketing tactic, and 7% of marketers plan on increasing their YouTube marketing (Source: Content Marketing Institute)

One of the things that separates digital from traditional marketing is the capabilities of modern technology. Digital marketers are focused primarily on targeted, measurable activities. They want to zero-in on the “right” audience and measure the results of their efforts. In the past, targeting looked like taking out a regional TV ad or running an ad in a niche magazine, but today’s technology allows for a much more refined, measurable approach.

For example, a digital marketer today can run a Facebook advertisement targeting only 20-year-olds interested in the band Coldplay. They can see every view, like, comment, and click and then use a tracking pixel to see exactly what people do after they click on the ad. This data can then be used to create ads that perform better.

The Digital Conversion Funnel

In order for us to dig into the various digital marketing channels themselves, we first need to understand the overall process in which they fit.

Digital marketing is typically built around acquiring and funneling users through a “sales” or “conversion” process often referred to as a “funnel.” The basic Digital Conversion Funnel looks like this:

What Is Digital Marketing(2)

At its most basic, this process is a simple progression from acquisition to conversion to retention. This model is fairly universal and can be applied to virtually any business. Leads are acquired, converted to customers, and then retained for additional transactions.

As we get more detailed, we begin to exclude certain business models, but for the sake of reference, the most common digital conversion funnel currently in use looks something like this, taken from Digital Marketer’s guide to CVO:

What Is Digital Marketing(3)

Unlike traditional marketing which is focused primarily on new customer acquisition, digital marketing is highly active throughout the entire conversion process. Once you’ve acquired new leads, you must continue to market to them in order to convert them into a customers and upsell them on additional products.

Acquisition: Common Channels For Acquiring Traffic

What Is Digital Marketing(3b)

Since businesses can’t take people through their full sales process on Facebook, Google, etc., the first step for most digital marketers is getting people to visit their website. This is called acquiring “traffic,” and it’s the first step of the conversion funnel we mentioned earlier.

There are currently 7 primary channels used to acquire traffic:

  1. Search Engine Optimization
  2. Paid Advertising
  3. Social Media Marketing
  4. E-mail Marketing
  5. Content Marketing
  6. Influencer Marketing

These channels offer businesses a scalable way to acquire and increase traffic over an indefinite period of time. Furthermore, they have become so prominent that it would be fairly easy to find a full-time job specific to any one of these categories.

Let’s take a closer look at each channel.

1. Search Engine Optimization (SEO)

Search Engine Optimization (SEO) is the process of maximizing the number of visitors to a particular website by ensuring that the site appears high on the search engine results pages (SERPs).

For example, if you wanted to make a rock climbing website appear first on the SERPs when someone searches for “rock climbing gear,” the techniques and processes you use to attempt that would be called SEO.

Search engines work by using software applications called “crawler bots” to systematically browse the web and send back information on the millions of browsed pages. This data is then indexed via the search engine’s algorithm in order to provide relevant results when a user searches for a given keyphrase.

When Google launched in 1998, its PageRank system provided a new level of relevancy for keyphrase search results, and by 2000 it had become THE search engine to use, a position it maintains to this day:

What Is Digital Marketing(4)

SEO was one of the first dedicated marketing channels to revolutionize how businesses approached online marketing. Some consider it to be THE first meaningful online marketing channel.

While SEO has changed drastically within the last 10 years, modern practices can be broken down into two significant sections:

  1. On-Page SEO
  2. Off-Page SEO

On-page SEO is the practice of optimizing individual web pages in order to rank higher and earn more relevant traffic in search engines. On-page refers to both the content and HTML source code of a page that can be optimized.

In other words, on-page SEO covers everything you can do on your own website to improve search engine visibility.

Common on-page SEO techniques include:

  1. SEO-friendly permalink URLs
  2. Keyphrase optimized meta tags
  3. Multiple media types targeting same keyphrase
  4. Authoritative outbound links
  5. Improving site loading speed
  6. Internal cross-linking
  7. Lengthy, in-depth content

These techniques tune a website’s content and framework to help provide crawler bots with the correct information.

What Is Digital Marketing(4b)

(Source:Backlinko)

To learn more about on-page SEO, check out these guides:

Off-page SEO is the practice of optimizing a website’s search engine visibility through off-site backlinks and other external signals. Branding and overall web presence play a role in this equation, but by far the biggest component of off-page SEO is generating backlinks.

Part of what made Google’s PageRank so revolutionary was the inclusion of external factors, namely backlinks, into the ranking algorithm. Google’s founders hypothesized that if tons of other websites were linking to a page (called a backlink), it must be a valuable resource and one that search engines users would want to find as well.

In the early days, SEO practitioners would game the system by creating thousands of websites for the sole purpose of sending backlinks to the website they wanted to optimize. As Google’s algorithm has evolved, however, the vast majority of these practices have been rendered ineffective, and now backlinks from legitimate, authoritative sites are needed in order to improve search rankings.

Effective strategies for grabbing more backlinks, also called " link building ," include:

  1. Writing guest posts
  2. Creating shareable infographics
  3. Get included in resource lists and directories
  4. Write and promote case studies
  5. Sponsor sites that will link to sponsors
  6. Buy listings with trust mark brands like BBB or Truste
  7. Offer your website to replace dead links

What Is Digital Marketing(5)

These techniques (and many others) will increase the number of sites linking to your site, which will improve your site’s prominence in relevant search results.

For additional resources on link building, click on the links below:

2. Paid Advertising & Acquisition

Paid acquisition is any form of advertising or traffic acquisition in which a business pays directly for incoming traffic.

The most common pricing models for paid acquisition include:

  • Cost Per Impression (CPM)
  • Cost Per Click (CPC)
  • Cost Per Lead (CPL)

With Cost Per Impression (CPM), advertisers pay for ad views, typically in units of 1,000 views, which is where the CPM acronym comes from. CPM stands for “cost per mille” (“mille” is Latin for “thousand”).

CPM was traditionally the preferred strategy for getting maximum views at a low cost. However, with the rise of bot traffic (nearly 60% of all web traffic now comes from bots) and the arrival of better performing channels, CPM has fallen out of favor in the digital marketing world.

Today, CPM is typically only used in conjunction with other models. It offers a low-cost way to increase brand awareness, and can yield minor results if targeted at the right audiences.

With Cost Per Click (CPC), advertisers pay every time their ad is actually clicked on by a viewer. CPC, more commonly referred to as “pay per click (PPC)”, allows for direct ROI tracking, making it the most popular pricing model currently used in online marketing.

CPC is often used in conjunction with a search engine, where ads can be displayed to users searching for a specific keyphrase. For example, a business could use AdWords to place a “Purchase Rock Climbing Gear” ad in Google’s search results anytime someone searches for “rock climbing gear.”

What Is Digital Marketing(6)

While a business’ SEO efforts might not be enough to get them on Google’s front page, they could guarantee a front page spot via AdWords if they are willing to pay enough per click. Adwords and other PPC platforms are typically run on a bidding system, where advertisers select a bidding range and the platform dynamically selects ads to display based on a combination of factors including bid price and page relevance.

More recently, CPC ads on social networks like Facebook, Twitter, and LinkedIn have begun to gain traction as well, and some have even become the preferred advertising option for certain industries.

To learn more about CPC/PPC, check out the guides below:

Cost Per Lead (CPL) typically refers to how much it costs a business to generate or acquire a lead. CPL tends to be used more as a metric for other strategies like PPC, but it can also apply to paid lead acquisition, which is what we are talking about in this section.

Paying directly for leads tends to only makes sense in industries where customers spend high amounts per transaction or session.

Industry examples include:

  • Insurance
  • Travel
  • Gambling
  • Debt Consolidation
  • Financing

For most businesses, it makes more sense to simply target traffic and set up their own lead capture system to convert traffic into leads and then customers.

3. Social Media Marketing

Social media marketing is the process of acquiring attention and website traffic through social media platforms. With the consistently increasing popularity of social media, social media marketing has become one of the quickest ways for new businesses to generate traffic without any monetary expense.

Continue reading %What Is Digital Marketing?%



from SitePoint http://ift.tt/2aCFIHK
via https://ifttt.com/ IFTTT

Friday, 22 July 2016

Developing Push Notifications for iOS 10

Whilst they are often overused, notifications are an effective way to get a users attention and inform them of updates or actions they need to take. iOS 10 brings updates to notifications such as new messages, offers, and timetable changes. In this tutorial I will show you how to use notifications in your iOS apps and show the new features that iOS 10 introduces. To develop push notifications for iOS 10 you will need the latest version of Xcode available, Xcode 8 beta, which is available on the download page.

Continue reading %Developing Push Notifications for iOS 10%



from SitePoint http://ift.tt/29Ttvgu
via https://ifttt.com/ IFTTT

Thursday, 21 July 2016

10 Reasons Perfectionism Could Be Hurting You (& What to Do About It)

Perfectionism

Perfection. How romantic.

As a society we celebrate perfectionists and their behaviors.

[author_more]

Steve Jobs, Leonardo Da Vinci, James Cameron, and Serena Williams are just a few of the perfectionists we’ve celebrated for their commitment to excellence and their never-ending pursuit of the absolute best.

As an entrepreneur or businessperson, you might look up to one or more of these people. You might even model your own behaviors on them.

You’re of the belief that a perfectionist mindset is going to help you reach your goals. Help you succeed. You’re proud to call yourself a perfectionist. Just like your heroes.

In a society that celebrates and romanticizes perfection, sometimes it’s hard to see its downside. If you’ve never considered perfectionism a double-edged sword, don’t worry — that’s completely natural.

Perfection Can Get Extreme

In a lot of cases, a bit of perfectionism can give us the extra push to achieve that little bit more.

But in a many more cases where perfectionism is taken to the extreme, it can be a powerfully corrosive force.

Let’s go back to some of our most lauded heroes.

Steve Jobs obsessed over the details of his products so much his engineers became utterly miserable and the board of his own company fired him.

James Cameron pushed his crew so hard while shooting The Abyss they took to calling the filming experience The Abuse. People resented him and hated working for him even more.

Serena Williams has called herself insatiable and Leonardo Da Vinci actually thought he’d “offended God and mankind because my work didn’t reach the quality it should have”.

Steve Jobs and James Cameron turned everyone against them. Serena Williams and Leonardo Da Vinci, from their own quotes, just sound unhappy.

If you take the time to think about it, an extreme perfectionist attitude towards work and life isn’t exactly healthy.

Perfection — Just an Ideal

Ask any rational person on the planet whether or not perfection exists and it’s likely they’ll tell you it’s just an ideal — an impossibility only existent in a person’s imagination.

What we need to remember is that perfectionists of the most extreme order don’t acknowledge this. They’ll talk about perfection as if it’s an impossibility but chase it anyway.

After all, we celebrate it so often.

So now you’re not exactly sure if you’re a healthy perfectionist or an extreme one. And now you’re starting to worry whether your perfectionism could be hurting you.

The Crunch — Perfectionism Hurts

We’ve come to the crunch. Here are 10 ways to identify how perfectionism could be hurting you.

  • Your perfectionism crushes your ideas.

You sit down to brainstorm a new product or business idea. You sit there for hours generating idea after idea but they all feel wrong. In fact, you feel downright bad. After half a day you’ve come up with nothing but frustration with yourself. You feel like a failure.

  • Your perfectionism destroys your productivity.

You have a bunch of tasks to complete. You commit yourself to completing those tasks. You start knuckling down and you get some stuff done. You momentarily feel good about it. Then doubt sets in so you go back and do them all over again. And again. And again. At the end of the day, you haven’t achieved much.

  • Your perfectionism makes you procrastinate.

Again, you have a bunch of tasks. But unlike the last scenario, you don’t even sit down to do them. You go and make a cup of coffee. You drink it, slowly. You eat a donut. Then you do the laundry. Clean the dishes. Go for a jog. You do anything but the actual work. At the end of the day, nothing is done and you’re still waiting for the stars to align for the perfect circumstances in which to do the work.

  • Your perfectionism makes you feel like a fool even over the smallest mistakes.

You’ve spent days, weeks or even months completing your work. You start analyzing the work more closely. You find some minor mistakes. You tell yourself mistakes are unforgivable. You ask yourself why you can’t catch your own mistakes and give yourself a hard time for it.

  • Your perfectionism eats up the time you have for your loved ones.

You’re redoing the few tasks you’ve already done a hundred times. You need another idea even though you have fifty good ones. You tell yourself it’s still not good enough. Perfection demands more. In the meantime, your family and your friends wonder where you are and why you’re always working.

  • Your perfectionism makes you unhappy.

You take little pleasure in your work and you take little pleasure in life. Everywhere you go you see problems and mistakes. Errors in yourself and the work you do. In the work others do for you. In the world. You want to fix everything but it’s a fact of life that you can’t. And it makes you miserable.

  • Your perfectionism makes you unhappy even about your successes.

Your pitch is accepted. You win new business. Your venture is receiving some serious cashflow now. But nope — still not good enough. Perfection demands that you go out and get more business. That more pitches are accepted and you get even more cash flowing. The thirst cannot be quenched.

  • Your perfectionism exhausts you.

You’ve spent months and months (or even years) working eighteen hour days. Your body is starting to say no. You get sick often but you won’t take any rest because you’re in pursuit of the impossible. Perfectionism is the little devil on your shoulder, whispering into your ear that you need to do more even when you’re about to collapse.

  • Your perfectionism makes you feel like everything is impossible.

You try hard. You really do. But every little thing you do makes you feel further away from your final goal. You just can’t reach the bar. It’s way too high.

  • Your perfectionism will make you give up.

In the end, you don’t enjoy anything. You now hate the work you used to love doing. The colleagues that used to have fun working with you don’t even show up. You blame it all on yourself. You ruminate over the value of what you do, the effect it has had on your life and the life of others and you decide none of it is worth it. You give up.

The Struggle is Real — What Do I Do?

Some of you may think the aforementioned behaviors are just downright crazy. And if you do think it’s nuts, it’s likely you don’t struggle with extreme perfectionism. Phew!

But some of you entrepreneurs and businesspeople may have read through the bullet points and now identify yourself as bona fide perfectionists. The romance is gone and you’re seeing it clearly for the corrosive force it actually is.

You’re tired, you’re anxious and even though you put on a brave face when you enter those meeting rooms you feel like you’re an inch off the floor. It’s a little bit depressing.

Don’t get too depressed, though. There are solutions!

Continue reading %10 Reasons Perfectionism Could Be Hurting You (& What to Do About It)%



from SitePoint http://ift.tt/2abBl7B
via https://ifttt.com/ IFTTT

Wednesday, 20 July 2016

Python on the Web: Why Frameworks Like Django Are Hot

Created in the early 1990s by Guido van Rossom, Python has grown in popularity over the years. In 2016, Python is the 4th most popular language after Java, C and C++. Python is a general purpose programming language, and it can be used in a variety of fields. To quote Kenneth Love from Treehouse ---

When I need to build a web app, I reach for Python. When I need to automate some small task on my system, I reach for Python. When I want to find the most common colors in an image, I reach for Python.

Python is a popular choice for writing scripts for testing and monitoring. Python has also been used for game development, and its ability to be integrated with other languages makes it very valuable in the process. Such is the popularity of Python that it's also been used by George Lucas' Industrial Light and Magic (responsible for special effects in the original Star Wars trilogy) to manage its complex production process.

Unlike PHP, it wasn't built for the web in mind, and there are no core web functionalities that are integrated into Python. Hence, we must use a web framework to develop web applications in Python. Web developers have started using it for the web since the rise of popular frameworks like Django.

What makes Python the go-to language for an increasing number of developers when it comes to web development these days? We'll try to find an answer to this question in this post.

Why use Python?

Python for beginners

The primary reason for the popularity of Python is the elegance of the code --- the brevity and readability in particular. For instance, let us look at how Python and Java stack up against each other in terms of reversing a number:

Java vs Python

Programs to reverse a number in Java (left) and Python 2.7.x (right)

Python provides a short learning curve, making it ideal for beginners to learn. In addition to that, if your project is Python-based and new developers aren't familiar with it, the transition is easier.

As Quora co-founder Adam D'Angelo says on the choice of Python for Quora's development ---

So far, we've been pretty happy with the choice … all of the early employees who'd been working with other languages in the past were happy to transition to Python, especially those coming from PHP.

In fact, the webcomic xkcd came up with a cartoon on how easy it is to get things done in Python!

Python webcomic by xkcd. Source: xkcd.com

Further, Python has easy to use debugging tools. Although there are several debuggers and IDE tools, the default one is pdb, an interactive debugging tool which allows a developer to stop the execution of a program midway and assess the environment to better understand run time errors.

Python on a remote server

The management of packages (or modules as they are called) in Python is very easy too. Use a package installer like pip or easy_install and it can be used to install and remove packages.

Python is very portable too! The ease of transferring your development environment to a remote machine is commendable. You just need to export the packages, and install it in a virtual environment on the remote machine with just two commands.

One more reason why Python is a good choice for web applications is the ability of running scripts which are not embedded to the web server (unlike running a PHP script.) Scripts are run as separate processes.

Continue reading %Python on the Web: Why Frameworks Like Django Are Hot%



from SitePoint http://ift.tt/29WqAGD
via https://ifttt.com/ IFTTT

An Alternative to Regular Expressions: agp-exp

Hardly any programmer escapes the need to use regular expressions in one form or another from time to time. For many, the pattern syntax can seem cryptic and forbidding. This tutorial will introduce a new pattern-matching engine, apg-exp—a feature-rich alternative to RegExp with an ABNF pattern syntax that is a little easier on the eyes.

A Quick Comparison

Have you ever needed to verify an email address and come across something like this?

^[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-Z0-9-]+\.)+[A-Z]{2,6}$

A pattern-matching engine is the right tool for the job. This is a well-designed, well-written regular expression. It works great. So what's not to like?

Well, if you are an expert with regular expressions, nothing at all. But for the rest of us, they may be

  • Hard to read
  • Even harder to write
  • Hard to maintain

The regular expression syntax has a long, time-honored history and is deeply integrated into many of the tools and languages that we, as programmers, use every day.

There is, however, an alternative syntax that has been around almost as long, is very popular with writers and users of Internet technical specifications, has all the power of regular expressions but is seldom used in the world of JavaScript programming. Namely, the Augmented Backus-Naur Form, or ABNF, formally defined by the IETF in RFC 5234 and RFC 7405.

Let's see what that same email address might look like in ABNF.

email-address   = local "@" domain
local           = local-word *("." local-word)
domain          = 1*(sub-domain ".") top-domain
local-word      = 1*local-char
sub-domain      = 1*sub-domain-char
top-domain      = 2*6top-domain-char
local-char      = alpha / num / special
sub-domain-char = alpha / num / "-"
top-domain-char = alpha
alpha           = %d65-90 / %d97-122
num             = %d48-57
special         = %d33 / %d35 / %d36-39 / %d42-43 / %d45 / %d47 
                / %d61 / %d63 / %d94-96 / %d123-126

Not as compact, for sure, but like HTML and XML it is designed to be read by humans as well as machines. I'm guessing that with nothing more than a passing knowledge of wild card search patterns, you can just about read what is going on here in "plain English".

  • the email address is defined as a local part and a domain separated by @
  • the local part is one word followed by optional dot-separated words
  • the domain is one or more dot-separated sub-domains followed by a single top domain
  • the only things you might not know here, but can probably guess, are:
    • just as the wild card character * means "zero or more", 1* means "one or more" and 2*6 means min 2 and max 6 repetitions
    • / separates alternate choices
    • %d defines decimal character codes and character code ranges
    • for example, %d35 represents #, ASCII decimal 35
    • %d65-90 represents any character in the range A-Z, ASCII decimals 65-90

RegExp and apg-exp are compared for this email address in example 1.

apg-exp is a pattern-matching engine designed to have the look and feel of RegExp but to use the ABNF syntax for pattern definitions. In the next few sections I'll walk you through:

  • How to get apg-exp into your app
  • A short guide to the ABNF syntax
  • Working with apg-exp—a few examples
  • Where to go next—more details, advanced examples

Up and Running—How to Get It

npm

If you are working in a Node.js environment, from your project directory run:

npm install apg-exp --save

You can then access it in your code with require().

For example:

var ApgExp = require("apg-exp");
var exp = new ApgExp(pattern, flags);
var result = exp.exec(stringToMatch);

GitHub

To get a copy of the code from GitHub, you can clone the repository to your project directory:

git clone http://ift.tt/2av5CgH apg-exp

or download it as a zip file.

Then in page.html:

<!-- optional stylesheet used in tutorial examples -->
<link rel="stylesheet" href="./apg-exp/apgexp.css">
<script src="./apg-exp/apgexp-min.js"></script>

<script>
  var useApgExp = function(){
      var exp = new ApgExp(pattern, flags); 
      var result = exp.exec(stringToMatch);
      /* do something with the result */
  }
</script>

CDN

You can also create a CDN version directly from the GitHub source using RawGit. However, be sure to read the no uptime or support guarantees (In fact, be sure to read the entire FAQ).

The following are used in all of the examples in this tutorial.

<link rel="stylesheet"
 href="http://ift.tt/2av6bXO">
<script
 src="http://ift.tt/29WalZT"
 charset="utf-8"></script>

These files are cached on the MaxCDN servers and you are free to use them for testing as long as they remain available. However, for production, you should place copies of apgexp-min.js and apgexp.css on your own servers for guaranteed access
and include them in your pages as best suited to your application.

A Short Guide to ABNF

ABNF is a syntax to describe phrases, a phrase being any string. As you saw in the email example above, it allows you to break down complex phrases into a collection of simpler phrases. A phrase definition has the form:

name = elements LF

where LF is a line feed (newline \n) character.

The table below is a short guide to the elements (see SABNF for the full guide).

Continue reading %An Alternative to Regular Expressions: agp-exp%



from SitePoint http://ift.tt/2ahiRFc
via https://ifttt.com/ IFTTT

20+ Docs and Guides for Front-end Developers (No. 9)

It’s that time again to get learning! As before, I’ve collected a number of different learning resources, including guides, docs, and other useful websites to help you get up to speed in different areas of front-end development.

So please enjoy the ninth installment of our Docs and Guides series and don’t forget to let me know in the comments of any others that I haven’t yet included.

1. JavaScript Standard Style

This is not primarily a learning guide, but a module that you can install and run via the command line to test your code against a set of rules for JavaScript syntax. It’s also available as a text editor plugin. As a guide, however, you can read the rules breakdown, which should be a good way for beginners and others to get a sense of some general JavaScript best practices.

JavaScript Standard Style

2. Webpack: An Introduction

“Webpack is a popular module bundler, a tool for bundling application source code in convenient chunks and for loading that code from a server into a browser.” This guide is on the official Angular website, so the guide is geared towards using Webpack with Angular 2 apps.

Webpack: An Introduction

3. Aural UI of the Elements of HTML

“How HTML elements are supported by screen readers.” Consists of four tables of data covering JAWS on Firefox on Windows 10, VoiceOver and Safari 9 on OSX, and NVDA and Firefox on Windows 8.1, with more tests to come.

Aural UI of the Elements of HTML

4. Type Terms

This is more for designers than developers, but it’s a really nicely designed and useful interactive tool for those who want to become more familiar with typography terminology. Made by the folks at Supremo, a Manchester-based design agency.

Type Terms

5. Email Toolbox

This is an extensive resource of links focused primarily on designing and coding HTML email. Lots of stuff under various categories including people to follow, courses, blogs to read, tools, and email service providers.

Email Toolbox

6. Almost complete guide to flexbox (without flexbox)

There are so many different flexbox guides and tools floating around, but here’s something a little different. This guide shows you how to achieve flexbox-like effects in your layouts using the traditional methods. Nice to see them all in one post like this, with code examples.

Almost complete guide to flexbox (without flexbox)

7. Angular 1.x styleguide (ES2015)

This is an “Angular styleguide for teams” by Todd Motto, a Developer Advocate with Telerik. Todd also offers courses on AngularJS development. This styleguide “has been rewritten from the ground up for ES2015, the changes in Angular 1.5+ for future-upgrading your application to Angular 2.”

Angular 1.x styleguide (ES2015)

Continue reading %20+ Docs and Guides for Front-end Developers (No. 9)%



from SitePoint http://ift.tt/2acEm74
via https://ifttt.com/ IFTTT