Thursday, October 19, 2017

20 Creative Writing Prompts That'll Help You Beat Writer's Block - #infographic

Sometimes, it seems like it’s hard to come across a truly remarkable one -- one that’s achieved the perfect trifecta of good design, readability, and reliable data. But when they’re well-executed, infographics work wonders, transforming complex topics and dry statistics into visually enticing...

[ 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

Underscore.string – String Manipulation Helpers for Javascript

Underscore.string is a string manipulation helpers for javascript. Originally started as an Underscore.js extension but is a full standalone library nowadays.


by via jQuery-Plugins.net RSS Feed

What And How Often To Post On Social Media? - #infographic

You know that sticking to a schedule is important for your business. It helps you get through your never-ending To Do list and keeps everything running smoothly. The same is true when it comes to your social media marketing. Creating a social media schedule is the best way to stay on top of your...

[ 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

Top 12 Productivity Tips for WebStorm and Angular – Part 1

This article was sponsored by JetBrains. Thank you for supporting the partners who make SitePoint possible.

In this 2-part series, Google Developer Experts Jurgen Van de Moere and Todd Motto share their favorite productivity tips for developing Angular applications using WebStorm.

In this first part, Jurgen shares his personal top 5 WebStorm features that allow him to increase his productivity on a daily basis:

  1. Use Angular CLI from within WebStorm
  2. Navigate like a pro
  3. Take advantage of Angular Language Service
  4. Auto format your code
  5. Optimize your imports

Each tip can tremendously increase your development productivity, so let's dig into them a little deeper one by one.

Tip 1: Use Angular CLI from Within WebStorm

Angular CLI is a Command Line Interface (CLI), written and maintained by the Angular team, to help automate your development workflow. You can use it to quickly create new Angular projects and add new features such as components, services and directives to existing Angular projects.

WebStorm's integration with Angular CLI provides you with all its power right from within WebStorm, without using the terminal.

To create a new Angular Project, choose File | New | Project and select Angular CLI.

Enter a project location and hit the Create button. WebStorm uses Angular CLI to create a new Angular project and install dependencies.

When your new Angular application is in place, you can easily add new Angular features. Right click on src/app and choose New | Angular CLI to pick the type of feature you wish to add.

Once you’ve selected a feature, you can specify the name and optional parameters, just as you would with Angular CLI on the command line:

Create a new Angular module

To learn more about Angular CLI options and parameters, make sure to check out The Ultimate Angular CLI Reference.

What's really awesome is that WebStorm automatically adds the component to the right Angular module for you, in this case AppModule.

If your application has multiple Angular modules, right click on the module you wish to add the feature to and choose New | Angular CLI. WebStorm will make sure the new files are created in the right location and that the new feature is added to the correct Angular module.

How sweet is that!

Tip 2: Navigate Like a Pro

Use cmd-click or cmd-B to easily jump to any definition within your project.

If you are a keyboard user, just put your cursor on a term and hit cmd-B. If you are a mouse user, hold down the cmd button and all terms you hover will turn into links to their definition.

WebStorm automatically recognizes Angular components and directives in your HTML, links to stylesheets, links to templates, classes, interfaces and much more.

No need to open file(s) manually, just jump to any definition you need:

Command-click words

When looking for a file that you don't have an immediate reference to, hit shift twice to open the Search everywhere dialog. You don't have to type the entire search string. If you want to open AppComponent, just type the first letter of each part — i.e. ac — and WebStorm will immediately narrow down the result list for you, so you can quickly pick the suggestion you wish to open:

Search everywhere

Another super useful navigation shortcut is cmd-E, which presents you with a list of recently edited files so you can easily navigate back and forth between them.

Recent files

Knowing how to quickly navigate to the code you need will save you a tremendous amount of time every single day.

Tip 3: Take Advantage of Angular Language Service

Angular Language Service is a service, designed by the Angular Team, to provide IDEs with error checking and type completion within Angular templates.

WebStorm integrates with Angular Language Service to better understand your code. To enable Angular Language Service, first make sure it is installed:

npm install @angular/language-service --save-dev 

If you use Angular CLI to generate an Angular application, Angular Language Service is automatically installed.

Next, go to Preferences | Languages & Frameworks | TypeScript, make sure Use TypeScript Service is checked and click Configure...:

TypeScript recommendations

The Service Options modal will pop up. Enable Use Angular service and apply the changes:

TypeScript recommendations

By default, WebStorm already provides great assistance for writing Angular code.

When editing a script, WebStorm automatically imports the required JavaScript modules so you don't have to import them manually.

If you open up the TypeScript panel, WebStorm provides you with immediate feedback on the validity of your code, so you can quickly resolve issues before having to compile your project.

Watch how the OnInit interface is automatically imported and how the live TypeScript feedback immediately tells you whether or not your TypeScript code is valid:

TypeScript recommendations

When you edit a template, WebStorm provides you with smart code completion that recognizes components, directives and even input and output properties:

Code completion in templates

With Angular Language Service enabled, WebStorm is able to improve code completion in template expressions:

Angular Language Service Expression Error

… and report template errors more precisely right inside your editor:

Highlighted errors

Catching errors without having to compile your project saves you incredible amounts of time.

Tip 4: Auto-format Your Code

Don't worry about formatting your code manually. WebStorm has you covered.

Whether your are in a template, a script, a stylesheet or even a JSON file, just hit cmd-option-L and WebStorm will automatically format all code for you:

Continue reading %Top 12 Productivity Tips for WebStorm and Angular – Part 1%


by Jurgen Van de Moere via SitePoint

How to Conduct User Research: Getting the Right People

The following is a short extract from our new book, Researching UX: User Research, written by James Lang and Emma Howell. It's the ultimate guide to user research, a key part of effective UX design. SitePoint Premium members get access with their membership, or you can buy a copy in stores worldwide.

Once you’ve decided who you want to include in the research, and defined it in a recruitment brief, you’ll need a way to ensure that you’re actually getting those people. There are two ways to do this.

  • Evaluating against the recruitment brief: Once you’ve identified a potential participant, you just size them up against the criteria in the recruitment brief, based on what you know about them or an informal conversation. This is the rough-and-ready method, and is most commonly used in DIY recruitment (see later in this chapter).
  • Using a screener: Once a potential participant has been identified, they’re asked a series of questions that evaluates them against the criteria in the recruitment brief, and allocates them to a quota. This is the more robust, credible approach, as used by recruitment agencies.

There are pros and cons to both approaches. Evaluating against the recruitment brief can be inaccurate, risking misleading results and undermining the credibility of your project. On the other hand, a screener takes additional time to create and apply.

There are some workarounds. If you hire a recruitment agency, they will often write the screener on your behalf. If you’re conducting guerrilla research, the screener will be very short. We’ll say more about both of these scenarios later in the chapter.

Creating a Screener

A screener is a set of questions that are asked to potential participants, based on the sample criteria you defined in your recruitment brief. These questions are designed to figure out how suitable participants are for your project.

You can see an example screener here, showing the key questions you would want to ask to recruit for a project about outdoor gear. It establishes what activities the potential participants do without leading them to give certain answers. The other questions are written to probe more into their experiences and habits when buying outdoor equipment, without being leading. The final question is written to catch out anyone that is trying to trick their way onto the research.

Screener questions contain several elements:

Continue reading %How to Conduct User Research: Getting the Right People%


by Emma Howell via SitePoint

How to Create Custom Components Using Component IO

My Introduction to Component IO article described how you could use pre-built components on any site regardless of the Content Management System, languages, or technologies used. The benefits include:

  • hundreds of ready-made, attractive and configurable components to choose from including content blocks, galleries, navigation bars, social media widgets, forms and more
  • component code can be installed with a simple cut and paste
  • the same components can be used across other pages and sites will updated instantly
  • it's easy for non-technical editors to make changes in a WYSIWYG editor and check it with a live preview
  • all users can share Component IO dashboard links and collaborate on the same items
  • Component IO is fast and delivers items quickly with a single API call, regardless of the number embedded in the page
  • you can switch CMS or build processes at any point and retain components
  • a full help guide and real-time chat assistance is available
  • a free trial account can be used to test the service with your system.

Component IO Custom Components

Despite the huge range available, Component IO permits developers to create and edit their own components. In this tutorial, I will illustrate how to create a simple custom bar chart component which can be displayed and configured on any site:

example bar chart

Component Development Concepts

Component IO uses the Vue.js component model. Those with experience with the framework will immediately recognize the concepts and syntax. That said, I'm no Vue.js expert — but a little HTML, CSS and JavaScript knowledge is enough to build a complex component.

All components are encapsulated; their styles and code cannot 'leak' to other parts of the page. For example, the bar chart component's title is an H2 element and we can apply any styles, e.g.

h2 {
  font-family: comic-sans;
  font-size: 8em;
  color: #f00;
}

Vue.js will ensure those (awful!) styles are only applied to our component and not H2 headings elsewhere on the page. However, a style applied to all H2 titles on the page can cascade to our component title. This can be useful since our component can inherit default fonts, colors and dimensions.

Step 1: Create a Blank Component

Log in to component.io, and then click Blank component on the Project page:

create a new component

From the Edit menu, choose Edit component name and enter "barchart" or another suitable name.

edit menu

Step 2: Define Fields

Fields are used to configure a component. They allow:

  1. Content editors to modify values.
  2. Other components to be created with a different configuration. For example, if we require two bar charts, we can duplicate the first and change the field values accordingly.

From the Edit menu, choose Add / remove fields and enter the fields you require:

add and remove fields

For this control, I defined:

  1. A single title text field.
  2. The barvalue numeric field which defines the bar's value.
  3. The barlabel text field which defines the bar's label.
  4. The barcolor color field which defines the bar's color.

These last three items had the repeat checkbox checked. We can therefore define any number of data items in our bar chart.

Step 3: Set the Initial Data

Hit the Edit menu to open the Content and Code control. Remaining in the Content section, I entered values for the title and three data items:

set field data

Step 4: Define the Component Code

Hit the Code toggle to open the code editor. This is where the component's HTML, CSS and JavaScript is defined:

code editor

The component HTML documentation describes how templates are created. There is no need for an outer DIV or other element because the component will be automatically given one.

The title field is added first:

<h2 v-text="title"></h2>

Alternatively, we could use:

<h2></h2>

The chart bars will be contained in a <ul> list element where each <li> displays a single value. The HTML code:

Continue reading %How to Create Custom Components Using Component IO%


by Craig Buckler via SitePoint

Top 10 Millionaire Life Habits That You Should Copy - #infographic

Many of these habits are not particularly glamorous, but remain essential for the long-term success of entrepreneurs and investors. They tend to fall in categories such as: hard work, persistence, passion, acquiring self-knowledge, associating with the right people, and staying healthy. Today’s...

[ 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