Gatti's Jingle Campaign Microsite Launches

Pixeldust and Nice Monster launched a microsite for Gatti's web-based jingle contest. Gatti's, a rapidly-expanding, long-time Texas pizza chain, is looking to update their current jingle with a public music contest. Pixeldust and Nice Monster built the web application for users and musicians to upload their music and videos for the contest. Submissions will be judged by regular users and a panel of Gatti's judges. The winning jingle will receive a cash prize of $10,000 and media exposure, and be featured in Gatti's end-of-contest concert. Read more


Pulling the plug on Facebook

© Andrei Lacatusu Exactly one year ago, I decided to use social media less and blog more. I uninstalled the Facebook application from my phone, but kept my Facebook account for the time being.

The result is that I went from checking Facebook several times a day to once or twice a month.

Facebook can't be trusted

At the time I uninstalled the Facebook application from my phone, Mark Zuckerberg promised that he would fix Facebook. He didn't.

The remainder of 2018 was filled with Facebook scandals, including continued mishandling of personal data and privacy breaches, more misinformation, and a multitude of shady business practices.

Things got worse, not better.

The icing on the cake is that a few weeks ago we learned that Facebook knowingly duped children and their parents out of money, in some cases hundreds or even thousands of dollars, and often refused to give the money back.

And just last week, it was reported that Facebook had been collecting users' data by getting people to install a mobile application that gave Facebook root access to their network traffic.

It's clear that Facebook can't be trusted. And for that reason, I'm out.

I deleted my Facebook account twenty minutes ago.

Social media's dark side

Social media, in general, have been enablers of community, transparency and positive change, but also of abuse, hate speech, bullying, misinformation, government manipulation and more. In just the past year, more and more users have woken up to the dark side of social media. Open Web and privacy advocates, on the other hand, have seen this coming for awhile.

Technological change is a wonderful thing, as it can bring unprecedented improvements to billions around the globe. As a technologist, I believe in the power of the web to improve the world for many, but we also need to make sure that technology disruption is positive for all of us.

Last week, we heard that Facebook intends to further blend Instagram and WhatsApp with Facebook. If I were to guess, they want to make it harder to split up Facebook later (and harder for users to know what is happening with their data). Regulators should be all over this right now.

My social detox

I plan to stay off Facebook indefinitely, unless maybe there is a new CEO and better regulatory oversight.

I already stopped using Twitter to share personal updates and use it almost exclusively for Drupal-related updates. It remains a valuable channel to reach many people, but I wouldn't categorize my use as social anymore.

For now, I'm still on Instagram, but it's hard to ignore that Instagram is owned by Facebook. I will probably uninstall that next.

A call to rejoin the Open Web

Instant gratification and network effects have made social media successful, at the sacrifice of blogs and the Open Web.

I've always been driven by a sense of idealism. I'm optimistic that the movement away from social media is good for the Open Web.

Since I scaled back my use of social media a year ago, I blogged more, re-subscribed to many RSS feeds, and grew increasingly interested in the IndieWeb — all small shifts back to the Open Web's roots.

I plan to continue to work on my POSSE plan, and hope to share more thoughts on this topic in the coming weeks.

I'd love to see thousands more people join or rejoin the Open Web, and help innovate on top of it.
Source: Dries Buytaert www.buytaert.net


JavaScript Scope and Closures

Scopes and closures are important in JavaScript. But, they were confusing for me when I first started. Here's an explanation of scopes and closures to help you understand what they are.

Let's start with scopes.
Scope
A scope in JavaScript defines what variables you have access to. There are two kinds of scope – global scope and local scope.
Global scope
If a variable is declared outside all functions or curly braces ({}), it is said to be defined in the global scope.
This is true only with JavaScript in web browsers. You declare global variables in Node.js differently, but we won't go into Node.js in this article.
const globalVariable = 'some value'
Once you've declared a global variable, you can use that variable anywhere in your code, even in functions.
const hello = 'Hello CSS-Tricks Reader!'

function sayHello () {
console.log(hello)
}

console.log(hello) // 'Hello CSS-Tricks Reader!'
sayHello() // 'Hello CSS-Tricks Reader!'
Although you can declare variables in the global scope, it is advised not to. This is because there is a chance of naming collisions, where two or more variables are named the same. If you declared your variables with const or let, you would receive an error whenever you a name collision happens. This is undesirable.
// Don't do this!
let thing = 'something'
let thing = 'something else' // Error, thing has already been declared
If you declare your variables with var, your second variable overwrites the first one after it is declared. This also undesirable as you make your code hard to debug.
// Don't do this!
var thing = 'something'
var thing = 'something else' // perhaps somewhere totally different in your code
console.log(thing) // 'something else'
So, you should always declare local variables, not global variables.
Local Scope
Variables that are usable only in a specific part of your code are considered to be in a local scope. These variables are also called local variables.
In JavaScript, there are two kinds of local scope: function scope and block scope.
Let's talk about function scopes first.
Function scope
When you declare a variable in a function, you can access this variable only within the function. You can't get this variable once you get out of it.
In the example below, the variable hello is in the sayHello scope:
function sayHello () {
const hello = 'Hello CSS-Tricks Reader!'
console.log(hello)
}

sayHello() // 'Hello CSS-Tricks Reader!'
console.log(hello) // Error, hello is not defined
Block scope
When you declare a variable with const or let within a curly brace ({}), you can access this variable only within that curly brace.
In the example below, you can see that hello is scoped to the curly brace:
{
const hello = 'Hello CSS-Tricks Reader!'
console.log(hello) // 'Hello CSS-Tricks Reader!'
}

console.log(hello) // Error, hello is not defined
The block scope is a subset of a function scope since functions need to be declared with curly braces (unless you're using arrow functions with an implicit return).
Function hoisting and scopes
Functions, when declared with a function declaration, are always hoisted to the top of the current scope. So, these two are equivalent:
// This is the same as the one below
sayHello()
function sayHello () {
console.log('Hello CSS-Tricks Reader!')
}

// This is the same as the code above
function sayHello () {
console.log('Hello CSS-Tricks Reader!')
}
sayHello()
When declared with a function expression, functions are not hoisted to the top of the current scope.
sayHello() // Error, sayHello is not defined
const sayHello = function () {
console.log(aFunction)
}
Because of these two variations, function hoisting can potentially be confusing, and should not be used. Always declare your functions before you use them.
Functions do not have access to each other's scopes
Functions do not have access to each other's scopes when you define them separately, even though one function may be used in another.
In this example below, second does not have access to firstFunctionVariable.
function first () {
const firstFunctionVariable = `I'm part of first`
}

function second () {
first()
console.log(firstFunctionVariable) // Error, firstFunctionVariable is not defined
}
Nested scopes
When a function is defined in another function, the inner function has access to the outer function's variables. This behavior is called lexical scoping.
However, the outer function does not have access to the inner function's variables.
function outerFunction () {
const outer = `I'm the outer function!`

function innerFunction() {
const inner = `I'm the inner function!`
console.log(outer) // I'm the outer function!
}

console.log(inner) // Error, inner is not defined
}
To visualize how scopes work, you can imagine one-way glass. You can see the outside, but people from the outside cannot see you.
Scopes in functions behave like a one-way-glass. You can see the outside, but people outside can't see you
If you have scopes within scopes, visualize multiple layers of one-way glass.
Multiple layers of functions mean multiple layers of one-way glass
After understanding everything about scopes so far, you're well primed to figure out what closures are.
Closures
Whenever you create a function within another function, you have created a closure. The inner function is the closure. This closure is usually returned so you can use the outer function's variables at a later time.
function outerFunction () {
const outer = `I see the outer variable!`

function innerFunction() {
console.log(outer)
}

return innerFunction
}

outerFunction()() // I see the outer variable!
Since the inner function is returned, you can also shorten the code a little by writing a return statement while declaring the function.
function outerFunction () {
const outer = `I see the outer variable!`

return function innerFunction() {
console.log(outer)
}
}

outerFunction()() // I see the outer variable!
Since closures have access to the variables in the outer function, they are usually used for two things:

To control side effects
To create private variables

Controlling side effects with closures
Side effects happen when you do something in aside from returning a value from a function. Many things can be side effects, like an Ajax request, a timeout or even a console.log statement:
function (x) {
console.log('A console.log is a side effect!')
}
When you use closures to control side effects, you're usually concerned with ones that can mess up your code flow like Ajax or timeouts.
Let's go through this with an example to make things clearer.
Let's say you want to make a cake for your friend's birthday. This cake would take a second to make, so you wrote a function that logs made a cake after one second.
I'm using ES6 arrow functions here to make the example shorter, and easier to understand.
function makeCake() {
setTimeout(_ => console.log(`Made a cake`, 1000)
)
}
As you can see, this cake making function has a side effect: a timeout.
Let's further say you want your friend to choose a flavor for the cake. To do so, you can write add a flavor to your makeCake function.
function makeCake(flavor) {
setTimeout(_ => console.log(`Made a ${flavor} cake!`, 1000))
}
When you run the function, notice the cake gets made immediately after one second.
makeCake('banana')
// Made a banana cake!
The problem here is that you don't want to make the cake immediately after knowing the flavor. You want to make it later when the time is right.
To solve this problem, you can write a prepareCake function that stores your flavor. Then, return the makeCake closure within prepareCake.
From this point on, you can call the returned function whenever you want to, and the cake will be made within a second.
function prepareCake (flavor) {
return function () {
setTimeout(_ => console.log(`Made a ${flavor} cake!`, 1000))
}
}

const makeCakeLater = prepareCake('banana')

// And later in your code...
makeCakeLater()
// Made a banana cake!
That's how closures are used to reduce side effects – you create a function that activates the inner closure at your whim.
Private variables with closures
As you know by now, variables created in a function cannot be accessed outside the function. Since they can't be accessed, they are also called private variables.
However, sometimes you need to access such a private variable. You can do so with the help of closures.
function secret (secretCode) {
return {
saySecretCode () {
console.log(secretCode)
}
}
}

const theSecret = secret('CSS Tricks is amazing')
theSecret.saySecretCode()
// 'CSS Tricks is amazing'
saySecretCode in this example above is the only function (a closure) that exposes the secretCode outside the original secret function. As such, it is also called a privileged function.
Debugging scopes with DevTools
Chrome and Firefox's DevTools make it simple for you to debug variables you can access in the current scope. There are two ways to use this functionality.
The first way is to add the debugger keyword in your code. This causes JavaScript execution in browsers to pause so you can debug.
Here's an example with the prepareCake:
function prepareCake (flavor) {
// Adding debugger
debugger
return function () {
setTimeout(_ => console.log(`Made a ${flavor} cake!`, 1000))
}
}

const makeCakeLater = prepareCake('banana')
If you open your DevTools and navigate to the Sources tab in Chrome (or Debugger tab in Firefox), you would see the variables available to you.
Debugging prepareCake's scope
You can also shift the debugger keyword into the closure. Notice how the scope variables changes this time:
function prepareCake (flavor) {
return function () {
// Adding debugger
debugger
setTimeout(_ => console.log(`Made a ${flavor} cake!`, 1000))
}
}

const makeCakeLater = prepareCake('banana')
Debugging the closure scope
The second way to use this debugging functionality is to add a breakpoint to your code directly in the sources (or debugger) tab by clicking on the line number.
Debugging scopes by adding breakpoints
Wrapping up
Scopes and closures aren't incredibly hard to understand. They're pretty simple once you know how to see them through a one-way glass.
When you declare a variable in a function, you can only access it in the function. These variables are said to be scoped to the function.
If you define any inner function within another function, this inner function is called a closure. It retains access to the variables created in the outer function.
Feel free to pop by and ask any questions you have. I'll get back to you as soon as I can.
If you liked this article, you may also like other front-end-related articles I write on my blog and my newsletter. I also have a brand new (and free!) email course: JavaScript Roadmap.

JavaScript Scope and Closures is a post from CSS-Tricks
Source: CssTricks


Our quest to see the Northern Lights

In February we spent a weekend in the Arctic Circle hoping to see the northern lights. I've been so busy, I only now got around to writing about it.

We decided to travel to Nellim for an action-packed weekend with outdoor adventure, wood fires, reindeer and no WiFi. Nellim, is a small Finnish village, close to the Russian border and in the middle of nowhere. This place is a true winter wonderland with untouched and natural forests. On our way to the property we saw a wild reindeer eating on the side of the road. It was all very magical.

The trip was my gift to Vanessa for her 40th birthday! I reserved a private, small log cabin instead of the main lodge. The log cabin itself was really nice; even the bed was made of logs with two bear heads were carved into it. Vanessa called them Charcoal and Smokey. To stay warm we made fires and enjoyed our sauna.

One day we went dog sledding. As with all animals it seems, Vanessa quickly named them all; Marshmallow, Brownie, Snickers, Midnight, Blondie and Foxy. The dogs were so excited to run! After 3 hours of dog sledding in -30 C (-22 F) weather we stopped to warm up and eat; we made salmon soup in a small make-shift shelter that was similar to a tepee. The tepee had a small opening at the top and there was no heat or electricity.

The salmon soup was made over a fire, and we were skeptical at first how this would taste. The soup turned out to be delicious and even reminded us of the clam chowder that we have come to enjoy in Boston. We've since remade this soup at home and the boys also enjoy it. Not that this blog will turn into a recipe blog, but I plan to publish the recipe with photos at some point.

At night we would go out on "aurora hunts". The first night by reindeer sled, the second night using snowshoes, and the third night by snowmobile. To stay warm, we built fires either in tepees or in the snow and drank warm berry juice.

While the untouched land is beautiful, they definitely try to live off the land. The Fins have an abundance of berries, mushrooms, reindeer and fish. We gladly admit we enjoyed our reindeer sled rides, as well as eating reindeer. We had fresh mushroom soup made out of hand-picked mushrooms. And every evening there was an abundance of fresh fish and reindeer offered for dinner. We also discovered a new gin, Napue, made from cranberries and birch leaves.

In the end, we didn't see the Northern Lights. We had a great trip, and seeing them would have been the icing on the cake. It just means that we'll have to come back another time.
Source: Dries Buytaert www.buytaert.net


Our quest to see the Northern Lights

In February we spent a weekend in the Arctic Circle hoping to see the northern lights. I've been so busy, I only now got around to writing about it.

We decided to travel to Nellim for an action-packed weekend with outdoor adventure, wood fires, reindeer and no WiFi. Nellim, is a small Finnish village, close to the Russian border and in the middle of nowhere. This place is a true winter wonderland with untouched and natural forests. On our way to the property we saw a wild reindeer eating on the side of the road. It was all very magical.

The trip was my gift to Vanessa for her 40th birthday! I reserved a private, small log cabin instead of the main lodge. The log cabin itself was really nice; even the bed was made of logs with two bear heads carved into it. Vanessa called them Charcoal and Smokey. To stay warm we made fires and enjoyed our sauna.

One day we went dog sledding. As with all animals it seems, Vanessa quickly named them all; Marshmallow, Brownie, Snickers, Midnight, Blondie and Foxy. The dogs were so excited to run! After 3 hours of dog sledding in -30 C (-22 F) weather we stopped to warm up and eat; we made salmon soup in a small make-shift shelter that was similar to a tepee. The tepee had a small opening at the top and there was no heat or electricity.

The salmon soup was made over a fire, and we were skeptical at first how this would taste. The soup turned out to be delicious and even reminded us of the clam chowder that we have come to enjoy in Boston. We've since remade this soup at home and the boys also enjoy it. Not that this blog will turn into a recipe blog, but I plan to publish the recipe with photos at some point.

At night we would go out on "aurora hunts". The first night by reindeer sled, the second night using snowshoes, and the third night by snowmobile. To stay warm, we built fires either in tepees or in the snow and drank warm berry juice.

While the untouched land is beautiful, they definitely try to live off the land. The Fins have an abundance of berries, mushrooms, reindeer and fish. We gladly admit we enjoyed our reindeer sled rides, as well as eating reindeer. We had fresh mushroom soup made out of hand-picked mushrooms. And every evening there was an abundance of fresh fish and reindeer offered for dinner. We also discovered a new gin, Napue, made from cranberries and birch leaves.

In the end, we didn't see the Northern Lights. We had a great trip, and seeing them would have been the icing on the cake. It just means that we'll have to come back another time.
Source: Dries Buytaert www.buytaert.net


6 Reasons Working Moms Make Good Workers

As of 2010, Women comprised 47 percent of the total U.S. labor force and are projected to account for 51 percent of the increase in total labor force growth between 2008 and 2018. (United States Department of Labor, Women’s Bureau) And according to a Pew Research Center survey, half of U.S. homes today include a full-time working mother.
While there are more working moms in the workforce than ever before, old-fashioned stigmas remain that working moms are not as productive as women without kids and/or men in general.
The reality is what makes us good moms also makes us good workers. We are just as ambitious, dedicated, and motivated as our peers. The difference is when others are hanging up their hats, we are just starting our second full-time job.

1. We Are Chief Multi-Taskers
Have you ever taken a client call, while holding your baby with one hand, and paying the cashier for your groceries with the other hand, all the while pinning your two-year-old to the checkout counter with your leg so he won’t run away? Out of necessity for survival, we have learned to multi-task. But here’s the thing: we are good at it. Working moms have the innate ability to focus our attention “fully” on several things at once. Contradiction of terms? Maybe, but it’s true.
‘Distraction’ by definition means a thing that prevents someone from giving full attention to something else. Distraction is a luxury for those who are used to being able to focus on one thing at a time. This is not a luxury working moms have. We are not easily distracted, because we have trained ourselves to give full attention to a multitude of things that need to happen. We deal with distractions while continuing to get sh*t done. Responding to a client email, while updating a budget spreadsheet, and texting a babysitter that yes my kid is allergic to strawberries and no that type of rash doesn’t sound normal? Piece of cake. Multiple clients screaming at the same time for attention? No problem.

2. Patience & Understanding
If working moms majored in multi-tasking, we minored in patience and understanding. While we are hyper-organized (again out of necessity for survival), we are used to things not going the way we planned and turning chaotic. We are flexible. We can roll with the punches and keep our eye on the prize. We do not need instant gratification. We are comfortable chipping away at steady progress while understanding that journey is just as important as the destination.

3. The Calm In The Storm
When sh*t hits the fan, you want a working mom on your team. It takes a lot to shake us.We have learned to remain calm and composed through everything: bloody knees, snot, vomit, and many other bodily fluids that could scare off some from ever procreating so I’ll stop there. We know how to remain cool and quickly figure out a plan of attack. We are professionals at fixing the problem.

4. We Are Empathetic
We are raising the next generation. Moldable minds are in our hands every day. We are constantly thinking about what we say and how we say it. We are empathetic and strong. We lead by example. We are approachable. We are not afraid to try and fail. We value strong personal connections. We know we are not perfect and we don’t expect anyone else to be either. 

5. We Are Persuasive Peacemakers
If we majored in multi-tasking, and minored in patience and understanding, then we wrote the book on negotiating peace. You think negotiating budgets with clients is tough? At least clients are rational (mostly). Try persuading a two-year-old that green beans are yummy or negotiating peace between two young boys and one very red firetruck. We are professionals at finding common ground and peace among conflicting sides. 

6. Working For The Mortgage
We have a lot going on, but we have a lot to lose too. Every working mom has made the decision to be away from her kids for eight plus hours a day. That is a decision we do not take lightly and we want it to mean something. We are not here to play around or just get by. We are here to work hard and give our kids a good life: mortgage, doctors, bikes, braces, hockey equipment, college, etc. We never forget why we are at work.


Source: VigetInspire


Pong with SVG.js

Everybody loves the vintage game Pong, right? We sure do. What's more fun? Building it yourself!
That's why we decided to create one with SVG.js - to highlight some aspects of our library. It might seem like a complex idea for a small tutorial, but as you'll see, it's simpler than it sounds. Let's dive into it!

Here's the finished product:
See the Pen Fully functional Pong game with effects by Wout Fierens (@wout) on CodePen.
Getting started
SVG.js is available through Github, npm, bower or CDN.js. There are plenty of options for getting your hands on SVG.js, so use whatever you are most comfortable with.
Start out by creating a new HTML document and include the library. Create an empty <div> to serve as a wrapper for the SVG document, and give it an id attribute. Something like pong should be suitable for this project:
<div id="pong"></div>
Next, initialize the SVG.js instance by referencing the wrapper. At this point, it's also a good idea to define a width and height for the game which makes it easier to modify them later on.
// define width and height
var width = 450, height = 300

// create SVG document and set its size
var draw = SVG('pong').size(width, height)
Now you're ready to start building the game.
Drawing Game Elements
The Background
The background should cover the whole document, so we're using a <rect> and give it a neutral grayish color. First, we'll draw the left player in green. Then, we'll draw the right one by cloning the left one and coloring it pink.
// draw background
var background = draw.rect(width, height).fill('#E3E8E6')
We'll also need a vertical, dashed line in the middle to distinguish the player fields.
// draw line
var line = draw.line(width/2, 0, width/2, height)
line.stroke({ width: 5, color: '#fff', dasharray: '5,5' })
See the Pen Pong Background by Wout Fierens (@wout) on CodePen.
Paddles and the Ball
Pong wouldn't be Pong without paddles and a ball. First, we'll draw the left player in green. Then, we'll draw the right one by cloning the left one and coloring it pink.
var paddleWidth = 20, paddleHeight = 100

// create and position left paddle
var paddleLeft = draw.rect(paddleWidth)
paddleLeft.x(0).cy(height/2).fill('#00ff99')

// create and position right paddle
var paddleRight = paddleLeft.clone()
paddleRight.x(width-paddleWidth).fill('#ff0066')
For the ball we're going to use a circle with a diameter of 20 and place it in the center of the court:
// define ball size
var ballSize = 20

// create ball
var ball = draw.circle(ballSize)
ball.center(width/2, height/2).fill('#7f7f7f')
See the Pen Pong Paddels and Ball by Wout Fierens (@wout) on CodePen.
Score board
Finally, we will need a scoreboard which we will add at the top of the court.
// define initial player score
var playerLeft = playerRight = 0

// create text for the score, set font properties
var scoreLeft = draw.text(playerLeft+'').font({
size: 32,
family: 'Menlo, sans-serif',
anchor: 'end',
fill: '#fff'
}).move(width/2-10, 10)

// cloning rocks!
var scoreRight = scoreLeft.clone()
.text(playerRight+'')
.font('anchor', 'start')
.x(width/2+10)
That's all! Now we have all game elements, let's move on to game logic.
See the Pen Pong Scoreboard by Wout Fierens (@wout) on CodePen.
Game logic
We'll start out by writing an update function which will update the state of our game and game elements.
// random velocity for the ball at start
var vx = Math.random() * 500 - 250
, vy = Math.random() * 500 - 250

// update is called on every animation step
function update(dt) {
// move the ball by its velocity
ball.dmove(vx*dt, vy*dt)

// get position of ball
var cx = ball.cx()
, cy = ball.cy()

// check if we hit top/bottom borders
if ((vy < 0 && cy <= 0) || (vy > 0 && cy >= height)) {
vy = -vy
}

// check if we hit left/right borders
if ((vx < 0 && cx <= 0) || (vx > 0 && cx >= width)) {
vx = -vx
}
}
When we run this, nothing will happen, because we didn't call the update function yet. This will be done using JavaScript's native requestAnimationFrame feature, which will allow us to do smooth animations. To make this work, a handler is registered to periodically call our update function:
var lastTime, animFrame;

function callback(ms) {
// we get passed a timestamp in milliseconds
// we use it to determine how much time has passed since the last call

if (lastTime) {
update((ms-lastTime)/1000) // call update and pass delta time in seconds
}

lastTime = ms
animFrame = requestAnimationFrame(callback)
}

callback()
Yay! The ball is jumping around! But, our paddles are still pretty useless at the moment. So, let's do something about that and insert paddle collision detection. We'll only need it on the x-axis:
var paddleLeftY = paddleLeft.y()
, paddleRightY = paddleRight.y()

// check if we hit the paddle
if ((vx < 0 && cx <= paddleWidth && cy > paddleLeftY && cy < paddleLeftY + paddleHeight) ||
(vx > 0 && cx >= width - paddleWidth && cy > paddleRightY && cy < paddleRightY + paddleHeight)) {
// depending on where the ball hit we adjust y velocity
// for more realistic control we would need a bit more math here
// just keep it simple
vy = (cy - ((vx < 0 ? paddleLeftY : paddleRightY) + paddleHeight/2)) * 7 // magic factor

// make the ball faster on hit
vx = -vx * 1.05
} else ...
Better, now the ball is aware of the paddles. But a few other things are still missing:

the score is not updating when the border is hit
paddles are not moving
the ball should reset when a point was scored

Let's work through this list from top to bottom.
See the Pen Pong jumping ball by Wout Fierens (@wout) on CodePen.
Update the score
To update our score, we need to hook into collision detection to the left or right wall:
// check if we hit left/right borders
if ((vx < 0 && cx <= 0) || (vx > 0 && cx >= width)) {
// when x-velocity is negative, its a point for player 2, else player 1
if (vx < 0) { ++playerRight }
else { ++playerLeft }

vx = -vx

scoreLeft.text(playerLeft + '')
scoreRight.text(playerRight + '')
}
See the Pen Pong jumping ball by Wout Fierens (@wout) on CodePen.
Moving the user-controlled paddle
The right paddle will be controlled by the keyboard, and that's a piece of cake with SVG.js:
// define paddle direction and speed
var paddleDirection = 0 // -1 is up, 1 is down, 0 is still
, paddleSpeed = 5 // pixels per frame refresh

// detect if up and down arrows are prssed to change direction
SVG.on(document, 'keydown', function(e) {
paddleDirection = e.keyCode == 40 ? 1 : e.keyCode == 38 ? -1 : 0
});

// make sure the direction is reset when the key is released
SVG.on(document, 'keyup', function(e) {
paddleDirection = 0
})
So what are we doing here? First, we call SVG.on, which lets us bind an event listener to any node (not only SVG.js objects). We'll listen to the keydown event to detect if either the up (38) or the down (40) key is pressed. If that's the case, the paddleDirection will be set to -1 or 1 respectively. If another key is pressed, the paddleDirection will be 0. Lastly, when any key is released, the paddleDirection will be reset to 0.
The update function will do the actual work of moving the paddle, based on the user input. So we'll add the following code to the update function:
// move player paddle
var playerPaddleY = paddleRight.y();

if (playerPaddleY <= 0 && paddleDirection == -1) {
paddleRight.cy(paddleHeight / 2)
} else if (playerPaddleY >= height-paddleHeight && paddleDirection == 1) {
paddleRight.y(height - paddleHeight)
} else {
paddleRight.dy(paddleDirection * paddleSpeed)
}
We prevent the paddle from exiting the court by testing its y position. Otherwise, the paddle will be moved by a relative distance using dy().
See the Pen Pong user controlled paddle by Wout Fierens (@wout) on CodePen.
Moving the AI paddle
A good opponent will make the game worthwhile. So we'll have the AI player follow the ball, with a predefined difficulty level. The higher the difficulty, the faster the AI paddle will respond.
First define the difficulty value, defining the AI's speed:
var difficulty = 2
Then add the following code to the update function:
// get position of ball and paddle
var paddleRightCy = paddleRight.cy()

// move the left paddle in the direction of the ball
var dy = Math.min(difficulty, Math.abs(cy - paddleRightCy))
paddleRightCy += cy > paddleRightCy ? dy : -dy

// constraint the move to the canvas area
paddleRight.cy(Math.max(paddleHeight/2, Math.min(height-paddleHeight/2, paddleRightCy)))
See the Pen Pong user controlled paddle by Wout Fierens (@wout) on CodePen.
Score!
Wait, this isn't right! The game goes on even after one of the players scored. Time to include a reset function to move all game elements to their initial position using animations:
function reset() {
// reset speed values
vx = 0
vy = 0

// position the ball back in the middle
ball.animate(100).center(width / 2, height / 2)

// reset the position of the paddles
paddleLeft.animate(100).cy(height / 2)
paddleRight.animate(100).cy(height / 2)
}
The reset function should be called if one of the players misses the ball. To make that happen, change the failure detection by removing the vx = -vx line and adding the reset() call:
// check if a player missed the ball
if ((vx < 0 && cx <= 0) || (vx > 0 && cx >= width)) {
// when x-velocity is negative, its a point for player 2, else player 1
if (vx < 0) {
++playerRight
} else {
++playerLeft
}

// update score
scoreLeft.text(playerLeft)
scoreRight.text(playerLeft)

reset()
}
We also need to make sure the initial vx and vy values are set to 0. So the game does not start without our input. To be able to indicate the first serve, we'll add a click listener to the SVG document:
draw.on('click', function() {
if (vx === 0 && vy === 0) {
vx = Math.random() * 500 - 250
vy = Math.random() * 500 - 250
}
})
See the Pen Pong with start and reset by Wout Fierens (@wout) on CodePen.
Encore
Of course, there is a lot left to improve on the game, but the purpose of this tutorial is to teach about SVG and in particular about SVG.js. We want to leave you with some visual effects to spice up the game.
Ball color
It would be nice to have the color of the ball change while approaching the opposite opponent. This is done by leveraging the power of the morph method on the SVG.Color class. We'll detect the position of the ball, and gradually assign the color of the opposite opponent, based on the position of the ball on the x-axis.
We'll start by initializing a new instance of SVG.Color:
var ballColor = new SVG.Color('#ff0066')
Next, we'll define the target color by calling the morph() method:
ballColor.morph('#00ff99')
This will set a start color, being #ff0066 and an end color, being #00ff99. Using the at() method on SVG.Color, we can tween the color based on a given position between 0 and 1. So by adding the following code to our update function, we can change the color of the ball while it moves:
ball.fill(ballColor.at(1/width*ball.x()))
That wasn't hard at all, right?
Boom!
Imagine a huge color blast when the opponent missed the ball. That would make it even more fun to win a point. To achieve this, we'll use a radial gradient. It will appear where the ball has hit the wall and then quickly fade out. Once faded out, the object carrying the gradient will be deleted from the scene. To achieve this, we'll add another function called boom including the required logic:
function boom() {
// detect winning player
var paddle = vx > width/2 ? paddleLeft : paddleRight

// create the gradient
var gradient = draw.gradient('radial', function(stop) {
stop.at(0, paddle.attr('fill'), 1)
stop.at(1, paddle.attr('fill'), 0)
})

// create circle to carry the gradient
var blast = draw.circle(300)
blast.center(ball.cx(), ball.cy()).fill(gradient)

// animate to invisibility
blast.animate(1000, '>').opacity(0).after(function() {
blast.remove()
})
}
See the Pen Fully functional Pong game with effects by Wout Fierens (@wout) on CodePen.
Conclusion
That's it! You just created a working Pong game using SVG.js. In the next tutorial, we will cover how to convert this blob of code into a reusable SVG.js plug-in, while adding new features and easy configuration to the game.

Written by Ulrich-Matthias Schäfer & Wout Fierens.

Pong with SVG.js is a post from CSS-Tricks
Source: CssTricks


If Your Company Were a Couch…

Without even realizing it, our perceptions are cross-referenced with our memories. Our brains conjure up an emotional reaction when our eyes see familiar shapes, colors, and textures. This fun exercise uses various styles of couches to help you make decisions about the emotional response that best represents the personality of your company (or how you would like your company to be perceived).

So, which couch feels most like your company? Parallel your choice with your company's brand personality attributes. Insights on effective color and hand-picked typography choices (with links to free fonts) are included and will help codify your communication style. See if your choice aligns with your company's mission and vision.
Is your brand...
Stylish?

Clean lines, modern, current. That's a stylish company. Being confident and deliberate in your decision-making shows in everything you do. This company may associate themselves with a Mid-Century modern look.
Recommendations:
For color — go fruity for the main color, use: orange, plum, lime, blueberry, etc. ground it with a gray or charcoal. A geometric sans-serif font like Raleway will feel contemporary yet timeless; look cutting-edge yet approachable —all staying in line with that sharp stylish image.
Case in Point:
M Industrial Design, a design studio
Agile?

Pragmatic in its approach, this company can accommodate almost anything that is thrown its way. The agile company appeals to people who want to get things done no matter what road blocks they come against. Energetic and flexible, this company is always on its toes.
Recommendations:
A fun muted tone with sage greens and slate blues will keep the look grounded. The typography should be super clean while the layout is geometric and modular. A condensed font face like Alpin Gothic will make an excellent evergreen typeface solution for your logotype.
Case in Point:
Shopclass, a versatile vintage furniture store
Collaborative?

Communication is key. Relationships are important to your organization both internal and external. Decisions are not made in a vacuum but are a result of the collaboration of many minds. Your company culture is perceived as young, thoughtful, and deliberate.
Recommendations:
The color family is a pop of color grounded in neutrals. Pick one strong color. Don’t clash hues. Balance a dominant color with lots of white. For a logotype, stay friendly and timeless with a sans-serif font such as, Langdon.
Case in Point:
Team Dandelion, ideation firm
Rustic?

Solid furniture, wood, and leather — heirlooms that evoke a rugged, organic tone. You take your work seriously. You are a meat and potatoes kind of company.
Recommendations:
Stay earthy or let your corporate identity color palette go beyond greens and chestnut browns with inspiration drawn from the colors of autumn leaves, baked clays, and terracotta. Keep the font strong, legible, and simple by using a san-serif or get bold with a slab font like Museo Slab. A showy, novelty font will dilute your message.
Case in Point:
The Ranch at Live Oak Malibu
Playful?

Happy and productive corporate or retail culture. This is a place where ideas become realized and enthusiasm is valued. The employees feel appreciated and are proud to be associated with the company.
Recommendations:
Let go a little with this color palette. Explore colors such as vintage teal, pink, or robin’s egg blue. Conversely, use a neutral as a secondary color to counter the fun color and ensure a professional feel. Play with a bold, retro script like, Grand Hotel for a logotype. Steer clear of novelty fonts. Over-designed fonts make you look like you are screaming for attention and may come off as amateurish. Downplay to stay above the pack.
Case in Point:
Cake Monkey Bakery
Accomplished?

A bookshelf laden with books from every generation and a smart looking desk lamp define this category. Rich in tradition and high on integrity, you’re a company built on a solid reputation that has garnered great respect from years of experience and deep knowledge of your industry.
Recommendations:
Consider darker colors to convey depth and couple it with several shades of an earthy tone: a mid-tone khaki or charcoal gray. Using a classic typeface with contrasting thick and thin strokes will be easily readable. A serif typeface will represent stability and credibility, along the lines of Crimson in upper and lower case.
Case in Point:
Flewelling and Moody Architects, architects for educational facilities

Karen Barranco is originally from New Orleans and now in Los Angeles. In 2000 she founded Special Modern Design and her work has been been published internationally in books, print magazines, and online, including being featured on lynda.com and being hand-picked by Shepard Fairey to represent the "Revitalization of the Los Angeles River by 2020" initiative. Logos With Soul is a spin-off company for designers.

If Your Company Were a Couch… is a post from CSS-Tricks
Source: CssTricks


AdEspresso joins Hootsuite — Anatomy of an M&A

Yes, we joined forces with Hootsuite: you can find our announcement here. Exciting times!
We also wanted to give some visibility to the actual mechanics. M&As (Mergers and Acquisitions) are so rare and there’s always a high confidentiality/pressure involved. So much so that they are by far *the* most obscure processes of the startup industry.
Still, as our CTO wisely said: “startups either are acquired, or they go IPO, or they die”. That’s really it. (an IPO – initial public offering – is the first time that the stock of a private company is offered to the public)

A few minutes after having signed on the dotted line, there was only one thing in my mind. Four words. “Ok, that was terrifying”.
And I don’t mean it in a nice catchy and hyperbolic way. I mean “terrifying” in the most literal way possible. What follows is the insider’s story of how it all went down.

The mechanics — Initial Partnership
The first contact with Hootsuite happened last year during SaaStr Annual (I’m sure Jason Lemkin will love this BTW). The proposal came from their Senior Corp Dev and was pretty straightforward: “We’re looking to partner or potentially buy… are you guys interested?”
This is a first useful piece of data for you:

Pro tip #1: Usually this type of conversation, when real, comes form Corp Dev Depts, not Biz Dev Depts.

Our answer: “of course. We know and love you guys, we clearly see the potential, and we’re definitely interested in exploring if there are the conditions to make an M&A happen, but 100% down to partner up regardless.”
Which is a second useful piece of information for you as an entrepreneur:

Pro tip #2: Partnering up is an awesome way to start knowing each other and working together, on both sides.

And yes, partnerships between smaller and bigger companies turn in full-blown M&As more often than you’d think. We quickly explored terms of a potential M&A to discover that there weren’t the conditions to make it happen just yet, so we started working on the partnership.
This could take an entirely different post on its own, so let’s just fast forward to July 2016 when we closed the Partnership Agreement, after which we started working on a first integration, which we launched publicly on October 25, 2016.
This is the illustration we created to share the news of the partnership with Hootsuite!
Here’s the third useful piece of information for you:

Pro tip #3: These are looooong conversations, as a founder the more you can avoid feeling the time pressure, the better.

The interesting thing is that the Corp Dev Dept comes back saying: “the partnership is great, but we’d really love to see if there is a way to make things work on the M&A side as well. Would you guys be interested in considering resuming that?”.
Result: we ended up with an actual LOI in our hands.
The Mechanics — LOI back and forth
LOI stands for “Letter of Intent”, it’s not binding in any way but it’s meant to draft the business terms (not the legal ones) that will be the cornerstones of the M&A. It also has a very short expiration date, and you’re expected to turn it over within a few days. Kinda like playing ping pong

Pro tip #4: The true turning point on when an M&A conversation becomes real is when you have an LOI.

In our case, we exchanged 5 of them, one per week. And the general idea there is that they propose you what would work for them, you propose them what would work for you, and then you negotiate terms until you meet somewhere in the middle.
I won’t go into the details as to what ours contained, but a Letter Of Intent includes things like how much cash versus stock proceeds, how much retention versus earn-out (if any), who’s considered a key employee and who’s not, how long is the exclusivity period, and how do the major indemnities work.
We exchanged a few Letters Of Intent for around five weeks
If you’re thinking: “well, that sounds like an exhausting process”, yeah it definitely is. But… it’s nowhere as exhausting as the part that follows.
Before moving forward, there is another useful piece of information for you, which everybody will advise you to explore to some degree:

Pro tip #5: It’s your fiduciary responsibility to verify whether there may be better offers in the market for you.

The vast majority of the companies do this by engaging with an M&A advisor, whose job is basically to “shop” the LOI to see if they can get a better one. They’re expensive, though. It’s not uncommon for them to charge $500k as a baseline -if the M&A goes through because of their involvement.
We tested the waters with a few of them but ended up not hiring anyone. We had other offers on the table already, plus we felt we had a good understanding of the market. But more importantly, we had no pressure to sell and the Hootsuite’s conversation was really the most exciting one to us.
BTW receiving the first LOI is also where you should start to actively engage your Board (if you have one) in the conversation… to understand what they’re looking for and what’s important for them. Having that internal conversation is as important as having the external LOI discussion.

Pro tip #6: Keep building optionality… as a founder that’s your number one job, never ever lose sight of that.

This as well could be a post on its own, but maximizing optionality is really the single most important thing founders can do. Some examples of things that reduce optionality? Not being profitable, raising a big round of funding, not growing fast enough. Your optionality really is your main leverage.
Maximizing optionality brought us to this point.
Except that: your optionality goes away when you decide to sign-off the LOI, because of the exclusivity clause that binds you to only talk to them and no one else. At that point, things start to be really serious because you’re essentially saying: it’s them or no one at all. That’s a *huge* decision.
The Mechanics — Due Diligence kickoff
It’s also useful to mention another not-so-well-known data point, here. Up to now, your engagement with your corporate lawyers has been a little bit higher than usual, but still nothing crazy. From the moment in which you sign the LOI and go to the Due Diligence, legal fees start to pile up.

Pro tip #7: It’s not uncommon for an M&A process to cost you $200–350k in legal fees when it’s all said and done.

Many founders experience the Due Diligence process when doing a priced round, either at the Seed or at the Series A stage. Well, forget about that: the Due Diligence of an M&A is 10X more thorough. Literally, no stone will be left unturned, no dollar processed will be left unchecked.
Which is also another good point worth mentioning: generally speaking, consider yourself accountable not only to your customers, team, investors and Board (and -of course- the law), but also in front of any potential future acquirer. Because, as a matter of fact, you are.

Pro tip #8: Is how you’re spending money going to be easy to explain? If it’s not, you should ask yourself why.

In our case, the Due Diligence went through the first half of the exclusivity period of the LOI (it’s fairly common for it to be 2 months) which we extended for a couple weeks more after its expiration date by another few weeks.
Many things change as you go through that:

In the LOI phase, you want to completely insulate your team: you don’t know whether things will move forward or not, and an M&A is a *huge* distraction for anyone. As you go through the Due Diligence, talking to your team will be one of the key steps… so you’ll need to explain what’s happening. How you frame that conversation with your team is one of the most critical things you’ll need to do.
Your travel schedule and your overall routine will be ripped apart. We flew to their Vancouver and London headquarters, they flew to our Milan and San Francisco headquarters. Your whole job becomes coordinating with people, on your side *and* on the other side, not to mention various consultants. It would not be an exaggeration to say that 50-ish people were directly involved in making this deal happen. (!)
While the LOI discussion is meant to agree on the business terms, the Due Diligence is meant to make sure that there are no surprises on the legal sides. And while you’re sharing tons of things with them (our DD spreadsheet tracker had 250 rows, each one with a document to provide) you should also do your own (reverse) Due Diligence, to understand as much as possible about the company you’re thinking of joining.
Every new piece of data you share with them, and they share with you, essentially brings both sides one step closer to making the M&A actually happen. And the more you think about it, the more you’ll start to include that scenario in your planning and in your management conversations. The delicate balance here is to be able to entertain that thought without going completely off-track of the day-to-day operations of the company.

The Mechanics — Paperwork Craziness
The second half of the exclusivity period of the LOI is mostly dedicated to the actual paperwork. While Due Diligence is mostly about organizing existing documents and sharing them with the counterpart, this phase is about creating the actual documents that will materialize the M&A. And yes, in case you were wondering, there’s a sh#t-ton of them.
The second half of the exclusivity period of the LOI is an overload of paperwork
Below you can find the *actual* list we used to be 10,000% sure we had everything we needed to move forward to the last phase of the M&A (signing and closing, which are surprisingly two separate things):

Merger Agreement
Disclosure Schedules
Form of Joinder
Founder Employment Agreements
Retention Agreement
Certificate of Merger
Founder Side Letter
Non-Competition/Non-Solicitation Agreement
Italian Employment Side Letter
Italian Employment Settlement
Form of Release
Information Statement
Letter of Transmittal
Obtain signed Merger Agreement Joinders from all Founders
Same as above for more than 50% of the Preferred Shareholders

A couple things worth noting here:
a) the closer you get to the signing and closing, the more the focus on the M&A process becomes all-encompassing and all-consuming, so to speak. You’ll struggle to find any meaningful time to do anything else, really.
b) the scary thing is that you try and read the paperwork produced, keeping up with the edits and revisions and the remaining items from the Due Diligence, but the reality is that you’ll barely be able to do so and you’ll rely heavily on your legal team to advise you on the material items.
c) at the same time you’ll need to balance that with the need to keep up the communication channel with the other side. On more than one occasion, the M&A risked blowing up because both sides talked to their lawyers too much, leaving lawyers to argue too much between the both of them.

Pro tip #9: the amount of trust that goes in a successful M&A process is the highest I have ever seen. Full stop.

That’s because everyone has tons of questions, and everybody is kinda wary and kinda concerned about not being screwed over: the founders, the team, the investors, the acquirer… and it’s a totally legit position because at the end of the day everyone has a responsibility toward someone else. So, the more you will have built that trust and comfort, the easier this phase will be. Things can get pretty nasty pretty fast, if that’s not the case. But regardless, communicating what’s happening will be a *huge* part of how you will be spending your time at this point.
On this note, it’s always better to engage in person… like 100X better. When we were together (in Vancouver, London, Milan, San Francisco) things always sped up dramatically. When we were engaging via phone/email, that’s where the vast majorities of the disconnects happened.
The Hootsuite Team flies in to get to know the vast majority of the AdEspresso Team, and it’s pizza and cake time!
And, make no mistake, disconnects *will* happen. They’ll either kill the M&A or not, it depends on your ability to communicate, and your willingness to work through issues together. In case you’re wondering, yeah: our M&A was dead in the water too, at least twice.
Finally, this is also where you’ll start talking about “future state”. Key employees roles and compensations, organizational chart, joint goals, among other things. Essentially how the two organizations will work together one month, one quarter and one year after the closing.
The Mechanics — Signing and Closing
The first surprise here was that signing and closing actually are two entirely separate milestones. Signing is a condition to closing, but there are lots of other conditions that need to be met for the closing to be finalized. And it may actually happen that signing materializes but closing does not.
The other surprise on this is how strict and carefully planned the timeline is. There are several deadlines every day, detailed down to the hour, that need to happen for things to move forward, toward which everyone needs to come together and give maximum effort. The closest comparison to this in my mind is a Formula One pit stop.
Italian Formula One Grand Prix 2012, the Ferrari of Felipe Massa at Pit stops (photo by Francesco Crippa)
Signing is particularly tricky, because you need to reach a certain threshold in terms of preferred and common shareholders approval (kinda like an election): 50% of the preferred and 90% overall in our case. And generally speaking, every investor is *very* busy.
To simplify things (not) usually you’re barely keeping up with the timeline, so you send out the Information Statement to investors with just a few days left for them to read through a simplified version of the paperwork prepared from your lawyers and sign off on the deal. Again, communication is key.
The special t-shirt that was given to those who participated in making the M&A happen.
Another critical piece of the closing, among others, is the Closing Statement, which aggregates two essential set of information:

a) how are the proceeds going to be distributed among shareholders
b) the final balance sheet at the moment of closing, representing assets and liabilities of the company.

When all the closing conditions are met, both sides need to fulfill their side of the deal at the same time, so signatures are collected ahead of that, but also the wire with the cash consideration and the issuance of the shares are made in advance. That’s where the “Escrow Agents” come into play.
They are third parties that keep on hold signatures, cash and stocks until all the parties sign-off on the green-light to execute the closing. In our case, we jumped on a call all together on the last day of closing and a few minutes later, AdEspresso had officially joined forces with Hootsuite.

Hey, I used @AdEspresso while I was running fbook ad campaigns at Sidelines. Congrats on getting acquired by Hootsuite!! #SuccessfulStartups pic.twitter.com/KLOd3niuqR
— Krithic Annamalai (@ContentKrithic) February 11, 2017

Major congrats to our friends @hootsuite on the recent acquisition of @AdEspresso. Awesome combo! pic.twitter.com/g7BNre5m5V
— Scott A. Rogerson (@scottarogerson) February 8, 2017

One more thing: we want to celebrate this important news together! In that spirit, we’re launching Pixel Caffeine, a new a 100% free WordPress plugin to manage all your Facebook Pixel needs in one place. Discover more here!
Source: https://adespresso.com/feed/


5 steps to a scaleable content marketing campaign

There are 2 key points in the life of a content marketing campaign where many fail. The first is the beginning, where you set out to find what your audience is looking for.
The second is when you to scale your content creation beyond yourself. You hire a writer… But the brand loyalty you have carefully built up over time can turn against you here.

Will the audience that you’ve worked so hard to build up still be interested in following content created by someone else? Will you be able to maintain the quality of what you publish? Can you find a writer to write in your voice?
Many content marketing campaigns fail at this crucial stage. But there are a few simple steps you can take to improve your odds and ensure the long-term success of your campaign.

Not scaling your content could be dangerous. What if, after many years, you tire of the topics, but your content marketing is the main driver of traffic to your business? What if you want to sell your company, but the success of the marketing relies on you and becomes a liability? What if you want to spend more time managing your team or improving other areas of your business, but content creation is taking up too much time?
Define your content marketing strategy
The foundation of your content marketing campaign should be a documented strategy. For many content marketers, this seems like unnecessary homework. In fact, according to the 2016 B2B Content Marketing Benchmarks, Budgets, and Trends—North America, only a third of marketers have a documented strategy.
“Last year, 35% of B2B marketers had a documented content strategy, 48% had a verbal-only strategy, and 14% had no strategy. A documented content marketing strategy impacts effectiveness:

53% of the most effective marketers have a documented content marketing strategy
40% of the least effective marketers have no strategy at all.”

A “verbal-only” strategy is not enough; we’re all humans here, and we know how easy it is to get sidetracked by the latest shiny object marketing trends. Content marketing is a long-term play, and the only way you’re going to get results is with consistency and quality.
We also know how easy it is to misinterpret each other when communicating. If you don’t believe me, here’s a little experiment you can try.
Take a picture of a landscape with distinctive features. Find a friend who is great at drawing and ask them to draw a picture of the landscape for you, but don’t show them the picture, just describe it to them. (If you actually do this, please post the picture in the comments).
If you want to add team members to your content marketing campaign, a written strategy will keep everyone consistent and make sure everyone has the same vision.
In just a few pages, this document should contain:

The mission of your content – The mission certainly should not be “sell more of my product”; people will easily see through that and go elsewhere. Your content should have a purpose and be valuable in its own right. If you’re just focused on using content to boost conversions or drive traffic, then you’re missing out on many of the hidden and unmeasurable benefits of content marketing.
The reader avatar – Great content can bring you more than just customers. So instead of focusing on a customer avatar, define it as someone who you would want to recruit to your team. Create content that inspires them to join you in your mission and your vision. This will fundamentally shift how you approach your content.
What makes your content unique – In this noisy world, the best competitive advantage is to find something you can do better than most and an angle that makes you different from your competition. This could be your sense of humor, or what kind of content you create, or a key quality.
Core problems – What are the core problems that your audience is having? What are they searching for that you can solve? You should identify 3-6 problems that are specific enough to resonate, but broad enough to be able to create lots of content. Identifying core problems makes it easier to reach your audience, organize your content and deliver a consistent message through. We’ll talk more about these in the next section.
Metrics – How do you measure success? What numbers do you need to optimize for? Some simple ones I recommend starting with are 10% growth in traffic each month and 10% growth of your email list.
What do you believe is true? – This defines some of the broad philosophies of your blog and helps you find a way to be unique in a noisy world. Simple things like “We believe content marketing is the best tool to bootstrap a business” or “we believe that less is more when it comes to working out” can help.

This strategy will keep you consistent over time. Without it, you’re susceptible to constantly changing your strategy depending on how you feel or whatever shiny object is in your field of view at the time. This is also crucial for sharing the vision of your blog successfully with others.
I have a more in-depth guide to a great content marketing strategy here: How to get powerful results with your content marketing strategy.
Also, here’s a link to a template I have developed to make documenting your strategy a breeze.
Organize your blog around your reader’s core problems
Your core problems will become your category structure for your content. This category structure allows you to do a lot of the time-consuming work that goes into creating good content once, and then use it in many of the things you create.

Lead generation – For each category, you’ll be able to develop a lead magnet that is relevant to all the content you create in that category. This way, everything you create will have a useful lead magnet attached to it so your readers can take the next step with you.
SEO – You’ll be able to research and collect a set of keywords for each category once that you can draw from.
Key relationships – For each core problem, you can list influencers, allies, and competitors that address those problems and begin to build relationships with them by linking to their content and drawing inspiration from what they are doing.

Here’s an example of some of the core problems we decided on for WP Curve and how much traffic we were getting to our site for each problem.

Have others write in your voice with style and branding guide
Where your strategy handles the big picture of your content, your style guide helps with the day to day. There are many tiny details that are worth keeping consistent if you want to maintain the quality of your content as you scale. The style guide also can give you a predictable creation process, which enables you to plan out content weeks or even months in advance.
A style guide allows other writers to create content in your voice. Here are a few key elements of a good style guide:

Words you use and don’t use – Some people like to say words like “hack” or “ninja” in their content.  For some audiences, this is a great move, for others, it could turn people off. Consider your own style and how a writer could embody it.
Header Style – Do you use h1 or h2 for your headers? Should they be in all caps, sentence case or title case?
Quality Checklist – What are some aspects of your blog post that embody the quality you want to create. Is the content actionable? Is it easy to read? Do you focus on one problem only? Are there helpful images? How many outbound links should there be in each article?
Images – How many pictures do you expect per post? What dimensions should the images be? What’s the size limit?

Editorial Calendar
An editorial calendar will allow you to plan out content weeks or even months in advance. You’ll be able to anticipate holidays, industry events, product launches, and have content prepared in time to take advantage of them.

(source)
Two common tools for editorial calendars are Trello and CoSchedule. Each has unique advantages depending on your tastes. I have written a review comparing then here: Trello vs. CoSchedule: Editorial calendar review for content marketers.
Here are a few key elements of an editorial calendar:

The content pipeline – What articles are planned to be published and when.
Visualizing progress – As your content team grows and you begin creating many different posts simultaneously, you’ll want an easy way to see the status of each post without having to dive into each one individually.

You can organize your lists in Trello to indicate status (Check out how the team at Trello does it here)
Both Trello and Coschedule have labeling systems, and you can assign certain colors to mark the status of the post.
The colored labeling systems can also be used to indicate the topic or the core problem of the post.

Who’s responsible? – You’ll be able to assign specific content to team members and hold them accountable to moving the post forward.
Team idea collection – This should be a recurring event each month. Have your team meet to discuss new ideas for content and add them to a list of “open ideas.” Mention any new key relationships that may have started and could be developed with content collaboration.
Repurposing – You should not always focus on new content creation. Make time in your calendar to repurpose your successful content into different formats.

Great content won’t be seen without great promotion
In the article What to do if your content is not getting traction? Renee Warren, the founder of Onboardly, describes how she focuses heavily on content promotion, not content creation. This is especially important in the early days of your brand building when you’ll need to work hard to get attention and differentiate yourself in your market.

You should have several processes in place that ensure every post gets promoted.
Here’s a few I recommend starting with:

Email and @Mention anyone you link to – If you’re making use of the key relationships list I mentioned earlier in this post, then you need to let the people you are mentioning know about it. This is great for building relationships, and it’s likely that they’ll help promote the content if they are mentioned in it.  
Use tools to help you with social media –  Keeping up with Twitter and all the other social media platforms can be a hassle without the right tools. I recommend using either CoSchedule or Meet Edgar, which allow you to schedule social media to be published in the future.
Hashtag bank – Just like with your keyword bank, you should have a hashtag bank with relevant tags to make sure you’re consistently promoting to the right audiences.
Team promotion – Content marketing is a team sport, and your team members should be helping you get the word out on your content. Have team members rotate posting on sites like Inbound.org; everyone should be sharing content on their own channels and emailing it to people that may benefit.

Conclusion
Scaling up your content marketing and building a team that can tell your story and speaks in your voice is crucial to the long-term success of your campaign. With documented processes and the right tools, you’ll be able to scale up your content marketing, expand your reach and grow your business.
Kyle Gray is the founder of Conversion Cake, he helps startups and small businesses build content marketing strategies and teams. He is the author of “The College Entrepreneur” A book for students who want to break into entrepreneurship. Follow him @kylethegray.”
Source: https://adespresso.com/feed/


How to get powerful results with your content marketing strategy

It’s easy to see the allure of content marketing, to follow the stories of the many successful startups that have used it to build an army of followers and create a renowned brand.
Like Groove HQ, that just 3 years ago was a few months away from running out of cash and now has 5 million in annual recurring revenue. They simply changed their content marketing strategy.

If you want to see these same results for your business, you’re going to need a documented content strategy. A long-term vision that not only guides your content but sets you up for success in other aspects of your marketing.
In this post, I’m going to show you the key elements of a content strategy that will guide you to long-term success and set you up to get amazing results with your paid traffic campaigns as well.

Three years ago Alex Turnbull, CEO & Founder of Groove, a customer service SaaS, hated Fridays. This was because Friday was the day that their metrics provider would send a weekly summary of their numbers for that week. And those numbers reminded him that his company was on the edge of collapse, a few months away from running out of cash.

Up to this point in 2013, their marketing efforts weren’t working. Nobody was visiting their site; nobody was buying their product. Faced with a “gun to the head” situation, they decided to rework their content marketing strategy.
“We realized that there was an entire world beneath the surface of content marketing strategy that we had been missing the entire time.” – Alex Turnbull
They ditched their blog that focused on customer service and started to research and talk with businesses about what they actually needed help with. They found most businesses had problems just like theirs; challenges like cash flow, hiring, marketing. So they reworked their strategy to genuinely help people with these issues.
“Just as we did with our product, we decided to rebuild our content marketing strategy from the ground up with an eye towards what could actually help our market, rather than what we thought might look nice on a blog.” – Alex Turnbull
Three years later, they get a quarter million visits a month and 5 million in annual recurring revenue. They credit this all to the changes they made to their content marketing strategy.
Read the full story here: Behind the Scenes: How We’ve Built a $5M/Year Business in 3 Years With Content Marketing.
Why have a documented strategy?
“If you don’t know where you are going, you’ll end up someplace else.” – Yogi Berra
Many people start content marketing by just creating whenever they feel inspired by whatever is on their mind or interesting to them at the time. Their content ends up being scattered and never gets any traction. A written strategy keeps you consistent; it crystallizes your ideas and your vision, and it enables you to share that vision in a clear way. It protects you from the risk of getting caught up in “shiny object syndrome” with whatever new marketing trend appears. The written document also gives you a tool to make decisions on your content.
Take a look at these statistics from the B2B Content Marketing Benchmarks, Budgets, and Trends—North America showing the dramatic difference a content marketing strategy can make for your business.

Last year, 35% of B2B marketers had a documented content strategy, 48% had a verbal-only strategy, and 14% had no strategy. A documented content marketing strategy impacts effectiveness:

53% of the most effective marketers have a documented content marketing strategy
40% of the least effective marketers have no strategy at all.”

The target audience for your blog may be different than the target customer for your business. Content marketing is a “broad net” you cast and a long-term play. Someone who starts reading your blog may not become a customer for months or years, or they may never become a customer at all, but they’ll refer a close friend to you after reading your blog.
For example, Meryl Johnson, co-founder of Bean Ninjas, has an ideal customer of an online business that’s making 6 figures. But her content strategy targets people in much earlier stages of their business. She has lots of great articles on how a bootstrapper can manage their bookkeeping with Xero. The bootstrapper she writes the article for may not be an ideal customer now, but they are on their way to becoming one. In 6-12 months, they may hit that 6 figure mark, and by then, they’ll have a well-established relationship with Bean Ninjas and want to buy from them.
Identify the core problems you want to solve
If there’s one element of your target persona that you must emphasize and understand for content, it’s their “core problems.” A core problem is a persistent challenge that your audience faces. It should be specific enough that people immediately understand it, but broad enough that you’ll be able to create lots of variations of content for it. Each core problem should have an obvious relationship to your product or service so you can be sure you’re attracting the right people to your site.
Here are some examples of core problems that WP Curve, a startup that provides unlimited WordPress support, chose to solve with their content. They target entrepreneurs and startups for their service and have grown almost exclusively using content marketing.

Content marketing – Many entrepreneurs are attracted to content marketing as a growth strategy. WP Curve has grown almost exclusively using content, so they are an authority and a resource.
Improving your WordPress site – Common WordPress issues that entrepreneurs face on their sites, like optimizing for site speed.
Driving traffic to your site – Strategies and tactics, like SEO, paid traffic and email marketing, that can drive more traffic to your site.
Starting / launching a business – How to successfully launch a business and the many key decisions that need to be made before you launch.
Business growth – There are countless strategies and tactics to grow a business online, but with limited resources, an entrepreneur needs to identify the most effective from these and not waste time on the rest.

Your core problems should become a framework for how you organize the categories on your blog. Each problem gets its own category. All of the content you create should fit nicely into one of these categories. This gives you several advantages down the road.

You’re able to see which categories or core problems are resonating with your audience.
You’re able to hone in your messaging based on the core problem the viewer has.
You can retarget people based on the core problem they resonate with.

Find influencers to build relationships with for each problem
Each of your core problems should have a unique set of influencers and thought leaders related to it. Your documented strategy should list influencers you want to build a relationship with.
For every piece of content, you create, you should quote 3 or more other influencers in the space. This could be the first step to future backlinks, collaborations, and opportunities with these influencers.
This will also help with your paid traffic campaigns, but I’ll explain that later in the post.
Identify keywords related to the problem
Do some keyword research on each of the categories or core problems you discuss in your content.
Create a list of 5-10 keywords you would want to target for each core problem. Include these keywords in your documented strategy. Each time you write a post, you can sprinkle a few of these keywords in, to slowly climb the search rankings for these keywords and related ones.
These keywords should also help you frame the messaging on your landing pages, email series and lead magnets that you develop for that core problem.
Create a lead magnet that helps with each problem
Once you have your core problems determined, create an attractive lead magnet for each problem. The lead magnet should clearly relate to the core problem and give actionable advice on how to solve a very specific and common aspect of the problem.
A lead magnet does not have to be a long ebook; make your lead magnet short. This increases the chances that the people who download your lead magnets will use and be successful with them. If it’s too long, someone may start reading but never finish or take action, which does not help your brand.
Place the lead magnet offer in your content. If you use WordPress, you can use a plugin like Widget Context to setup your blog so that the appropriate lead magnet appears for each category automatically.
I prefer minimally disruptive placement so that the viewer can have a good experience with the content then make a decision on the lead magnet. My favorite place is the sidebar. You can use Q2W3 Fixed Widget to make sure your opt-in box stays visible and scrolls with the viewer as they go down your post.

Each lead magnet should have its own landing page, in-post or sidebar opt-in, and a thank you page
Create welcome series for each category
If someone downloads a lead magnet for a specific core problem, they’re sending you a specific signal about their wants, needs and the current state of their business. This gives you an opportunity to send them more content related to that core problem.
For each core problem and lead magnet you develop, you should create a simple email series to follow up, introduce yourself and your team, and suggest more content that they might find useful.
Helpscout’s post Building a newsletter series from scratch provides a great framework
These series should consist of 3-5 emails, each discussing different aspects of the core problem. Since they’ve already pointed out the core problem that’s on their minds currently, it’s more than likely that they’ll find another piece of content in this category helpful. This will keep them engaged with your brand, amazed at how you seem to be reading their minds, and more likely to advocate for you or become a customer.
Gasoline on the fire – boost your content with paid traffic
Now that we have this content marketing strategy and campaign set up, we can start driving some traffic to it. All of the work you have done up to this point will make it easier to setup your ads, and make them more effective in the long-run.
Cold traffic
The first step is to send cold traffic to your best posts. You can define “best” in a few ways.

Posts with the most search traffic
Posts with the highest conversion rates for lead magnet downloads
Posts that have the highest rate of social shares and engagement

Sending cold traffic to content is less expensive than trying to generate leads; people are less skeptical when they see an ad for content instead of something trying to capture their email. Don’t worry about conversion from the traffic you drive at this stage. You’ll be able to retarget them in the future and move them forward. For now, you just want your content to make a good first impression with your audience.
If you need help with targeting for cold traffic, check out Why Retargeting Isn’t the End All to Facebook Ads (And How to Get Cold Traffic That Is).
Use your Keywords – The keywords that you have found for your core problem are also useful for your ad copy. Since those are the words people are searching for when looking for a solution to the core problem you solve, including them in your ads is a no-brainer.
Using the same keywords throughout your campaign from ad to content to your lead magnet also builds up consistency and familiarity in your messaging. Consistency builds trust, and trust is the foundation of a successful content marketing campaign.
Target the influencers you mention – Target the followers of the same influencers you are building relationships with and mentioning in your content. Seeing people they already know and trust quoted and mentioned in your content will cultivate a sense of familiarity with your blog, even if it’s their first visit.
Warm Traffic
If you have a good amount of traffic flowing to your site, you can set up some warm traffic campaigns.
Create some ads for your lead magnets that send people to the landing page for the lead magnet. You can retarget people who have visited posts in the category that corresponds to the core problem the lead magnet solves. Since the people have read or at least visited your content, there’s a good chance they’re feeling the pain from that core problem you’re discussing and are looking for ways to solve it.
You’ll want to carefully watch the frequency of your ads here. With a small audience size (3-10k), it’s easy to over-send ads to your audience and frustrate them. You’ll want to exclude anyone who has visited the “thank you” page for your lead magnet. Since they’ve already converted, there’s no sense in sending ads to them.  You may want to exclude anyone that has visited your landing page within the past week as well. This will keep people from seeing your ad so much it annoys them but still leaves room for “second chances” to convert.
If you’re starting with a small audience size, I recommend choosing your highest converting lead magnet and retargeting all of your visitors. As traffic grows over time, you can start to segment your traffic and test new lead magnets.
Conclusion
By focusing on the core problems of your audience, you’ll be able to create content that truly helps your readers. You’re able to get much more specific on the content you create, the messaging you send and how you present yourself to your audience.
Remember that this is a long-term strategy, designed to build a relationship with your audience over time and cultivate trust along the way. Don’t jump into content marketing expecting immediate results. Focus on adding value to your audience first, the results will follow if you can get that right.
Kyle Gray is the founder of Conversion Cake, he helps startups and small businesses build content marketing strategies and teams. He is the author of “The College Entrepreneur” A book for students who want to break into entrepreneurship. Follow him @kylethegray.”
Source: https://adespresso.com/feed/


Should You Offer A Coupon Code In Your Facebook Ads?

Coupons are the proverbial golden tickets of sales. Or they seem that way, until they devalue your product, slow your growth, and ruin your brand.
Though coupons can be a powerful force to drive sales, they can have unintended, disastrous effects. Just ask Rachel Brown of Need A Cake Bakery in London, who lost $20,000 in a nightmarish response to a cupcake coupon.

The negative effects of offering coupons aren’t always that obvious (or high in refined sugar), especially because you intend for coupon offers to help your business.
Take a look at the different goals you might be hoping to achieve with coupon codes and how each might backfire. Then see how you can achieve these goals without using coupons and build a stronger business in the process.

Your goal: Offer lower prices than your competition
When you’re in a competitive market with other companies that sell similar products, you might think that a coupon code for a lower price will win you the customer.
But in the race-to-the-bottom, you’re not playing to win. Consistently offering discounts or dramatically slashing prices conditions your customers to believe that your product or service is less valuable. Price Intelligently, a price consulting company, shows that discount customers undervalue the product’s bottom line as shown by their willingness to pay (WTP).

Providing discounts for the sole purpose of competing on low prices not only devalues your product, but it also creates doubt in your customers’ minds. Stanford Business, in a study on comparative advertising, found that pointing out the price difference between your prices and a competitor’s makes the customer fear they are somehow being tricked.
The real solution: Add more value to your product
Instead of distinguishing yourself from the competition as the “low-price leader,” distinguish yourself by providing other value. Then not only will you stand out from the competition, but you’ll also be adding to the value of your product rather than undermining it. You can do this by:

Adding a unique feature to a product or highlighting a little-known feature that is different than what competitors offer.
Providing excellent customer service to distinguish you from other companies. Most companies aren’t as good at customer service as they think. While 80% of companies say they have superior customer service, only 8% of their customers agree.
Showcasing your company culture to give customers the opportunity to feel a human connection to your brand. This leads to customer loyalty and trust, so don’t be afraid to wear your quirks on your sleeve.

 
Your goal: Attract new customers and encourage first-time purchases
Research by VoucherCloud found that 57% of shoppers are motivated to complete a first-time purchase when they are able to redeem a coupon. Toss a coupon code out there and you’ll be shooting sitting ducks, right?
Not quite. Coupon codes will certainly draw attention and, in some cases, motivate purchases—but you’re probably not attracting the kind of customer you want.
The ideal customer will return to purchase from you and will pay full price for your product or service. When you capture new customers with a coupon code, you don’t know if they’re more interested in the product or the discount.
Science shows that people like to use coupons simply for the thrill of getting a discount. Coupons.com found that shoppers who received a $10 voucher experienced a 38% rise in their levels of oxytocin, a positive-feedback hormone. They also experienced decreased heart rates and respiration rates, indicating lower stress levels.
These coupon-seeking customers are particularly detrimental if your product is a subscription service. Customers might use the coupon to sign up, but if they are not the right customers for the product, they will cancel and immediately churn out. This leads to an overall higher churn rate than is justified for your product. This only compounds as you grow in size and publicity and attract more one-hit wonder customers.

The real solution: Focus on customer loyalty
Instead of using coupons to snag customers who might only be in it for the deal, use coupons to reward loyal customers who complete many purchases with you to keep and build your loyal customer base:

Know the Lifetime Value (LTV) of a customer, or the approximate projected revenue that a customer will generate during their time with the company. An excellent infographic for calculating LTV can be found here.
Use a customer loyalty application like LoyaltyLion to allow customers to directly reap benefits from actions that support your company.
Offer benefits to customers who like, share, and refer others to your company and you’ll build brand loyalty while spreading the word to new customers.

 
Your goal: Sway current customers to purchase different items
Providing coupon codes for specific items can draw attention to specific inventory or services. It is particularly tempting to do this for items that are less popular and don’t sell as well.
The problem with this strategy is that you’ll lose your market for those specific services when you offer them at full price again. Your original price might not be working if you don’t have a good product-market fit.
A good product-market fit means that you’re in a market where people are interested in your product, and you have a product that people will happily pay for. Figuring out this fit is a process that involves shaping your market just as much as it involves shaping your product as this flowchart shows.

Early product integrationand customer/business integrationshould go hand-in-hand. Both processes have various stages and require you to assess your progress at each stage.
As you create the opportunity for people to discover your product and to find benefit, you create your customers. When you have the product and the market, then you can build your company.

Discounts mean nothing if you don’t have a good product-market fit. You need this as a foundation before you start aiming for growth through promotions.
The real solution: Create a better product-market fit
Instead of pushing your underperforming products and services with coupon codes, ask why this product isn’t selling at full price and try to fix the underlying problem:

Read customer reviews and go over customer service feedback to learn about your market. This will help you understand how customers view the value of your product and how well it meets their needs.
Explain the benefits of your product or service more clearly to help customers understand your industry and understand the value. You can do this by changing the copy on your website to be more explicit or by publishing content to help your customers learn.
Remove simple pain points that might exist around this product by rephrasing its pitch, renaming, or writing the price in a different way.

 
Your goal: Learn about customers’ buying pathways
Using coupon codes can have value when you want to find out more about how customers navigate to make purchases and what effects their buying decisions. You can test two versions of the same advertisement—one with a coupon code and one without—and experiment whether the coupon makes a difference in sales and customers when everything else is equal.
But if you only test one coupon/no-coupon combination, you won’t really know if the success of the coupon ad (or the non-coupon ad) is related to the coupon at all. You’ll show correlation, but you won’t prove causation.
There are many many aspects of your ads that you can vary—the addition of a coupon code is just one. The experiment below ran two different ads with the same goal of driving membership purchases before a price increase.

The ads have different copy, image, and target audience and saw drastically different results in cost per click and return on investment.
The real solution: Vary many aspects of ads in your tests
You need to be sure that the coupon code is having a predictable effect on sales to learn about the online shopping behaviors of your customers. Run multiple tests featuring different coupon codes and different iterations of the ad:

Experiment with different types of Facebook ads, such as domain ads, multi-product carousel ads, and dynamic product ads. Different types of ads can be supported in different placements like Facebook’s right column, the desktop newsfeed, and the mobile app platform.
Vary the design of your ad by changing the copy, the image, or the call-to-action.
Offer different types of coupons in your tests like two-for-one deals, percentage, or dollar-based discounts, and free shipping.

 
Are coupons the golden tickets?
The goal of any promotion is to generate interest in your brand and prompt desire for your product for which customers will return and pay full price.
If you’re thinking about using a coupon code as a quick-fix to meet objectives or push unpopular products, step back and consider how you can fix the underlying problems.
If you focus on bottom lines like product and brand quality, customer loyalty, and product-market fit, you’ll build a stronger business that will thrive with or without coupon codes.
Source: https://adespresso.com/feed/


Facebook: Workplace

I can literally hear all of the IT administrators scream as they have to “unblock” access to Facebook on their local networks at work…
The idea of Facebook moving into the team and productivity setting makes complete sense. Even I find myself nodding my head in agreement with their strategy and product direction.

It’s just hard to not imagine this system ultimately powering not just your personal relationships but your professional ones as well. It’s always been a bit fluid technologically but not seamless. Now, it seems, you’ll be able to have your cake and eat it too.

I am not personally a large user of Facebook after having quit a while ago, but, I won’t lie… I’ve imagined a world that has forced my hand to go back.
How I reason through this in my small brain is comparing it to another enterprise solution and toolset that I use but that I have my issues with: Google Apps.
They see everything that I do since I use them and many folks choose to avoid Google and their army of services at all costs. But most of the companies that I encounter and have worked for use Google Apps. To be a successfully engaged employee I had to use those systems.
That’s how I liken it; if the rest of the world moves toward Facebook as an enterprise, workplace solution, then, I can imagine a world where I’d have to make the decision to either submit to that or find another place of employment.
Huh. Check it out here.
The post Facebook: Workplace appeared first on John Saddington.
Source: https://john.do/