teleren/devto huggingface dataset:
WEB 2 VS WEB 3
Tags: web2vsweb3, zuriteam, blockgames, nestcoin
Published: 2022-03-01 14:08:11



![rm373batch16-banner-09.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1646235289836/2VcFMSEMt.jpg)

_<a href='https://www.freepik.com/vectors/banner'>Banner vector created by rawpixel.com - www.freepik.com</a>_
Good day everyone, so happy to share this article and happy new month 💕. As a developer by now, if you check your YouTube, (WEB 3.0, solidity, Ethereum, decentralized, centralized, Dapp, so on), these are mostly keyword you will see.  In today's article, I would love to differentiate the difference between the formal WEB 2.0 and the over-hype WEB 3.0 (latter).
According to an article in the [Ethereum developers documentation](https://ethereum.org/en/developers/docs/web2-vs-web3/) written by [Sam Richards](https://www.samajammin.com/), he explains that the difference between WEB2 and WEB3 is that

> Web2 refers to the version of the internet most of us know today. An internet dominated by companies that provide services in exchange for your personal data. Web3, in the context of Ethereum, refers to decentralized apps that run on the blockchain.

 These are apps that allow anyone to participate without monetizing their personal data.


Well according to my own definition on what web2 and web3 is, from my 2 weeks and ongoing course on Web 3.0 by [Blockgames](https://blockgames.gg) sponsored by [NestCoin](https://nestcoin.com) and [Zuriteam](https://zuri.team)
stated that 

> Web 2.0 is the second generation of internet services that allow users to interact with the web. HTML, CSS, AJAX, and JavaScript have emerged as formidable instruments for the creation of web 2.0 websites which also focus mainly on the design, functionality of the web to suit the users' experience. To crown it all Web 2.0 is an internet service dominated by companies that provide services for your personal data.



![90452.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1646235319338/3KlJyMl68.jpg)

_<a href='https://www.freepik.com/vectors/technology'>A decentralized social network created by rawpixel.com - www.freepik.com</a>_
 
> While Web 3.0 is the third generation of the internet services which is also an advanced improvement, corrections on the services that Web 2.0 provides. Web 3.0 provides a decentralized and universal way for the flow of information among users.

 

> Although here Web 3.0 does not crawl or sell your personal data from dominated companies but it is an internet service that requires a little bit of token before you can use it. It allows you to participate both as a user and also as a builder. Web 3.0 runs on blockchain technologies.

**Conclusion**

It is well known that WEB 3.0 is the future internet service now and perhaps a more secure future one, due to the technologies used in building it. It is believed that the technologies used in building WEB 3.0 are trustless.
 
Comments are welcome, thanks for reading.
7 Fun, Cool & Free APIs For Your Next Project
Published: 2022-03-02 11:05:06

---
title: 7 Fun, Cool & Free APIs For Your Next Project
published: true
date: 2022-03-01 14:01:43 UTC
tags: 
canonical_url: https://simondoescoding.hashnode.dev/7-fun-cool-and-free-apis-for-your-next-project
---

## A Small list of free APIs for your next project!

Just a quick list of fun and free APIs that you can use for your next web development project.

1. [Poke API](https://pokeapi.co/docs/v2) - Access all pokemon data including characters, sprites, moves, stats and more!
2. [Bored API](https://www.boredapi.com/) - Generates random activities for you to do when you're bored
3. [Super Hero API](https://superheroapi.com/) - Data on superheroes from both comic universes
4. [Chuck Norris Jokes API](https://api.chucknorris.io/) - Generates a random Chuck Norris joke
5. [Movie Database](http://www.omdbapi.com/) - Obtain movie information 
6. [Cocktail API](https://www.thecocktaildb.com/api.php) - Find information on cocktails, how to make them, ingredients or generate a random cocktail!
7. [Geeky Jokes API](https://github.com/sameerkumar18/geek-joke-api) - Fetches a random geeky/programming related joke

I created a simple Pokedex using Poke API [My Pokedex](https://my-pokemon-pokedex.vercel.app/)

#### I'd love to see what you make with these APIs!

### Have Fun!
🥇Counting Valleys - HackerRank Solution (Javascript) 🚀
Tags: javascript, programming, algorithms, help
Published: 2022-03-01 14:00:39

An avid hiker keeps meticulous records of their hikes. During the last hike that took exactly _steps_ steps, for every step it was noted if it was an uphill, _U_, or a downhill, _D_ step. Hikes always start and end at sea level, and each step up or down represents a _1_ unit change in altitude. We define the following terms:

- A mountain is a sequence of consecutive steps above sea level, starting with a step up from sea level and ending with a step down to sea level.
- A valley is a sequence of consecutive steps below sea level, starting with a step down from sea level and ending with a step up to sea level.

Given the sequence of up and down steps during a hike, find and print the number of valleys walked through.

### Example
_steps = 8 path = [DDUUUUDD]_
The hiker first enters a valley _2_ units deep. Then they climb out and up onto a mountain _2_ units high. Finally, the hiker returns to sea level and ends the hike.

### Function Description
Complete the countingValleys function in the editor below.
countingValleys has the following parameter(s):

- int steps: the number of steps on the hike
string path: a string describing the path

### Returns
- int: the number of valleys traversed

### Input Format
The first line contains an integer , the number of steps in the hike.
The second line contains a single string , of  characters that describe the path.

```js
function countingValleys(steps, path) {
    // Write your code here
    
    let strArr = path.split('')
    let count = 0
    let result = 0
    for(let step=0; step<steps; step++){
        if(count == 0 && strArr[step].toLowerCase() == 'd'){
            count -= 1
            result += 1
        } else if(strArr[step].toLowerCase() == 'd'){
            count -= 1
        } else {
            count += 1
        }
    }
    return result
}
```
Das ist die MasterClass
Tags: lms
Published: 2022-03-01 13:30:24

[MasterClass](https://kursprofi.com/review/masterclass/) ist die weltweit erste professionelle videobasierte Lernplattform für kreative Unternehmer/innen. Sie bietet Anleitungen zur Gestaltung deines kreativen Unternehmens, von Stil, Markenbildung und Geschäftswachstum bis hin zu kreativer Freiheit und kreativem Lebensstil. MasterClass wurde von den kreativen Köpfen hinter den sehr erfolgreichen Kreativunternehmen InVision und Ads of the World gegründet. Tatsächlich haben Kreative wie Wes Anderson, Tim Burton, Tom Ford und Oscar-Preisträger Guillermo del Toro gesagt, dass MasterClass ihre Arbeitsweise verändert hat.
Python for everyone: Mastering Python the Right Way
Published: 2022-03-01 13:22:02



## What is Python?
Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general-purpose language, meaning it can be used to create a variety of different programs and isn't specialized for any specific problems.

 **Why is python popular?**
The python language is one of the most accessible programming languages available because it has simplified syntax and not complicated, which gives more emphasis on natural language. Due to its ease of learning and usage, python codes can be easily written and executed much faster than other programming languages.

**What is the application areas of python?**

**Web and Internet Development**
Python has many uses for web development including
1.	Django and Pyramid Frameworks for complex web apps
2.	Flask and Bottle micro-framework for light applications

**Scientific and Numeric**
Widely used in scientific and numeric computing.
This is in the fields of mathematics and Data science
Popular libraries like scikit learn, pandas, NLTK, NumPy, SciPy used in data anaylis, machine-learning, AI, NLP and much more

**Education**
Used for teaching programming both fundamentals and advanced levels.

**Software development**
Used as a support language for software development, testing and build control

## Best ways to learn python.
**1. Figure out why you need to learn python.**
This acts as a driving force to what you need to achieve and setting the goals you want to achieve after running python.
Pick an area you are interested in such as :

- Data science / Machine learning
- Mobile apps
- Websites
- Games
- Data processing and analysis
- Hardware / Sensors / Robots
- Scripts to automate your work
Select one or two areas that interests you and which will eventually help in building projects with them.

**2. Learn the basic Syntax.**
This is key to any programming language. You have to understand the basic syntax to be able to come up with structured and more complex projects.

**3. Come up with structured projects**
This will help you apply knowledge you have learned and aids in opening you mind and digging deep to complex projects and will greatly help in your learning.

**4. More practice and more projects**
Involve yourself in more projects and do more practice to master the concepts 

## Python installation and best practices
**Python Installation**
Check the python documentation for installation on the various platforms [Python Documentation](https://docs.python-guide.org/starting/installation/)
**Best practices**
Also visit they python docs for best practice when writing you python code [DOCS](https://docs.python-guide.org/writing/style/)


All the best in your python career. Happy Coding!!!💯
Shallow Copying in JavaScript using Object Spread Operator
Tags: javascript, webdev, tutorial, oop
Published: 2022-03-01 13:08:51

For the longest time, you had to resort to workarounds and libraries to create a deep copy of a JavaScript value.

Copying a value in JavaScript is almost always shallow, as opposed to deep. That means that changes to deeply nested values will be visible in the copy as well as the original.

One way to create a shallow copy in JavaScript using the [object spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax)...:

```
const myOriginal = {
  someProp: "with a string value",
  anotherProp: {
    withAnotherProp: 1,
    andAnotherProp: true
  }
};

const myShallowCopy = {...myOriginal};
```
Adding or changing a property directly on the shallow copy will only affect the copy, not the original:

```
myShallowCopy.aNewProp = "a new value";
console.log(myOriginal.aNewProp)
// ^ logs `undefined`
```

However, adding or changing a deeply nested property affects both the copy and the original:

```
myShallowCopy.anotherProp.aNewProp = "a new value";
console.log(myOriginal.anotherProp.aNewProp) 
// ^ logs `a new value`
```

The expression `{...myOriginal}` iterates over the (enumerable) properties of `myOriginal` using the [Spread Operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax). It uses the property name and value, and assigns them one by one to a freshly created, empty object. As such, the resulting object is identical in shape, but with its own copy of the list of properties and values. The values are copied, too, but so-called primitive values are handled differently by the JavaScript value than non-primitive values. To quote [MDN](https://developer.mozilla.org/en-US/docs/Glossary/Primitive):

> In JavaScript, a primitive (primitive value, primitive data type) is data that is not an object and has no methods. There are seven primitive data types: string, number, bigint, boolean, undefined, symbol, and null.

MDN — Primitive

Non-primitive values are handled as references, meaning that the act of copying the value is really just copying a reference to the same underlying object, resulting in the shallow copy behavior.

That's it for now. Next article I will write about `Deep copies` in JavaScript.

##Wrapping Up
I hope you enjoyed the article, if yes then don't forget to press ❤️ and Subscribe. You can also bookmark it for later use. It was fun to create this article and If you have any queries or suggestions don't hesitate to drop them. See you.
You can extend your support by giving me stars on GitHub Profile.😊👇
[Github](https://github.com/Mohammad-Asif-Web)
[Portfolio](https://muhammadasif10.blogspot.com/)

##Support

[Buy me a Coffee](https://www.buymeacoffee.com/muhammadasif10)
PYTHON 101: INTRODUCTION TO PYTHON
Published: 2022-02-14 15:04:43


**_Introduction_**
The history of programming languages is not gospel to anyone in the field. The history begins with a woman by the name of Ada Lovelace and her partner Charles Babbage while working on the Analytical Engine. Lovelace developed an algorithm to be used on the Analytical Engine to compute the Bernoulli numbers, a sequence of rational numbers that occur frequently in analysis. Since then there has been a huge growth in the field of programming.

In 1991 at Centrum Wiskunde & Informatica (CWI), Guido Van Rossum, a Dutch programmer developed a programming language that would be easy to read, easy to debug, and also easy to extend which we now know as The Python programming language.
Python programming language is a high-level programming language that is easy to code with its ‘English-like’ code statements thus making it the most sought-after language in recent times.

**_Setting up the python environment_**
Python is a cross-platform programming language, what this means is that any program written in python can run in any operating system.
To develop a python program one will need to install the following:
**Python**
i. This can be installed from python’s website
https://www.python.org/downloads/
ii. Choose the operating system you are using to develop the programs. E.g Windows
iii. Download the version of python. It is always recommended to download the latest and most stable version.
iv. Install it to your computer

**A text editor**
This is the environment within which the programmer writes their code.
There are many text editors e.g Visual basic code, sublime text, vim e.t.c

**_Writing our first program in python_**
Now that the environment is ready we can code and execute our first python program.
We are going to write a program that outputs the following text message “Hello World”

i. Open the text editor and open a new file.
Save the file with the .py extension. e.g. hello.py. The .py extension is used to distinguish the python files from other files.
ii. Write the following
    print(“Hello world!”)
iii. If you are using the visual studio code editor. You will just click on the play button contained in the toolbar on the upper side of the text editor to run the program
Alternatively, one can run the program from the terminal. 

- Open the terminal and using the cd function navigate to the folder containing the hello.py file.
- Once there use the following command to run the program
   python(version of python you are using) filename e.g.python3 hello.py
- Click Enter
- The following should be displayed
    Hello world!
[OmniSSHAgent] Consolidate the chaos of Windows ssh-agent into one.
Tags: wsl, ssh, putty, sshagent
Published: 2022-03-01 12:48:24

---
title: [OmniSSHAgent] Consolidate the chaos of Windows ssh-agent into one.
published: true
description: NamedPipe on Windows, Unix domain socket on Cygwin/MSYS2, WSL, WSL2, and other existing ssh environments can now be used with a single ssh agent. 
tags: wsl, ssh, PuTTy, sshagent
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zjhz6sfjxh8cvgcuc2rp.png

---


## [OmniSSHAgent](https://github.com/masahide/OmniSSHAgent)
![OmniSSHAgent](https://raw.githubusercontent.com/masahide/OmniSSHAgent/main/build/appicon.png)

# Communication method between ssh-agent and ssh command

There are multiple ways of communication between ssh client and ssh-agent in windows environment.

- PuTTy pageant event message communication
- Unix domain socket in Cygwin(MSYS2)
- Windows Named pipe
- Unixdomain socket of WSL1
- WSL2's Unixdomain socket

Since these communication methods are different, there are various ssh-agent proxy tools to perform each communication.

### wsl-ssh-ageant
https://github.com/rupor-github/wsl-ssh-agent

Proxies ssh-agent communication from Named Pipe to WSL1.

### wsl-ssh-pageant
https://github.com/benpye/wsl-ssh-pageant

Proxy ssh-agent communication from PuTTy (pageant) to Named Pipe and WSL1.

### ssh-pageant
https://github.com/cuviper/ssh-pageant

Proxies ssh-agent communication from Putty (pageant) to Cygwin/MSYS2.

### npiperelay/socat
https://github.com/jstarks/npiperelay

Proxy ssh-agent communication from Named Pipe to WSL2.


## Add a secret key to ssh-agent (ssh-add).

### ssh-add
https://man.openbsd.org/ssh-add.1
Add your private key to ssh-agent by using ssh-add command which is provided for each environment.

### KeePassXC
https://keepassxc.org/
Password manager has ssh-add function.
It supports PuTTY (pageant) and Named pipe ssh-agent communication.

## Chaos Map of SSH-Agent on Windows
As you can see, there are many different ssh-agent communication methods and tools in Windows, and they are all intertwined in a complex way.
The following is a diagram of the ssh-agent communication path in Windows. As you can see, it's very chaotic.

![Chaos Map of SSH-Agent on Windows](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wwxwoc3qu7p1csoo9c88.png)

## Connection diagram of [OmniSSHAgent](https://github.com/masahide/OmniSSHAgent)
[OmniSSHAgent](https://github.com/masahide/OmniSSHAgent) is a program to simplify what used to be a chaotic situation, as shown in the following figure. 
![OmniSSHAgent](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zjhz6sfjxh8cvgcuc2rp.png)

## Usage and Setup

For more information on how to use and setup, click here.
https://github.com/masahide/OmniSSHAgent
How to Query in MongoDB?
Tags: mongodb, database, tutorial, beginners
Published: 2022-03-01 12:43:13

**MongoDB** is an open source NoSQL database. It stores or retrieve data in the form of JSON-like documents. Just like Mysql where we can select records with specific conditions, ordering records, grouping records, limiting records, using Math functions etc. Similarly, In mongodb we can find records with conditions, limiting records etc. In this tutorial we will learn how to query in MongoDB.

## Mongodb Like Query to Return Documents
**db.users.find({“name”: /.m./})**

This will return documents where name contains ‘m’.

## Mongodb Where Condition
**db.users.find( { age: { $gt: 12 } } )**

This will return documents where age greater than 12.

**db.users.find( { _id: 5 } )**

This will return documents where id is 5.

**db.users.find( { birth: { $gt: new Date(‘1940-01-01’), $lt: new Date(‘1960-01-01’) } } )**

This operation returns from the documents where birth is between new Date(‘1940-01-01’) and new Date(‘1960-01-01’).

## Mongodb Multiple Where Conditions
**db.users.find( {
birth: { $gt: new Date(‘1920-01-01’) },
death: { $exists: false }
} )**

This operation returns all the documents where birth field is greater than new Date(‘1950-01-01’) and death field does not exists.

## Mongodb Query an Array of Documents
**db. users.find(
{ awards: { $elemMatch: { award: “Turing Award”, year: { $gt: 1980 } } } }
)**

This operation returns documents where the awards array contains at least one element with both the award field equals “Turing Award” and the year field greater than 1980.

## Specify the Fields to Return in Mongodb
**db.users.find( { }, { name: 1, contribs: 1 } )**

This operation finds all documents and returns only the name field, contribs field and _id field.

## Limit the Number of Documents to Return in Mongodb
**db.users.find().limit( 5 )**

This will return only 5 documents.

## Offset in Mongodb
**db.users.find().skip( 5 )**

This will skip or offset 5 documents from start.

## Count in Mongodb
**db.users.find().count()**

This will count the documents.

## Order by in Mongodb
**db.users.find().sort( { name: 1 } )**

This operation returns documents sorted in ascending order by the name field.

These are the basic mongodb queries you can use in your project.

Please like, share and give positive feedback to motivate me to write more.
For More Tutorials you can [visit my website](https://www.w3courses.org/how-to-query-in-mongodb/).
Thanks :)
Happy Coding :)
Freelancing sucks
Published: 2022-03-01 12:34:17

I have been a web developer for a while now and made my debut in the professional world in 2020 as a backend development intern in a pseudo tech company; why nickname? first, there was no automated testing, no project management systems; it was a bit like a group of friends, we find a client, we invent an estimate and we give the job to whoever is available; our stack was php! well I may be going to pass for a nazi but for me the php is shit! I spent 6 months doing casi every day and I didn't get over it; maybe facebook was made in php, that 90,...% of the sites in the world are made in php but that doesn't mean anything. Well let's come back, I'm doing my best to complete the projects assigned to me and once my internship is over, I'm out of the box! (Some time later I learn that the box has to be closed). and I felt like I had lost 6 months of my life, so what am I trying to catch up by keeping up to date with web technology; I rush on view js, I do some projects, then I see the reality of the market, 80% of the requests were on react; I change my cape, I start react I do 2, 3 concrete projects in it; and I'm going freelance! BOOOM it's a disaster, it's been about 6 months I haven't found a client, so now I'm questioning myself! is freelancing dead or is it just my skills that aren't sharp enough?
Crypto Review APP
Tags: java, retrofit, rxjava, app
Published: 2022-03-01 12:13:39

Application that displays cryptocurrencies and their market caps. Retrofit, RXJava Library is used. Nomics API was used to pull market values.

[Github](https://github.com/mertkadirarslan/CryptoReview)
[My Portfolio](https://mertkadirarslan.com.tr)

**Note: Some parts are not complete, I will upload again when complete**


![Crypto List](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/er4pmyof6gsx6lahz5n6.png)

![Main Menu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sgtycwrm7xb9nb7wbsci.png)
After cloning an react repo from git facing an issue
Tags: react, webpack, webpackdev, npm
Published: 2022-03-01 12:11:18

After cloning an react repo from git facing an issue- 

can ayone help me to fix this, I tried the 1,2,3,4 no point but not helped.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ribdi6wws6yfjbar3arp.png)