teleren/devto huggingface dataset:
Enter at your peril, past the vaulted door
Published: 2021-12-01 09:54:18

``I bet we been together for a million years, And I bet we’ll be together for a million more. Oh, It’s like I started breathing on the night we kissed, and I can’t remember what I ever did before. What would we do baby, without us? What would we do baby, without us? And there ain’t no nothing we can’t love each other through. What would we do baby, without us? Sha la la la.
Here’s the story of a lovely lady

Here’s the story of a lovely lady, who was bringing up three very lovely girls. All of them had hair of gold, like their mother, the youngest one in curls. Here’s the store, of a man named Brady, who was busy with three boys of his own. They were four men, living all together, yet they were all alone. ‘Til the one day when the lady met this fellow. And they knew it was much more than a hunch, that this group would somehow form a family. That’s the way we all became the Brady Bunch, the Brady Bunch. That’s the way we all became the Brady Bunch. The Brady Bunch!

Who can turn the world on with her smile? Who can take a nothing day, and suddenly make it all [seem worthwhile](https://www.w3schools.com)? Well it’s you girl, and you should know it. With each glance and every little movement you show it. Love is all around, no need to waste it. You can have a town, why don’t you take it. You’re gonna make it after all. You’re gonna make it after all.

In time of ancient gods, warlords and kings, a land in turmoil cried out for a hero. She was Xena, a mighty princess forged in the heat of battle. The power. The passion. The danger. Her courage will change the world.

Being evil has a price. I hear a lot of little secrets. Tell me yours, and I’ll keep it. You oughta know my name by now, better think twice. Being evil has a price. I’ve got a nasty reputation. Not a bit of hesitation, you better think twice. ‘Cause being evil has a price.

Chosen from among all others by the Immortal Elders – Solomon, Hercules, Atlas, Zeus, Achilles

The time to play the music, it’s time to light the lights. It’s time to meet the Muppets on the Muppet Show tonight! It’s time to put on makeup, it’s time to dress up right. It’s time to raise the curtain on the Muppet Show tonight. Why do we always come here? I guess we’ll never know. It’s like a kind of torture to have to watch the show! And now let’s get things started – why don’t you get things started? It’s time to get things started on the most sensational inspirational celebrational Muppetational… This is what we call the Muppet Show!

Chosen from among all others by the Immortal Elders – Solomon, Hercules, Atlas, Zeus, Achilles, Mercury – Billy Batson and his mentor travel the highways and byways of the land on a never-ending mission: to right wrongs, to develop understanding, and to seek justice for all! In time of dire need, young Billy has been granted the power by the Immortals to summon awesome forces at the utterance of a single word – SHAZAM – a word which transforms him in a flash into the mightiest of mortal beings, Captain Marvel!
Create a filter and get goodies from Meta
Published: 2021-12-01 09:54:13

We all have used filters in social media, but have you ever realised that anyone can create them using SparkAR?

The SemiKolan community is collaborating with Reskilll, where you can just create a filter and submit it on our form https://sparkar.semikolan.co to receive goodies and certificate from Meta(previously Facebook).

Without any pre-requisite, you all can avail BAGS and CERTIFICATES straight from Meta just by participating and submitting a filter in the workshop.

You can join our Discord for more details: https://discord.semikolan.co
CommonJS 实现原理
Published: 2021-12-01 09:51:18

## 模块定义

CommonJS 模块定义一般是这样：

```js
export sayHi = function () {}
sayHi = fnction () {}
name= ''
```



```js
const {name} = require('axios');
import {name}from 'axios'
console.log('name')
function getUserInfo (id) {
  return axios.get('/user/' + id);
}

console.log('hi');

// 统一导出
module.exports = {
  getUserInfo
};
// 或者单个导出
exports.getUserInfo = getUserInfo;
```

基本上就是通过 `require` 导入模块，通过 `module.exports` 或者 `exports` 导出模块。

> `exports` 是 `module.exports` 的一个引用，因此，如果已经改变了 `module.exports`，就不要使用 `exports` 导出变量了。反之，直接对 `exports` 重新赋值，会切断二者引用关系，最终无法导出

## 模块查找

CommonJS 模块使用这样的方式导入：

```ts
const xxx = require(ID);
```

模块的标识 ID 可以是一个文件路径 Path（相对/绝对路径），也可以是一个 npm 包名称。当 ID 是 npm 包名时，遵循这样的查询逻辑：

- 在当前的 node_modules 目录下查找该包
  - 存在，查找 package.json 下 main 指定的入口文件，有则加载
    - main 未指定，默认加载 index.js => index.json => index.node 
  - 不存在，下一步
- 往上级目录 node_modules 查找该包，同样遵循上一步逻辑
- 递归向上查找 node_modules，直到全局的 node_modules 目录

> 全局目录可通过 `npm root -g` 查看

> 其实，模块分为 Node 内置的**核心模块**，以及用户的**文件模块**，前者是不需要遵循上述的模块定位的

> 此外，模块一旦被定位到，就会被缓存起来，下一次 require 同样模块时，直接使用缓存。

> require 语句是同步的

## CommonJS 的实现原理

CommonJS 的模块实现较为简单，可以理解为是这么一个外层函数的包裹：

```js
(function (exports, require, module, __filename, __dirname) {
  // 你的模块代码
  const axios = require('axios');

  function getUserInfo (id) {
    return axios.get('/user/' + id);
  }

  module.exports = {
    getUserInfo
  };
});
```

> 通过函数包裹，还达到了作用域隔离的目的

当第一次 require 一个模块时，node 会创建一个类似这样的模块对象 ( `new Module()` ) 传递给上述函数执行

```js
function Module (id, parent) {
  this.id = id;
  this.exports = {};
  this.parent = parent;
  if (this.parent && this.parent.children) {
    this.parent.children.push(this);
  }
  this.filename = null;
  this.children = [];
  this.load = false;
}
```

执行模块代码并得到模块导出，然后挂载到模块对象的 exports 上，同时缓存该模块：

```js
Module._cache['xxx'] = module;
```

下次 require 直接使用缓存对象，返回其 exports
前端的模块化发展
Published: 2021-12-01 09:50:30

模块化：cut into small pieces, bundle into one app.

模块化的意义：分而治之是软件工程中的重要思想，是复杂系统开发和维护的基石，以达到复用，可测，易读的目的。

前端的模块化，一般指的是 Javascript 的模块化；但是 Javascript 语言标准（[ECMAScript](https://tc39.es/ecma262/)）并没有定义模块化；不像其他语言自带模块化支持。

但是，当 Node 出现时，带来了自身的模块化标准：CommonJS.

CommonJS 的出现，使得模块化书写代码成了可能；也带来了包管理系统 npm 及其繁荣生态。

于是，开始有人想着，把 CommonJS 带到浏览器端。但在浏览器端要支持 CommonJS，需要一些 hack 操作，并且与 Node 的本地模块同步 require 不同，浏览器端需要支持模块的**异步加载**。

先思考下，为什么 CommonJS 不能直接在浏览器用，类似这样的代码：

index.js

```js
const add = require('./add.js'); // 同步获取

add(1, 2);
```

add.js

```js
function add (a, b) {
  return a + b;
}

module.exports = add;
```

如上述代码：

CommonJS 的 require 是同步操作，会先加载完模块后，才开始执行接下来的语句；

而且，由于**模块都在本地**，所以加载会很快；但是浏览器要做到这点，需要先将所有模块下载下来，显然是不现实的（会触发很多请求等），因此只能通过**异步**的方式获取模块；**加载**/**执行**

另一种方式是，将所有的模块都打包在一起，但只执行 entry 模块，其他模块代码只在 require 的时候才执行导出，然后 cache 起来；
这个虽然避免了请求过多，但弊端在于，暂时不需要的模块，也会被打包进去；

所以，最好的方式是：浏览器只加载 entry 模块，然后按需**加载和执行**其他模块。但就没法像 CommonJS 一样**同步**地去执行代码。

> 可以思考下，现在 webpack 一系列工具是怎么做的。

## 浏览器的模块化

针对浏览器，第一个比较出名的模块化方案是 AMD. 它的代码是这样的：

```js
define(['add', 'mul'] , function (add, mul) {
  add(1, 2);
  mul(2, 1);
});
```

AMD 的加载逻辑是：需要显式声明模块的依赖，在模块代码执行前，AMD 会先帮你获取依赖模块，再将依赖模块的**导出** (exports) 作为参数传递给当前模块，然后执行模块。

在 AMD 的规范下，代码的执行逻辑依旧可以保持同步，和 CommonJS 一样，只是需要提前声明好依赖即可。但也带来了其它问题：

首先，依赖即使最终没使用，也被加载并执行了，不是按需的，例如

```js
define(['add', 'mul'] , function (add, mul) {
  // 可能不会执行 但是模块 add 还是提前被加载并执行了
  if (window.xxx) {
    add(1, 2);
  }
  mul(2, 1);
});
```

而且，AMD 规范对于有依赖的模块间加载顺序是有要求的。

尽管如此，AMD 还是很受欢迎，特别是在 requirejs 的推广下。

在 AMD 规范之后，国内推出了一个 CMD 规范，解决了 AMD 的一些问题，其模块定义方式是这样的：

```js
define(function(require, exports, module) {
  // 模块代码
});
```

其模块的定义和 CommonJS 几乎一致，同样支持同步执行 require：

```js
define(function(require, exports, module) {
  const add = require('add.js');
  add(1, 2);
  if (window.xx) {
    // 只有条件为真才加载执行
    require('mul.js');
    console.log(1);
  }
});
```

除了在最外层包裹了一个 define 函数外，其行为和导出方式与 CommonJS 十分接近，并解决了 AMD 规范存在的问题。

不管是 AMD 还是 CMD 规范，都需要在模块定义之前，执行其模块加载器逻辑，并在执行模块前，对模块依赖进行分析；

例如，AMD 通过显式声明依赖，可以在模块执行前，处理（加载并执行，然后缓存）依赖；

而 CMD 选择了另一条路：它会对模块的源码进行静态分析，找出所有的 require 语句，得到模块的依赖列表，提前加载（但不执行）；当执行模块代码时，遇到真正 require 语句再去执行模块得到导出（并缓存）。所以，不被真正 require 的模块是不会被执行的。

还有另外一个经常看到的：UMD，但 UMD 是模块化方案吗？

其实不是的，UMD 只是一个**代码输出格式**而已。可以理解为，为模块加了一层 wrapper, 然后根据环境进行判断，包装成环境所在模块化系统的模块。其包装代码是这样的：

```js
(function (global, factory) {
  // commonjs
  typeof exports === 'object' && typeof module !== 'undefined'
    ? factory(exports)
    // AMD
    : typeof define === 'function' && define.amd
      ? define(['exports'], factory)
      : (global = typeof globalThis !== 'undefined'
        ? globalThis
        : global || self, factory(global.MyLib = {}));
})(this, (function (exports) { 'use strict';

  // 你的模块代码

}));
```

## CommonJS 的实现原理
参见 [CommonJS 的实现原理](https://dev.to/hisheng/commonjs-shi-xian-yuan-li-3bgk)

## 参考文章

[从 CommonJS 到 Sea.js](https://github.com/seajs/seajs/issues/269)

[CMD 模块定义规范](https://github.com/seajs/seajs/issues/242)

[前端模块化开发那点历史](https://github.com/seajs/seajs/issues/588)
JavaScript startsWith and multiple conditions
Tags: javascript
Published: 2021-12-01 09:19:14

You might have heard of the [JavaScript `startsWith` method](https://daily-dev-tips.com/posts/vanilla-javascript-string-startswith/). It can check if a particular string starts with another string.

To give you a demonstration it would work something like this:

```js
const string = 'Hi, and welcome from JavaScript';
console.log(string.startsWith('Hi'));
// true
console.log(string.startsWith('Hello'));
// false
```

## Checking for multiple conditions with startsWith

But what if we want to check if a string starts with a multiplication of strings?

So let's say `Hi` and `Hello` would both be fine.

We could use a conditional statement. However, this might get very unorganized if we decide to allow more strings at a later stage.

However, it would look like this:

```js
const string = 'Hi, and welcome from JavaScript';
const result = string.startsWith('Hi') || string.startsWith('Hello');
console.log(result);
// true
```

Another way is to use the same method on a predefined array. I quite like the simplicity and naming of this method as it really states what's happening.

This is what it looks like:

```js
const result = ['Hi', 'Hello'].some(word => string.startsWith(word));
console.log(result);
// true
```

Feel free to try these out in the following CodePen.

{% codepen https://codepen.io/rebelchris/pen/wvqOQde %}

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Supervised learning vs unsupervised learning
Tags: machinelearning, beginners, computerscience
Published: 2021-12-01 09:17:07

## **Supervised Learning:**
Supervised learning is a machine learning approach that uses labeled datasets. These datasets are designed to train or “supervise” algorithms into classifying data or predicting outcomes accurately. Using labeled inputs and outputs, the model can measure its accuracy and learn over time.
The two types of supervised learning are Classification and  Regression.
Classification: This type of supervised learning uses algorithms that are mainly used to predict the class or category.
Example- Logistic Regression. 
Regression: This type of supervised learning uses algorithms that are mainly used to predict the numerical values.
Example- Linear Regression.

## **Unsupervised Learning:**
Unsupervised learning uses machine learning algorithms to analyze and cluster unlabeled data sets. These algorithms discover hidden patterns in data without the need for human intervention (hence, they are “unsupervised”).
The two types of unsupervised learning are Association and Clustering. 
Association: This type of unsupervised learning method uses different rules to find relationships between variables in a given dataset.
Clustering: It is a data mining technique for grouping unlabeled data based on their similarities or differences.
Laravel Eloquent Skip and Take - Offset and Limit
Tags: laravel, php, programming, beginners
Published: 2021-12-01 09:08:07

Let's start quickly. If you want to leave some columns in the database and take a few, is there a problem ? of course not
Skip and Take
```php
User::skip(4)->take(6)->get();
DB::table('users')->skip(4)->take(6)->get();
```
Offset and Limit
```php
User::offset(4)->limit(6)->get();
DB::table('users')->offset(4)->limit(6)->get();
```
take can be used within a relationship to extract a certain number of products
```blade
@foreach ($categories as $category)
  @foreach ($category->products->take(4) as $product)
     // fields
  @endforeach 
@endforeach 
```
I hope you enjoyed the code.
Competitive Programming Chrome Extension
Tags: beginners, programming, codenewbie, productivity
Published: 2021-12-01 09:01:54

An extension that keeps users updated about Coding or Competitive Programming contests.
I am making chrome extensions to help young dev/coders to manage their contest time schedule.

Install it from here : https://chrome.google.com/webstore/detail/competitive-coding-calend/fhglbklldnbkhmhghpmgpnadfkjljnfj?hl=en-GB&authuser=0

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/higu4v45afo4r89lmyaj.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t0vwm8ybn291isqsei9d.png)
Spotlight: Have a Very Data Holiday Promotion for Event Streams
Tags: dataanalytics, dataengineering, cdp, saas
Published: 2021-12-01 08:28:46

Here at RudderStack we want more people to see that real-time event streaming can be painless and that they can effortlessly sync all of their data into and out of the warehouse. That's why we're excited to announce our new [Have a Very Data Holiday Promo](https://rudderstack.com/have-a-very-data-holiday-promo/). Starting today we are implementing a pricing promotion that increases our free event stream volume from 500K to 5M per month through the end of 2022 for all new and existing users.* Sign up for free by December 31, 2021 in order to get this gift!

Benefits of RudderStack Event Stream
------------------------------------

RudderStack event stream enables teams to spend less time on vendor SDK implementations, custom API integrations, and maintenance so developer teams can spend their time on the actions that drive true value for their businesses. Our Event Stream product enables teams to integrate their entire stack and is built to scale with your business as it scales over time.

With RudderStack Event Stream you can:

-   ID users across devices
-   Deliver events in real-time
-   Link to [12+ SDKs](https://rudderstack.com/docs/stream-sources/) for every app and website
-   Send data to 150+ cloud and warehouse [destinations](https://rudderstack.com/docs/destinations/)

Sign Up for Free and Start Sending 5M Data Streams Per Month Today
------------------------------------------------------------------

Start testing out our Event Stream, ELT, and reverse-ETL pipelines. Use our HTTP source to send data in less than 5 minutes, or install one of our 12 SDKs in your website or app. [Try RudderStack for free](https://app.rudderlabs.com/signup?type=freetrial/).

**[Terms and Conditions](https://userimg-bee.customeriomail.com/images/client-env-103842/editor_images/Have%20a%20Very%20Data%20Holiday%20Promotion%20Terms%20and%20Conditions.pdf/) apply*
Live AMA: DevOps, GitHub and Azure DevOps
Tags: devops, github, azuredevops, live
Published: 2021-12-01 08:20:41

### Got any questions about DevOps, GitHub and/or Azure DevOps?

Join me for this __live Q&A__ and I will try and answer all your questions!

{% youtube YLjSu8tD4gI %}
[Link to the video: https://youtu.be/YLjSu8tD4gI](https://youtu.be/YLjSu8tD4gI)

Prepare your questions, and I hope to see y'all live! And if you can't make it, __post your questions down below__ so I can address them during the live!

Thanks so very much again for your support!

### ⏲️ TIME FOR THE LIVE:

- Tuesday, December 7th, 9.30 pm HKT
- Tuesday, December 5th, 7.00 pm IST
- Tuesday, December 5th, 1.30 pm UTC
- Tuesday, December 5th, 8.30 am ET
- Tuesday, December 5th, 5.30 am PT

__Like, share and follow me__ 🚀 for more content:

📽 [YouTube](https://www.youtube.com/CoderDave)
☕ [Buy me a coffee](https://buymeacoffee.com/CoderDave)
💖 [Patreon](https://patreon.com/CoderDave)
📧 [Newsletter](https://coderdave.io/newsletter)
🌐 [CoderDave.io Website](https://coderdave.io)
👕 [Merch](https://geni.us/cdmerch)
👦🏻 [Facebook page](https://www.facebook.com/CoderDaveYT)
🐱‍💻 [GitHub](https://github.com/n3wt0n)
👲🏻 [Twitter](https://www.twitter.com/davide.benvegnu)
👴🏻 [LinkedIn](https://www.linkedin.com/in/davidebenvegnu/)
🔉 [Podcast](https://geni.us/cdpodcast)

<a href="https://www.buymeacoffee.com/CoderDave" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 30px !important; width: 108px !important;" ></a>

{% youtube YLjSu8tD4gI %}
Advent of PBT 2021 - Day 1
Tags: challenge, testing, webdev, javascript
Published: 2021-12-01 07:57:30

---
title: Advent of PBT 2021 - Day 1
published: true
description: Advent of Property Based Testing - Day 1
tags: challenge,testing,webdev,javascript
//cover_image: https://direct_url_to_image.jpg
---

> _Advent of PBT 2021 — Learn how to use property based testing and [fast-check](https://github.com/dubzzz/fast-check) through examples_

Our algorithm today is: **lastIndexOf**.
It comes with the following documentation and prototype:
```ts
/**
 * Check whether a pattern is contained within a text.
 * If so, where does it starts.
 *
 * @param search - The substring to search for in the string
 * @param text - The string where we should look for the substring
 *
 * @returns
 * The last index of pattern in text.
 */
declare function lastIndexOf(search: string, text: string): number;
```

We already wrote some examples based tests for it:
```ts
it('should return -1 when there is no match at all', () => {
  expect(lastIndexOf('abc', 'defghi')).toBe(-1);
});
it('should return -1 when match is not complete', () => {
  expect(lastIndexOf('abc', 'abdefghi')).toBe(-1);
});
it('should return the start index of the match', () => {
  expect(lastIndexOf('cdef', 'abcdefghi')).toBe(2);
});
it('should return the start index of the last match', () => {
  expect(lastIndexOf('cdef', 'abcdefghiabcdefghi')).toBe(11);
});
```

How would you cover it with Property Based Tests?

In order to ease your task we provide you with an already setup CodeSandbox, with examples based tests already written and a possible implementation of the algorithm: https://codesandbox.io/s/advent-of-pbt-day-1-3ewqs?file=/src/index.spec.ts&previewwindow=tests

You wanna see the solution? Here is the set of properties I came with to cover today's algorithm: https://dev.to/dubzzz/advent-of-pbt-2021-day-1-solution-1l5l

---

[Back to "Advent of PBT 2021"](https://dev.to/dubzzz/advent-of-pbt-2021-13ee) to see topics covered during the other days and their solutions.

More about this serie on [@ndubien](https://twitter.com/ndubien) or with the hashtag [#AdventOfPBT](https://twitter.com/search?q=%23AdventOfPBT).
How to remember everything you learn in code

Tags: webdev, beginners, programming, codenewbie
Published: 2021-12-01 07:54:23

SPOILER ALERT: you can't!

And the best part is that to be a good developer you don't even have to!

😕 I'm sharing this because at some point in my developer journey I thought I needed to remember everything I learned by heart.

💡 But we don't know every single word in English and we can still speak it right? That's because to speak a language, whether it be a natural language or a programming language, if you focus on the most important and commonly used words you will be considered fluent. Everything else is secondary and can be looked up in the dictionary. For ex, if you are travelling to Spain and can't speak Spanish won't you rather learn how to say "Where is the bus?" than "Xylophones are amazing?"

😍 Syntax + Grammar rules + Core Vocabulary > Random Vocabulary

🙂 The same applies to programming! Some things are like core vocabulary that will help you get around, and some things can be kept in your notes for reference only when you need them. Not everything you learn should be memorized. If you won't use it on a consistent basis turn it into a code snippet with a thorough explanation and you'll be fine.

💡 For example, instead of trying to memorize all the methods of Arrays, you can learn the most essential (adding, deleting, slicing) by heart and read/make notes about the rest and know what they do. Only memorize on a need-to-know basis.

😋 Do you take a lot of notes when you code? What apps do you use? Share in the comments!

This post was originally posted here:https://brinascode.com/ac263e38615e47309a955302c0293723
Java 8 for beginners - Part 1
Tags: java, beginners, programming, 100daysofcode
Published: 2021-12-01 07:50:59


1. [Java 8 for beginners - Part 1](https://dev.to/sn04/java-8-for-beginners-part-1-3bcb)

#### Introduction

JAVA 8 is a major feature release of Java programming language. It was initially released on 18 March 2014. Java 8 provides support for functional programming, new JavaScript engine, new APIs for date time manipulation, new streaming API, etc.

Below are some of the new features in Java 8 :

1) Lambda expression − Adds functional processing capability to Java.

2) Method references − Referencing functions by their names instead of invoking them directly. Using functions as parameter.

3) Default method − Interface to have default method implementation.

4) New tools − New compiler tools and utilities are added like ‘jdeps’ to figure out dependencies.

5) Stream API − New stream API to facilitate pipeline processing.

6) Date Time API − Improved date time API.

7) Optional − Emphasis on best practices to handle null values properly.

8) Nashorn, JavaScript Engine − A Java-based engine to execute JavaScript code.

Check out below program to sort names in Java 7 vs Java 8 to understand how lambda help us write a clean and elegant code in java. 


```java

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class Main {

    public static void main(String[] args) {
        List<String> names1 = new ArrayList<String>();
        names1.add("Sam ");
        names1.add("James ");
        names1.add("Wilson ");
        names1.add("Edward ");
        names1.add("Ramesh ");

        List<String> names2 = new ArrayList<String>();
        names2.add("Sam ");
        names2.add("James ");
        names2.add("Wilson ");
        names2.add("Edward ");
        names2.add("Ramesh ");

        Main tester = new Main();
        System.out.println("Sort using Java 7 syntax: ");

        tester.sortByJava7(names1);
        System.out.println(names1);
        System.out.println("Sort using Java 8 syntax: ");

        tester.sortByJava8(names2);
        System.out.println(names2);
    }

    //sort by java 7
    private void sortByJava7(List<String> names) {
        Collections.sort(names, new Comparator<String>() {
            @Override
            public int compare(String s1, String s2) {
                return s1.compareTo(s2);
            }
        });
    }

    //sort by java 8
    private void sortByJava8(List<String> names) {
        Collections.sort(names, (s1, s2) -> s1.compareTo(s2));
    }
}

```

#### Output :

```
Sort using Java 7 syntax: 
[Edward , James , Ramesh , Sam , Wilson ]
Sort using Java 8 syntax: 
[Edward , James , Ramesh , Sam , Wilson ]
```

Thank you folks. Please do check my other articles on https://softwareengineeringcrunch.blogspot.com 

If you like my article, you can support me by buying me a coffee ->

<a href="https://www.buymeacoffee.com/sn04" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>