teleren/devto huggingface dataset:
My uses page with my setup, gear, software and config
Tags: uses, setup, config
Published: 2020-01-25 22:45:36

---
title: My uses page with my setup, gear, software and config
published: true
date: 2020-01-23 00:00:00 UTC
tags: uses,setup,config
canonical_url: 
---

Another quick one today.

I was recently listening to an [episode of syntax.fm](https://syntax.fm/show/215/hasty-treat-picking-the-stack-for-uses-tech-gatsby-react-context-styled-components) where wes bos was talking about a new site [uses.tech](https://uses.tech/).

![uses.tech](https://i.imgur.com/rBdR6B6.gif)

This is a site that lists /uses pages detailing developer setups, gear, software and configs.

This inspired me to create my own [/uses](https://solrevdev.com/uses/) page.

Success 🎉
Why coordinated security vulnerability disclosure policies are important
Tags: opensource, security
Published: 2020-01-23 16:20:10

We believe that working with maintainers to create coordinated security vulnerability policies is important. Why? Here’s one story to illustrate.

Last year, a new [security vulnerability](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-11324) was found in the [urllib3 library](https://tidelift.com/subscription/pkg/pypi-urllib3)—a powerful HTTP client for Python. If you are using Python, then you’re probably using urllib3. 

When one of the core developers of Python 3, Christian Heimes, discovered this security vulnerability, he followed the disclosure policy on the urllib3 GitHub page, which gave instructions on how to notify the maintainers via Tidelift. Tidelift works with all of our participating maintainers to set up coordinated security vulnerability disclosure policies for their projects, which helps avoid risky [zero-day security vulnerability scenarios](https://blog.tidelift.com/enough-of-zero-day-fire-drills).

Tidelift then took the following measures:

1. We worked with MITRE to coordinate the allocation of a CVE for the vulnerability. CVEs provide an industry standard way to refer to a vulnerability across vendors. 
1. Next, we collaborated with the urllib3 maintainers to implement a fix and have it tested by the original reporter.
1. We alerted our subscribers about the existence of this new vulnerability.
1. In addition to the information on the security vulnerability’s existence, we also gave subscribers information on which new releases would resolve the vulnerability in their codebases.
1. We linked the release notes for users to understand any other changes present in the urllib3 update.

This process—which historically has often taken months with many open source projects—all occurred within 1 day. 

If the package hadn’t had a maintainer watching over it, a scenario like this might require that your team spend time forking the library, patching it yourselves, and crossing your fingers that an official patch would be released before you descend into [dependency hell](https://blog.tidelift.com/dependency-hell-is-inevitable). 

This is where Tidelift helps. Tidelift ensures that there are maintainers standing behind covered packages who have the financial incentives to fix problems quickly once they are discovered.

In the case of urllib3, all of this was handled before our customers even knew there was an issue. This same scenario has been repeated a number of times since we launched our security vulnerability disclosure process in December 2018.

"Tidelift has made the process of offering a comprehensive vulnerability disclosure process simple for the urllib3 team,” said co-maintainer of urllib3, [Seth Larson](https://github.com/sethmlarson?tab=overview&from=2017-12-01&to=2017-12-31&org=urllib3). “This makes delivering secure code and responding quickly to vulnerabilities easy even for a small team."
What the hell is property pattern matching?
Tags: csharp, dotnet
Published: 2020-02-10 11:08:58

I'vealready  made some posts about pattern matching, with the last one about [positional pattern matching](https://dev.to/alexdhaenens/what-the-hell-is-positional-pattern-matching-9dn-temp-slug-8210505). Pattern matching made it possible to do a type check, cast to that checked type into a variable and then deconstruct its properties into variables:

```c#
if (person is Elf(int age, string elfishName))
            {
                Console.WriteLine($"Elf with elfish name{elfishName} is {age} years old");
            }
```
And it made it also possible to do a value check while deconstructing:

```c#
if (person is Elf(110, string elfishName))
            {
                Console.WriteLine($"Elf with elfish name{elfishName} is 110 years old");
            }

```
One of the drawbacks of this technique is that a deconstructor is needed (more about that in my blogpost about [object deconstructing](https://dev.to/alexdhaenens/what-the-hell-is-object-deconstructing-kj0)). Luckely for us, __C# 8.0__ provides us with property pattern matching!

#What is it?
Well property pattern matching does the __same as positional pattern matching__ but __without the need of a _Deconstructor___ . The code above, which checks if the _person_ is an _Elf_ then deconstructs it and checks if his/her _age_ is 110, looks like this with property pattern matching:
```c#
if (person is Elf{ Age: 110, ElfishName: var elfishName })
            {
                Console.WriteLine($"Elf with elfish name{elfishName} is 110 years old");
            }
```
As you can see, the syntax is quite similar to its counterpart. The downside however, is that it is more (computationally) expensive. 

#Sources
https://docs.microsoft.com/en-us/dotnet/csharp/deconstruct
Demo project: https://bitbucket.org/aldhaenens/p-d-demo/src/master/
JavaScript Promises vs. RxJS Observables
Tags: javascript, rxjs, programming
Published: 2020-01-23 19:34:11

---
title: JavaScript Promises vs. RxJS Observables
published: true
description: Compare JavaScript Promises and RxJS Observables to find the one that meets your needs.
tags: #javascript #rxjs #programming 
canonical_url: https://auth0.com/blog/javascript-promises-vs-rxjs-observables/
---
TL;DR: Have you ever thought to yourself, which should I use, JavaScript Promises or RxJS Observables? In this article, we are going to go over some pros and cons of each one. We'll see which one might be better for a project. Remember, this is a constant debate, and there are so many different points to cover. I will be covering only five points in this article. [Read on 🚀](https://auth0.com/blog/javascript-promises-vs-rxjs-observables/?utm_source=dev&utm_medium=sc&utm_campaign=jspromises_rxjsobservables)
Fractional Knapsack Problem With Solution
Tags: greedymethod, algorithms
Published: 2020-01-23 19:54:57

What is Greedy Method
Before discussing the Fractional Knapsack, we talk a bit about the Greedy Algorithm. Here is our main question is when we can solve a problem with Greedy Method?  Each problem has some common characteristic, as like the greedy method has too. Such as if a problem contains those following characteristic , then we can solve this problem using greedy algorithm. Such as

https://www.codechief.org/article/fractional-knapsack-problem-with-solution
Making Command-line interface (CLI) for fun and profit
Tags: node, javascript, devops
Published: 2020-01-24 09:54:16

Next time you have an idea 💡 "I know... Why don't I write a script to automate this thing?" Actually, you should not, you should write a *CLI* instead.

CLI has better structure than scripts. CLI uses flags and help text to avoid mistakes. For example:

```
$ moa --help
Moa makes it easier to run your local node.js apps.

USAGE
  $ moa

OPTIONS
  -c, --commands=commands  [default: start] commands to run.
  -h, --help               show CLI help
  -r, --root=root          [default: ../] root path to run.

DESCRIPTION
  ...
  Have some fun
```

Scripts are messy. And can get out of control.


At [Taggun](https://www.taggun.io), we run a lot of node.js application.  We make APIs for receipt OCR scanning, by the way. So, I recommend [oclif: The Open CLI Framework by Heroku](https://oclif.io/).


## How to create a new CLI

Install [node.js](https://nodejs.org/en/) first.

### Start by scaffolding
```
$ npx oclif single moa
? npm package name (moa): moa
$ cd moa
```

### Modify your flags in `src\index.js`
```
MoaCommand.flags = {
  // add --help flag to show CLI version
  help: flags.help({char: 'h'}),
  commands: flags.string({char: 'c', description: 'commands to run. Comma-separated.', default: 'start'}),
  root: flags.string({char: 'r', description: 'root path to run.', default: '../'}),
}
```

### Modify your description in `src\index.js`

```
MoaCommand.description = `Moa makes it easier to run your local node.js apps.

```

### Modify your command in `src\index.js`

```
class MoaCommand extends Command {
  async run() {
    const {flags} = this.parse(MoaCommand)
    const commands = flags.commands.split(',')
    const {root} = flags
    find.file(/(?<!node_modules\/.*)\/package\.json$/, root, files => {
      files.forEach(async file => {
        const cwd = require('path').dirname(file)
        commands.forEach(async command => {
          this.log(cwd, `npm run ${command}`)
          const npm = spawn('npm', ['run', command], {cwd})
          for await (const output of npm.stdout) {
            this.log(`${file}: ${output}`)
          }
        })
      })
    })
  }
}
```

In this example, you will need to run `npm i find` to install `find` npm module.

This simple CLI will look for all node.js application in the `[root]` and run `npm run [command]`. Great if you need to run multiple node.js application to start coding.


### Run it

```
./bin/run -c start -c ../taggun/
```

### Publish and share your CLI
See https://oclif.io/docs/releasing
Layer 2 / Plasma watcher to protect against invalid exits and malicious behavior
Tags: plasma, javascript, layer2, blockchain
Published: 2020-01-24 11:06:54

# Plasma service

The goal of this project is for a plasma user (or a plasma service provider) to be able to run a watcher on a server or their own computer that listens for any issues on the Plasma chain and immediately react and exit the Plasma chain or challenge invalid data

## Workflows

Based on https://github.com/omisego/elixir-omg/blob/master/docs/api_specs/status_events_specs.md#byzantine-events

| Event | Task | Implementation |
| - | - | - |
| invalid_exit | challengeStandardExit | [invalid-exit.yml](invalid-exit.yml) | 
| unchallenged_exit | startInFlightExit | TODO | 
| invalid_block | startInFlightExit | TODO | 
| block_withholding | startInFlightExit | TODO | 
| noncanonical_ife | challengeInFlightExitNotCanonical | TODO | 
| invalid_ife_challenge | respondToNonCanonicalChallenge | TODO | 

<!-- | piggyback_available |  |
| invalid_piggyback |  | -->


## Architecture
```
   +-------------------+               +-------------------+
   |                   |               |                   |
   |   Plasma Watcher  |               |  Plasma Contract  |
   |                   |               |                   |
   +-------------------+               +-------------------+
                |                                ^
                |                                |
           invalid_exit                  challengeStandardExit
                |                                |
                |                                |
                |    +------------------+        |
                +--->|                  |--------+
                     |  Plasma Process  |
                     |                  |
                     +------------------+
                     | PRIVATE_KEY      |
                     +------------------+

```

## Start the Plasma Guard

If you don't already have MESG you should install and run it with:
```bash
npm i -g mesg-cli
mesg-cli daemon:start
```
[more information](https://docs.mesg.com/guide/installation.html)

```bash
mesg-cli process:dev ./invalid-exit.yml \
     --env PRIVATE_KEY=$ALICE_PRIVATE_KEY \
     --env PROVIDER_ENDPOINT=$PROVIDER_ENDPOINT \
     --env PLASMA_ADDRESS=$PLASMA_ADDRESS \
     --env PLASMA_ABI="$(curl -s https://raw.githubusercontent.com/omisego/omg-js/v2.0.0-v0.2/packages/omg-js-rootchain/src/contracts/RootChain.json | jq .abi)"
```

## Create an invalid exit

[Check how to create an invalid exit](./create-invalid-exit.md)
Pick. Squash. Drop. Rebase! (Comic)
Tags: git, beginners, illustrated, comics
Published: 2020-01-24 16:06:24

---
title: Pick. Squash. Drop. Rebase! (Comic)
published: true
description: It is a common practice to use `git rebase` to squash commits before creating or merging a pull request; nobody needs to see that you fixed 10 typos in 5 separate commits, and keeping that history is of no use. So how does a rebase look like?
series: Git Illustrated
tags: git, beginners, illustrated, comics
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mipao0n3oqno93o22s7f.png
---

[Git Rebase](https://git-scm.com/docs/git-rebase) allows us to rewrite Git history. It is a common practice to use `git rebase` to squash commits before creating or merging a pull request; nobody needs to see that you fixed 10 typos in 5 separate commits, and keeping that history is of no use. So how does a rebase look like?

![Git Rebase Comic](https://thepracticaldev.s3.amazonaws.com/i/fbah0r4533nv72y2wgiz.png)

Let's imagine you have your deck of cards, they are ordered in a certain way that cannot be changed. Each card represents a commit in a project's branch. 

When running an interactive rebase with `rebase -i`, there are mainly three actions we may want to perform in a commit (card):

- **p**ick: pick a commit.
- **s**quash: squash this commit into the previous one.
- **d**rop: drop this commit altogether.

In this game, you want to **s**quash cards together into doubles and triples. Some cards make sense on their own, so you will **p**ick them. Sometimes, a card should not even be there, so you might want to **d**rop it.

Although there are other ways of using `git rebase`, the interactive rebase used like this is a common practice observed in projects that rely on multiple contributors, both in open as well as in closed source. It enables you to commit earlier and with more frequency, because you are able to edit your history before submitting your pull request. 

If you'd like a deeper introduction to Git Rebase, please check this great dev article from [@maxwell_dev](https://dev.to/maxwell_dev):

{% post https://dev.to/maxwell_dev/the-git-rebase-introduction-i-wish-id-had %}
JavaScript and Friends - Tech Launchers
Tags: career, mentors
Published: 2020-01-24 16:47:23

Tech Launchers is a program to go the extra mile beyond the regular mentor and mentee program. JavaScript and Friends is excited to launch this program in 2020.

There is always a gap which regular coursework at college or bootcamp do not teach or self-taught programmers do not learn. Tech Launchers are those who will fill that gap.

### Why did we name the program as "Launchers"?

The most common words we get to imagine upon hearing the term Launcher is either a Rocket Launcher, Satellite Launcher or Launch Vehicle. 

> Based on Wikipedia - 

> A launch vehicle or carrier rocket is a rocket propelled vehicle used to carry a payload from Earth's surface to space, usually to Earth orbit or beyond.

> A rocket launcher is a device that launches an unguided, rocket-propelled projectile

Now that you have a basic understanding of the term "Launcher", Tech Launchers are those who will have both qualities in them.  


### Who are Tech Launchers?

Tech Launchers are those who will guide and support college/bootcamp graduates and self-taught programmers to unleash their potential. Launchers will propel and boost college/bootcamp graduates and self-taught programmer's path to tech industry by offering support via knowledge, network, referrals and help them close the gaps making them job ready.

Tech Launchers will advise, coach and be there as support providing feedback to college/bootcamp graduates and self-taught programmer's. You can go the extra mile and be available to them until they reach their destination.

As a Tech Launcher, you can choose to launch as many as you want. 


### How much time should I dedicate to be Tech Launcher?

The program is initially targeted for 14 days with a minimum overall time commitment of 10 hours. You can also go the extra mile by extending the program beyond 14 days.

On any given day, you may be tasked with helping the student understand some programming challenge / task.  On another day, you may be giving career advice or reviewing a resume. You might help them understand current trends in industry and advise them on building their portfolio projects on Github.


### How do I connect and communicate with Students?

As moderator of the program, we will share with you details of students who are looking for Tech Launchers. 

You can connect with them through JavaScript and Friends Slack channel "techlaunchers" initially and then choose either of the following preferred modes - email, chat, voice calls based on your preference. 

You will define the rules on when you want to connect and the frequency.

### How do I participate? 

Interested in being part of the program to help launch future aspiring students, leave your details in comments. Our team will reach out to you to discuss further logistics. The program is currently looking for Launchers in the USA. Once we validate the program, we will consider expanding the program to other locations.
Daily Challenge #176 - Loopover
Tags: challenge
Published: 2020-01-30 15:36:21

---
title: Daily Challenge #176 - Loopover
published: true
series: Daily Challenge
description: Create a function to solve Loopover puzzles. 
tags: challenge
---
###Setup
Loopover puzzles are 2D sliding puzzles that work more like flat rubik's cubes. Instead of having one open slot for pieces to slide into, the entire grid is filled with pieces tha wrap back around when you slide a row or column. 

You can try it out at this sketch here: https://www.openprocessing.org/sketch/576328

To complete this challenge, implement a function to return a list of moves that will transform an unsolved grid into a solved one. 

Consider the grid:
<pre>
ABCDE
FGHIJ
KLMNO
PQRST
UVWXY
</pre>
If we make the move `R0` (move the 0th row right) then we get:
<pre>
EABCD
FGHIJ
KLMNO
PQRST
UVWXY
</pre>
Likewise, if we do `L0` (move the 0th row left), we get:
<pre>
ABCDE
FGHIJ
KLMNO
PQRST
UVWXY

Back to normal.
</pre>
Say we make the move `U2` (move the 2nd column up):
<pre>
ABHDE
FGMIJ
KLRNO
PQWST
UVCXY
</pre>
`D2` (2nd column down) would then return us to the original grid. With all of this in mind, our tests will give you the scrambled grid as input. Please return an array of the moves taken to unscramble the grid.

For example:
<pre>
SCRAMBLED GRID:

DEABC
FGHIJ
KLMNO
PQRST
UVWXY

SOLVED GRID:

ABCDE
FGHIJ
KLMNO
PQRST
UVWXY
</pre>

One possible solution would be `["L0", "L0"]` as moving the top row left twice would result in the original, solved grid. Another would be `["R0", "R0", "R0"]` etc. etc.

###Tests
`"ACDBE\nFGHIJ\nKLMNO\nPQRST\nUVWXY"`
`"ABCDE\nKGHIJ\nPLMNO\nFQRST\nUVWXY"`

Some of these can be kind of tricky. Good luck! 

***
_This [challenge](https://www.codewars.com/kata/5c1d796370fee68b1e000611) comes from jaybruce1998 on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Wireframing dev.to/videos
Tags: wireframing
Published: 2020-01-24 19:45:04

---
title: Wireframing dev.to/videos
published: true
description: 
tags: wireframing
cover_image: https://thepracticaldev.s3.amazonaws.com/i/53g508jpytaka7e35h3c.png
---

It’s not a secret some of us prefer to learn tech ‘X’ by watching videos, rather than reading blog posts.

Dev.to has a separate video page dev.to/videos. It needs some more structure and layout, so I decided to do some wireframing on initial ideas to improve the particular section of site.

**1.Dashboard**
This would be the landing page of the video section. The main section would be dedicated for most curated videos. The content feed could be made more personalized by developing an algo for it. User would also be able to see the uploads on specific tags he/she has subscribed as well as from persons he/she follows. There would be an option to heart and save for later on each video.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/0w9ii6t5gujnkar9kmww.png)

**2.Courses**
Content in each course would be hand-picked manually. User would be able to select his/her experience level (beginner-intermediate-advanced) to select the complexity of course concepts. The content would be sorted accordingly to provide a proper learning path.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/bvi61mrtafybpdc1wdnp.png)

**3.Explore**
User would be able to explore the technologies of their interest (based on tags videos would get during the publish phase). There would be an option to sort displayed results based on the curates and most recent ones. There would be an option to heart and save for later as well.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/zy0defsjd8y422p510c1.png)

**4.Favorites**
This section would display users activities - recently watched videos and saved for later list. Furthermore user would also be able to make collections, by sorting the videos he/she has liked.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/l5bx7l4jqkuz98cdzng6.png)

I’ve also put this in dev.to’s Github issues as a feature, where you can find better quality images.

In case if anyone wondering, I used draw.io (it's free).
Introducing Pixz! Point. Shoot. Shared...Photo sharing for groups and events.
Tags: showdev
Published: 2020-01-24 22:02:57

Hey everyone,
I wanted to get your feedback on Pixz (pixzapp.com). It's a project I started after returning from a wedding a few months ago. I thought, wouldn't it be cool if the bride/groom could crowdsource photos from all their guests privately and instantly. 

Here we are. We launch nearly a week ago. We built our app on flutter and firebase, and have gone through multiple iterations of the app. 

I would love for you to check it out and would appreciate any feedback you have. If you want to join the Pixz Beta group. Here is the invite code: 1579209706055

Cheers! Michael
Day 73 : Amazing
Tags: hiphop, code, coding, lifelongdev
Published: 2020-01-25 00:28:09

_liner notes_:
- Professional : So yeah, haven't really been keeping up with my daily blogs. haha I could have sworn, I posted some blogs, but I guess not. To be fair, I have been on a work retreat thing for the last week and just got back today and have been sleeping. I did create a website to chronicle my adventures during that time and that can be found at https://dwane.in/PDXmiami2020
To sum it all up, it was a great time with AMAZING people! Really looking forward to the future.
Here's a pic:
 ![The Nexmo / Vonage team on the beach for PDX week in South Beach Florida](https://thepracticaldev.s3.amazonaws.com/i/4bbb1p1dj9vqug4n33bu.jpg)
(thanks to Beth for letting me use this pic)
- Personal : Got home from the work retreat, through my clothes into the washing machine and went to sleep. haha. Just got up and have been catching up on things on the internet.

![A lake surrounded by a pine tree forest with a mountain in the background and a small island with a few pine trees in the foreground to the left side in Two Jack Lake, AB, Canada](https://thepracticaldev.s3.amazonaws.com/i/o6j26wqw3t5uvyj3u67r.png)

For the rest of the night, I'll be working on the radio show for tomorrow and then some side projects if I have some time.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube sy8uXXreMi4 %}