teleren/devto huggingface dataset:
Educational resources for "Web 3.0"
Tags: web3, blockchain, hashgraph, ipfs
Published: 2020-03-30 16:32:34

---
title: Educational resources for "Web 3.0"
published: true
description: A curated list of talks, posts, and whitepapers related to Web 3.0, including blockchains, and cryptocurrencies.
tags: web3, blockchain, hashgraph, ipfs
---

### Why collect educational resources?

Blockchains, hashgraph, and the interplanetary file system (IPFS) are all very new technologies emerging into what's being called "Web 3.0". 

I find many trying to learn these new systems have a hard time deciding where to start, or finding good resources. Not to mention the difficulties associated with seeing where they fit into the larger ongoing trends in the technology industry. So, I thought it'd be helpful to provide a list of educational resources I've found useful.

### What is Web 3.0? 

"Web 3.0 is a broad movement and group of associated technologies aiming to make the web and internet more decentralized, verifiable, and secure. 

The goals of Web 3.0 include (a) trustless infrastructure; (b) removing intermediaries; and (c) giving users power and ownership over their data, identity, security, and transactions.

The technologies add capabilities and functionality for securely linking data and programs, cryptographic verifiability, transaction processing, P2P connectivity, and trustless interoperability. They also provide decentralized computation and storage, enabling fully autonomous applications (dapps). The movement includes many blockchain and dweb projects, as well as some linked data efforts." - [Juan Bennet](https://twitter.com/juanbenet), Creator of [IPFS](https://ipfs.io/) (2018)

## Videos
- [Decentralize Everything](https://youtu.be/WSN5BaCzsbo) - Vitalik Buterin
- [Tim Berners-Lee: The next Web of open, linked data](https://youtu.be/OM6XIICm_qo) - Tim Berners-Lee
- [What Exactly is Web3?](https://www.youtube.com/watch?v=l44z35vabvA) - Juan Benet
- [What is Hedera Hashgraph?](https://youtu.be/MzWiiOLv96I) - Dr. Leemon Baird
- [Why Ethereum is Going to Change the World](https://youtu.be/lYJymzsdXmU) - Joseph Lubin

## Papers / Blog posts
- [One Small Step for the Web...](https://www.inrupt.com/blog/one-small-step-for-the-web) - Tim Berners Lee
- [Understanding the IPFS White Paper](https://decentralized.blog/understanding-the-ipfs-white-paper-part-1.html) - Mark Pors
- [What are zk-SNARKs?](https://z.cash/technology/zksnarks/) - Zcash

## Whitepapers
- [Bitcoin: A Peer-to-Peer Electronic Cash System](https://bitcoin.org/bitcoin.pdf) (2008)
- [Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform](https://github.com/ethereum/wiki/wiki/White-Paper) (2013)
- [IPFS - Content Addressed, Versioned, P2P File System](https://ipfs.io/ipfs/QmR7GSQM93Cx5eAg6a6yRzNde1FQv7uL6X1o4k7zrJa3LX/ipfs.draft3.pdf) (2014)
- [Hedera: A Governing Council & Public Hashgraph Network](https://www.hedera.com/whitepaper/) (2017)

<hr/>

Have any other suggestions? Let me know in the comments 👇
Startup Engineering Preview
Tags: aws, startup, podcast
Published: 2020-03-30 16:28:19

{% spotify spotify:episode:0YczpN2ZDTDRYPk2ZxnH2C %}

Startup Engineering podcast has launched. I go behind the scenes with the engineers, CTO’s, and founders that built the technology and products at some of the world’s leading startups.

Each episode we will learn the inside story of how they overcame their biggest technology challenges. From launch through to achieving mass scale, and all the bumps in between. Engineers share their experiences, lessons learnt and best practices.

If you are excited about building the next big thing or you want to learn from the engineers that have been there and done that, subscribe to [Startup Engineering](http://startupengineering.co/) wherever you get your podcasts.

+ [Apple Podcasts](https://podcasts.apple.com/podcast/startup-engineering/id1504093052)
+ [Google Podcasts](https://podcasts.google.com/?feed=aHR0cHM6Ly9mZWVkcy5zaW1wbGVjYXN0LmNvbS9iRjFVUXhocA%3D%3D)
+ [Spotify](https://open.spotify.com/show/58m8vSzXx1WKirKLTdCQa6)
+ [Stitcher](https://www.stitcher.com/podcast/startup-engineering)
+ [Breaker](https://www.breaker.audio/startup-engineering)

Until next time keep on building.

*AWS Activate founder tier providers $1,000 in AWS Credits, access to experts and the resources needed to build, test & deploy. [Activate your startup today](https://aws.amazon.com/activate/).*
How to Minify JSON Code?
Tags: minifier, json
Published: 2020-03-30 15:59:58

Are you using JSON Code? If yes then this tutorial is a must helpful for you because everyone likes minified code because it improves the loading of files.

So you are manually minifying JSON code, why not use automatic minifier.

So today in this tutorial I will introduce [JSON Minifier](https://goonlinetools.com/json-minifier/).

![](https://res.cloudinary.com/practicaldev/image/fetch/s--DvguPT_n--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/i/fg203gq6ndla8dozfik6.png)

### Here is How to Minify JSON Code?

1. First Open this [JSON Minifier](https://goonlinetools.com/json-minifier/)
2. Click on Clear Button to Clear Demo Code
3. Paste JSON Code
4. Click on Minify Button
5. Now Press Copy Button to Copy Minified JSON Code

Do you want to Beautify your Minified or Ugly written code? If yes then read [this guide](https://dev.to/goonlinetools/how-to-beautify-json-code-221e). 

Thanks for reading this article if you have any question regarding then please ask in the comment box.
VS Code: Search-and-Replace Regex with Dollar-Sign
Tags: vscode, regex, findandreplace, webdev
Published: 2020-03-30 16:21:34

---
title: VS Code: Search-and-Replace Regex with Dollar-Sign
published: true
description: Search and Replace using Regular Expressions within VS Code can be fairly straight-forward until you need to incorporate a dollar sign next to the selection. Here's my take.
series: VS Code
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/bfwmaa3hqsulg55t781n.png
tags: vscode, regex, findandreplace, webdev
---

In a previous article about VS Code, Search-and-Replace using RegEx, I had a question that prompted me to create this article so that I can remember what I did ...

## The Question

What if I need to replace something with **$**? For example, replace `$var` with `$this->var = $var`, the regex to search is easy, the problem is the replacement. I (have tried this) with `$this->$1 = $$1` (and) it does not work properly. So how do we go about it?

## The Solution

The solution, as I see it is actually in two parts. First, we need to properly select the content for replacement. Then, second, we need to define the replacement, **accounting for the dollar-sign** ...

### Selecting the Content

When I started breaking down the question in my head, I saw some content like the following ...

```javascript
$var;
$content;
$question;
```

... the assumption being that this should be changed into ...

```javascript
$this->var = $var;
$this->content = $content;
$this->question = $question;
```

So, this means I need to capture the text after the dollar sign. As stated in the question, this is pretty straight forward. There are many ways to do this. I chose ...

```
\$([a-zA-Z0-9]*)
```

### Replacing the Content

The dollar-sign after the equal sign seems to be where the main concern of the question comes from. I will admit that it took me a few minutes to get my head around the issue of escaping it.

#### Original Attempt

First, I tried this replacement RegEx ...

```javascript
$this->$1 = $$1
```

... this is shown in the question and makes sense; however, the result is ...

```javascript
$this->var = $1
```

#### Escaping the Dollar-Sign

... then, I tried escaping the dollar-sign after the equal-sign ...

```javascript
$this->$1 = \$$1
```

... however, the result is not quite what I expected ...

```javascript
$this->var = \$var
```

#### Proper Escaping of the Dollar-Sign

While this is closer, there is clearly something wrong with this approach. I then started searching for how to properly escape the dollar-sign in a RegEx Search-and-Replace.

I found the following ...

{% stackoverflow 59056327 %}

### The Solution

And, here's the answer ...

```javascript
$this->$1 = $$$1
```

... try it out, **it works!**
How Would You Reverse an Array In Place?
Tags: array, algorithms, javascript
Published: 2020-03-30 16:03:24

Let's say you were given an array of characters, such as `['a', 'b', 'c', 'd', 'e']`. How would you reverse this array in place (that is, have a space complexity of O(1))?

One solution to this problem involves having two pointers, which start at both ends of the array. Then, swap the elements at those points in the array. Once both elements have been swapped, move both pointers toward the middle, and keep doing this until the left pointer is no longer smaller than the right pointer.

To start, set two variables for the two pointers--

```javascript
function reverseArray(arr) {
  let leftPointer = 0
  let rightPointer = arr.length - 1

  //...
}
```

Then, initiate a while loop to keep going as long as `leftPointer` is less than `rightPointer`. When I initiate while loops, I like to immediately include an increment or decrement--this helps me avoid accidentally creating an infinite loop.

```javascript
function reverseArray(arr) {
  let leftPointer = 0
  let rightPointer = arr.length - 1

  while (leftPointer < rightPointer) {
    //...
    leftPointer ++
    rightPointer --
  }
}
```

This is the tricky part of the problem: swapping the elements. One solution to this involves temporarily storing one of the elements in a variable. Then, set one element to the other, and set the other to the temporary.

```javascript
function reverseArray(arr) {
  let leftPointer = 0
  let rightPointer = arr.length - 1

  while (leftPointer < rightPointer) {
    let temporary = arr[leftPointer]
    arr[leftPointer] = arr[rightPointer]
    arr[rightPointer] = temporary
    
    leftPointer ++
    rightPointer --
  }
}
```

And that's it! If you tested this out with the array `['a', 'b', 'c', 'd', 'e']`, the function would return `['e', 'd', 'c', 'b', 'a']`. The time complexity for this solution would be linear, O(n).
Agile for Kids, literally
Tags: agile, beginners
Published: 2020-03-30 16:01:05

The word *Kids* in the title is literal: **kids**! I have kids at home and nowadays they are required to study from home due to the current circumstances (the pandemic, obviously), the same way as I am also forced to work from home. Initially, they were kind of very happy about having not to go to school, but after the first week, I noticed that things started to change. Things were getting out of their control. They started to become desperate for not knowing exactly what to do. Lots of homework, online tests, and other activities. Now, their responsibility is way bigger than before, when they were present at school and teachers usually say to you what to do and when.

That's where I came in. So I was aware that I had to wear the hat of "*Scrum Master*" at home. So I decided to apply some agile methodologies which we use in the company to facilitate their lives, to give them focus on what's really important. I bought one whiteboard per daughter and colored paper stickers. Each color represents a type of activity: yellow for tests, pink for homework, and blue for other activities, for example.

Then we created a board with all stories which we identified together in a sort of light planning session. We identified the important stories for the week and glued all of them to the TODO session.

These were the sessions of their Kanban boards:

1. Backlog: all remaining stories
2. To do: starts with all the important stories for the week
3. Doing: the story which she is working on (should be only one)
4. Done: all completed stories

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3p5g2efn3k45a22yh2q9.jpg)

Now they know exactly what to do and they are way more confident knowing that everything is there on the board and under control.
MPI for python, wrapping C++ code by swig
Tags: swig, cpp, mpi, parallel
Published: 2020-03-30 15:57:35


There is a nice [tutorial](https://mpi4py.readthedocs.io/en/stable/tutorial.html) for `mpi4py`, but I think the wrapping C/C++ code with swig is not clear enough. So I introduce my implementation of the tutorial.
The header file contain the hello world example to print the rank of the process.

```C++
/* file: helloworld.hpp */
#include "mpi.h"

void sayhello(MPI_Comm comm)
{
    int size, rank;
    MPI_Comm_size(comm, &size);
    MPI_Comm_rank(comm, &rank);
    printf("Hello, World! "
            "I am process %d of %d.\n",
            rank, size);
}
```
swig interface code:

```
// file: helloworld.i
%module helloworld

%{
#include "helloworld.hpp"
%}

%include /usr/local/lib/python3.6/dist-packages/mpi4py/include/mpi4py/mpi4py.i
%mpi4py_typemap(Comm, MPI_Comm);

%include "helloworld.hpp"
```

**How to compile:**
```sh
swig -c++ -python helloworld.i  
mpiCC  -O2 -fPIC -c helloworld_wrap.cxx -I /usr/include/python3.6 -I /usr/local/lib/python3.6/dist-packages/mpi4py/include
mpiCC  -shared helloworld_wrap.o -o _helloworld.so 
```
The first line produce a `helloword_wrap.cxx` file.
The second line make the object file `helloworld_wrap.o`.
and the at the final line shared library file  `_helloworld.so` is made. 

How to use:

```python
from mpi4py import MPI
import helloworld

helloworld.sayhello(MPI.COMM_WORLD)
```


```sh
$ mpirun -n 4 python3 runme.py 
Hello, World! I am process 0 of 4.
Hello, World! I am process 1 of 4.
Hello, World! I am process 2 of 4.
Hello, World! I am process 3 of 4.
```


The get the files please refer to the [GitHub](https://github.com/Ziaeemehr/mpi_parallel/tree/master/mpi4py/examples/swig/helloworld) directory.
To get more examples wrapping C++ codes using swig, please look at my [github repository](https://github.com/Ziaeemehr/swig/tree/master/examples).

I hope it be helpful.
Tracking your project / GH todos...
Tags: tools, productivity, planning, discuss
Published: 2020-03-30 15:41:45

If you're anything like me - especially after spending time learning new things on DEV every day :smile: - you end up with a number of tabs open, or bookmarks recorded, for interesting projects to look into, ideas for contributions you could make, or PRs you could send... it all soon adds up, and eventually, things get forgotten or fade, even though you would still be excited about them if you remembered!

How do you go about keeping track of all those "back of the mind" ideas you will come back to on a rainy day? (under quarantine, especially at weekends, a lot of days feel like the proverbial rainy days at the moment!)

I was thinking of maybe spinning up a private GH repo for myself to jot down ideas and links to the relevant other projects. Mind you, I could equally do that  locally in a Markdown file... (on Friday night, I discovered [this rather nice iOS-based way](https://www.macstories.net/ios/my-markdown-writing-and-collaboration-workflow-powered-by-working-copy-3-6-icloud-drive-and-github/) of managing a GH workflow using iaWriter and Working Copy); or, I could create myself a Trello board...

Just curious how others in the community manage their random plans for project contributions or personal project improvements!
4 Mistakes I Made When I First Learned How To Code
Tags: career, webdev, beginners, codenewbie
Published: 2020-03-30 15:41:40

_Originally published on [https://ali-ilman.com/blog/4-mistakes-i-made-when-i-first-learned-how-to-code](https://ali-ilman.com/blog/4-mistakes-i-made-when-i-first-learned-how-to-code)._

With my two-year anniversary of working permanently coming soon, I took a look into the past and thought of what were the mistakes that I made in the very beginning.

## 1. Let completing a course influence how I feel
I was a _course champion_ in the beginning. It felt good knowing that I have completed a course, but I kept going through courses without an idea of which path I wanted to take in the tech industry. I had completed courses on Codecademy and SoloLearn, a couple of tutorials on freeCodeCamp, and the courses were sort of similar.

## 2. Not writing down notes in my own words
Instead of using my own words, which can test myself on whether I understand what I've learned, I wrote down courses' content word-for-word, including the exemplary code snippets! And I did this for more than a few courses on a few platforms. Ouch!

## 3. Not going in-depth with concepts I found difficult to understand
I feel this go hand-in-hand with number 1. It felt good completing a challenge for a tutorial, so I continued onto the next tutorial without thinking deeply whether I understand what I've learned.
Because of this, I _relearned_ JavaScript in the second-half of 2019 because I mostly learned JavaScript in the beginning.

## 4. Built barely anything with what I've learned
When I first started learning, I didn't build much in the first 2-3 years. I can only remember two projects, and they were on Codecademy. For these two projects, I had wanted to mimic the landing page of [Twitter](https://twitter.com) and [Lowyat](https://www.lowyat.net/). And that's about it. It was only in 2017 in which I started to build projects.

Finishing a course doesn't mean you understand everything you've went through. And remember, learning is lifelong. 🧠 

_The only true wisdom is in knowing you know nothing. - Socrates_

Cheers for reading! 🤓

_I share the rumblings of a Man United fan and the life of a software engineer on [Twitter](https://twitter.com/thealiilman), you might want to follow me._ 😉
How to properly close a port?
Tags: beginners, codenewbie, todayisearched
Published: 2020-03-30 15:41:03

This is a thing I need to google every now and then so here's a simple recipe for closing neglected ports on [MacOS](#mac-os), [Windows](#windows) and [Linux](#linux).
***

# Mac OS
Here are the steps:

### 1. Find the process ID (PID) of the port (replace the 'portNumber' with the number)
`sudo lsof -i :portNumber
`
This will give you a response as follows — copy the PID number for the next step:
![](https://dev-to-uploads.s3.amazonaws.com/i/voazxy0n2x8i25riddth.png)

### 2. Kill the process
First, try this (replace PID with the number you copied above):

`kill PID`

Now, test if it's closed by connecting to the port (replace portNumber with the actual port number):

`nc localhost portNumber`

If it returns immediately with no output, the port isn't open. However, if it returns some input, try to kill it with:

`kill -9 PID`

Again, try to connect. If it's still running, try this:

`sudo kill -9 PID`

***
# Windows
Here are the steps for Windows:
### 1. Find the process ID (PID) of the port (replace the 'portNumber' with the number)

`netstat -ano | findstr :portNumber`

Copy the PID number for the next step.

### 2. Kill the process
First, try this (replace typeyourPIDhere with the number you copied above):

`taskkill /PID typeyourPIDhere /F`

Run the first command again to see if it's closed.

***
# Linux
Here are the steps for Linux (courtesy of [mayankjoshi](https://dev.to/mayankjoshi))
### 1. Get a list of all open processes

`$top`

### 2. Kill a process
`kill pid` kills the process by process id
`killall pname` kills the process by name
`-9` for forceful killing in both kill and killall
Use `sudo` if it's a root process.
Azure Community Day
Tags: azure, community, conference, remote
Published: 2020-03-30 15:38:37

Tomorrow is the Azure Community Day for those of you who may not be aware of this.

It is being ran online and streamed from all over Europe from 13:00 to 21:00 Central European Time (CET). 

You can catch it here on the [Azure Community Day website](https://azureday.community/)! 🎉

Let me know if you'll be tuning in too! 👨‍💻
Task id to commit message
Tags: git, hook, utility
Published: 2020-03-30 15:24:10

I'm sure many of us include task id to branch name, like `feature/PROJECT-123`. And I'm sure many of us should include task id to commit message, like `PROJECT-123 made cool stuff` as well. The necessity to add task id to every commit message by hands irritates me, so I decided to write a little git hook intended to do it automatically. I made npm package with this hook and have just published it a couple of days ago.

This hook should be called only at `commit-msg` git hook because there we have a path to the entered commit message, however, you can find it in readme :)

I hope this hook will help to save a little bit of time!

 - [link to npm](https://www.npmjs.com/package/commit-ticket)
 - [link to github](https://github.com/GenrikhFetischev/commit-ticket);
Docker commands
Tags: docker, linux
Published: 2020-03-30 15:19:21

## Stop all containers
```sh
 docker stop $(docker ps -a -q)
```

## Delete images

* By image name
```sh 
docker rmi $(docker images  'imagename' -a -q) 
```

* Untagged images
```sh
docker rmi $(docker images -f "dangling=true" -q) 
```

## Export/import image as .tar file

* Save image to .tar file
```sh
 docker save -o <filename>.tar <image-name>:<image-tag>
```

* Load/import image 
```sh
docker load -i <filename>.tar
```

# Move the Docker directory

We gonna move the default docker directory "/var/lib/docker" to another.
Usually doing it when the docker host disk was not propertly dimensioned and we cannot increase de size.

Stop the docker service
```sh
service docker stop
```

Verify if docker process is running yet
```sh
ps faux | grep docker --color
```

Verify there is some files in the default docker directory
```sh
ls -la /var/lib/docker/
```

Make a backup from docker directory
```sh
tar -zcC /var/lib docker > /dados/docker/bkp/var_lib_docker-backup-$(date +%s).tar.gz
```

Move the directory /var/lib/docker to new home 
```sh
mv /var/lib/docker /dados/docker
```

Create a symlink
```sh
ln -s /dados/docker /var/lib/docker
```

Verify symlink working well
```sh
ls -la /var/lib/docker
```

Start the docker service
```sh
service docker start
```
Open-sourcing Vessel: a high-level Ruby web crawling framework
Tags: ruby, rails
Published: 2020-03-30 15:09:13


Vessel is a fast, open source, high-level, web crawling and scraping framework for Ruby, built on top of Ferrum — a minimal-dependency pure-Ruby driver for running headless Google Chrome instances.

Why would you need a web crawler? Perhaps you're building a search engine for an intranet or a group of public-facing websites, or just need to mirror a website with finer-grained control than tools such as wget offer.

https://evrone.com/vessel-framework
Introducing My Java Tutorial Series
Tags: java, javatutorialseries, learnjava
Published: 2020-03-30 15:41:44

---
title: Introducing My Java Tutorial Series
published: true
date: 2020-03-30 15:00:45 UTC
tags: Java,java tutorial series,learn java
canonical_url: 
---

I’ve decided to start a series of articles on my blog dedicated to teaching you, the reader, the basics and fundamentals of Java. In my...

The post [Introducing My Java Tutorial Series](https://jaeheonshim.com/introducing-my-java-tutorial-series/) appeared first on [Coding with Jaeheon Shim](https://jaeheonshim.com).
How to implement a VPN
Published: 2020-03-30 14:53:55

Sometimes you would want to be in your office, because you need to press that very button, just now, and you wish you had not left, you need to come back, start your machine again, start all the environment, double check if it’up. And all this because you moved, you had to be somewhere else:

https://kevwe.se/article/openvpn/
Why I'm here
Published: 2020-03-30 14:23:34

First My name is Youssef, I'm a 16 years old boy from EGYPT, I'm a Front-End Web Developer.
So I'm gonna write here because I want when I become successful, people will want to know my story (I don't mean fame) or someone like me see my blog and inspires him/her like I saw some blogs that inspired me like [Florin Pop](https://www.florin-pop.com/) who inspired me the most (gonna talk about that topic later).
So basically I want to document every step in my way of becoming what I want to be in programming (in life, and in business).