Monday, May 9, 2016

How to Use Google, Email, Social Media & Web: The Grandparent’s Guide to the Internet [INFOGRAPHIC]


“You’re watching a movie with your granddaughter and you say, “That actor sure looks familiar.” And suddenly the little girl whips out her tablet computer, taps on it a couple of times, and says, “It’s Joseph Gordon-Levitt — the kid from Third Rock From the Sun. He just got married!” You know you could probably do that too. But how do you get started learning? That’s an easy one: you start right here!”

The infographic below, created by WhoIsHostingThis, will serve as you basic guide to understanding the world of internet, you'll discover how to search the web, how to use tools like Google and Skype, and much more.

by Irfan Ahmad via Digital Information World

A Guide to Creating an Optimal Remote Workspace from Scratch

Remote workspace

[author_more]

Working remotely can lead you on a downward spiral of demotivation if your workspace isn’t encouraging, healthy and well-equipped, so that you can do the work that you’ve been hired to do. Critically-acclaimed collaboration tools and excellent skills are far less effective if your workspace is none of these things.

I use the term “workspace” loosely, because we all have different types of workspaces depending on what we do for a living and our individual temperaments. Some of us have more than one workspace, and some of us have a different one everyday (i.e. those that require less equipment and work from cafés and bars).

In order to create a remote workspace that’s right for you, one that keeps you happy and motivated as well as boosts your creativity, you first need to ask yourself these questions:

Equipment: What Type of Work Do You Actually Do?

Remote workspace equipment

Your equipment largely depends on what you do, which can range from a simple 11” laptop to a much larger 27” desktop (and we’re only talking about computers here!). But that doesn’t mean that some roles are restrictive; quite often we assume that more (or bigger) equipment is better, when in fact, less is usually more.

First, consider what equipment you actually need.

Standing desk? Full desk? Just a table in a café? Minimising (especially Wi-Fi-enabled devices if you’re addicted to checking emails) can certainly improve your productivity, if not enable you to work outside whenever you feel like it. Amazon, or even our very own SitePoint shop has a huge inventory of mobile desks, fold-up tablet stands and so on.

Gadgets like these are more than suitable for use at home, as well, so your remote workspace travels wherever you go.

Ambience: What Makes You Happy, But Not Distracted?

Working in a café

For me it’s working in a café. I don’t have much equipment as a writer but I require a little bit of background noise to function correctly; not music, because the lyrics conflict with my written words, and for others too, it’s hard to read when there’s music.

For creative types on the other hand, music can be a huge motivator. Consider what kind of noise and ambience motivates you to work without distracting you; that can be the live sound of various conversations in a busy co-working space, or the recorded sounds of an ambient noise app like Noisli.

If you need to work at home because you’re required to take conference calls in between work sessions, but working from cafés is definitely your style, Noizio even has “Paris Café” setting!

Green Plants Can Boost Creativity

Plants that boost creativity

Plants — yes, that’s right, plants. Plants can boost creativity by up to 50%. Whether you enjoy working for an hour a day in a natural open space, or you keep a few tiny bonsai trees on your at-home desk, either can massively improve your work output. Not only do they clean the air in a room, but brief exposure to the colour green can induce creative and innovative thinking.

Continue reading %A Guide to Creating an Optimal Remote Workspace from Scratch%


by Daniel Schwarz via SitePoint

Web Design Weekly #234

Headlines

Scaling Knowledge at Airbnb

An insight into the way Airbnb is tackling the transmission of knowledge across its ever-growing organization. Their process not only considers what the company has itself created, but also peer reviews to check for code correctness and adherence to best practices. In sharing their work in progress they hope to inspire other organizations to tackle the problem and share their insight to collaboratively produce best practices across the industry. (medium.com)

Why the future of web browsers belongs to the biggest tech firms (theguardian.com)

Group Chat for Teams

Stop losing momentum with reply-to-all wars and buried email messages. Cut to the chase with @mentions and get the answer you need. Try HipChat for free today! (hipchat.com)

Articles

A Comparison of Animation Technologies

Sarah Drasner compares various animation tools that she’s had experience with and breaks down the pros and cons of each method. (css-tricks.com)

Refactoring Legacy CSS

Kasey Bonifacio offers some quality advice for attacking legacy CSS. If you have a large codebase that is in need of some serious love, this is a good place to start. (seesparkbox.com)

Meaningful CSS: Style Like You Mean It

Tim Baxter’s passion for writing semantically and meaningfully, not bloating code and thereby creating a lighter markup, shines through clearly in this article of his. (alistapart.com)

WebKit Updating Their Prefixing Policy

The WebKit team are heading in the direction of implementing experimental features unprefixed and putting them behind a runtime flag. (webkit.org)

A Team Activity to Start a Design System (medium.com)

Tools / Resources

Useful eBooks for Web Developers

A collection of free ebooks for front-end developers about JavaScript, ES6, NodeJS, CSS3 and HTML5. After comparing near 400 free books related to web developers, these top 17 have been identified for their quality content. (medium.com)

Guide To CSS Pseudo-Classes And Pseudo-Elements

A great resource put together by Ricardo Zea that looks at all the current pseudo-classes and pseudo-elements available. One for the bookmarks. (smashingmagazine.com)

Design More, Work Less

You do fun, we do boring. Create outstanding websites on LightCMS. (lightcms.com)

Let’s Learn JavaScript Closures

Preethi Kasireddy looks into the inner workings of how and why closures work the way they do. If you are serious about JavaScript this is worth reading. (medium.freecodecamp.com)

Reducing JPG File size

This article by Colt McAnlis doesn’t just link a couple of tools and sends you on your merry way. He fully nerds out and shares copious amounts of knowledge to help make your JPG files smaller. (medium.com)

Inspiration

10 Stats That’ll Change The Way You Think About Remote Work (jell.com)

Front-end metrics from big news sites around the world (francescoschwarz.de)

Jobs

UX Designer at Hotjar

We are looking for an ambitious and driven UX designer who is passionate about creating engaging, consistent and memorable experiences. Hotjar is a rapidly growing startup that is giving thousands of website owners the tools needed to discover how their visitors are really using their website. (hotjar.com)

Product Designer at Creative Market

We’re growing rapidly and need your help as we continue to scale the platform that puts incredible design and creativity at the fingertips of the masses. (creativemarket.com)

Have an Web Design related position you need to fill?

Last but not least…

Upcoming Changes to Embedded Tweets (twittercommunity.com)

The post Web Design Weekly #234 appeared first on Web Design Weekly.


by Jake Bresnehan via Web Design Weekly

Build Your Own Chrome Extension Using Angular 2 & TypeScript

Chrome extensions are small web applications that add features to the Google Chrome browser. They can extend and customize browser behavior, the developer tools or the new tabs page. Extensions can be downloaded from the Chrome Web Store.

In this tutorial we are creating a Chrome extension that lets us save website URLs and displays them on every new tab's page. Of course, there are native Chrome bookmarks, but we want to integrate the bookmarks directly into the new tab's page and control their visual appearance.

You can find the complete project code in the GitHub repository here, and feel free to install a running version of the extension (with a few more features).

What We're Building

Let's start with a brief overview of what we want to develop. The screenshot shows that we will create a list consisting of a variable amount of bookmark items. The bookmarks are links that open the respective URLs when clicked.

Screenshot of the bookmark lists.

Every bookmark needs two pieces of information: its title and its URL. There will be an option to edit this information and another to delete the bookmark. To edit a bookmark, we'll need a form with two input fields and a submit button.

Screenshot of the edit modal.

To handle user input and render the list, we are going to use Angular 2 with TypeScript. Angular 2 is great for building client-side applications, and it works well with TypeScript, a typed super-set of JavaScript. If you'd like to start with an introduction to Angular 2 and TypeScript, I recommend this article.

You don't need more than a text editor and the Node Package Manager (npm) to follow this tutorial. However, publishing an extension requires a Google developer account, which can be created here.

Setup and Structure

It is time to work on the actual app, so let's create a new project folder:

mkdir sitepoint-extension && cd sitepoint-extension

TypeScript Config

Next we'll add a tsconfig.json file to the project folder. This file instructs the TypeScript compiler how to compile our .ts files.

{
  "compilerOptions": {
    "target": "ES5",
    "module": "system",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  },
  "exclude": [
    "node_modules"
  ]
}

The important settings are the compilerOptions. There we specify that the ECMAScript target version should be ES5 and that the module code generation should happen with SystemJS ("module": "system").

With "sourceMap": true source map files will be generated. These .map files are great for debugging, because with them the browser can map the compiled ES5 code onto the TypeScript code.

For this tutorial we do not need to know more about the tsconfig.json file. The complete documentation can be found here.

Package.json

We are using npm to install the packages we need, and npm scripts to create some development and build tasks. To do this, we add a package.json to our main directory.

Angular 2 is currently in beta. For this tutorial, I used the beta 7 version. You may use a newer version of course, but I can not guarantee that everything will work smoothly because the framework might still change.

{
  "name": "SitePointBookmarkExtension",
  "description": "A Chrome Extension for Bookmarks",
  "version": "1.0.0",
  "scripts": {
    "lite": "lite-server",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "start": "concurrently \"npm run tsc:w\" \"npm run lite\""
  },
  "dependencies": {
    "angular2": "2.0.0-beta.7",
    "systemjs": "0.19.22",
    "es6-promise": "^3.0.2",
    "es6-shim": "^0.33.3",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.2",
    "zone.js": "0.5.15"
  },
  "devDependencies": {
    "concurrently": "^2.0.0",
    "lite-server": "^2.1.0",
    "typescript": "^1.7.5"
  }
}

Now let's install the packages with

npm install

Notice that there are some prepared npm scripts included that can be executed with npm run [script name]. At the moment, there are four scripts which will help us compile our TypeScript files and create a development server.

Manifest.json

Before we create our app, we need to add yet another .json file, the manifest.json. This file is necessary for every Chrome extension, as it specifies information about how the Web Store and the browser should handle the extension.

We will complete the file later, but for now let's just add the required and recommended properties:

{
    "manifest_version": 2,
    "name": "SitePoint Bookmark Extension",
    "short_name": "Make the most of a new tab",
    "description": "This extension helps you save your favorite webpages.",
    "version": "1.0.0",
    "author": "Michaela Lehr @fischaelameer"
}

Bookmark Component

Angular 2 is a component-based framework and our first component will be a single bookmark. This component will later be a child component, since we'll be creating a parent list component to contain the bookmarks.

Screenshot of the component architecture.

Let's create a new folder scripts and, within, a file called bookmark.component.ts.

// To create a component, we need Angular's "Component" function.
// It can be imported from the "angular2/core" module.
import { Component } from 'angular2/core';

// A component decorator tells Angular that the "BookmarkComponent" class
// is a component and adds its meta data: the selector and the template.
@Component({
    selector: 'sp-bookmark',
    template: '<h1>Bookmark</h1>'
})

// The "BookmarkComponent" module exports the "BookmarkComponent" class,
// because we will need it in other modules,
// e.g. to create the bookmark list.
export class BookmarkComponent { }

To bootstrap the BookmarkComponent component, we have to add another file, we call boot.ts:

// We need to reference a type definition (or 'typings') file 
// to let TypeScript recognize the Angular "promise" function
// (we'll need this later on) otherwise we'll get compile errors.
/// <reference path="../node_modules/angular2/typings/browser.d.ts" />

// Angular's "bootstrap" function can be imported 
// from the angular2/platform/browser module.
// Since we want to bootstrap the "BookmarkComponent",
// we have to import it, too.
import { bootstrap }    from 'angular2/platform/browser'
import { BookmarkComponent } from './bookmark.component'

// We can now bootstrap the "BookmarkComponent" as the root component.
bootstrap( BookmarkComponent );

Another new file, system.config.js, configures the SystemJS module loader. It will load the boot.ts file, we just created.

// SystemJS is the module loader for the application. 
// It loads the libraries and our modules and then catches and logs errors, 
// that may occur during the app launch.
System.config({
  packages: {
    scripts: {
      format: 'register',
      defaultExtension: 'js'
    }
  }
});
System.import('scripts/boot')
  .then(null, console.error.bind(console));

Before we can see anything in the browser, the last thing we need is an index.html file. We put the file in the root of our project directory, on the same level as the .json files.

<html>
  <head>

    <title>SitePoint Bookmark Extension</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- We load the libraries we need directly from the "node_modules" folder.
    In a more complex project, we would use a different approach here, 
    e.g. working with a build tool like gulp.js or Angular-CLI. -->
    <script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
    <script src="node_modules/systemjs/dist/system.src.js"></script>
    <script src="node_modules/rxjs/bundles/Rx.js"></script>
    <script src="node_modules/angular2/bundles/angular2.dev.js"></script>

    <!-- Load the SystemJS config -->
    <script src="scripts/system.config.js"></script>

  </head>

  <body>
    <!-- Here we are using the selector "sp-bookmark", 
    which we defined as component meta data in the "BookmarkComponent" decorator. 
    Everything inside the element tag will only be seen 
    until our application is loaded. -->
    <sp-bookmark>Loading bookmarks...</sp-bookmark>
  </body>

</html>

Let's test what we've done by compiling the TypeScript files and starting the server:

npm run start

If everything worked correctly, we should see the browser open a new tab and showing a paragraph "Loading bookmarks..." before displaying our template, the headline "Bookmark".

Continue reading %Build Your Own Chrome Extension Using Angular 2 & TypeScript%


by Michaela Lehr via SitePoint

Connecting a Raspberry Pi to IBM Watson, Bluemix and Node-RED

IBM recently helped spark the Internet of Things enthusiasm into a bunch of developers by sending out Raspberry Pi 3 computers to developers who signed up for their Bluemix platform trial. I had been eager to give Bluemix and IBM Watson a try and figured this was as good a time as any to sign up! I was lucky enough to be one of the developers who received a Raspberry Pi 3 and so, I did what I always do with new emerging technology, I began tinkering and writing about my experience.

This is the first part of a series of articles around combining the Raspberry Pi with IBM Watson and Bluemix. This article focuses on the various ways you can connect up the Raspberry Pi to IBM's cloud services, along with my tips along the way for when things didn't quite go to plan for me. It was a lot of fun and I highly recommend people give IBM Bluemix and Watson a try, especially if you have a spare Raspberry Pi lying around!

Setting Up a Quick Test of Watson IoT on Our Raspberry Pi

To set up the IBM Watson IoT Platform on our Raspberry Pi, we run the following commands on the Pi itself:

First, we download the Watson IoT Platform installer from IBM's GitHub:

[code language="bash"]
curl -LO http://ift.tt/1s83nHR
[/code]

Then, we run the following command to install it:

[code language="bash"]
sudo dpkg -i iot_1.0-2_armhf.deb
[/code]

Once this has installed, it will automatically run the IBM Watson IoT Platform service on our device. In fact, the service runs automatically each time our Pi is booted up. If you aren't sure if it is running and want to be certain, run the following command:

[code language="bash"]
service iot status
[/code]

That should bring up a response that looks something like so:

[code language="bash"]
● iot.service - LSB: IoT service
Loaded: loaded (/etc/init.d/iot)
Active: active (running) since Fri 2016-04-29 23:33:47 UTC; 15s ago
CGroup: /system.slice/iot.service
└─11960 /opt/iot/iot /dev/null
[/code]

If you see the above message, you're good to go! In fact, we can already see Raspberry Pi data being streamed to the IBM's cloud. To do so, type in:

[code language="bash"]
service iot getdeviceid
[/code]

It will return an ID for our device and a URL we should visit:

[code language="bash"]
The device ID is abcdefghijkl
For Real-time visualization of the data, visit http://ift.tt/1rLLM7P
[/code]

If we head to http://ift.tt/1rLLM7P (with our device's ID rather than the placeholder), we should see a pretty neat visualization from IBM! In it, we can see our Raspberry Pi's CPU temperature and other stats from the cloud.

Our data streaming through in a simple visualization

Now, let's approach it in a different way and set up IBM Bluemix to handle our data.

Getting Started in Bluemix

To log into Bluemix, head to the IBM Bluemix login page. You can sign up for an IBM ID and BlueMix from there too if you do not already have an account.

Once Bluemix loads, we select our region by clicking the top right-hand corner account icon:

Choosing a region

Then, if Bluemix requests that we create a space in that region, we do so. I've named my space "dev":

Entering the name of our space

Then, we click on "Use Services or APIs" to find a good initial service for our app.

Choosing Use Services or APIs

In this screen, we need to find the "Internet of Things Platform" service. You can do so by either clicking the "Internet of Things" checkbox on the left hand side to filter the selections down, or by typing into the search bar "Internet of Things Platform". However we search for it, once we have it we select it for our app.

Selecting the Internet of Things Platform in Bluemix

We then click "Create" on the next screen, you could change the "Service Name" if you wanted to adjust this. It doesn't really affect much, so for my example I just left it as is. You could name it something like "Raspberry Pi Service" if you so desired:

Choosing to create our IoT service

We scroll down on the welcome screen that appears and choose "Launch Dashboard":

Clicking to launch Bluemix Dashboard

Now we can add our Raspberry Pi to this new service by clicking "Add Device":

Adding device to Bluemix

Click to "Create device type":

Choosing create device type

Another screen will appear asking whether we want to create a device type or gateway type. We want a device type:

Choosing the device type option

Finally, we name our device type. The first field is for a device type name that will be used in our APIs and such, so keep it lowercase and separated by dashes. e.g. "my-pis" or "iot-sample-devices". Underneath that, you can write a longer and more human readable description:

Adding our device type details

The next screen gives us options for our device template, providing fields we can use for each device to define its characteristics. This is very much up to you and what device data you'd like to record in this device type. As I am using this device type to just track Raspberry Pis, I've chosen only to define their "Model" (e.g. Raspberry Pi 2, Raspberry Pi 3... etc).

Selecting just model and then clicking Next

Then, we set our default model type. I set my main model type for this device template to be "Raspberry Pi 3 Model B":

Entering in Raspberry Pi 3 Model B as the model name

You can add your own custom metadata in JSON format if you would like, for our purposes in this simple tutorial, we can skip this step.

We could add sample JSON data for our device type

Now our device type is ready to be used! We should be back at the "Add Device" screen. This time, our new device type should be selected. Check that is the case and click "Next".

Selecting a device type if not selected and clicking next

Continue reading %Connecting a Raspberry Pi to IBM Watson, Bluemix and Node-RED%


by Patrick Catanzariti via SitePoint

Random Quote Machine with jQuery and JSON

A simple and nice random quote machine created by using jQuery and JSON.


by via jQuery-Plugins.net RSS Feed

An Overview of PHPUnit 5 – What’s New? What’s Coming?

It was January 2016 when the PHPUnit development team announced the release of PHPUnit 5.0.

Color pen on paper, putting checkmarks into some boxes and red X-es into others

While several minor version have already been released since, PHPUnit's major version 5 has introduced several new functionalities and deprecated a few others. In this article, we'll take a look at the most notable changes.

Requirements

PHPUnit 5 requires PHP 5.6. They have dropped support for PHP 5.3, 5.4, and 5.5 as they are not actively supported by the PHP project, according to their release process. You can see the full list of required PHP extensions here.

New Assertion Methods

Three assertion methods including assertFinite(), assertInfinite() and assertNan() have been added to the stack.

assertFinite() asserts that the expected value is a finite value, meaning it is a legal number within the allowed range for a PHP float on the platform on which the test runs. Behind the scenes, it uses PHP's built-in function is_finite, to check if the constraint is met.

Consider the following test:

Continue reading %An Overview of PHPUnit 5 – What’s New? What’s Coming?%


by Reza Lavaryan via SitePoint