teleren/devto huggingface dataset:
Postman Tip : Upload a  File
Tags: postman, productivity
Published: 2019-10-20 13:13:14

Here's a tip you might find useful if you work with REST API and need to upload a file. Postman can be of good use to test this upload file API. Just follow these steps : 

1. Set method type to "POST" 
2. Select "Body"
3. Select "form-data"
4. Hover cursor on the right-most side of "Key" text-box. You will see a drop-down appearing magically with "text" as selected value.
5. Select "File" from the drop-down options and you will see "Select Files" button appearing in the value text-box.
6. Click on "Select Files" and it will open a file dialog.
7. Select one or more files and click on "Open" button.

![FileUploadFromPostman](https://thepracticaldev.s3.amazonaws.com/i/poykwt8h6sewlp2c1q0l.png)


Voila !! You are all set to send a request with Files.
Rediseen: start REST-like API service for Redis database without writing a single line of code
Tags: go, database
Published: 2019-10-20 12:52:31

Hi there,

Recently I have been working on a side project using Golang. It aims to help start REST-like API service for Redis databases, without writing a single line of code.

I have made it public recently (with Apache 2.0 license) at https://github.com/XD-DENG/rediseen. You can install it easily via Homebrew (`brew install XD-DENG/rediseen/rediseen`).

It's as easy to use as below:
```
# Install using Homebrew
brew install XD-DENG/rediseen/rediseen

# Configuration
export REDISEEN_REDIS_URI="redis://:@localhost:6379"
export REDISEEN_DB_EXPOSED=0
export REDISEEN_KEY_PATTERN_EXPOSED="^key:([0-9a-z]+)"

# Start the service
rediseen start
```

Now you can query against your Redis database with HTTP GET call like `http://localhost:8000/0/key:1`.

Give it a try and share your feedbacks please!
WTF is Flow-Based Programming?
Tags: functional, programming
Published: 2019-10-20 12:51:39

> In computer programming, flow-based programming (FBP) is a programming paradigm that defines applications as networks of "black box" processes, which exchange data across predefined connections by message passing, where the connections are specified externally to the processes. These black box processes can be reconnected endlessly to form different applications without having to be changed internally. – [Wikipedia](https://en.wikipedia.org/wiki/Flow-based_programming)

<!--A quick introduction and overview on the ideas behind Flow-Based Programming-->
As a software developer, I'm always trying different programming languages, different styles and distinct **paradigms**: procedural, OOP, functional, and recently I got introduced to a curious and different approach for software design – **Flow-Based Programming (FBP).**

**Flow-Base Programming** defines an application as a network of independent process exchanging data through message passing. **FBP** is a data first approach, in which the application is viewed as a system of data pipelines being transformed by the process. 

## Data Processing Factories

Back in 2017 I had the opportunity to meet with [J. Paul Morrison](https://jpaulm.github.io/index.html) the inventor/discoverer behind FBP, and way that he explained the general idea behind FBP is to think about application as a **data processing factory** where data moves as part of a conveyor belt system and each process is an independent "black box" with one or more inputs and outputs. 

Connections between process are predefined and externally to the process itself.

### Key Concepts

- Applications are broken down into **repeatable individual components**.
- **Connections** between components are handled externally
- Components are **blackboxes** to each other
- **Data-centric approach,** think about the application as a series of transformations to the dat

## Summary

Overall, the fact that FBP forces the idea of compartmentalized logic and a data first approach makes FBP an extremely powerful tool on your developer arsenal when correctly applied. 

In subsequent articles will go into more detail of the advantages, disadvantages, and implementation options for you to start experimenting with **Flow-Based Programming.**
Celebrating the publication of  "Professional JavaScript" with the Dev.to family
Tags: writing, books, javascript, node
Published: 2019-10-20 12:20:47

"Professional JavaScript" (which I've a co-authored), has recently been published with Packt, it's currently the #1 new release in the "Internet Web Browsers" category on Amazon: https://www.amazon.com/dp/1838820213

As a first-time author I was very grateful to work with the editorial team and the other authors. Publishing a book was a longer-term goal for me, which I've now achieved ahead of schedule and the experience has expanded my horizons as a writer.

> **Edit 2** I've sent through a list of people for the review referral scheme
> If anyone is interested in a free ebook copy through the Packt review referral scheme, fill out the form:

> **Edit 1**: I may reach the referral limit soon, if you're interested, I suggest still filling out the form anyhow and I'll see with my editor 😊

Thanks again to the amazing team at Packt and everyone who has worked on this (Vinicius Isola, Siyuan Gao, Philip Kirkbride).

To anyone who has ever read, liked, shared any of my posts anywhere on the internet, thanks! I wouldn't have got here without your support and readership.
I created my first open source project in 7 days and released it today
Tags: javascript, react, discuss, hacktoberfest
Published: 2019-10-20 12:18:13

---
title: I created my first open source project in 7 days and released it today
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/rvcfgn672lrsshrp80gd.jpg
description: ConfTalks should help you to decide if a conference is worth it.
tags: javascript, react, discuss, hacktoberfest
series: ConfTalks Development Updates
---

Hi everyone! How's your #hacktoberfest progress going so far?

Today I released my first source project https://github.com/EddyVinck/ConfTalks

ConfTalks is an idea I had last sunday. I worked on it after work all week to get it in a usable state by today. It's an open source index of already recorded and scheduled conference talks to help you decide if you should go.

Check out the live version here: https://conftalks.org

![The list of conference talks on ConfTalks](https://thepracticaldev.s3.amazonaws.com/i/aol0upubjxelo3cxvsvh.png)

If you check the issues you can see I've already added a few issues for conference data to add. Feel free to open up a PR for any conference data you would like to add.

When I am deciding if a conference is worth attending I usually check out the list of talks. I then decide which talks I'd like to see. Then I check YouTube to see if those talks are already uploaded. If the majority of the talks are recorded, then maybe it isn't worth going to the conference. Ideally there would be a website that can help find these talks. I couldn't find one, so I made one! And you can help! All the data is currently stored in 4 JSON files and anybody can contribute! I'm in need of contributors for the data as I can't possibly do it all myself of course.

If the project gets enough users I'll start working on a proper back-end which will make it easier to add talks.

I used the following to create ConfTalks:
- React with NextJS
- Styled Components
- Netlify for deployment
- Local storage to save your bookmarks
- Simple JSON files for the data
- Email Octopus for the [newsletter](https://emailoctopus.com/lists/b6cc50a1-f282-11e9-be00-06b4694bee2a/forms/subscribe)

I created a free [newsletter](https://emailoctopus.com/lists/b6cc50a1-f282-11e9-be00-06b4694bee2a/forms/subscribe) and a [community Slack workspace](https://join.slack.com/t/conftalks/shared_invite/enQtNzk1MjA1ODQ2NzM3LTRkMmU0YmRhZDEzYmUxZTEyYjhlMWYzOWIyYTU0NDBkMGFlN2U3MjJmNWE5MjM4ZDM1Yzg0M2QwZWUzODllMzM) you can join if you are interested in hearing more about ConfTalks or want to get involved.

Check it out! https://conftalks.org
Introducing nodevirtualenv - a pure bash n+virtualenv clone
Tags: node
Published: 2019-10-20 11:53:13

# nodevirtualenv

A virtualenv clone for NodeJS. Provides a flow that borrows from the convenience of both [n](https://github.com/tj/n) and [virtualenv](https://github.com/pypa/virtualenv)

#### Rationale

At [crisp](https://getcrisp.news), NodeJS powers our article content extraction services. A cause of concern during development/ deployment has been version maintenance. With containers, smaller team bandwidths meant high maintenance costs.

Currently, [n](https://github.com/tj/n) powers most of our NodeJS versioning requirements. It has been convenient for the most part since it installs a non-intrusive binary at /usr/local. The missing part with n was with a single version's use between two packages with different needs.

A virtualenv kind of solution would be an ideal solution for these cases. While [nodeenv](https://github.com/ekalinin/nodeenv) exists, the activate flow, pip install (as the primary mode) added load to picking it up.

Ergo, [nodevirtualenv](https://github.com/techiev2/node-virtualenv) comes in as an alternative.



#### Usage

In its current state, nodevirtualenv allows installation of specific NodeJS versions inside $HOME/.node-envs/

```
	nodevirtualenv -v <version> -p <envPath>

	  -v        NodeJS version to install/use to run.
	  -p        NodeJS installation path to use.
	  -c        Script path to run with the requested version.

	  --bin     Get the path for the NodeJS binary for the version specified.
	  --list    List all locally installed NodeJS versions.

```

#### Caveat emptor

* As such, the script works only on 64-bit GNU/Linux systems and uses the corresponding binary paths from NodeJS distribution channels. Support for Windows/non-GNU/Linux systems are forthcoming.
[Junior Dev] Step by step through a coding challenge. (Part 1)
Tags: webdev, beginners, javascript
Published: 2019-10-20 11:48:20

# About me
My name is Kelvin, a graduate software developer. This is one of my first blogs ever. These are all the things that I learned and I want to share it with everyone who is going to have an interview or just simply want to know about it.

# Introduction 
A whiteboard challenge in an interview is always a nightmare for beginners like me. I just got my first technical interview ever last week, and I was totally panic when I took a first look at the question and could not do it properly. After that, I decided to study how to manage to solve a whiteboard problem in the right way. 

# 15 Steps to go through a problem 
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/syi87rrnxm9vll2l9ssb.png)
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/a8yjk7xhwpr3kw70zy3g.png)

With these 15 steps, I believe you can impress the interviewers with your critical thinking of how you approach and solve a problem. 

# Some small tips 
- Do not jump straight to into coding. 
- Calm down, do not be panic even though you may not know how to code the answer, just speak out the approach to the problem that first comes to your mind (follow the steps).
- A thank you email after the interview may give you a bonus.
- Confidence is a key, I know you can totally get this done.

# Conclusion 
I hope this little post helps you get an idea of how to prepare and go through a whiteboard challenge. The coding challenge is always a trouble and a nightmare of every junior developer (or at least for me). But be confident and believe in your self, I wish you guys all the best with your coding challenge.

### Bonus:
I really like the video demo of the technical interview at Google. It may give you an idea and how they work through a problem. Moreover, try to apply the steps above to the video, it will make more sense when we apply it to a real problem. 
Link: https://www.youtube.com/watch?v=XKu_SEDAykw&t=1267s
Recomendations for open source projects in Javascript.
Tags: opensource
Published: 2019-10-20 11:37:46

I would love to get started on contributing to open source projects that are in Javascript. 
My main interest are vanilla JS, React,Typescript and Postgres, unit testing using mocha/chai and jest.
I also do HTML5 and CSS3.

Please somebody point me in the right direction.
Thanks in advance!
8.4 Power Set
Tags: javascript, algorithms, programming
Published: 2019-10-20 10:41:54

######**NB: This post is a part of the series of solving the challenges from 'Cracking The Coding Interview' book with JavaScript. I'll post only the challenges I've figured out on my own - and will try to describe my reasoning behind the solution. Any ideas on how to solve it differently or in a more optimal way are very welcome 😊**

_Write a method to return all subsets of a set._

So, what exactly is meant under all subsets of a set? According to [Wikipedia's definition](https://en.wikipedia.org/wiki/Power_set) of the power set, given an array `[1,2,3]`, the method should return an array of all the possible combinations of the elements of that array + an empty array: `[[], [1], [2], [3], [1,2], [1,3], [2,3], [1,2,3]]`. After drawing it on the paper, I observe a certain pattern for adding each next number: 

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

Basically, with every next element _n_ of the given array we need to add to the resulting array a copy of all already stored combinations with _n_ added to each. We can turn this logic into the code:

```javascript
function allSubsets(arr){
  const maxIndex = arr.length - 1; 
  let result = [ [] ];
  arr.forEach(el => {
   result.forEach(subset => {
     result.push([...subset, el]);
   })
  })
  return result;
}
```

An alternative recursive solution using the same logic will look like:

```javascript
function allSubsets(arr) {
  if (arr.length === 0) { return [ [] ]; }
  const prev = allSubsets(arr.slice(1));
  const next = prev.map(el => [...el, arr[0]]);
  return [...prev, ...next];
}
```
So, to get all subsets of array `[n...k]` (where n and k are min and max index), we will need to:

1) calculate all subsets of array `[n+1...k]`
2) create a copy of 1)
3) Add `n` to each subset of a copy
4) Merge 1) and 3)
Monads for Java programmers in simple terms
Tags: java, beginners, tutorial
Published: 2019-10-20 10:31:40

---
title: Monads for Java programmers in simple terms
published: true
description: Short description of monads in terms known by Java programmers
tags: #java #beginners #tutorial
---

The word `Monad` frequently used while functional programming is mentioned or discussed. There are several explanation of this term, but even simplest of them tend to explain it using category theory or relying on at least basic functional programming background.

Recently I've discovered for myself, that actually all that is not necessary, monad can be explained to Java programmers using only therms and concepts they are definitely familiar with. The explanation does not pretend to be precise or absolutely correct. Its purpose is to provide general understanding.

So, what is monad?

Monad is:
 - container for some value(s)
 - design pattern

I guess that 'container' part is clear. So, let's go to 'design pattern' part. 

Monad is a kind of "inversion of control" comparing to immutable POJO. For POJO you call getter to retrieve value and do what you want with this value. POJO has no control over that use. For monad you provide "processing function" and pass it to some monad method. The result of processing is then returned back to caller in some form.

This inversion gives monad complete control on how processing is performed and enables whole lot of possibilities. 

For example, it can avoid calling processing if value stored in monad is actually missing (`Maybe` monad).

Or apply processing only if stored value is of one of particular type (`Either` monad) and omit processing otherwise, and so on and so forth. 

Note also that Monad do not expose stored value(s) directly (nor via getter), in some cases this is just impossible. This makes some implementations, like introduced in Java 8 `Optional`not a completely monadic.
Should Dev.to posts have a comment section for grammar suggestions?
Tags: discuss
Published: 2019-10-20 10:20:25

A great part of the dev.to publishers are not native English-speaker - like me.

In the posts I write, I pay attention also on grammar (of course), but sometimes I miss some error.

I think it can help the community to have a section dedicated to suggestion on grammar (different from the main comment section) so that we can improve not only our tech skills but also our English skill.

What do you think?
Build and deploy static Vue/React SPA on Dokku
Tags: dokku, javascript, vue, react
Published: 2019-10-20 07:16:31

In this post I will show you how to build and deploy a static Vue/React Single Page Application on Dokku with the help of multiple buildpacks.

I have seen several posts where people build on their local machine, commit the /dist folder changes into their repo and push the changes to their dokku instance. This does work but adds unnecessary commits to your repository and I think running the build process on the server is a much cleaner solution.

# Setting up Dokku

I do not want to go into detail as the process of installing Dokku is well described in the official docs http://dokku.viewdocs.io/dokku/getting-started/installation/ and can even be simpler when using 1-click Dokku setup on DigitalOcean.

Create a new app
```
dokku apps:create my-awesome-app
```

# Buildpacks

Add a .buildpacks file to the root of your project. As you can see, we are using two buildpacks. The first one is to build our production code (dist folder output) and the second one is for our static hosting. The version numbers can be found on the releases page on Github and are recommended to add.

.buildpacks

```
https://github.com/heroku/heroku-buildpack-nodejs.git#v164
https://github.com/heroku/heroku-buildpack-static.git#v3
```

# Build config

To build our application on the server we have to add this command to the scripts section of our package.json file.

package.json

```
{
  "scripts": {
    "heroku-postbuild": "npm run build"
  }
}
```

# Static config

Our static buildpack does allow us to add some configurations described [here](https://github.com/heroku/heroku-buildpack-static). As we want to serve our /dist folder, we add it to the static.json file alongside the option of serving clean urls and our default index.html.

static.json

```
{
  "root": "dist/",
  "clean_urls": true,
  "routes": {
    "/**": "index.html"
  }
}
```

# Deploy our app

As we do not want to track any dist folder changes, we add it to our .gitignore file.

.gitignore

```
# ...
/dist
```

Commit all changes and run:
```
git remote add dokku dokku@your-server-ip:my-awesome-app
git push dokku master
```

# Done
Voilà, your static app is built and served by Dokku.
My Final Year Of Graduate School And Finding A New Path Forward
Tags: career, beginners
Published: 2019-10-20 05:58:47

This is my first post on Dev, so forgive me if it seems unpolished or if I somehow am missing some common conventions. Any guidance or constructive criticism is welcomed.

I am writing this post in the Fall Semester of my last year as a PhD student in Astrophysics. I have spent twelve years on my undergraduate and graduate degrees, and have years of experience analyzing data and creating computer simulations to better understand the Universe. This subject has become, like many academics I encounter, intertwined with my own personal identity.

While I am very proud of my accomplishments as a student and a scientist, I have come to an uncomfortable realization over the last year. After years of stress, late nights, and sacrificing for my scientific work, *I don't know if I want to be an Astrophysicist any longer.*

That is very hard to admit to myself, but I slowly am letting myself have that freedom to explore who I really want to become. My great passion for computer programming and problem solving led me to start to learn more about Software Engineering, to learn some basic Computer Science, Algorithms, and Web Development. I participated in Hacktoberfest, got involved (and am now a member of) an open source JavaScript project, and have joined the wonderful Dev community.

*I feel happy. I feel a passion again that I thought I had lost.*

I am still working on changing my mindset. I still feel at times like I'm a bit crazy, or that I'm not good enough to make that kind of abrupt transition from pure research into industry. I have always been one to encourage my friends to follow their happiness and to believe in themselves, and I need to learn to take my own advice.

I am writing this post to tell people like me, people who might be unhappy with their current circumstances, that it is okay. We are often much deeper and much more capable than we often think of ourselves. 

**Give yourself the freedom to explore your interests and passions, for it is there where you may start to construct a path forward.**

I have a long path ahead of me, but I am happy to begin my journey.
Developing and debugging with SAM & typescript with webpack
Tags: aws, typescript, webpack, node
Published: 2019-10-20 05:55:51

I really enjoyed develop this one !
https://github.com/vincedgy/aws-sam-webpack-typescript

#aws #sam #webpack #typescript #nodejs

Desk here : https://vincedgy.github.io/aws-sam-webpack-typescript

Thanks to 
@richbuggy plugin 
https://github.com/SnappyTutorials/aws-sam-webpack-plugin
Back to a Single Spec for HTML and the DOM
Published: 2019-10-21 18:51:50

---
title: Back to a Single Spec for HTML and the DOM
published: true
date: 2019-10-20 05:00:00 UTC
tags: 
canonical_url: https://stolley.dev/linked/back-to-a-single-spec-for-html-and-the-dom/
---

Coralie Mercer at the World Wide Web Consortium blog, back in May 2019:

> Today W3C and the WHATWG signed an agreement to collaborate on the development of a single version of the HTML and DOM specifications. The [Memorandum of Understanding jointly published as the WHATWG/W3C Joint Working Mode](https://www.w3.org/2019/04/WHATWG-W3C-MOU.html) gives the specifics of this collaboration.

That announcement is now reflected [in this pull request](https://github.com/whatwg/html/pull/4993/commits/2b193e1f5e70c312449bd2fb6a3c5859f78321e0) at the WHATWG. The return to a single, shared specification for HTML and another for the DOM is good news for developers, browser makers, and those of us who pitch in to make dev-friendly documentation over on [MDN](https://developer.mozilla.org/en-US/). It’s also important, I think, that the WHATWG “living standard” is what will live on, rather than the post-hoc versioned HTML 5.x specifications the W3C had been publishing.