Thursday, July 21, 2016

A JS-powered Terminal Emulator, V8 5.3, Deep Dive into ES6 Destructuring

This week's JavaScript news
Read this e-mail on the Web
JavaScript Weekly
Issue 293 — July 21, 2016
“The goal of the project is to create a beautiful and extensible experience for command-line interface users, built on open web standards.”
Guillermo Rauch

An audio library that uses the Web Audio API but can fall back to HTML5 audio. Supports 3D audio, auto-caches, and has no dependencies.
James Simpson

In beta until Chrome 53 stable arrives, version 5.3 boasts improved page startup and Promises performance (20-40% on one benchmark), plus a new interpreter called Ignition.
Seth Thompson

ZingChart-AngularJS is a directive to create AngularJS graphs. Easy to set up. Style as you like. Access all the features. Try it today.
ZingChart   Sponsored
ZingChart

A complete tutorial bringing together numerous modern Web technologies to create a simple desktop music player.
Wern Ancheta

Faraz Kelhini’s detailed tutorial explores arguments and parameters and sees how ES6/ES2015 has upgraded their potential.
Smashing Magazine

“destructuring takes data from an existing object or array and literally destructs it to extract only the values you’re interested in.”
Mike Evans

Jobs Supported by Hired.com

  • Software Engineer – JavaScriptWanted: JavaScript genius who can apply their analytical work process to our codebase. Experience with webpack, Rollup and Babel? Understand unidirectional data-flow principles? Apply today. Trivago
  • Javascript Developer at X-Team (Remote)We're looking for developers with an extensive knowledge of JavaScript and skills in different frameworks and libraries. We are 100% remote and we provide the funding needed to help you achieve your goals and grow. X-Team
  • JavaScript Developer at Evolution GamingWe are looking for a senior developer who would be ready to shape the future and accomplish challenging tasks, e.g., migrating stateful legacy components to functional React-Redux ones and modularising CSS with the help of css-modules.  Evolution Gaming

Can't find the right job here? Want companies to apply to you? Try Hired.com.

In brief

Looking for more on Node? Read this week's Node Weekly too :-)

Curated by Peter Cooper and published by Cooper Press.

Stop getting JavaScript Weekly : Change email address : Read this issue on the Web

© Cooper Press Ltd. Office 30, Lincoln Way, Louth, LN11 0LS, UK


by via JavaScript Weekly

VieLoco

VieLoco

Super impressive landing page for 'VieLoco' social app that matches users based on their shared passions. The Single Page website features a hover sensitive parallax effect while showcasing how the app matches a couple with similar interests. Lovely touch with the logo animation in the last slide. Make sure you use the dot navigation for the best browsing experience. We're letting that footer FAQ page slide through the submission cracks purely because of the quality of this submission using excellent One Page techniques for reference.

by Rob Hope via One Page Love

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

Perfectionism

Perfection. How romantic.

As a society we celebrate perfectionists and their behaviors.

[author_more]

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

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

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

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

Perfection Can Get Extreme

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

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

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

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

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

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

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

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

Perfection — Just an Ideal

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

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

After all, we celebrate it so often.

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

The Crunch — Perfectionism Hurts

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

  • Your perfectionism crushes your ideas.

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

  • Your perfectionism destroys your productivity.

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

  • Your perfectionism makes you procrastinate.

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

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

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

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

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

  • Your perfectionism makes you unhappy.

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

  • Your perfectionism makes you unhappy even about your successes.

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

  • Your perfectionism exhausts you.

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

  • Your perfectionism makes you feel like everything is impossible.

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

  • Your perfectionism will make you give up.

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

The Struggle is Real — What Do I Do?

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

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

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

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

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


by Andrew Lau via SitePoint

My Merry Miles

My Merry Miles

'My Merry Miles' is a fun quiz-style One Pager that calculates your sex drive score. The "character" illustrations that appear along with your results are hilarious:)

by Rob Hope via One Page Love

How to Quickly and Easily Remove a Background in Photoshop

This article was first published in 2009 and remains one of our most popular posts. Recently we asked Gabrielle Gosha to update it for 2016 Photoshop users. Enjoy.

Background Eraser Tool

Photoshop offers many different techniques to remove an unwanted background from an image. For simple backgrounds, using the standard magic wand tool to select and delete the background may well be more than adequate.

For more complicated backgrounds, you might use the Background Eraser tool. This tool samples the color at the center of the brush and then deletes pixels of a similar color as you "paint." It feels like painting with acid. Let me show you how it works.

Step 1: Open your Image

Start by grabbing an image that you want to remove the background from. I'll be using this image as it features areas that range from easy removal through to more challenging spots.

The example image.

Step 2: Select Background Eraser

Select the Background Eraser tool from the Photoshop toolbox. It may be hidden beneath the Eraser tool. If it is simply click and hold on top of the Eraser tool and pick the Background Eraser.

Finding the Background Eraser Tool

Step 3: Tune Your Tool Settings

On the tool options bar at the top of the screen select a round, hard brush. The most appropriate brush size will vary depending on the image you're working on. Use the square bracket key ([ or ]) for quickly scaling your brush size.

Brush adjustment panel

Next, on the tool options bar, set the Sampling to Continuous, the Limits to Find Edges and a Tolerance of somewhere between 20-25% is a good starting place.

Limits settings. Find edges.

Note: A low tolerance limits your eraser to areas that are very similar to your sampled color. A higher tolerance expands the range of colors your eraser will select.

Step 4: Begin Erasing

Bring your brush over your background and begin to erase. You should see a brush-sized circle with small crosshairs in the center. The crosshairs show the "hotspot" and delete that color wherever it appears inside the brush area. It also performs smart color extraction at the edges of any foreground objects to remove 'color halos' that might otherwise be visible if the foreground object is overlayed onto another background.

Note: For the example image, I actually used a rather high Tolerance than the 20-25% recommended above due to the wide range of blues behind this subject.

Beginning the background removal process

When erasing, zoom up your work area and try to keep the crosshairs from overlapping on the edge of your foreground. It's likely that you will need to reduce the size of the brush in some places to ensure that you don't accidentally erase part of your foreground subject.

Step 5: Choosing Effective Limit and Sampling Settings

Even though I have used a smaller brush to work around the hair and neck area, the Background Eraser has still managed to gouge a few chunks out of the hair and shirt.

Overly aggressive tolerance settings are removing foreground detail

For foreground image areas that share colors with the background (like this one), you may need to adjust the Sampling and Limits. In this picture, I switched over to the Sampling: Once option, set my Limits to Discontinguous and set my Tolerance to 30%.

enter image description here

The Sampling: Once option samples the color under the crosshair only the moment you click and it doesn't resample as you move your brush along. The Discontiguous Limit option allows you to erase all pixels that match the sampled color that you're erasing. This allowed me to get in between the hair strands without erasing them.

There's a good chance the Background Removal Tool may be all you need to complete your task.

But if not, read on.

Close up showing improved removal

Step 6: Quick Mask or Pen Tool

While removing the background on our example image is mostly straight-forward due to the fairly solid background, there are inevitably areas of our foreground subject that get wrongly erased as we work close to foreground's edges.

Manually retouching challenging areas

In our example, the foreground and background share similar colors due to the lighting. This will be easiest to repair using Photoshop's Pen tool. I only have a small section I need to touch up, so I'll use the Pen to create a clean selection and delete the unwanted background.

Using the pen tool to retouch difficult areas

Here's the finished result:
Finished background removal

Continue reading %How to Quickly and Easily Remove a Background in Photoshop%


by Jennifer Farley via SitePoint

A Quick Dive into the Crystal Programming Language

Screenshot 2016-07-20 07.57.18

You might have heard mentions of the Crystal programming language of late. It is a language that looks very similar to Ruby. In fact, many Ruby programs are also valid Crystal programs. However, it must be emphasized that this is a mere side effect of the syntax of the language and is not a goal of the project.

One of the most interesting things about Crystal is that it is a statically type-checked language, yet it doesn't require the programmer to sprinkle types everywhere like Java. Crystal compiles down to efficient code, which means Crystal programs are much faster than Ruby programs.

In this article we will take a quick dive into Crystal. This is by no means a comprehensive walk-through of all the features in Crystal. Instead, we are going to develop a concurrent Chuck Norris joke fetcher with the lens of a Rubyist. This involves making HTTP GET requests and also some JSON parsing.

We will see how far that takes us, along with looking into the facilities that Crystal provides that makes things more convenient.

Continue reading %A Quick Dive into the Crystal Programming Language%


by Benjamin Tan Wei Hao via SitePoint

Laludelo

Laludelo

Centrally-divided layout in this One Pager for outdoor furniture craftsman, Laludelo. Nice touch revealing the "remaining half" of the team member when clicking for more info on them.

by Rob Hope via One Page Love