Archive

Archive for January, 2020

Free Website Builder + Free CRM + Free Live Chat = Bitrix24

January 30th, 2020 No comments

(This is a sponsored post.)

You may know Bitrix24 as the world’s most popular free CRM and sales management system, used by over 6 million businesses. But the free website builder available inside Bitrix24 is worthy of your attention, too.

Why do I need another free website/landing page builder?

There are many ways to create free websites — Wix, Squarepage, WordPress, etc. And if you need a blog — Medium, Tumblr and others are at your disposal. Bitrix24 is geared toward businesses that need websites to generate leads, sell online, issue invoices or accept payments. And there’s a world of difference between regular website builders and the ones that are designed with specific business needs in mind.

What does a good business website builder do? First, it creates websites that engage visitors so that they start interacting. This is done with the help of tools like website live chat, contact form or a call back request widget. Second, it comes with a landing page designer, because business websites are all about conversion rates, and increasing conversion rates requires endless tweaking and repeated testing. Third, integration between a website and a CRM system is crucial. It’s difficult to attract traffic to websites and advertising expensive. So, it makes sense that every prospect from the website as logged into CRM automatically and that you sell your goods and services to clients not only once but on a regular basis. This is why Bitrix24 comes with email and SMS marketing and advertising ROI calculator.

Another critical requirement for many business websites is ability to accept payments online and function as an ecommerce store, with order processing and inventory management. Bitrix24 does that too. Importantly, unlike other ecommerce platforms, Bitrix24 doesn’t charge any transaction fees or come with sales volume limits.

What else does Bitrix24 offer free of charge?

The only practical limit of the free plan is 12 users inside the account. You can use your own domain free of charge, the bandwidth is free and unlimited and there’s only a technical limit on the number of free pages allowed (around 100) in order to prevent misusing Bitrix24 for SEO-spam pages. In addition to offering free cloud service, Bitrix24 has on-premise editions with open source code access that can be purchased. This means that you can migrate your cloud Bitrix24 account to your own server at any moment, if necessary.

To register your free Bitrix24 account, simply click here. And if you have a public Facebook or Twitter profile and share this post, you’ll be automatically entered into a contest, in which the winner gets a 24-month subscription for the Bitrix24 Professional plan ($3,336 value).

Direct Link to ArticlePermalink

The post Free Website Builder + Free CRM + Free Live Chat = Bitrix24 appeared first on CSS-Tricks.

Categories: Designing, Others Tags:

How To Create A Card Matching Game Using Angular And RxJS

January 30th, 2020 No comments
Screen capture of the learningl game “matching pairs”

How To Create A Card Matching Game Using Angular And RxJS

How To Create A Card Matching Game Using Angular And RxJS

Anna Prenzel

2020-01-30T13:00:00+00:002020-01-30T15:06:57+00:00

Today, I’d like to focus on data streams resulting from click events on the user interface. The processing of such clickstreams is particularly useful for applications with an intensive user interaction where many events have to be processed. I’d also like to introduce you to RxJS a bit more; it’s a JavaScript library that can be used to express event handling routines compactly and concisely in a reactive style.

What Are We Building?

Learning games and knowledge quizzes are popular both for younger and older users. An example is the game “pair matching”, where the user has to find related pairs in a mixture of images and/or text snippets.

The animation below shows a simple version of the game: The user selects two elements on the left and right side of the playing field one after the other, and in any order. Correctly matched pairs are moved to a separate area of the playing field, while any wrong assignments are immediately dissolved so that the user has to make a new selection.

A sneak peek of the game we’ll be creating today

In this tutorial, we will build such a learning game step by step. In the first part, we will build an Angular component that is just showing the playing field of the game. Our aim is that the component can be configured for different use cases and target groups — from an animal quiz up to a vocabulary trainer in a language learning app. For this purpose, Angular offers the concept of content projection with customizable templates, which we will make use of. To illustrate the principle, I will build two versions of the game (“game1” and “game2”) with different layouts.

In the second part of the tutorial, we will focus on reactive programming. Whenever a pair is matched, the user needs to get some sort of feedback from the app; it is this event handling that is realized with the help of the library RxJS.

1. Building An Angular Component For The Learning Game

How To Create The Basic Framework

First, let’s create a new project named “learning-app”. With the Angular CLI, you can do this with the command ng new learning-app. In the file app.component.html, I replace the pre-generated source code as follows:

<div style="text-align:center"> 
  <h1>Learning is fun!</h1>
</div>

In the next step, the component for the learning game is created. I’ve named it “matching-game” and used the command ng generate component matching-game. This will create a separate subfolder for the game component with the required HTML, CSS and Typescript files.

As already mentioned, the educational game must be configurable for different purposes. To demonstrate this, I create two additional components (game1 and game2) by using the same command. I add the game component as a child component by replacing the pre-generated code in the file game1.component.html or game2.component.html with the following tag:

<app-matching-game></app-matching-game>

At first, I only use the component game1. In order to make sure that game 1 is displayed immediately after starting the application, I add this tag to the app.component.html file:

<app-game1></app-game1>

When starting the application with ng serve --open, the browser will display the message “matching-game works”. (This is currently the only content of matching-game.component.html.)

Now, we need to test the data. In the /app folder, I create a file named pair.ts where I define the class Pair:

export class Pair {
  leftpart: string;
  rightpart: string;
  id: number;
}

A pair object comprises two related texts (leftpart and rightpart) and an ID.

The first game is supposed to be a species quiz in which species (e.g. dog) have to be assigned to the appropriate animal class (i.e. mammal).

In the file animals.ts, I define an array with test data:

import { Pair } from './pair';
export const ANIMALS: Pair[] = [
  { id: 1, leftpart: 'dog', rightpart: 'mammal'},
  { id: 2, leftpart: 'blickbird', rightpart: 'bird'},
  { id: 3, leftpart: 'spider', rightpart: 'insect'},
  { id: 4, leftpart: 'turtle', rightpart: 'reptile' },
  { id: 5, leftpart: 'guppy', rightpart: 'fish'},
];

The component game1 needs access to our test data. They are stored in the property animals. The file game1.component.ts now has the following content:

import { Component, OnInit } from '@angular/core';
import { ANIMALS } from '../animals';
@Component({
  selector: 'app-game1',
  templateUrl: './game1.component.html',
  styleUrls: ['./game1.component.css']
})
export class Game1Component implements OnInit {
  animals = ANIMALS;
  constructor() { }
  ngOnInit() {
  }
}

The First Version Of The Game Component

Our next goal: The game component matching-game has to accept the game data from the parent component (e.g. game1) as input. The input is an array of “pair” objects. The user interface of the game should be initialized with the passed objects when starting the application.

For this purpose, we need to proceed as follows:

  1. Add the property pairs to the game component using the @Input decorator.
  2. Add the arrays solvedPairs and unsolvedPairs as additional private properties of the component. (It is necessary to distinguish between already “solved” and “not yet solved” pairs.)
  3. When the application is started (see function ngOnInit) all pairs are still “unsolved” and are therefore moved to the array unsolvedPairs.
import { Component, OnInit, Input } from '@angular/core';
import { Pair } from '../pair';
@Component({
  selector: 'app-matching-game',
  templateUrl: './matching-game.component.html',
  styleUrls: ['./matching-game.component.css']
})

export class MatchingGameComponent implements OnInit {
  @Input() pairs: Pair[];
  private solvedPairs: Pair[] = [];
  private unsolvedPairs: Pair[] = [];
  constructor() { }
  ngOnInit() {      
    for(let i=0; i<this.pairs.length; i++){    
        this.unsolvedPairs.push(this.pairs[i]);
    }
  }
}

Furthermore, I define the HTML template of the matching-game component. There are containers for the unsolved and solved pairs. The ngIf directive ensures that the respective container is only displayed if at least one unsolved or solved pair exists.

In the container for the unsolved pairs (class container unsolved), first all left (see the left frame in the GIF above) and then all right (see the right frame in the GIF) components of the pairs are listed. (I use the ngFor directive to list the pairs.) At the moment, a simple button is sufficient as a template.

With the template expression {{{pair.leftpart}} and {{{pair.rightpart}}}, the values of the properties leftpart and rightpart of the individual pair objects are queried when iterating the pair array. They are used as labels for the generated buttons.

The assigned pairs are listed in the second container (class container solved). A green bar (class connector) indicates that they belong together.

The corresponding CSS code of the file matching-game.component.css can be found in the source code at the beginning of the article.

<div id="game">
   <div class="container unsolved" *ngIf="unsolvedPairs.length>0">
      <div class="pair_items left">
         <button *ngFor="let pair of unsolvedPairs" class="item">  
             {{pair.leftpart}}
         </button>        
      </div>
    <div class="pair_items right">
      <button *ngFor="let pair of unsolvedPairs" class="item"> 
            {{pair.rightpart}}
         </button>  
    </div>
   </div>
   <div class="container solved" *ngIf="solvedPairs.length>0">
       <div *ngFor="let pair of solvedPairs" class="pair">
          <button>{{pair.leftpart}}</button>
          <div class="connector"></div>
          <button>{{pair.rightpart}}</button>
       </div>
   </div>
</div>

In the component game1, the array animals is now bound to the pairs property of the component matching-game (one-way data binding).

<app-matching-game [pairs]="animals"></app-matching-game>

The result is shown in the image below.

Current state of the user interface

Current state of the user interface

Obviously, our matching game is not too difficult yet, because the left and right parts of the pairs are directly opposite each other. So that the pairing is not too trivial, the right parts should be mixed. I solve the problem with a self-defined pipe shuffle, which I apply to the array unsolvedPairs on the right side (the parameter test is needed later to force the pipe to be updated):

...
<div class="pair_items right">
  <button *ngFor="let pair of unsolvedPairs | shuffle:test" class="item"> 
        {{pair.rightpart}}
  </button>  
</div>
...

The source code of the pipe is stored in the file shuffle.pipe.ts in the app folder (see source code at the beginning of the article). Also note the file app.module.ts, where the pipe must be imported and listed in the module declarations. Now the desired view appears in the browser.

Extended Version: Using Customizable Templates To Allow An Individual Design Of The Game

Instead of a button, it should be possible to specify arbitrary template snippets to customize the game. In the file matching-game.component.html I replace the button template for the left and right side of the game with an ng-template tag. I then assign the name of a template reference to the property ngTemplateOutlet. This gives me two placeholders, which are replaced by the content of the respective template reference when rendering the view.

We are here dealing with the concept of content projection: certain parts of the component template are given from outside and are “projected” into the template at the marked positions.

When generating the view, Angular must insert the game data into the template. With the parameter ngTemplateOutletContext I tell Angular that a variable contextPair is used within the template, which should be assigned the current value of the pair variable from the ngFor directive.

The following listing shows the replacement for the container unsolved. In the container solved, the buttons have to be replaced by the ng-template tags as well.

<div class="container unsolved" *ngIf="unsolvedPairs.length>0">
<div class="pair_items left">        
    <div *ngFor="let pair of unsolvedPairs" class="item">
         <ng-template [ngTemplateOutlet]="leftpart_temp" 
             [ngTemplateOutletContext]="{contextPair: pair}">
       </ng-template>
    </div>    
</div>    
<div class="pair_items right">
    <div *ngFor="let pair of unsolvedPairs | shuffle:test" class="item">           
         <ng-template [ngTemplateOutlet]="leftpart_temp"
           [ngTemplateOutletContext]="{contextPair: pair}">
       </ng-template>
    </div>
</div>
</div>
...

In the file matching-game.component.ts, the variables of both template references (leftpart_temp and rightpart_temp) must be declared. The decorator @ContentChild indicates that this is a content projection, i.e. Angular now expects that the two template snippets with the respective selector (leftpart or rightpart) are provided in the parent component between the tags of the host element (see @ViewChild).

@ContentChild('leftpart', {static: false}) leftpart_temp: TemplateRef<any>;
@ContentChild('rightpart', {static: false}) rightpart_temp: TemplateRef<any>;

Don’t forget: The types ContentChild and TemplateRef must be imported from the core package.

In the parent component game1, the two required template snippets with the selectors leftpart and rightpart are now inserted.

For the sake of simplicity, I will reuse the buttons here again:

<app-matching-game [pairs]="animals">
    <ng-template #leftpart let-animalPair="contextPair">
          <button>{{animalPair.leftpart}}</button>       
       </ng-template>
    <ng-template #rightpart let-animalPair="contextPair">
          <button>{{animalPair.rightpart}}</button>
       </ng-template>
</app-matching-game>

The attribute let-animalPair="contextPair" is used to specify that the context variable contextPair is used in the template snippet with the name animalPair.

The template snippets can now be changed to your own taste. To demonstrate this I use the component game2. The file game2.component.ts gets the same content as game1.component.ts. In game2.component.html I use an individually designed div element instead of a button. The CSS classes are stored in the file game2.component.css.

<app-matching-game [pairs]="animals">
    <ng-template #leftpart let-animalPair="contextPair">
          <div class="myAnimal left">{{animalPair.leftpart}}</div>        
       </ng-template>
    <ng-template #rightpart let-animalPair="contextPair">
          <div class="myAnimal right">{{animalPair.rightpart}}</div>
       </ng-template>
</app-matching-game>

After adding the tags on the homepage app.component.html, the second version of the game appears when I start the application:

An alternative view of the game in the component game2

An alternative view of the game in the component game2

The design possibilities are now almost unlimited. It would be possible, for example, to define a subclass of Pair that contains additional properties. For example, image addresses could be stored for the left and/or right parts. The images could be displayed in the template along with the text or instead of the text.

2. Control Of User Interaction With RxJS

Advantages Of Reactive Programming With RxJS

To turn the application into an interactive game, the events (e.g. mouse click events) that are triggered at the user interface must be processed. In reactive programming, continuous sequences of events, so-called “streams”, are considered. A stream can be observed (it is an “observable”), i.e. there can be one or more “observers” or “subscribers” subscribing to the stream. They are notified (usually asynchronously) about every new value in the stream and can react to it in a certain way.

With this approach, a low level of coupling between the parts of an application can be achieved. The existing observers and observables are independent of each other and their coupling can be varied at runtime.

The JavaScript library RxJS provides a mature implementation of the Observer design pattern. Furthermore, RxJS contains numerous operators to convert streams (e.g. filter, map) or to combine them into new streams (e.g. merge, concat). The operators are “pure functions” in the sense of functional programming: They do not produce side effects and are independent of the state outside the function. A program logic composed only of calls to pure functions does not need global or local auxiliary variables to store intermediate states. This, in turn, promotes the creation of stateless and loosely coupled code blocks. It is therefore desirable to realize a large part of the event handling by a clever combination of stream operators. Examples of this are given in the section after next, based on our matching game.

Integrating RxJS Into The Event Handling Of An Angular Component

The Angular framework works with the classes of the RxJS library. RxJS is therefore automatically installed when Angular is installed.

The image below shows the main classes and functions that play a role in our considerations:

A model of the essential classes for event handling in Angular/RxJS

A model of the essential classes for event handling in Angular/RxJS
Class Name Function
Observable (RxJS) Base class that represents a stream; in other words, a continuous sequence of data. An observable can be subscribed to. The pipe function is used to apply one or more operator functions to the observable instance.
Subject (RxJS) The subclass of observable provides the next function to publish new data in the stream.
EventEmitter (Angular) This is an angular-specific subclass that is usually only used in conjunction with the @Output decorator to define a component output. Like the next function, the emit function is used to send data to the subscribers.
Subscription (RxJS) The subscribe function of an observable returns a subscription instance. It is required to cancel the subscription after using the component.

With the help of these classes, we want to implement the user interaction in our game. The first step is to make sure that an element that is selected by the user on the left or right side is visually highlighted.

The visual representation of the elements is controlled by the two template snippets in the parent component. The decision how they are displayed in the selected state should therefore also be left to the parent component. It should receive appropriate signals as soon as a selection is made on the left or right side or as soon as a selection is to be undone.

For this purpose, I define four output values of type EventEmitter in the matching-game.component.ts file. The types Output and EventEmitter have to be imported from the core package.

@Output() leftpartSelected = new EventEmitter<number>();
@Output() rightpartSelected = new EventEmitter<number>();
@Output() leftpartUnselected = new EventEmitter();
@Output() rightpartUnselected = new EventEmitter();

In the template matching-game.component.html, I react to the mousedown event on the left and right side, and then send the ID of the selected item to all receivers.

<div *ngFor="let pair of unsolvedPairs" class="item" (mousedown)="leftpartSelected.emit(pair.id)">
...
<div *ngFor="let pair of unsolvedPairs | shuffle:test" class="item" (mousedown)="rightpartSelected.emit(pair.id)">

In our case, the receivers are the components game1 and game2. There you can now define the event handling for the events leftpartSelected, rightpartSelected, leftpartUnselected and rightpartUnselected. The variable $event represents the emitted output value, in our case the ID. In the following you can see the listing for game1.component.html, for game2.component.html the same changes apply.

<app-matching-game [pairs]="animals" (leftpartSelected)="onLeftpartSelected($event)" (rightpartSelected)="onRightpartSelected($event)" (leftpartUnselected)="onLeftpartUnselected()" (rightpartUnselected)="onRightpartUnselected()">

      <ng-template #leftpart let-animalPair="contextPair">
           <button [class.selected]="leftpartSelectedId==animalPair.id"> 
           {{animalPair.leftpart}}
           </button>       
      </ng-template>    
    <ng-template #rightpart let-animalPair="contextPair">
        <button [class.selected]="rightpartSelectedId==animalPair.id"> 
        {{animalPair.rightpart}}
        </button> 
     </ng-template>
</app-matching-game>

In game1.component.ts (and similarly in game2.component.ts), the event handler functions are now implemented. I store the IDs of the selected elements. In the HTML template (see above), these elements are assigned the class selected. The CSS file game1.component.css defines which visual changes this class will bring about (e.g. color or font changes). Resetting the selection (unselect) is based on the assumption that the pair objects always have positive IDs.

onLeftpartSelected(id:number):void{
    this.leftpartSelectedId = id;
}
onRightpartSelected(id:number):void{
    this.rightpartSelectedId = id;
}
onLeftpartUnselected():void{
    this.leftpartSelectedId = -1;
}
onRightpartUnselected():void{
    this.rightpartSelectedId = -1;
}

In the next step, event handling is required in the matching game component. It must be determined if an assignment is correct, that is, if the left selected element matches the right selected element. In this case, the assigned pair can be moved into the container for the resolved pairs.

I would like to formulate the evaluation logic using RxJS operators (see the next section). For preparation, I create a subject assignmentStream in matching-game.component.ts. It should emit the elements selected by the user on the left or right side. The goal is to use RxJS operators to modify and split the stream in such a way that I get two new streams: one stream solvedStream which provides the correctly assigned pairs and a second stream failedStream which provides the wrong assignments. I would like to subscribe to these two streams with subscribe in order to be able to perform appropriate event handling in each case.

I also need a reference to the created subscription objects, so that I can cancel the subscriptions with “unsubscribe” when leaving the game (see ngOnDestroy). The classes Subject and Subscription must be imported from the package “rxjs”.

private assignmentStream = new Subject();

private solvedStream = new Observable<Pair>();
private failedStream = new Observable<string>();

private s_Subscription: Subscription;
private f_Subscription: Subscription;

ngOnInit(){

  ...
  //TODO: apply stream-operators on
  //leftpartClicked und rightpartClicked
  this.s_Subscription = this.solvedStream.subscribe(pair =>   
  handleSolvedAssignment(pair));
  this.f_Subscription = this.failedStream.subscribe(() =>    
  handleFailedAssignment());
}

ngOnDestroy() {
   this.s_Subscription.unsubscribe();
   this.f_Subscription.unsubscribe();
}

If the assignment is correct, the following steps are done:

  • The assigned pair is moved to the container for the solved pairs.
  • The events leftpartUnselected and rightpartUnselected are sent to the parent component.

No pair is moved if the assignment is incorrect. If the wrong assignment was executed from left to right (side1 has the value left), the selection should be undone for the element on the left side (see the GIF at the beginning of the article). If an assignment is made from right to left, the selection is undone for the element on the right side. This means that the last element that was clicked on remains in a selected state.

For both cases, I prepare the corresponding handler functions handleSolvedAssignment and handleFailedAssignment (remove function: see source code at the end of this article):

private handleSolvedAssignment(pair: Pair):void{
   this.solvedPairs.push(pair);
   this.remove(this.unsolvedPairs, pair);    
   this.leftpartUnselected.emit();
   this.rightpartUnselected.emit();
   //workaround to force update of the shuffle pipe
   this.test = Math.random() * 10;
}
private handleFailedAssignment(side1: string):void{

   if(side1=="left"){        
        this.leftpartUnselected.emit();        
   }else{            
        this.rightpartUnselected.emit();
   }  

}

Now we have to change the viewpoint from the consumer who subscribes to the data to the producer who generates the data. In the file matching-game.component.html, I make sure that when clicking on an element, the associated pair object is pushed into the stream assignmentStream. It makes sense to use a common stream for the left and right side because the order of the assignment is not important for us.

<div *ngFor="let pair of unsolvedPairs" class="item" (mousedown)="leftpartSelected.emit(pair.id)"
(click)="assignmentStream.next({pair: pair, side: 'left'})">
...
<div *ngFor="let pair of unsolvedPairs | shuffle:test" class="item" (mousedown)="rightpartSelected.emit(pair.id)" 
(click)="assignmentStream.next({pair: pair, side: 'right'})">

Design Of The Game Interaction With RxJS Operators

All that remains is to convert the stream assignmentStream into the streams solvedStream and failedStream. I apply the following operators in sequence:

pairwise

There are always two pairs in an assignment. The pairwise operator picks the data in pairs from the stream. The current value and the previous value are combined into a pair.

From the following stream…

„{pair1, left},  {pair3, right},  {pair2, left},  {pair2, right},  {pair1, left},  {pair1, right}“

…results this new stream:

„({pair1, left}, {pair3, right}),   ({pair3, right}, {pair2, left}),   ({pair2, left}, {pair2, right}),   ({pair2, right}, {pair1, left}),   ({pair1, left}, {pair1, right})“
 

For example, we get the combination ({pair1, left}, {pair3, right}) when the user selects dog (id=1) on the left side and insect (id=3) on the right side (see array ANIMALS at the beginning of the article). These and the other combinations result from the game sequence shown in the GIF above.

filter

You have to remove all combinations from the stream that were made on the same side of the playing field like ({pair1, left}, {pair1, left}) or ({pair1, left}, {pair4, left}).

The filter condition for a combination comb is therefore comb[0].side != comb[1].side.

partition

This operator takes a stream and a condition and creates two streams from this. The first stream contains the data that meets the condition and the second stream contains the remaining data. In our case, the streams should contain correct or incorrect assignments. So the condition for a combination comb is comb[0].pair===comb[1].pair.

The example results in a „correct” stream with

({pair2, left}, {pair2, right}),   ({pair1, left}, {pair1, right})
 

and a “wrong” stream with

({pair1, left}, {pair3, right}), ({pair3, right}, {pair2, left}),  ({pair2, right}, {pair1, left})
 

map

Only the individual pair object is required for further processing of a correct assignment, such as pair2. The map operator can be used to express that the combination comb should be mapped to comb[0].pair. If the assignment is incorrect, the combination comb is mapped to the string comb[0].side because the selection should be reset on the side specified by side.

The pipe function is used to concatenate the above operators. The operators pairwise, filter, partition, map must be imported from the package rxjs/operators.

ngOnInit() {    
   ...  
   const stream = this.assignmentStream.pipe(
                   pairwise(),
                   filter(comb => comb[0].side != comb[1].side)                    
                  );
   //pipe notation leads to an error message (Angular 8.2.2, RxJS 6.4.0)      
   const [stream1, stream2] = partition(comb => 
                                        comb[0].pair === comb[1].pair)(stream);
   this.solvedStream = stream1.pipe( 
                         map(comb => comb[0].pair)
                       );
   this.failedStream = stream2.pipe(
                         map(comb => comb[0].side)
                       );
   this.s_Subscription = this.solvedStream.subscribe(pair => 
                             this.handleSolvedAssignment(pair));
   this.f_Subscription = this.failedStream.subscribe(side => 
                             this.handleFailedAssignment(side));
}

Now the game already works!

Final result

By using the operators, the game logic could be described declaratively. We only described the properties of our two target streams (combined into pairs, filtered, partitioned, remapped) and did not have to worry about the implementation of these operations. If we had implemented them ourselves, we would also have had to store intermediate states in the component (e.g. references to the last clicked items on the left and right side). Instead, the RxJS operators encapsulate the implementation logic and the required states for us and thus raise the programming to a higher level of abstraction.

Conclusion

Using a simple learning game as an example, we tested the use of RxJS in an Angular component. The reactive approach is well suited to process events that occur on the user interface. With RxJS, the data needed for event handling can be conveniently arranged as streams. Numerous operators, such as filter, map or partition are available for transforming the streams. The resulting streams contain data that is prepared in its final form and can be subscribed to directly. It requires a little skill and experience to select the appropriate operators for the respective case and to link them efficiently. This article should provide an introduction to this.

Further Resources

Related Reading on SmashingMag:

Smashing Editorial(ra, il)
Categories: Others Tags:

Agile vs DevOps: Which Software Development Methodology You Should Consider

January 30th, 2020 No comments

The plethora of opportunities provided by software applications is beyond imagination. One cannot take a step without looking at the apps or at least using them once. Be it entertainment, shopping, banking, connecting, messaging anything, a user has tons of options available to explore and make their life simpler and easier.

Now that we know how software apps are transforming lives, do we know what methodologies a software development company uses to make the magic happen?

Big companies are in constant need to improve and enhance their capabilities while making it big in competition. The methodologies/ approaches they use help their businesses be responsive and edgy at the same time. DevOps & Agile frameworks are such methodologies that are very popular with software development companies.

These two methodologies have been shaping the software development process and helping development companies in providing a speedy response to the digital commotion happening across the world while adding benefits of lower cost, reduced risk, and increased quality.

Let’s breakdown the two methodologies and have a quick understanding of each of them.

1) Agile Methodology

Agile methodology is more of an adaptive, code-centred and collaborative approach to software development when compared to the waterfall model.

Unlike the traditional waterfall model that focuses on the sequential approach of software development, agile is more based on continuous iteration, incremental and evolving approach. It brings in more frameworks that enhance the software development company’s capabilities in developing software applications like Scrum, Kanban, and more.

2) DevOps Methodology

DevOps is another software development methodology adopted by a software development company that makes IT more responsive to business needs.

It is an amalgamation of development and operations, thus concerning more than code checking. It connects cross-functional, multi-talented teams in a collaborative ecosystem that enhances the development process, testing, quality operations, security, and connectivity with business stakeholders throughout the project lifecycle.

Agile vs. DevOps methodology

1) Agile focuses more on an iterative approach. It emphasizes on delivering projects through multiple testing of the codes. It doesn’t allow the process to move unless the codes are tested and errors are corrected before moving on to the next step of the development.

Whereas, DevOps is more about bringing development and operations team together to fulfil the needs of software application development. It brings in teams of various segments and meets stakeholders’ requests mutually.

2) The team skills of a software development company following the agile methodology have a defined set of developers who have a wide variety of similar or equal skill sets. Since it’s all about how the process of development would be, at every stage the developers would do the same task of testing and then proceeding to the next step.

When it comes to following the DevOps methodology by a software application development company, it involves the process of collaboration of employees from various teams. This brings in a pool of talented employees and all are free to share their ideas, knowledge, and skills together to come to a conclusion and then work towards the development of the app.

3) As explained in the blog above, agile methodology is all about following the iterative approach. The software development company encourages teams to manage the development process in terms of sprints. The ideal time to manage and finish a software application development project is less than a month for each sprint.

In DevOps methodology application development, it marks deadlines and benchmarks to reach a defined set of goals. The major goal is to deliver code to production every few hours.

4) The software development company that seeks agile methodology or app development believes in following the procedure of communication through daily meetings and documentation. This process helps the fellow team members to go through the documentation or get into a meeting to know the progress and updates of the project. This meeting also includes stakeholders to know their feedback on the update as well.

DevOps methodology does focus on meetings but not on a daily basis. They are more encouraged towards following the protocol of documentation as there are multiple teams who need to know about the progress of the app development. Thus, documentation is the only way that could easily be circulated for teams to understand.

Other Contrasting Points

Now that we have already looked into the differences between these two methodologies, let’s have a look precisely at the contracting areas between these two:

Specialization

Agile is more of an opportunity for the entire team where members can do any job scheduled to be performed. This prevents bottleneck and slowdowns.

DevOps assumes separate teams for performing different tasks. And thus members need to perform operations by communicating frequently with each other.

Documentation

Members of the Agile team do not focus on codifying the minutes of each and every meeting.

DevOps teams, on the other hand, follow all the documentation procedures while working on or releasing software programs.

Automation

Automation is not as much a part of the Agile process as it is of DevOps methodology.

Automation plays the central role in DevOps methodology as the prime aim of the methodology is to maximize the overall efficiency of different teams.

Development Approach

Instead of taking the development as a massive responsibility, Agile promotes development through small and manageable tasks.

DevOps, on the other hand, is all about balancing the stability between teams while remaining flexible with the development.

Is One Process Better Than Other?

Most software development companies prefer DevOps when it comes to software application development these days while there are many which favour agile development methodology.

Both methodologies have their own positive and negative points. When it comes to developing a project with continuous integration (CI) and continuous delivery (CD), agile proves to be the best. However, DevOps is the best when the project development required multi-facet talent/team, collaborative effort and more. The development team, operations team, quality team, and testing team are not considered as different, but ‘one team’. This enhances the capabilities of the custom software development company and the end results are quite impressive as compared to agile methodology.

Categories: Others Tags:

20 Freshest Web Designs, January 2020

January 30th, 2020 No comments

January 2020 is picking up where 2019 left off, with lots of animation and even more bold, bright color schemes. We’re also seeing an unusual number of luxury sites this month, and as always there’s a strong set of startups trying to break into the market. Enjoy!

Plink

To take on giants like PayPal, you need a compelling brand and a simple message, that can also wow with its first impression. Plink hits the nail on the head with its 3D animation.

Madame Turfu

Are you wondering what 2020 will hold for you? Why wait to find out when Madame Turfu can predict the future with this wonderfully fun set of digital tarot cards.

Nathan Taylor

What’s not to love about Nathan Taylor’s playful site? There’s so much to explore and do, but our favorite part is the different lighting modes.

Meatable

Selling Meatable is a tough prospect; it’s real meat, grown in a lab instead of taken by animal slaughter. The simple step-by-step site does a great job of explaining.

Sussex Royal

Whatever your view of Harry and Megan, there’s little doubt that their website oozes class. For a promotional site that isn’t actually selling anything, it’s a strong presence.

Emotive Feels

This fantastic manifesto from design agency Emotive Brand illustrates an A–Z of potential brand emotions with simple animations that would grace the cover of a Bluenote release.

UNREAL

Swiss design agency UNREAL’s site is a wonderfully chaotic love affair with web animation. It’s the type of site we can click around for hours, enjoying the sharp transitions.

Kate Jackling

Sometimes the best design takes a step back and allows its subject to bask in all the attention. Kate Jackling’s site does this, letting her gorgeous photography take center stage.

Helias

Helias has fully embraced the blob trend with a flood-filled area of color supporting each of its various products. It’s appropriate, engaging, and breaks up the formal grid well.

Klokki

Sometimes the hardest sites to design, are the ones for products about which there’s very little to say. Klokki is one such product, but its site is bold, confident, and persuasive.

Jonnie Hallman

Jonnie Hallman’s simple résumé site benefits greatly from the household names he’s worked for. We really like the details, like the way the monogram changes color as you scroll.

eaast

eaast is a design and development partnership from Paris that’s fully embraced the Memphis style. Their simple site proves you don’t need years’ worth of work to sell yourself.

Pantheone Audio

Proving that elegant scrolling is still very much a thing in 2020, Pantheone Audio uses the scroll to seamlessly navigate a luxurious site with a complex grid underpinning it.

Leaf

After decades of the best a man can get, the half of the species that shaves daily seems to be obsessed with reinventing the process. Leaf taps into that simple marketing approach.

Mociun

Most sites that sell jewelry miss the spirit of the pieces by focusing on the financial value. Mocuin gets it right with an on-trend color palette and stunning product photography.

Jon Way

Jon Way’s portfolio features work from over a decade of art direction. There’s a clear, consistent aesthetic thanks to a lovely ‘static’ effect that plays across the whole site.

Kota Yamaji

There’s some amazing work in Kato Yamaji’s portfolio, but what really strikes home is the amount of color he manages to squeeze in.

Robb Owen

We’ve seen lots of animated vector avatars over the last couple of years, but rarely do we see one with as much personality as Robb Owen’s. The cursor tracking makes it feel real.

Glasgow International Festival 2020

The Glasgow International Festival takes place between 24th April and 10th May 2020. Its site features some distinctly celtic typography, and tons of bold color.

Megababe

Megababe is taking on the beauty industry with a range of body products that are insanely popular, and as positive as its super-confident sales site.

Source

Categories: Designing, Others Tags:

What is Performance Appraisal

January 30th, 2020 No comments
what is performance appraisal

Let’s get the obvious out of the way. Performance appraisals are universally difficult to get right. They’re a struggle for just about every business, and they come with so many moving parts that there isn’t a simple prescription for success.

If you dive into HR literature, you’ll find conflicting ideas about what makes a good performance review, seemingly constant debates about which methods actually work the best, and frequent shifts in trends. It’s up to you to look past the hype around any given performance appraisal method and identify why it’s getting so much attention and if the concept is a good fit for your business.

The Ultimate Performance Appraisal

With all of that in mind, we’ve created this guide to give you an overview of the ideas and practices commonly used in performance appraisals. The baseline knowledge will hopefully give you the foundational information you need to analyze performance management in your business and turn to more specialized resources for specific issues you want to take a deep dive into.

The guide contains five chapters:

Pro Tip

Do you need to evaluate the performances of your employees? Start using JotForm’s beautiful performance review form templates for free.

What is a performance appraisal? Simply put, it’s the process of assessing employee performance to both evaluate the work an individual is doing and inform future decisions about that employee. The problem is that such a broad definition can lead to a variety of outcomes.

For example, we’ve all heard the horror stories of businesses that don’t really put effort into performance reviews and only use them as part of their employee termination process. Though the business of assessing workers and determining if termination is necessary is part of a performance appraisal, that’s not really what appraisals are about.

An article from the Society of Human Resource Management (SHRM), an industry association covering emerging trends and best practices in the human resources sector, pointed out that making decisions about employment termination can be a part of performance appraisal, but it shouldn’t be everything. An effective program should primarily be used to:

  • Support decision-making for training
  • Promote career development among employees
  • Identify opportunities for transfers and promotions
  • Prepare for any reductions in the workforce

With such a wide array of goals, performance appraisals need to be about more than just evaluating whether an employee is struggling to the point that termination is necessary. They should

  • Empower top performers to grow
  • Help struggling workers overcome challenges and deliver value to the organization
  • Identify areas where the business is preventing workers from growing or developing skills
  • Get feedback from employees on the types of opportunities and challenges they are seeking
  • Set goals to either bolster competent workers or challenge those who have fallen behind

These are just some of the end goals of a performance appraisal program. To get there, you have to collect and analyze data about employees so you can assess how well they’re doing their jobs. That’s performance appraisal in a nutshell. Create a framework of the goals that you want reviews to achieve, gather relevant data to get a clear picture of employee performance, and work with employees to talk through the information and evaluate how to use it to improve performance.

The case for performance appraisals

We’ll dive more into why you should care about employment performance appraisals in the next section of this guide, but we want to touch on the issue here to contextualize the rest of the conversation.

Performance appraisals matter because if they’re effective, they can promote better staff retention and satisfaction. When your employees have clear goals and objectives, they stay motivated and engaged in their work. When they’re left drifting, they often end up disengaged and looking for more meaningful, impactful work elsewhere. You don’t want to lose good employees because they aren’t aware of their impact on the business and potential for future roles in the company.

A quick look at best practices

There are a lot of conflicting messages out there about performance appraisals. One publication may tell you to formalize and standardize everything. Another will say businesses today can get away with informal coaching. Where does that leave you?

We’ll unpack some of these ideas in a section dedicated to the appraisal process, but let’s look at a few tried-and-true ideas behind appraisal best practices:

  • Different organizations formalize their appraisal process to varying degrees, but some form of standardization is almost always necessary to ensure employees understand what to expect when they’re evaluated and to safeguard against accusations of discrimination. It’s easier to provide an equal opportunity when workers in similar roles go through similar appraisal processes.
  • Make your performance appraisal program valuable to and realistic for your specific business. Every company is different, and if you chase after trendy ideas, you can end up constantly shifting your programs and not getting anywhere.
  • It’s increasingly necessary to take advantage of the ways digital technologies can empower your business to gather feedback on employee performance and gain deeper insights into how people work.

This isn’t, by any means, an exhaustive look at best practices. But these are three key ideas that will inform the rest of this guide.

The importance of performance appraisals

It can be tempting to try to minimize the resources you put into performance appraisals. It’s often tough to concretely assess workers, and your managers know their team well anyway, so why go through all the effort? The logic there makes some sense, but in practice, there are so many factors impacting employee performance, and so many parts of the business affected by how engaged workers are, that it’s important to get appraisals right.

Here’s why performance appraisals matter.

Employee engagement and retention

A Gallup study covering data from 2018 found that the average employee engagement rate in the U.S. was 34 percent. Thirteen percent of workers were actively disengaged. These are sobering figures, but what may be more concerning is that they represent significant progress in the U.S. workforce.

It isn’t rocket science; engaged employees are more likely to stick around because they are happier and more fulfilled in their work. Neutral or disengaged workers are more likely to jump ship and look for a better job elsewhere. The Gallup study found that the extent to which workers are engaged is significantly tied to business outcomes.

Imagine you have a team of office assistants. They are highly organized, have project management skills, and are instrumental in driving company culture. They also spend a lot of time on clerical work — the kind of low-level tasks many people in the business value but that may feel kind of rote and tedious to the office assistants. If you don’t regularly connect with these employees to talk about performance, how are they going to see the link between what they do and the positive business outcomes the company is experiencing?

Effective performance appraisals can provide employees with a clear idea of how they’re valuable to the business. They can give them insight on not only the opportunities they have to grow but how that development can affect the larger goals of the company. This is what drives engagement. Nobody wants to do work that doesn’t mean much. But when employees — regardless of role — understand how they create value for their employer, they are more likely to be engaged.

The point of the performance appraisal is to evaluate employees, but the end result can be much bigger. View the time spent as an invaluable investment to fuel engagement. When your employees are more focused and engaged, they’re not only more productive, but also more likely to remain loyal to the business and to stick around.

Training and development

Engagement isn’t only about giving employees a purpose. People also seek opportunities to grow. It gets boring doing the same thing every day, especially if you don’t have a path to a better or different position within the company. Nobody sets out to be an office drone.

But how do you get your employees to invest in training and skills development? In modern business, people don’t start in the mailroom and climb their way to upper management over the course of 30 years with the same company. Today, businesses need ways to develop workers who often come into the job with specialized skills and are looking for a promotion or a new position within just a year or two.

You’re not always going to keep up with every employee’s ambitions, but in addition to giving them a sense of their impact, providing them with a path for skills development, training, and long-term job growth are among the best methods for keeping them engaged.

Imagine you have an employee who has been with the company for a few years. They do good work and like the business but don’t have a clear idea of a specific job role to grow into. You could let this person stagnate and keep getting through each day, gradually becoming bored and disengaged, or you could use your performance appraisal process to identify the employee’s top skills relative to what your company prioritizes. From there, you can coach the employee to develop those skills and recommend training opportunities so they can build toward future promotion.

Whether that person goes on to be a leader in your business or is simply more productive and engaged, you’re getting value from the performance appraisal process.

Employee recognition

Employee recognition comes in many forms. You can give employees bonuses based on performance. You can give managers a budget to take team members out to lunch once a quarter and praise the work they’ve done. Or you can make an effort to publicly thank top performers during company meetings. The bottom line is, you have a lot of options.

employee recognition

Formalizing employee recognition ties back to that earlier point we made about the connection between positive business outcomes and employee engagement. If you don’t recognize how individual workers contribute to your business outcomes, then your employees may feel undervalued and underappreciated. That’s a recipe for disengagement.

You can counter this issue by incorporating recognition into your performance appraisal program. Matt Grawitch, a professor of psychology at St. Louis University, told HR Dive that formal recognition happens in a variety of ways, both casually and systemically:

Most people appreciate a simple “thank you” from time to time, but recognition, as a broader practice, is about employers demonstrating to people that what they bring to the table adds value in some capacity. Whether we are talking about paying people fairly for the work they do, highlighting when employees achieve various milestones in performance or tenure, or calling attention to specific outstanding behavior, recognition sends the message that employees make valuable contributions and are instrumental in the success of the organization.

Building some form of recognition into your performance appraisal process can help employees see the connection between the work they do and the rest of the business. It creates a stronger link between workers and the organization and drives engagement.

You can do this in a variety of ways, from formalized events where you highlight standout work to a culture of frequent shout-outs for achievement. The key is to think holistically so you aren’t constantly recognizing people in some roles while neglecting other parts of the business.

Think about the office assistant example we shared earlier. If your recognition strategies constantly reward sales team members for closing deals and identifying leads, but rarely showcase the office assistant who makes copies, schedules travel, or otherwise empowers those sales workers to get the job done, then you’ve paved the way for bitterness and disengagement.

Standardizing your performance appraisal program can help you identify how and why you currently recognize positive contributions from team members and help you notice gaps in your plans that need to be dealt with so every team member gets the attention they deserve.

Goal setting

Remember how we said effective performance appraisals can lead to engagement because the review process helps with skills development? Goal setting is a major part of that. A performance review will, in the best of circumstances, give employees ideas about where they want to go in their careers, how that fits within the current business, and what they can do to develop the skills they need. But that isn’t where goal setting ends.

You can also use performance appraisals to make day-to-day life better for everybody in the business. Imagine you have an employee who is great at what they do, but they work in really unconventional ways that make it difficult for other team members. You can use performance appraisal to navigate those conflicts by

  • Bringing the unconventional practices up and highlighting why they create tension
  • Listening to the employee’s point of view about why those behaviors are important to their process
  • Identifying opportunities to compromise
  • Setting tangible goals for the employee and the business to create a better work environment without diminishing how the unique work style fuels effective performance from a quality team member

This type of short-term goal setting can be used to resolve conflict, help employees break bad habits, and give the business insight into cultural issues that could affect employee performance.

You can also use performance appraisals to measure employee output based on key metrics, which allows you to more clearly and coherently provide feedback. For example, a manager may notice an employee who is often scrambling and stressed out trying to keep up with their workload. On the surface, the employee may seem disorganized. But encouraging that worker to get more organized is not only a broad instruction that’s difficult to take action on, it may not even capture what’s actually causing problems.

Through a performance appraisal, the manager can gather data and feedback that confirms the employee seems to be constantly scrambling and stressed. Perhaps colleagues mention lots of close calls on deadlines or inflexibility when scheduling, but the data also reveals that the employee’s workload is out of balance.

Maybe operational demands have forced that employee to take on tasks that require a skill they haven’t really developed. Perhaps the team is extremely short-staffed. With this information, the manager can work with the employee to set goals for developing a specific skill and to communicate workload challenges before they escalate. At the same time, the manager can set a personal goal to check in with employees within a couple of weeks of a new assignment to ensure that everyone has a balanced workload.

goal settings

Ultimately, the point of a performance appraisal is to strengthen the business. The deep data and feedback analysis done during reviews can inform goal setting between team members. Besides improving long-term skills development and career goals, appraisals can give employees clear, measurable steps they can take to get better at their jobs and resolve workplace conflicts.

Creating a framework for effective performance appraisals

The benefits of performance appraisals can add up quickly, creating significant value for a business. But you’ll only achieve them if your performance review process provides the insight and conversations you need to get employees on board.

How do you do this? Formalized annual reviews are falling to the wayside because they’re too labor intensive. But more casual methods aren’t a fit for every business and can cause appraisals to slip into the background.

A SHRM report explained that annual performance reviews are no longer viable as an exclusive method in today’s business world. Change happens too quickly. Check-ins should be more frequent. Continuous performance management is a better option, but the real solution isn’t just to review performance more often. Instead, businesses should gather performance data in organic ways and use digital tools to provide employees with regular feedback and coaching. Combining continuous performance management with formal reviews that compile feedback is key.

Finding the right balance is a matter of organizational culture and preferences, but the overarching theme remains consistent. Businesses need to blend formal and informal methods to provide ongoing performance and talent management. This same balance comes into play when you think about how to write a performance appraisal.

As you implement different performance management strategies, you’ll generally need some type of formal review, even if it mostly documents the work done in information sessions throughout the year. A written performance appraisal can blend data-based evaluations, informal feedback from team members, and formal conclusions that give workers clear takeaways. While performance appraisals should be an ongoing practice through coaching and mentoring, official documentation during formalized reviews is still important when providing checkpoints for employees and a paper trail that safeguards the business.

Now let’s dive into the details of what the performance appraisal process looks like.

The performance appraisal process

The performance appraisal process is specific to each business. The kind of culture you want to create will determine the ideal structure and best options. While the actual process you settle on should be nuanced and aligned to your needs, there are some standard best practices you should follow.

Here are some of the most common elements of the performance appraisal process.

The performance appraisal process

A formalized schedule

The extent to which organizations formalize their appraisal plans varies quite a bit. For example, large corporations frequently have heavily standardized, closely regulated appraisal schedules to make sure every employee goes through the same process and nobody slips through the cracks.

On the other hand, small businesses can often get by with a much less structured process because they have fewer employees and are at less risk of neglecting anybody or giving any employee too much attention.

This discrepancy based on business size can impact a wide range of your performance management efforts, but it’s especially evident when it comes to scheduling. Every company should have some sort of formalized schedule for performance reviews. You can do them annually or quarterly — different options work best for different businesses — but it’s important to set some sort of schedule for reviews so you have a baseline to work from. Doing this allows you to

  • Create clear expectations with employees about when their reviews will take place
  • Ensure performance appraisals get regular attention, even in the event that managers let some secondary or tertiary tasks fall to the wayside
  • Budget for raises, bonuses, and performance recognition costs that may emerge during the review process because you know whenthose costs will arise

It’s common for performance appraisals to feel rushed, but the reviews won’t provide value in that kind of environment. If the process is hurried, your employees won’t get the feedback they need to grow as professionals. When you have a formalized schedule in place, the predictability of the process gives your teams time to prepare.

You don’t have to go into a lot of detail with your schedules. At the more formal end, you could schedule milestones for measuring various aspects of employee performance, analyzing salary, and meeting for coaching sessions. In a more laid back setup, you may simply schedule the actual review and ask your teams to prepare accordingly.

How detailed you make your schedule is up to you, primarily based on the goals you set for your program and the culture of your business. However, having some sort of formal schedule is critical.

Clear expectations about compensation

Performance reviews are often tied to compensation packages. Employees should be able to go into a review with a basic understanding of how the review process is connected to compensation. For example, some companies choose to specify when salary changes go into effect relative to the review. In some cases, a raise may go into effect in the next pay period or at a preset time relative to the employee’s last raise.

While rewarding performance is common in reviews, you don’t need to provide employees with a guarantee that raises are on the table or always link bonuses to performance appraisals. That said, performance expectations and compensation are inherently connected. Creating clear expectations about how the timing of reviews connects to the timing of raises can allow for smoother communication between employees and team members.

Self-evaluation capabilities

Asking employees what they think about the work they’re doing can be the most informative part of a performance appraisal. Imagine you discover an employee is performing better than they think they are.

That insight can help you get some perspective on the employee. Do they have untapped skills you aren’t taking advantage of? Do the expectations you set differ from what you actually look at, creating a discrepancy between managerial and staff evaluations? Is the employee getting so burnt out that they don’t see the value and quality in their work, even when you appreciate what they bring to the table?

Data from a self-evaluation can help you answer these questions and gain a stronger idea of what makes your employees tick. A good self-evaluation should

  • Give you perspective on how your employees think they fare in terms of performance relative to key metrics
  • Help you understand what your employees think about the business (self-evaluation forms are a great chance to get honest feedback)
  • Provide some perspective on employees’ career and skill development goals so you can better align your expectations with those endpoints in mind

Implementing some form of self-evaluation can be a great way for managers, employees, and the business to get feedback. It’s an increasingly common part of the performance appraisal processes.

A defined performance improvement plan

What do you do when an employee isn’t meeting performance expectations? Do your managers try to work through the situation gradually, perhaps leaving the worker surprised later if they’re fired due to poor performance? Do your leaders tend to avoid the potential conflict and redirect employees to alternative tasks?

These are common options as organizations deal with workers who regularly underachieve. The problem is, they open you up to negative outcomes.

What if an employee is surprised by their termination and feels like they were treated unfairly? They could end up suing the company for discrimination. What if you end up paying employees for significant responsibilities but find yourself diverting their efforts to less valuable work because they aren’t keeping up with operational demands?

Both of these scenarios can become expensive and cumbersome in the long run. Instead of using an informal improvement strategy, it’s better to come up with standardized practices if an employee is falling short.

In most cases, businesses trying to help underperformers step up will start with a more casual review. Managers meet with the employee in question to provide performance feedback and set some immediate goals for improvement. If the employee doesn’t respond well, companies will typically follow up with a formal move toward probationary status. When this happens, the employee receives clear performance benchmarks they need to maintain. That also comes with a clear understanding that failing to reach these standards can lead to termination.

By creating a standard performance improvement plan, managers can alert employees to the situation early on and give them a wake-up call. Employees also get clear goals to work toward. From there, the process gets more and more formal and documented and creates a paper trail in case the employee is terminated so the company is prepared for that situation and protected from accusations of discrimination.

Establishing your performance appraisal process

The following practices make up the bare bones of modern performance appraisal processes:

  • Scheduling reviews in advance so everybody can prepare
  • Establishing the relationship between compensation changes and performance appraisal to set expectations
  • Implementing self-evaluation tools to get employees’ perspectives
  • Creating a defined improvement plan for instances of poor employee performance

These four practices will help you engage in meaningful employee reviews. As you build your appraisal framework, it’s vital to ensure there are clear expectations throughout the organization.

Setting expectations for performance appraisals

The design of your performance appraisal process doesn’t really matter if you can’t get your employees to follow your organizational best practices for performance appraisals. It happens all the time. People get busy, organizational needs shift, and in the rush to keep up with everyday demands, teams don’t really pay attention to performance appraisals. As a result, nobody puts the necessary work into appraisals and the scheduled reviews are little more than salary updates.

This scenario is common, but it’s also damaging. It can frustrate employees because they don’t get feedback on their work. It causes discontent, leaving employees with a sense that they aren’t providing value to the business or that managers are ignoring the value they provide. This can force your HR team to make compensation decisions without much data about employee performance. The list goes on. This problem escalates when businesses don’t effectively create and sustain momentum surrounding performance appraisals.

Here are a few ways you can set stronger expectations for performance appraisals and drive opportunities:

  • Ensure your performance appraisal processes are well defined and realistic in terms of your culture and organizational habits. It’s reasonable to ask employees to take some extra time to invest in performance management. It’s an entirely different matter to expect them to engage in a bunch of time-consuming tasks that don’t align with their primary responsibilities or the way they work. When your processes make performance appraisals easy, your employees are more likely to contribute.
  • Make it easy to measure progress and stay on top of appraisal-related tasks. Give managers clear deadlines for various performance appraisal processes. That way, they can tell if team members are falling behind and provide high-level leadership that ensures appraisals get done.
  • Provide channels for performance appraisal feedback. Your employees can tell you a lot about whether your review strategies are working. Make sure to occasionally get input from them so you can nip any problems in the bud before they escalate.
  • Follow through on your performance appraisal efforts. The success of performance appraisals isn’t just about managers and HR team members staying on top of the plan. Instead, it’s often a reflection of the organizational culture created by executive teams. If your leadership neglects performance management as a company practice, it won’t be a priority for the rest of your company either. If your leaders value best practices, the rest of the business is more likely to do so too.

Performance appraisals are often a matter of effort. Businesses that put the time and energy into a program position themselves for success. Setting expectations for performance management is one area where effort is a major contributor to success.

Collecting and managing performance feedback

A performance improvement plan isn’t valuable to your business if you’re unable to gather data about employees in the first place. Without good data, you can’t get the insight you need to assess employees effectively in the first place. There are a few things you’ll need to do if you want to gather data efficiently.

collecting and managing perfomance feedback

Create effective KPIs

Key performance indicators are data points that represent the most important factors in an employee’s job. These vary based on roles, but they’re usually fairly straightforward. KPIs can be tied to productivity metrics — producing a certain number of goods or hitting a sales quota — or they can be linked to softer tasks. The key is to focus on metrics that are clearly definable and measurable while also being within the employee’s control.

For example, you may be tempted to assess a manager based on staff retainment because effective team building is important in that role. The problem is, employees may leave your company for a wide range of reasons, so retainment metrics don’t necessarily point to whether or not the manager is doing a good job. You may be able to gather more data to determine how the manager contributes to retainment, but simple turnover data can lead to misconceptions.

KPIs that are specific to employee roles and, in some cases, personalized performance expectations can go a long way toward making it easier to conduct formal reviews.

Use digital forms to simplify data management

Analyzing employee performance often requires gathering data from a variety of stakeholders. As we mentioned, self-evaluation is invaluable. Many businesses also survey employees who often interact with employees in other departments.

Electronic forms let you create a set of questions relevant to the role of the individual involved in the performance review. You can distribute the form via email or an app, gather the data, and compile it so the review team has all relevant information centralized in one place.

JotForm makes this process easy by providing you with a suite of prebuilt form templates and customization capabilities.

Maintaining a paper trail

While you don’t have to share all of the data influencing a performance review with the employee being evaluated — it may just be too much to get through — you should maintain the paper trail (probably a digital one) so you can easily justify the decisions you make. As mentioned earlier, this is vital in protecting the business from any accusations of discrimination.

Handling poor performance and positive rewards

The way you respond to poor performance is incredibly important. It’s almost always going to be easier to fix a negative situation with a current employee than try to find a new employee. There are exceptions, of course, but hiring new candidates is extremely expensive. Creating a formal performance improvement plan that’s easy for employees to manage is critical.

When it comes to rewarding performance, you can use the appraisal process for more than just raises. It’s common to link annual raises to performance reviews, but you can also use appraisals to

  • Offer personal thanks to employees for good work
  • Provide bonuses based on performance metrics or establish a bonus structure for the coming review period as a way to motivate employees
  • Recognize quality work through public means — perhaps using the company intranet to highlight a key performance stat you uncover or tell the story of a particularly positive outcome

It’s good to reward employees during performance appraisals because these reviews incorporate data-based decision making into the conversation. This helps you justify the costs of rewarding workers and makes it a more valuable task.

Now that we’ve delved into the nuances of what the performance appraisal process typically looks like, let’s get into some specific methods you can use to maximize reviews.

8 performance appraisal methods

Different performance appraisal methods fall in and out of fashion. One year, you’ll hear about an emerging idea that an enterprising business is using to change its culture and retain its workers. The next year, that solution will slip into the background.

Don’t fall into the trap of chasing after trends. Most modern performance appraisal methods are successful because they align with company culture and goals. When a trend suddenly becomes popular, it’s often because a business is responding to shifting employee expectations and getting it right.

Instead of constantly adjusting your plans around trending methods, analyze your staff, create a cohesive plan for the kind of culture you want to create, and identify what your employees value from performance appraisals. From there, it’s vital to understand the performance appraisal methods at your disposal so you can select a process that works well for your needs.

With this in mind, here’s a look at the eight most common performance appraisal methods.

1. 360 degree feedback

What is it?

Picture your typical employee. How many processes, project stakeholders, and customers does that person impact on a day-to-day basis? Chances are, each employee influences a long list of colleagues, teammates, and clients. In theory, the 360 degree feedback method is designed to help organizations get perspectives from all of those individuals to gain a more complete picture of an employee’s work.

360 degree feedback

When does it work?

Implementing 360 degree feedback can be great for development. A report from SHRM explained that the breadth of data gathered from this method can be great for identifying work patterns or behaviors that a manager may miss.

Think of it this way: A manager has authority and presence in the workplace but may only work one-on-one with an employee occasionally, often when problems arise. As such, workers often have a certain mind-set when they interact with managers but function entirely differently when they engage with customers or peers. When you ask a wider audience to help you assess an employee, you can gain insight that would otherwise slip through the cracks.

The SHRM report showed that the diverse information generated in a 360 degree feedback evaluation can be great when you’re working toward employee development. In this situation, you can use the data to help you identify growth opportunities for the employee, making the feedback less threatening.

One major contributor to success is how you go about gathering information. You need to

  • Collect a broad enough data set to make the feedback anonymous and filter out data that might be an anomaly
  • Reach out to a wide range of customers and employees to gather a large amount of data
  • Draft a survey that’s repeatable across your workforce so you don’t have to create a unique questionnaire for each employee review
  • Take time to review results with employees in a detailed, forward-thinking way so they can make sense of the feedback and use it to grow

This review method is a great example of how digital forms can make your life easier. Solutions like JotForm allow you create custom forms to distribute and collect data, simplifying performance appraisal methods like 360 degree feedback.

When doesn’t it work?

The SHRM report highlighted a simple but deeply problematic flaw with the 360 degree feedback method. It’s impossible to fully understand the perspectives and prior knowledge of the individuals evaluating your employee. A peer may be hoping to get the same promotion that the reviewee is seeking. Customers may not understand the processes and policies that dictate how the employee interacts with them.

These issues can lead to false results and make it difficult to evaluate employees effectively. It can also be difficult for smaller businesses to use 360 degree feedback because they don’t have a large enough staff to gather the broad data needed to position the reviews for positive results.

These limitations are why SHRM recommends only using 360 degree feedback for employee development. When it starts to inform salaries and promotions, there are too many opportunities for the system to be manipulated or for unhelpful data to cloud the results.

2. Self-assessment

What is it?

The idea of self-assessment is simple. No one is going to have a more complete picture of an employee’s performance than the employee. Sure, we can often be blind to our own flaws or undersell our successes or capabilities. But even so, the self-assessment method is widely viewed as an effective part of an employee performance appraisal.

Self-assessment

In practice, self-assessment is fairly straightforward. You create a survey that asks employees questions about their work performance. Ask them to provide honest, thoughtful answers. Some organizations will get creative, perhaps asking employees to create a job description of what they actually do and rate their performance on those tasks.

Getting that personal perspective can prove valuable because employees understand what they have to do in their day-to-day work. They know their job better than anyone else does. The problem is that this method bases the review primarily on the input of one person, something that creates potential blind spots.

When does it work?

Self-assessments work when you create an environment of openness and trust between employees and managers. If your employees feel like they can’t be honest with a manager, then you probably won’t get great results from a self-evaluation. Employees need to know that they can be critical of themselves and that their managers will provide support and opportunities to grow. Employees must also feel safe to tout their accomplishments and not worry that they’ll be negated.

Besides creating trust, it’s also important to use an effective blend of quick ratings (i.e., rate your performance on a scale of 1–5) and open-ended questions. The ratings will give you easily accessible data to pull from, while the questions will drive deep reflection and opportunities for conversation.

JotForm can make this process easier, giving you the ability to easily create and edit digital self-assessment forms.

When doesn’t it work?

Self-assessment is usually simple to put into practice. That said, there are a few ways you can run into trouble with this appraisal method. Be careful not to

  • Build the entire review around self evaluation. Employees can grow and benefit from outside feedback. Self-assessment alone can limit employee development.
  • Use overly standardized questions that don’t drive deep conversation. If all you do is ask employees to rate themselves, you’ll likely find yourself with no context to assess those ratings. It’s also important to ask specific questions based on the role and expectations.
  • Fail to set expectations for the assessments. Employees need to know how you’re using the assessment and the kinds of answers you’re looking for so they can open up and feel safe engaging in the process.

Ultimately, self-assessment is a simple way to deepen your performance evaluation process.

3. Peer assessment

What is it?

Where self-assessment sometimes falls short because you only get one person’s perspective, peer assessment gives you data from a wider range of sources to help you understand how an employee performs.

Peer assessment

Conducting a peer review involves gathering data from diverse peer sources within the organization to gain a clearer understanding of how an employee functions in day-to-day operations. For example, teacher peer reviews allow teachers to get feedback from people who understand the kinds of issues they face each day. Meanwhile, the reviewers get to see other teachers at work and get some ideas to inspire their own efforts.

When does it work?

Making peer reviews work depends on creating a culture of openness and an operational setting where peers frequently rely on one another and contribute to each other’s work on a regular basis.

When doesn’t it work?

Peer reviews are dangerous in environments where employees frequently compete with one another. In this kind of setting, interpersonal conflict, tension created by employees seeking the same promotions, and other similar issues can quickly undermine peers’ ability to evaluate each other with any sort of objectivity.

In a business where peers are asked to review their colleagues, but don’t get anything out of the process themselves, you’re also less likely to end up with quality feedback. On top of this, you can easily run into situations where peers don’t really interact with each other enough in their core responsibilities to be able to accurately speak about the quality of work others complete.

Peer reviews are difficult to manage when the actual assessment process is complex. Making peer reviews easy to complete is essential in creating a smooth, repeatable appraisal process.

4. Paired comparison method

What is it?

The paired comparison performance appraisal method is all about competition in the workplace. It involves comparing each worker to every other employee and evaluating performance in that context. At its core, it’s a ranking scheme that compares employees to each other.

Paired comparison method

Ranking systems like paired comparison can be powerful tools for your business, but it’s important to get them right to avoid unanticipated fallout.

When does it work?

In some environments, such as sales teams, the kind of competition involved in paired comparison performance appraisals can foster a spirit of growth and challenge that drives success.

Beyond that, the paired comparison method is highly dependent on gathering data about employees efficiently and in a format that makes information comparable across different lines of business. If you’re trying to compare a sales employee to a production team member, you need to be able to convert the data you collect into a format that works for that process. For example, asking a manager to rate an employee on their ability to consistently meet daily goals gives you a highly comparable data point.

This method of comparison can help you understand how valuable an employee is, regardless of role or pay grade. It can also help you understand areas where you may need to invest in your business — such as paying a high-performing member of a support team a higher-than-normal salary because they tend to regularly outperform expectations, making them as valuable as members of your marketing team.

When doesn’t it work?

Like any ranking method, the paired comparison strategy can lead to a highly competitive, fierce work environment as employees realize that everything they do is, on some level, assessed relative to their peers. This can create pressure and adversarial relationships that undermine the health of your business.

Paired comparison falls flat when you can’t collect enough relevant data about your employees to make an effective comparison. It’s also poorly equipped to assist with skills development and training. While ranking employees is great for optimizing salaries and bonuses, it doesn’t really provide insight into areas where an employee needs to grow or help your managers coach team members with the future in mind.

This is one situation where you really need to think about your organizational goals for the performance appraisal process. If your goal is to motivate workers and optimize your compensation processes, then paired comparison can be a natural fit. But if your goal is to lay the groundwork for coaching and mentorship to develop employees and help them grow, you should probably go with a different assessment option.

5. Forced choice method

What is it?

Forced choice works similarly to paired comparison. Managers explore the performance of two workers and choose one over the other.

Forced choice method

Like paired comparison, this is an inherently competitive and potentially adversarial appraisal method. If you give one employee a pay increase, and a peer the next cubicle over doesn’t get a raise, they’ll know you ranked that coworker at a higher level. This can create tension and erode your workplace culture.

A report from the Small Business Chronicle explained that ranking-based evaluations have often helped businesses grow quickly but also create considerable stress within an organization.

When does it work?

That same Small Business Chronicle report found that forced choice performance appraisal can be effective when you’re specifically looking to use reviews as a tool to improve productivity and directly contribute to your business’s profitability. It also helps identify your top performers, something that’s particularly helpful if you have many employees in diverse roles and can’t easily determine which actually have the biggest impact on your business.

The kind of data you collect in a forced choice review helps you identify the value employees provide regardless of role, giving you key insight into employees or parts of your business that you may undervalue.

When doesn’t it work?

Many businesses end up in situations where high turnover rates and a stressful environment lead to challenges in employee retention and limit growth opportunities. This is one scenario where you may want to avoid an appraisal method like forced choice.

The Small Business Chronicle pointed out that a forced choice method can be deflating for employees who are performing well, just not as well as other peers; it can also create unnecessary stress as workers operate out of fear of a low ranking.

These problems can escalate in businesses already struggling with employee retention and employee satisfaction, making forced choice problematic.

6. Critical incident method

What is it?

Think about the past few months of your work life. Chances are, each day kind of slips into the background. You got through what you needed to get through, you maintained your productivity, and you moved ahead.

Critical incident method

Most days aren’t very memorable. But every once in a while, something goes especially well or a conflict arises. In many cases, the responses of employees to these critical incidents heavily influence their future success or lack thereof.

The critical incident performance appraisal method focuses on asking managers to identify critical incidents that employees were involved in and assess how they performed in those situations.

When does it work?

Focusing on critical incidents is great in workplaces where workers have highly flexible job roles and complete a wide range of tasks. In these settings, it’s often difficult to gather empirical data about performance and get a clear idea of how employees get the job done each day. We’ve all had colleagues whose jobs we never could quite pin down, other than a few stories about how they handled emergencies.

These kinds of jobs — where much of the work happens behind the scenes or in ways that can’t be easily measured — are great candidates for the critical incident method. Focusing on the most important moments in employees’ lives can give managers something concrete to evaluate and help them identify the skills that make an employee valuable.

When doesn’t it work?

The critical incident method doesn’t provide much value in jobs that are highly standardized, clearly organized, or heavily measurable. For example, a production worker for a small manufacturer probably doesn’t face many critical incidents. That person’s value is in their ability to consistently produce.

Many knowledge workers face a similar situation as their jobs are often about regularly making good decisions and managing their time effectively. In work settings like these, trying to focus on critical incidents can skew perception about an employee and leave managers struggling to form an effective evaluation.

7. Ranking method

What is it?

We’re going to change the format on this one, as it represents a simplification of both the paired comparison and forced choice options. It has the same benefits and opportunities as those methods do. The big difference is that the simplified ranking method asks managers to complete a more straightforward rank of employees. It doesn’t necessarily involve a direct comparison between employees, so it’s usually less stressful.

Ranking method

Instead of specifically comparing employees to one another, a general ranking is focused on looking at the specific employee being evaluated. While some comparison is inherent in this process, the rank is determined by how the manager values the worker. While this means there may be less immediate competition in the backend of the ranking system, it also can lead to broader, less concrete employee evaluations.

In many cases, businesses avoid generic ranking systems due to the need for concrete, empirical decision-making when assessment boils down to pitting workers against one another. However, smaller organizations can often benefit from the simplicity and less formal nature of a basic ranking system.

8. Trait appraisal method

What is it?

The trait appraisal method is exactly what it sounds like. Managers look at the traits they want employees in a role to have and assess the extent to which employees have those traits.

Trait appraisal method

The evaluation process often involves establishing company goals for traits that are valued for all employees and traits valued for specific goals. Managers are expected to coach employees in those traits and create a culture that promotes behaviors aligned with those traits.

Without these background development efforts, focusing on traits isn’t helpful. You need to clearly determine which traits are valuable and reinforce related behaviors to create value through this method.

When does it work?

Trait appraisal is an exciting option for performance reviews because it doesn’t focus primarily on results, which can often be outside of the employee’s control. Instead, it emphasizes the underlying skills, personality traits, and other attributes that impact an employee’s ability to get the job done. This is great for businesses with highly volatile markets, like startups, which are looking to drive results but can’t afford to let go of valuable employees just because of a stretch of poor performance on paper.

In essence, implementing trait appraisal reviews focuses on what makes a good employee, not how a good employee performs. This can be effective when a company is trying to get its footing and doesn’t have a clear way to measure success for all job roles.

When doesn’t it work?

Evaluating traits is highly subjective. Sure, some traits may be measurable if you collect the right data, but many personal attributes are difficult to evaluate in a concrete way. As a result, a positive or negative review can be heavily influenced by a manager’s perception of an employee, not necessarily an accurate portrayal of that person’s traits. Success demands balancing multiple points of view in the evaluation and incorporating empirical data whenever possible.

Conclusion

Performance appraisals are never easy. A SHRM report went so far as to say that most reviews are inherently biased because open-ended questions lead to responses that lean too much on a manager’s personal perspective. To avoid these problems, organizations need to strategically mix and match multiple methods to limit bias and align performance appraisals with their culture and goals.

Performance appraisals are complex, and anything you can do to simplify the appraisal process can pave the way for success. This is where solutions like JotForm’s evaluation forms become so powerful. Our forms can help you create the exact documents you need to get performance appraisals right for your business, laying the groundwork for repeatable success down the line.

Categories: Others Tags:

AI-Robots Are An Astronaut’s Best Friend

January 30th, 2020 No comments

In Tom Hanks’ iconic movie, “Cast Away,” Hanks tries to hold onto his sanity by talking to his volleyball friend he named Wilson. But as we enter the space age, Wilson’s getting a high-tech makeover. Crew Interactive mobile companion, or CIMON, is a floating basketball-sized computer companion which speech and voice recognition abilities make it the perfect AI-assistant.

CIMON has a wide range of useful qualities like being able to deliver voice-controlled access to reference materials, convey instructions for repairs, document experiments, and even play music.

The mobile companion doesn’t process commands on its own. Instead, it interacts through IBM’s Watson Tone Analyzer, a ground-based computer system. Through Watson, CIMON can not only understand the context of a question, but also the intentions behind it.

New qualities like these are extremely useful. Before voice-command technology, astronauts would have to float to a laptop and search for the procedure. This costs astronauts unnecessary time which will now be saved by CIMON’s quick response time. After being given a command, CIMON can respond within seconds.

Not every great invention comes without a prototype. CIMON is the second of his kind. Till Eisenberg, Airbus’ project manager for CIMON, stated that “CIMON-2 has more sensitive microphones and a more advanced sense of orientation.”

Eisenberg continued, “The AI capabilities and stability of the complex software applications have also been substantially improved.”

Although CIMON has helpful features now, it still needs some improvement in order to be as functional as AI-assistants in popular space fiction movies. European Space Agency’s Astronaut Centre spokesman, Marco Trovatello, stated in an interview with Space.com that, “CIMON is not yet a fully-fledged AI crewmember like the film “Interstellar’s” TARS or the famous HAL 9000 from Stanley Kubrick’s iconic movie “2001: A Space Odyssey.”

Trovatello continued, “CIMON is rather a first step, designed to test what future human-robot interaction in space might look like.”

With a team of about 50 members working on CIMON since 2016, this AI-assistant is making life for astronauts easier than ever before.
For more articles like this, check out Fyresite.com/blog

Categories: Others Tags:

How Do You Do max-font-size in CSS?

January 29th, 2020 No comments

CSS doesn’t have max-font-size, so if we need something that does something along those lines, we have to get tricky.

Why would you need it at all? Well, font-size itself can be set in dynamic ways. For example, font-size: 10vw;. That’s using “viewport units” to size the type, which will get larger and smaller with the size of the browser window. If we had max-font-size, we could limit how big it gets (similarly the other direction with min-font-size).

One solution is to use a media query at a certain screen size breakpoint that sets the font size in a non-relative unit.

body {
  font-size: 3vw;
}
@media screen and (min-width: 1600px) {
  body {
     font-size: 30px;
  }
}

There is a concept dubbed CSS locks that gets fancier here, slowly scaling a value between a minimum and maximum. We’ve covered that. It can be like…

body {
  font-size: 16px;
}
@media screen and (min-width: 320px) {
  body {
    font-size: calc(16px + 6 * ((100vw - 320px) / 680));
  }
}
@media screen and (min-width: 1000px) {
  body {
    font-size: 22px;
  }
}

We’ve also covered how it’s gotten (or will get) a lot simpler.

There is a max() function in CSS, so our example above becomes a one-liner:

font-size: max(30vw, 30px);

Or double it up with a min and max:

font-size: min(max(16px, 4vw), 22px);

Which is identical to:

font-size: clamp(16px, 4vw, 22px);

Browser compatibility for these functions is pretty sparse as I’m writing this, but Chrome currently has it. It will get there, but look at the first option in this article if you need it right now.

Now that we have these functions, it seems unlikely to me we’ll ever get min-font-size and max-font-size in CSS, since the functions are almost more clear as-is.

The post How Do You Do max-font-size in CSS? appeared first on CSS-Tricks.

Categories: Designing, Others Tags:

Resizing Values in Steps in CSS

January 29th, 2020 No comments

There actually is a steps() function in CSS, but it’s only used for animation. You can’t, for example, tell an element it’s allowed to grow in height but only in steps of 10px. Maybe someday? I dunno. There would have to be some pretty clear use cases that something like background-repeat: space || round; doesn’t already handle.

Another way to handle steps would be sequential media queries.

@media (max-width: 1500px) { body { font-size: 30px; }}
@media (max-width: 1400px) { body { font-size: 28px; }}
@media (max-width: 1300px) { body { font-size: 26px; }}
@media (max-width: 1200px) { body { font-size: 24px; }}
@media (max-width: 1000px) { body { font-size: 22px; }}
@media (max-width: 900px) { body { font-size: 20px; }}
@media (max-width: 800px) { body { font-size: 18px; }}
@media (max-width: 700px) { body { font-size: 16px; }}
@media (max-width: 600px) { body { font-size: 14px; }}
@media (max-width: 500px) { body { font-size: 12px; }}
@media (max-width: 400px) { body { font-size: 10px; }}
@media (max-width: 300px) { body { font-size: 8px; }}

That’s just weird, and you’d probably want to use fluid typography, but the point here is resizing in steps and not just fluidity.

I came across another way to handle steps in a StackOverflow answer from John Henkel a while ago. (I was informed Star Simpson also called it out.) It’s a ridiculous hack and you should never use it. But it’s a CSS trick so I’m contractually obliged to share it.

The calc function uses double precision float. Therefore it exhibits a step function near 1e18… This will snap to values 0px, 1024px, 2048px, etc.

calc(6e18px + 100vw - 6e18px);

That’s pretty wacky. It’s a weird “implementation detail” that hasn’t been specced, so you’ll only see it in Chrome and Safari.

You can fiddle with that calculation and apply the value to whatever you want. Here’s me tuning it down quite a bit and applying it to font-size instead.

CodePen Embed Fallback

Try resizing that to see the stepping behavior (in Chrome or Safari).

The post Resizing Values in Steps in CSS appeared first on CSS-Tricks.

Categories: Designing, Others Tags:

Four Layouts for the Price of One

January 29th, 2020 No comments

Pretty notable when a tweet about a flexbox layouts gets 8K+ likes on Twitter!

4 layouts for the price of 1, thanks flex ?

css`
form {
display: flex;
flex-wrap: wrap;

& > input {
flex: 1 1 10ch;
margin: .5rem;

&[type=”email”] {
flex: 3 1 30ch;
}
}
}
`

view source on Codepen ?https://t.co/Q8H5ly2ZIe pic.twitter.com/y6HqxClILZ

— Adam Argyle (@argyleink) January 14, 2020

That’s “native” CSS nesting in use there as well, assuming we get that at some point and the syntax holds.

There was some feedback that the code is inscrutable. I don’t really think so, to me it says:

  • All these inputs are allowed both to shrink and grow
  • There is even spacing around all of it
  • The email input should be three times bigger than the others
  • If it needs to wrap, fine, wrap.

A great use case for flexbox, which is the right layout mechanism when you aren’t trying to be super precise about the size of everything.

There is a blog post (no byline ????) with a more longwinded explanation.


This reminds me a lot of Tim Van Damme’s Adaptive Photo Layout where photos lay themselves out with flexbox. They don’t entirely keep their aspect ratios, but they mostly do, thanks to literally the flexibility of flexbox.

Here’s a fun fork of the original.

It’s like a zillion layouts for the price of one, and just a few lines of code to boot.

The post Four Layouts for the Price of One appeared first on CSS-Tricks.

Categories: Designing, Others Tags:

Practice GraphQL Queries With the State of JavaScript API

January 29th, 2020 No comments

Learning how to build GraphQL APIs can be quite challenging. But you can learn how to use GraphQL APIs in 10 minutes! And it so happens I’ve got the perfect API for that: the brand new, fresh-of-the-VS-Code State of JavaScript GraphQL API.

The State of JavaScript survey is an annual survey of the JavaScript landscape. We’ve been doing it for four years now, and the most recent edition reached over 20,000 developers.

We’ve always relied on Gatsby to build our showcase site, but until this year, we were feeding our data to Gatsby in the form of static YAML files generated through some kind of arcane magic known to mere mortals as “ElasticSearch.”

But since Gatsby poops out all the data sources it eats as GraphQL anyway, we though we might as well skip the middleman and feed it GraphQL directly! Yes I know, this metaphor is getting grosser by the second and I already regret it. My point is: we built an internal GraphQL API for our data, and now we’re making it available to everybody so that you too can easily exploit out dataset!

“But wait,” you say. “I’ve spent all my life studying the blade which has left me no time to learn GraphQL!” Not to worry: that’s where this article comes in.

What is GraphQL?

At its core, GraphQL is a syntax that lets you specify what data you want to receive from an API. Note that I said API, and not database. Unlike SQL, a GraphQL query does not go to your database directly but to your GraphQL API endpoint which, in turn, can connect to a database or any other data source.

The big advantage of GraphQL over older paradigms like REST is that it lets you ask for what you want. For example:

query {
  user(id: "foo123") {
    name
  }
}

Would get you a user object with a single name field. Also need the email? Just do:

query {
  user(id: "foo123") {
    name
    email
  }
}

As you can see, the user field in this example supports an id argument. And now we come to the coolest feature of GraphQL, nesting:

query {
  user(id: "foo123") {
    name
    email
    posts { 
      title
      body
    }
  }
}

Here, we’re saying that we want to find the user’s posts, and load their title and body. The nice thing about GraphQL is that our API layer can do the work of figuring out how to fetch that extra information in that specific format since we’re not talking to the database directly, even if it’s not stored in a nested format inside our actual database.

Sebastian Scholl does a wonderful job explaining GraphQL as if you were meeting it for the first time at a cocktail mixer.

Introducing GraphiQL

Building our first query with GraphiQL, the IDE for GraphQL

GraphiQL (note the “i” in there) is the most common GraphQL IDE out there, and it’s the tool we’ll use to explore the State of JavaScript API. You can launch it right now at graphiql.stateofjs.com and it’ll automatically connect to our endpoint (which is api.stateofjs.com/graphql). The UI consists of three main elements: the Explorer panel, the Query Builder and the Results panels. We’ll later add the Docs panels to that but let’s keep it simple for now.

The Explorer tab is part of a turbo-boosted version of GraphiQL developed and maintained by OneGraph. Much thanks to them for helping us integrate it. Be sure to check out their example repo if you want to deploy your own GraphiQL instance.

Don’t worry, I’m not going to make you write any code just yet. Instead, let’s start from an existing GraphQL query, such as the one corresponding to developer experience with React over the past four years.

Remember how I said we were using GraphQL internally to build our site? Not only are we exposing the API, we’re also exposing the queries themselves. Click the little “Export” button, copy the query in the “GraphQL” tab, paste it inside GraphiQL’s query builder window, and click the “Play” button.

Source URL
The GraphQL tab in the modal that triggers when clicking Export.

If everything went according to plan, you should see your data appear in the Results panel. Let’s take a moment to analyze the query.

query react_experienceQuery {
  survey(survey: js) {
    tool(id: react) {
      id
      entity {
        homepage
        name
        github {
          url
        }
      }
      experience {
        allYears {
          year
          total
          completion {
            count
            percentage
          }
          awarenessInterestSatisfaction {
            awareness
            interest
            satisfaction
          }
          buckets {
            id
            count
            percentage
          }
        }
      }
    }
  }
}

First comes the query keyword which defines the start of our GraphQL query, along with the query’s name, react_experienceQuery. Query names are optional in GraphQL, but can be useful for debugging purposes.

We then have our first field, survey, which takes a survey argument. (We also have a State of CSS survey so we needed to specify the survey in question.) We then have a tool field which takes an id argument. And everything after that is related to the API results for that specific tool. entity gives you information on the specific tool selected (e.g. React) while experience contains the actual statistical data.

Now, rather than keep going through all those fields here, I’m going to teach you a little trick: Command + click (or Control + click) any of those fields inside GraphiQL, and it will bring up the Docs panel. Congrats, you’ve just witnessed another one of GraphQL’s nifty tricks, self-documentation! You can write documentation directly into your API definition and GraphiQL will in turn make it available to end users.

Changing variables

Let’s tweak things a bit: in the Query Builder, replace “react” with “vuejs” and you should notice another cool GraphQL thing: auto-completion. This is quite helpful to avoid making mistakes or to save time! Press “Play” again and you’ll get the same data, but for Vue this time.

Using the Explorer

We’ll now unlock one more GraphQL power tool: the Explorer. The Explorer is basically a tree of your entire API that not only lets you visualize its structure, but also build queries without writing a single line of code! So, let’s try recreating our React query using the explorer this time.

First, let’s open a new browser tab and load graphiql.stateofjs.com in it to start fresh. Click the survey node in the Explorer, and under it the tool node, click “Play.” The tool’s id field should be automatically added to the results and — by the way — this is a good time to change the default argument value (“typescript”) to “react.”

Next, let’s keep drilling down. If you add entity without any subfields, you should see a little squiggly red line underneath it letting you know you need to also specify at least one or more subfields. So, let’s add id, name and homepage at a minimum. Another useful trick: you can automatically tell GraphiQL to add all of a field’s subfields by option+control-clicking it in the Explorer.

Next up is experience. Keep adding fields and subfields until you get something that approaches the query you initially copied from the State of JavaScript site. Any item you select is instantly reflected inside the Query Builder panel. There you go, you just wrote your first GraphQL query!

Filtering data

You might have noticed a purple filters item under experience. This is actually they key reason why you’d want to use our GraphQL API as opposed to simply browsing our site: any aggregation provided by the API can be filtered by a number of factors, such as the respondent’s gender, company size, salary, or country.

Expand filters and select companySize and then eq and range_more_than_1000. You’ve just calculated React’s popularity among large companies! Select range_1 instead and you can now compare it with the same datapoint among freelancers and independent developers.

It’s important to note that GraphQL only defines very low-level primitives, such as fields and arguments, so these eq, in, nin, etc., filters are not part of GraphQL itself, but simply arguments we’ve defined ourselves when setting up the API. This can be a lot of work at first, but it does give you total control over how clients can query your API.

Conclusion

Hopefully you’ve seen that querying a GraphQL API isn’t that big a deal, especially with awesome tools like GraphiQL to help you do it. Now sure, actually integrating GraphQL data into a real-world app is another matter, but this is mostly due to the complexity of handling data transfers between client and server. The GraphQL part itself is actually quite easy!

Whether you’re hoping to get started with GraphQL or just learn enough to query our data and come up with some amazing new insights, I hope this guide will have proven useful!

And if you’re interested in taking part in our next survey (which should be the State of CSS 2020) then be sure to sign up for our mailing list so you can be notified when we launch it.

State of JavaScript API Reference

You can find more info about the API (including links to the actual endpoint and the GitHub repo) at api.stateofjs.com.

Here’s a quick glossary of the terms used inside the State of JS API.

Top-Level Fields

  • Demographics: Regroups all demographics info such as gender, company size, salary, etc.
  • Entity: Gives access to more info about a specific “entity” (library, framework, programming language, etc.).
  • Feature: Usage data for a specific JavaScript or CSS feature.
  • Features: Same, but across a range of features.
  • Matrices: Gives access to the data used to populate our cross-referential heatmaps.
  • Opinion: Opinion data for a specific question (e.g. “Do you think JavaScript is moving in the right direction?”).
  • OtherTools: Data for the “other tools” section (text editors, browsers, bundlers, etc.).
  • Resources: Data for the “resources” section (sites, blogs, podcasts, etc.).
  • Tool: Experience data for a specific tool (library, framework, etc.).
  • Tools: Same, but across a range of tools.
  • ToolsRankings: Rankings (awareness, interest, satisfaction) across a range of tools.

Common Fields

  • Completion: Which proportion of survey respondents answered any given question.
  • Buckets: The array containing the actual data.
  • Year/allYears: Whether to get the data for a specific survey year; or an array containing all years.

The post Practice GraphQL Queries With the State of JavaScript API appeared first on CSS-Tricks.

Categories: Designing, Others Tags: