Saturday, March 10, 2018

Jack Ma’s journey - #Infographic

Diminutive Jack Ma speaks softly – yet colorfully – and carries a big stick as the founder of China’s most popular online store. When he set up Alibaba, he saw a chance to connect China’s manufacturers to wholesale buyers around the world, fulfilling the ambition he formed as soon as he heard...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

Friday, March 9, 2018

4 Tips for Staying Focused on What Matters When You Work From Home [video]

Many companies are allowing employees to work from home. In fact, 43 percent of American workers said they worked from home at least some of the time in the last year. And there's an entire group of workers -- among them entrepreneurs and those running startups -- who operate exclusively from...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

Hey, I’m Phil

Unique One Pager for Phillip Pastore featuring tons of interactive text that overlays media. It’s got personality for sure and neat added touch stacking all the media in a hidden footer (that’s also draggable).

Full Review | Direct Link


by Rob Hope @robhope via One Page Love

#376: This week's JavaScript news smoosh-up

#376 — March 9, 2018

Read on the Web

JavaScript Weekly

Could Array.prototype.flatten Become 'smoosh'?

This week, TC39 member Michael Ficarra suggested renaming the flatten method to smoosh to avoid breaking sites using MooTools' incompatible flatten method. The dislike for 'smoosh' went viral and people rapidly suggested alternatives like squash, flat and chain, while André Staltz started a campaign to ‘prevent smoosh’!

The current state of play is the TC39 committee (who work on the standardization of ECMAScript and are actually really nice) are keeping their options (and dialogue) open while Brian Terlson reminds us "TC39's active GitHub users are not always representative of the entire committee."

How I Built a Super Fast JS Framework — The creator of Radi.js, a new tiny front-end library, shares why he’s created it when there are already tons of front-end libraries around — performance.

Mārcis Bergmanis

Power Your Apps with Angular UI Components and Spreadsheets — Build complete enterprise web applications with GrapeCity’s dependency-free, Angular JavaScript solutions. Includes Spread’s full-featured Excel-like spreadsheets and Wijmo’s collection of IntelliSense-enabled grids, charts, and input controls.

GrapeCity JavaScript Solutions sponsor

Loading Third-Party JavaScript — A jam-packed article from Google on how to find and fix issues related to loading third-party JS. How do you load third-party scripts efficiently? Learn it all here.

Addy Osmani and Arthur Evans

Beyond React 16: Time Slicing and Suspense API — Last week Dan Abramov gave his ‘Beyond React 16’ talk showing off ideas coming to React in the future, which are reflected upon here.

Prosper Otemuyiwa

Node v8.10.0 (LTS) Released — A significant LTS release for production systems with updates to V8, libuv, npm, Unicode and OpenSSL support. 9.8 is out too. Also, remember we have Node Weekly for each week’s Node news :-)

Gibson Fahnestock

Let’s Build a Custom Vue Router — A thorough walkthrough of building a custom client-side router for Vue when the official one doesn’t quite meet requirements.

Hassan Djirdeh

Jobs

Lead React/Redux Engineer - Remote, SF, or Halifax, Canada — We’re an ambitious startup seeking an experienced front-end engineer to bring our React architecture forward.

Manifold

Frontend Engineer for Leading Open Source Company — Love coding web apps & building reusable high-performance UI components? Help define open source web app UI for large-scale enterprises.

Liferay, Inc.

Find a Job You're Passionate About — Vettery connects you directly to hiring managers at over 4,000 top companies. Make a profile today and land your dream job.

Vettery

Tutorials

Building a Serverless Real-Time Chat App with AWS AppSync — AppSync is AWS’s fully-managed GraphQL service and interacting with it from JavaScript is pretty straightforward.

Adrian Hall and Ed Lima

What’s New in ES2018? — Lots of code examples in this slidedeck.

Benedikt Meurer and Mathias Bynens slidedeck

10 Tips for JS Debugging Like a Pro at the ConsoleRecommended by Sarah Drasner this week.

Yotam Kadishay

Preserve Build Integrity & Prevent Problems with Deterministic Builds — The most common thing a customer will say in a support ticket is that their builds are suddenly failing even though “nothing has changed” on their end. This is almost never true.

CircleCI sponsor

The JavaScript Learning Landscape in 2018 — Books, podcasts, etc.

Jason Rodriguez

🎬 Videos, Screencasts and Talks

▶  The Fundamentals of Testing Angular Components

Jesse Palmer

▶  Evan You's 'State of Vue.js 2018' Keynote

Vue.js Amsterdam Conference

🔧 Code and Tools

SlimerJS: Script a Headless Firefox Browser from JavaScript

Laurent Jouanneau

Instantly Seeing the Results of Your Code While You Are Writing It

Wallaby.js sponsor

Create Angular Libraries in No Time with 'Schematics'

Netanel Basal

Real-Time Error Monitoring, Alerting, and Analytics for JavaScript 🚀 — Report JS errors to Rollbar with full stack trace and diagnostic data.

ROLLBAR sponsor

DoneJS 2.0 Released: A Framework for High-Perf Realtime Webapps

Matthew Phillips

TinyState: A Tiny, Powerful State Management Library for Angular

Sebastian Holstein

Awaity.js: Functional, Lightweight Alternative to Bluebird — Built with async/await in mind.

Asaf Katz

OpenPGPjs 3.0: An Open Source OpenPGP Library

ProtonMail

Vue Tour: Simple, Customizable 'Guided Tour' Plugin for Vue

Pulsar

Workly: Simply Move a Function or Class to a Worker Thread

Preet Shihn

Events

AmsterdamJS Conference 2018 (May 31-June 1)

KnowJS 2018: An Online Workshop with 4 JS Experts — Takes place April 13. Costs money but the teachers are great.

Certified Fresh Events

Seen on Twitter

Let's make everything compile-to-2017-level-JavaScript

by via JavaScript Weekly

11 Pro Email Marketing Tips - #infographic

There’s a lot to learn when you’re new to email marketing. Wouldn’t it be great to get some wisdom from an email marketing pro? Get 11 email marketing tips from some of the best in the business.

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

Tiffany Break

Parallax Scrolling, media-rich Landing Page for the ‘House of Crunch’ campaign featuring Tiffany Break celebrities.

Full Review | Direct Link


by Rob Hope @robhope via One Page Love

Cleaning Up Your Data With Go: Part 1

Overview

One of the most important aspects of any application is validating its input. The most basic approach is just failing if the input doesn't satisfy the requirements. However, in many cases this is not enough. In many systems the data collection is separate from data analysis. It could be a survey or an old dataset. 

In these cases, it is necessary to go over the entire dataset before analysis, detect invalid or missing data, fix what can be fixed, and flag or remove data that can't be salvaged. It is also useful to provide statistics about the quality of the data and what kinds of errors were encountered. 

In this two-part series you'll learn how to use Go's text facilities, slice and dice CSV files, and ensure your data is spotlessly clean. In part one, we'll focus on the foundation of text processing in Go—bytes, runes, and strings—as well as working with CSV files.

Text in Go

Before we dive into data cleaning, let's start with the foundation of text in Go. The building blocks are bytes, runes, and strings. Let's see what each one represents and what the relationships are between them. 

Bytes

Bytes are 8-bit numbers. Each byte can represent one of a possible 256 values (2 to the power of 8). Each character in the ASCII character set can be represented by a single byte. But bytes are not characters. The reason is that Go as a modern language supports Unicode, where there are way more than 256 separate characters. Enter runes. 

Runes

A rune in Go is another name for the int32 type. This means that each rune can represent more than four billion separate values (2 to the power of 32), which is good enough to cover the entire Unicode character set. 

In the following code you can see that the rune '∆' (alt-J on the Mac) is just an int32. To print the character it represents to the screen, I have to convert it to a string.

Unicode is complicated. A rune officially represents a Unicode code point. Unicode characters are usually represented by a single Unicode code point, but sometimes more than one.

Strings

Strings are officially just read-only slices of bytes. If you index a string, you get a byte back:

String literals are a sequence of UTF-8 characters enclosed in double quotes. They may contain escape sequences, which are a backslash followed by an ASCII character such as \n (newline) or \t (tab). They have special meanings. Here is the full list:

Sometimes you may want to store literal bytes directly in a string, regardless of escape sequences. You could escape each backslash, but that's tedious. A much better approach is to use raw strings that are enclosed in backticks. 

Here is an example of a string with a \t (tab) escape sequence, which is represented once as is, then with the backslash escape, and then as a raw string:

While strings are slices of bytes, when you iterate over a string with a for-range statement, you get a rune in each iteration. This means you may get one or more bytes. This is easy to see with the for-range index. Here is a crazy example. The Hebrew word "שלום" means "Hello" (and peace). Hebrew is also written right to left. I'll construct a string that mixes the Hebrew word with its English translation. 

Then, I'll print it rune by rune, including the byte index of each rune within the string. As you'll see, each Hebrew rune takes two bytes, while the English characters take one byte, so the total length of this string is 16 bytes, even though it has four Hebrew characters, three symbols, and five English characters (12 characters). Also, the Hebrew characters will be displayed from right to left:

All these nuances can be extremely important when you have a dataset to clean up with weird quotes and a mix of Unicode characters and symbols.

When printing strings and byte slices, there are several format specifiers that work the same on both. The %s format prints the bytes as is, %x prints two lowercase hexadecimal characters per byte, %X prints two uppercase hexadecimal characters per byte, and %q prints a double quoted string escaped with go syntax. 

To escape the % sign inside a format string specifier, just double it. To separate the bytes when using %x or %X, you can add a space, as in "% x" and "% X". Here is the demo:

Reading and Writing CSV Files

Data can arrive in many ways and formats. One of the most common formats is CSV (comma-separated values). CSV data is very efficient. The files typically have a header line with the name of the fields or columns and rows of data where each row contains a value per field, separated by commas. 

Here is a little snippet from a UFO sightings dataset (really). The first row (header) contains the column names, and the other lines contain the data. You can see that often the "Colors Reported" column is empty:

Writing this chunk of CSV data to a file involves some string operations as well as working with files. Before we dive into the main logic, here are the mandatory parts: the package definition, the imports, and the data string (note the use of const).

The main() function creates a file called "ufo-sightings.csv", checks that there is no error, and then creates a buffered writer w. The defer call in the next line, which flushes the contents of the buffer to the file, is executed at the end of the function. That is the meaning of defer. Then, it uses the Split() function of the strings package to break the data strings into individual lines. 

Then, inside the for-loop, the leading and trailing whitespace is trimmed from each line. Empty lines are skipped, and non-empty lines are written to the buffer, followed by a newline character. That's it. The buffer will be flushed to the file in the end.

Reading from the file is pretty simple:

Conclusion

Go has strong facilities to deal with text of all shapes and encodings. In this part of the series, we looked into the basics of text representation in Go, text processing using the strings package, and dealing with CSV files. 

In part two, we will put what we've learned into practice to clean up messy data in preparation for analysis.


by Gigi Sayfan via Envato Tuts+ Code