teleren/devto huggingface dataset:
Announcing the npm@7 beta!
Tags: npm, node, javascript, cli
Published: 2020-08-11 17:19:44

---
title: Announcing the npm@7 beta!
published: true
description: The highly anticipated version 7 of npm is now available!
tags: npm, node, javascript, cli
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/uw1nkt5lk6pcyscwk0jk.jpg
---

We have just released the **beta** version of **npm v7** 🎉 

It has **workspaces** support along with many refactors that aim to make **npm** better and better in the future 😎

Are you feeling adventurous? Want to check out all the improvements? 

### ⬇️ Get it now:

```
npm i -g npm@next-7
```

Make sure to also read the official announcement and check the full list of breaking changes in the [**npm** blog](https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major) ❤️

### :bug: Found any nasty bug?

This is the first release of a **beta** version and as such it's expected that there will still be problems to be found and things to be polished. 

Found any issues? [Let us know!](https://github.com/npm/cli/issues)

### Have fun! :rocket:

---

###### Cover image photo by <a href="https://unsplash.com/@jamesponddotco?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">James Pond</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a>
Recommendations to speed up a web application
Tags: react, javascript, webdev, discuss
Published: 2020-08-11 17:07:20

Hello there, 

The actual web development major frameworks like angular,react, vue and other relie on some external libraries and every time we want to use an external library means more of code behind the scene , do you think this has an influence on the speed of the web application and what do you recommend to speed up a web app ? (Not using a framework is not a choice😶)
3 Efficient ways to get tomorrow date using javascript
Tags: node, javascript, webdev, showdev
Published: 2020-08-11 17:06:07


In this article, we will see some of the efficient ways to get tomorrow date using javascript.

Knowing how to play with date is important in javascript application development. because it is one of the common scenarios you will face in application development. 

### Recent Article


[How to Integrate Google sheet in nodejs Application](https://cloudnweb.dev/2020/08/integrate-google-sheet-with-nodejs)
[Kubernetes for Nodejs developers](https://cloudnweb.dev/2020/07/kubernetes-nodejs-developers)

## Tomorrow date in javascript

Let's see some of the easy ways to get tomorrow's date using javascript and some external libraries in javascript

### Built-in Method

Here, we are going to use a built-in `Date` method to get tomorrow's date in javascript.

`new Date()` returns the current date in javascript. Also, the `getDate` method in javascript returns the current date value(1-31).

we are going to increment that value and use function `setDate` to get tomorrow's date.

```js
const today = new Date()

// to return the date number(1-31) for the specified date
console.log("today => ",today)

let tomorrow =  new Date()
tomorrow.setDate(today.getDate() + 1)
//returns the tomorrow date
console.log("tomorrow => ",tomorrow)
```

![tomorrow date in javascript](https://dev-to-uploads.s3.amazonaws.com/i/gh7ggvo4plcwof4pmnyh.png)

### Momentjs

After that, we are going to use momentjs to get tomorrow date in javascript.

Let's install momentjs in our project using the command,

```bash 
npm i moment
```

Now, you can get the current date using moment instance inside your project.

```js
const todayMoment = moment() //returns the current date with moment instance.
```

To get tomorrow date, you just need to add +1 days to the `today` moment instance.

```js
const tomorrowMoment = todayMoment.clone().add(1,'days')
```

Here, we clone the `todayMoment` instance. because moment instance are mutable. it's always better the clone it before manipulating it.

![tomorrow date](https://dev-to-uploads.s3.amazonaws.com/i/1w41fqrg8033wv4cqsjl.png)

### Date Fns

Now, we will see how to get tomorrow date using [date-fns](https://date-fns.org/v2.15.0/docs/add). it is so simple to get the date using date-fns.

```js
const tomorrowFns = add(new Date(),{
  days: 1
})

console.log("tomorrow",tomorrowFns)
```

Using, we can add `days`,`month` and `year` easily.

```js
var result = add(new Date(2020, 8, 1, 10, 19, 50), {
  years: 2,
  months: 9,
  weeks: 1,
  days: 7,
  hours: 5,
  minutes: 9,
  seconds: 30,
})
```

![tomorrow date](https://dev-to-uploads.s3.amazonaws.com/i/dr2q1zfusubgiwpiksg3.png)


### Conclusion

We can use any one method depends upon the requirement. if you don't want to install a library, you can go with javascript in-built method to solve the problem.
🔥 Rest Assured API Testing Tutorial | Serialization and Deserialization in RestAssured | Day 17
Tags: testing, tutorial, webdev, beginners
Published: 2020-08-11 16:43:41

In this video, We are going to learn How to work Serialization and Deserialization Objects in RestAssured
Using Jackson 2 APIs.

🚀 Download PPT : https://scrolltest.com/ra/day17
🚀 Download Code : https://scrolltest.com/ra/sod

{% youtube muDFyUPOOZo %}

## ✅ What you are going to learn?
1. Create your own rest assured pojo. - https://scrolltest.com/pojo
2. What is serialization?
3. What is deserialization?
4. Example of Serialization and Deserialization Objects in RestAssured
5. How to serialize an object?
6. How to deserialize into the object?
7. Example of rest assured deserialize list and normally rest assured deserialize json array

## What is Serialization?
* Serialization is the process of converting objects into a stream of data.
* The serialization and deserialization process is platform-independent, it means you can serialize an object in a platform and deserialize in different platform.

🚀 All 30 Days Task - https://scrolltest.com/30days/restassured
📌 Join 30 Days Challenge Updates - https://scrolltest.com/tta
🎓 Free Automation MasterClass - https://thetestingacademy.com
📚 REST API testing with Python - https://masterapitesting.com

## ✅ How to Serialize an object?
* Data that is exchanged between client and server is of JSON format.
* Serialize objects into a stream of JSON data and deserialize stream of data to objects that are exchanged between the REST web service.

## ✅ What is Deserialization?
Deserialization is the process of converting a stream of data into objects.
The main purpose of serialization and deserialization is to persist the data and recreate whenever needed.

## ✅ How to deserialize into the object?
* Rest Assured can use the Jackson 2 library, GSON library or Jackson library for serialization and deserialization. 
*  Jackson 2 library for serialization and deserialization purposes.

## ✅ REST Assured ObjectMapper Serialization with JSON
Often when you are using REST Assured, you will want to serialize a POJO (Plain old Java Object) and send that in your API call. Or you might want to take the API response and de-serialize the body to a POJO.

## ✅ JSON Serialization & JSON De-Serialization
JSON is a format that encodes objects in a string. Serialization means to convert an object into that string, and deserialization is its inverse operation (convert string to  object)

## ✅ What is REST Assured?

REST Assured is a Java library that provides a domain-specific language (DSL) for writing powerful, maintainable tests for RESTful APIs. ... I'll be using real-world code examples you can copy, run, and reuse directly in your own test automation effort

🌍 Test Automation -
https://bit.ly/learnautomation2020

💌 API Testing -
https://www.learnapitesting.com

🎙 Cypress Tutorial with LIVE Projects -
https://cypresstutorial.com

📝 REST API testing with Python -
https://masterapitesting.com
Let's build Battleships in pure JavaScript, HTML and CSS
Tags: javascript, tutorial, gamedev
Published: 2020-08-11 16:36:55

Hey everyone! Welcome to another JavaScript Game walkthrough! In this game, we learn not only how to make the popular retro game battleships, but we team up with YouTuber's codeSTACKr and Web Dev Simplified in order to make it multiplayer and style it to the MAX!

In this walkthrough we will:
- make 5 draggable ships
- rotate the ships prior to dragging
- make the computer take random goes
- display results based on who has sunk whos ship
- display the winner

This tutorial will be in pure JavaScript, so no canvas will be used.

We will not be focusing too much on the styling, this video will be all about the logic of the game. Please watch the next two videos in the series to have a completed multiplayer version that is styled.

After watching this video, please head over to:
Codestackr to make it multiplayer: https://youtu.be/TpAwggQJPUQ
Web Dev Simplified for the styling: https://youtu.be/G6JTM-zt-dQ

Thanks for watching! If you liked watching this video, please do hit the  Subscribe or Like button so I know to make more!

{% youtube U64vIhh0TyM %}
Data Lake - 5 Major Principles
Tags: dataengineering, datascience, datalake, cloud
Published: 2020-08-11 16:26:42

![Data Lake](https://dev-to-uploads.s3.amazonaws.com/i/xe9nmkwxzzrrst5osh30.png)

In the [previous](https://dev.to/dminor/data-warehouse-the-minimal-architectural-approach-3mf2) post we understood what is a data warehouse and it's architecture. In this post, we are going to explore Data Lake.

# Data Lake


> If you think [data mart] 
  (https://study.com/academy/lesson/what-is-a-data-mart- 
  design-types-example.html) as a store of bottled water - 
  cleansed, packaged and structured for easy consumption - 
  the data lake is a large body of water in a **more natural 
  state** - James Dixon


A Data Lake is a central place where all company’s raw data flows, rapidly and provides a 360&deg; view of the company’s data.

It is intended to be raw data - as close to the source as possible. It is still a good idea to capture the metadata and describe the data so that people can explore the lake and re-use what is available.

## Data Lake comprises of these 5 major principles

### Ingest

Ability to `collect` all data that businesses care about. Systems frequently ingest data through APIs and batch processing from various sources such as transactional systems, web scraping, relational databases, etc.

### Store

Getting all data in one place and breaking down `data silos`. The storage should be scalable that supports storing structured, unstructured, and semistructured data.

### Analyze

Matching correct data points and having correct systems and `finding relations` between all data gathered. Schema is written at the time of analysis (schema on read)

### Surface

There needs to be a simple method to display all analysis. The `data need to be understood` here; the easier to see the result the easier to take actions.

### Act

`"Make Me More Money"`. A plan has to be put in place to take the results of data analysis and fit it into an operating business model.

# The main challenge with a data lake architecture

Raw data is stored with no oversight of the contents. For a data lake to make data usable, it needs to have defined mechanisms to catalog, and secure data. Without these elements, data cannot be found, or trusted resulting in a “data swamp.”

> For those who are thinking that how `Data Warehouse` is 
  different from a Data Lake, well to put it succinctly, 
  proving the value of data is the role of Data Lake and In 
  Data Warehouse one’s valuable data resides which they use 
  for reporting purposes.


For data discovery and transformation of data stored in the data lake, we can set up an execution engine(Spark/Hadoop/Dremio) layer over the top of our data lake for a better understanding of data.
How and why you should start a blog - The Gatsby Way 💜
Tags: gatsby, writing, webdev
Published: 2020-08-11 16:22:00

You may ponder whether a blog is even worth it in the first place. You may think, "but people have already covered what I want to write about" or "am I even good enough to teach other people?". 

I'm here to tell you **YES**, you should start a blog. If you don't believe me, even look at [Catalin's](https://twitter.com/catalinmpit) tweets, he goes on about it all the time. {% twitter 1293105082486140931 %}

Anyway, hopefully, I've convinced you by now.

<hr/>

# Gatsby Starters

I'm not experienced with Gatsby at all. Making my blog was my first experience with Gatsby. Therefore, I would recommend starters if you're not experienced with Gatsby or graphQL, as starters provide the functionality of a blog.

On Gatsby's website, there is a section where there are official Gatsby starters as well as community-made ones ([link to Gatsby blog starters page](https://www.gatsbyjs.com/starters/?c=Blog&v=2)). Here you can find many different open-source starters. There are 3 options here: you simply pick one and use it. You pick one, customise it to your liking, or lastly, you don't like the look of any, and want something different.

If you decide to use one of these starters you should clone it to your local environment. You could either do this using the Gatsby CLI - using a command such as 

`gatsby new gatsby-starter-blog https://github.com/gatsbyjs/gatsby-starter-blog`

 or, you could visit the starter's GitHub page and either download it or click "use as template". 

Either way, here's the one I used and customised - [link to starter](https://www.gatsbyjs.com/starters/gatsbyjs/gatsby-starter-blog/).

# Gatsby Themes

You may also decide to use a theme. As stated on the official [Gatsby site](https://www.gatsbyjs.com/docs/themes/what-are-gatsby-themes) (from the time of publishing this post) -

> "Gatsby themes are plugins that include a gatsby-config.js file and add pre-configured functionality, data sourcing, and/or UI code to Gatsby sites. You can think of Gatsby themes as separate Gatsby sites that can be put together and allow you to split up a larger Gatsby project!".

Essentially, you would want to use a theme if:
- You already have an existing Gatsby site and can’t start from a starter
- You want to be able to update to the latest version of a feature on your site
- You want multiple features on your site, but there is no starter with all the features — you can use multiple themes, composed in one Gatsby site

If you want to learn to use a theme you should refer to [Gatsby's official docs](https://www.gatsbyjs.com/tutorial/using-a-theme/).

Some themes I recommend would be from LekoArts – [link to LekoArts' theme site](https://themes.lekoarts.de/)


<hr/>
Some links that might be useful: 
- [Learn Gatsby: How to Build Your First Gatsby Blog](https://youtu.be/xJVHWhO9bJY)

- [Gatsby Blog Starters](https://www.gatsbyjs.com/starters/?c=Blog&v=2)


I hope this article convinced you that a blog is worth creating, it can help you consolidate your knowledge, it's valued by employers, and you share value to others! 💙
EditorConfig
Tags: developer, editor, vscode
Published: 2020-08-11 16:18:39


Esta es la configuración básica que uso para VSCode, el objetivo es formatear el código basado en un estándar, tener un mayor control de las configuraciones del editor y esta reglas tambien las uso en los editores de JetBrains.

{% gist https://gist.github.com/lgzarturo/a4fb7d6017260ccf89b3d1e1648a2121 %}

> EditorConfig es compatible con muchos editores de texto y entornos de desarrollo (IDE)

Las reglas de editor config que podemos usar son:

- **indent_style** - Define el estilo de la indentación [_tab, space_]
- **indent_size** - Define el tamaño en caracteres de los bloques de indentación [_integer_number, tab_]
- **tab_width** - Establece el tamaño en caracteres del tabulador [_integer_number_]
- **end_of_line** - Se usa para definir el final de línea [_lf, crlf, cr_]
- **charset** - Es la configuración de los caracteres para el archivo [l_atin1, utf-8, utf-16be, utf-16le, utf-8-bom_]
- **trim_trailing_whitespace** - Elimina los espacios en blanco al final de las lineas [_true, false_]
- **insert_final_newline** - Agrega una línea en blanco al final del archivo [_true, false_]
- **max_line_length** - Establece el tamaño de caracteres de un línea [_integer_number, off_]
GSoC 20: Week 10
Tags: gsoc, opensource, python
Published: 2020-08-11 16:11:52

Hello everyone!
I am Niraj and I will be sharing my code contribution of the tenth week of the GSoC.
## Background
One of our user has mentioned that we aren't currently showing file path where we found CVE in the output report. We were just logging it on the console so, my peer Harmandeep Singh has implemented a way to to store paths with the CVE data and write it in the output file. But unfortunately it was breaking `CVEScanner` whenever we use `--input-file` flag for scanning CVEs from CSV or JSON file.

When I start digging it, I also found out several issues in the current data structure for `all_cve_data` which are as following:

1. Old `CVEData` was `NamedTuple` and since newly added path attribute was mutable it can create hard to find bugs. 
2. To update path we need to scan `all_cve_data` to find product for which we want to append paths and its time Complexity is O(n<sup>2</sup>) which can be reduced to O(n) using better structure.
3. Throwing *vendor*, *product*, *version* in different function was decreasing readability. So, a `ProductInfo` datastructure would be nice to pack this data together since we never need that alone.
4. `TriageData` wasn't syncing with old `CVEData`. So, *csv2cve* or *input_engine* was breaking.

## What did I do this week?
I have experimented with various data structure to find out the one that handle all of the issues mentioned above efficiently. In the past, `all_cve_data` was *Set[CVEData]* which was sufficient at that time because all attributes were immutable in `CVEData` and we were just using *set* to remove duplicates from the final output. 

But, when we introduced *paths* attribute we need to change *paths* every time we detect same product in different file and *set* doesn't have any easy way to get value stored in it apart from looping over whole *set* to find what we are looking for.

> Note: set can only assert if object is in the container or not but doesn't have any way to retrieve actual object from the container. I have implemented a [MutableSet data structure](https://gist.github.com/Niraj-Kamdar/0bed6b9895b96b7ea632e72583e66336) which provides functionality to retrieve actual object from the container using `__getitem__` but I didn't want to use my custom data structure as long as it is feasible to use standard data structures. 

So, I have refactored `CVEData` into two parts: 1) immutable `ProductInfo(vendor, product, version)` and 2) mutable `CVEData(list_of_cves, paths_of_cves)`. And I am storing mapping of `ProductInfo` and `CVEData` (*Dict[ProductInfo][CVEData]*) into `all_cve_data` so now we can access `CVEData` of a product without having to traverse whole `all_cve_data`. 

I have moved all data structures into utils to avoid circular imports and I have also added test for *paths*.

## What am I doing this week? 
I will continue to improve documentation of the code I generated like adding docstrings and comments. And I am also going to add requested how-to guides to improve User Experience.
Introducing para: A package metrics tool
Tags: snap, brew, github, opensource
Published: 2020-08-11 16:25:02

---
title: "Introducing para: A package metrics tool"
published: true
date: 2020-08-11 16:00:00 UTC
tags:
  - "snap"
  - "brew"
  - "github"
  - "opensource"
canonical_url: https://www.Feliciano.Tech/blog/introducing-para/
---

`para` is short for Packages and Releases Analytics. It's a simple tool to solve a simple problem for those who release software via Snaps, Brew, GitHub Releases, etc. Metrics and availability.

If you release software via Brew or GitHub Releases, `para` lets you view metrics from those platforms so you can see how well those packages are doing. Here's an example of pulling the metrics for the static site generator [Gotham](https://github.com/gothamhq/gotham):

```bash
Brew data:
The number of installs in the last 30 days is: 4

GitHub data:
v0.6.0:
gotham-v0.6.0-linux-amd64-checksum.txt: 0
gotham-v0.6.0-linux-amd64.tar.gz: 2
gotham-v0.6.0-macos-amd64-checksum.txt: 0
gotham-v0.6.0-macos-amd64.tar.gz: 3
v0.5.0:
gotham-v0.5.0-linux-amd64-checksum.txt: 0
gotham-v0.5.0-linux-amd64.tar.gz: 2
gotham-v0.5.0-macos-amd64-checksum.txt: 0
gotham-v0.5.0-macos-amd64.tar.gz: 0
```

Don't have a software project yet? No worries, `para` is still helpful for you. When you're still in the naming phase, `para check` will check if a name is available on Snap, Brew, Chocolatey, and NPM. This way you can easily find a name that's available without hacking to tack on a username or some other weird suffix to your project's name.

`para` is still very much a work-in-progress with only an unpolished v0.1.0 release so far. Snap metrics isn't yet supported but it's on the roadmap. It's written in Go, packed as a raw binary, deb and snap, currently supports Linux and macOS on amd64, and is open source (MIT licensed).

You can learn more and contribute at its [GitHub Repository](https://github.com/halseylabs/para).
React95 is out. And it's 🔥
Tags: react, javascript, css
Published: 2020-08-11 15:59:14

Windows95 celebrates its 25th anniversary this September, so we decided to finally release [React95](https://react95.io/) v3.0 "Anniversary Edition". 🎉🥳

Give it a star on [Github](https://github.com/arturbien/React95), and see it in action in this [demo app](https://coins95.web.app/).


New release comes with lot's of improvements:
* 🎚  **new components:** Slider, Bar, Progress, ColorInput and more!
* 🌈  **25 color themes:** Rainy Day, Olive, Brick..which one you pick?
* 👨‍💻  **accessibility:** improved keyboard controls and navigation
* 💾  **new font:** original MS_Sans_Serif font
* 🐛  **bugs:** ...were finally fixed

If you want to contribute or have any questions about the project or just want to hang out- join our [Slack channel](https://join.slack.com/t/react95/shared_invite/enQtOTA1NzEyNjAyNTc4LWYxZjU3NWRiMWJlMGJiMjhkNzE2MDA3ZmZjZDc1YmY0ODdlZjMwZDA1NWJiYWExYmY1NTJmNmE4OWVjNWFhMTE)!

You can also catch us on Twitter:
* [Artur Bień](https://twitter.com/artur_bien) - developer,
* [Luiz Baldi](https://twitter.com/baldilp) - developer,
* [Max](https://twitter.com/NEW_FEAR) - designer

Special thanks to [Emily Kolar](https://twitter.com/sheminusminus), [Andrey Ermakov](https://github.com/Ermakoy), [Randy Renninger](http://renninger.design/) and everybody else who helped us along the way 💗

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8g54tass4alhrl1ifilw.png)
Writte.io - Can I get your feedback?
Tags: writing, startup, discuss, help
Published: 2020-08-11 15:51:56

Hey all!

I’m working on a tool for tech/startup writers and would really appreciate your input.

The tool in question is https://www.writte.io/

It’s a publishing tool that will allow writers to submit their publications to Medium, Wordpress, Ghost, Twitter, Linkedin, Hacker News and many other startup related websites. All from a single place and just by pressing one button.

I’m trying to validate if this is an idea that would help writers and something that solves a real problem.

Would love to have your feedback on this! As a writer what do you think? Real problem that needs solving? Just a nice to have that would cut some time off your day? Not a great idea at all?