teleren/devto huggingface dataset:
Why you shouldn't create your own authentication system
Tags: login, authentication, sso, discuss
Published: 2019-09-13 18:34:58

Implementing **correctly** an authentication system is **hard**. 

If you start creating your website/application now, please use a **third party authentication**. Third party authentication can be **social login** (e.g. the ubiquitous `Login with Facebook` button) or **identity management** tools like [Auth0](https://auth0.com) or [Okta](https://www.okta.com).

It's not just about storing username/password in the database. In a standard web application, an authentication system needs to:

- store password [hash](https://en.wikipedia.org/wiki/Cryptographic_hash_function#Password_verification) instead of password in cleartext. And each user should have their own [salt](https://en.wikipedia.org/wiki/Salt_(cryptography)). And the hash function should be [expensive](https://codahale.com/how-to-safely-store-a-password/) to compute. For all this, you would need a very good understanding on Rainbow tables, Bcrypt, Hash algorithms and salts. 
- have email verification and reset-password features. For that you might need to generate and store a temporary, short-lived token that is used to activate an account or to reset password. And this is the simple part. Making sure that your email doesn't fall into the **Spam** folder is much harder.

On the front-end side, the app needs to have a decent UI: a login form that at least validates the email and password, a sign-up form, a reset-password form. Not to mention modern authentication expects support for [MFA](https://en.wikipedia.org/wiki/Multi-factor_authentication) and soon (hopefully) [WebAuthn](https://en.wikipedia.org/wiki/WebAuthn).

More importantly, your users don't want to go through a lengthy registration process and create yet another username/password. Without a proper *password manager* (which probably 99% users don't use), they tend to reuse the same password which is bad in terms of security!

So why choosing the hard path and face the risk of password leaks, database hackings and above all, inferior user experience? Of course some applications need to have their own authentication system (banking app is an example but that's also changing with [PSD2](https://en.wikipedia.org/wiki/Payment_Services_Directive)) but they are rather minority. 

---

**So which 3rd-party verification should my app use?**

This really depends on your app. If getting user's Facebook feed can be a big plus to your app, then you should probably go with **Login with Facebook**. If having access to user's Twitter feed is valuable, then **Login with Twitter** is more appropriate. If your app only requires user basic information like email, name, avatar picture then I would suggest [Login with SimpleLogin](https://simplelogin.io), a developer-friendly login solution. Disclaimer: I happen to be SimpleLogin co-founder so this advice is obviously subjective 😅.

We should all stop requiring users to choose a username and password. There are better alternatives.

Please let username/password rest in peace ⚰️.
Need advice: How do I build my mailing list?
Tags: marketing, mailing, advice, help
Published: 2019-09-13 18:08:45

Hello follow developers!

I'm doing my best to spread my blog posts to more people, hopefully help more people, and discuss the topics with others. I'm doing this by cross posting my posts on my own personal blog, Medium, and on this wonderful platform. I'm also distributing my blog posts through automatic e-mails in MailChimp, but I'm having trouble getting people to sign up for my mailing list. 

Do you have any advice for me on this?

Thank you in advance!
Hello, Philadelphia! 
Tags: career, coding, bootcamp, juniordevs
Published: 2019-09-13 17:55:55

---
title: Hello, Philadelphia! 
published: true
description: This was a huge week for Tech Elevator as we announced our 6th location in Philadelphia.  
tags: career, coding, bootcamp, juniordevs
cover_image: https://thepracticaldev.s3.amazonaws.com/i/5vcnc4dv2isgw10qppeu.png
---

This was a huge week at [Tech Elevator](https://www.techelevator.com/) where we announced our 6th location would be opening up in Philadelphia. If you want to read more about why we are so excited about this opportunity I would encourage you to [read this article](https://www.linkedin.com/pulse/liberating-potential-birthplace-america-anthony-hughes/) by our CEO, Anthony Hughes. As exciting as expansion is, growth without a mission isn't sustainable. 

You will find a lot of coding bootcamps boasting about their numbers without any verified data to back them up. Here at Tech Elevator, we submit all of our results to [CIRR](https://cirr.org/), The Council on Integrity in Results Reporting. CIRR is an independent, non-profit organization whose members believe that prospective students should know a school's outcomes before deciding whether to enroll.

CIRR posted our result this week and Tech Elevator is graduating 95% of students across all our campuses and of that 94% are getting placed within 180 days of graduating. The starting salary of students entering our program is $30,000 and the average starting salary when they leave is $58,000. This means that in just 14 weeks students are leaving with double their salary and a career that they are excited about. 

This allows all of you to see what I already know, Tech Elevator is all about changing our student's lives. This makes me so happy because not only are we growing but we are doing it the right way and this is something I am incredibly proud of. 

So enough bragging, what does this mean for you? First, we are hiring across many of our [locations for multiple positions](https://www.techelevator.com/join-our-team). If you enjoy mentoring and have a real passion for software development you might be a great fit as an instructor. If you would like to hear more about becoming an instructor or have any questions please feel free to contact me. 

This also means that if you have any friends or family in the Philadelphia area that are interested in a career in software development you need to tell them about Tech Elevator. Our results speak for themselves, we give you everything you need to start a new career in software development. I truly believe in what we do here and again if you have any questions, please feel free to reach out. As always friends...

Happy Coding
Dan Vega

_If you found this article interesting please consider [subscribing to my newsletter](https://www.danvega.dev/signup/) or following me on [Twitter](http://twitter.com/therealdanvega)._
I'm learning graphql and I love it so far
Tags: discuss, graphql, webdev, javascript
Published: 2019-09-13 17:38:40

---
title: I'm learning graphql and I love it so far
published: true
description: what is your experience with graphql, any tips?
tags: discuss, graphql, webdev, js
---

So I'm learning graphql for a new project at work and so far it's pretty awesome. I like the concept. 

I'm using https://www.howtographql.com which is super useful. 

What is your experience with it?

Tips? Warning? suggestions?
REST Architecture - Part 1: Building The API
Tags: restful, api, programming, coding
Published: 2019-09-13 17:33:57

---
title: REST Architecture - Part 1: Building The API
published: true
description: Learn how to build client-server systems by applying the REST architecture principles.
tags: #restful #api #programming #coding
canonical_url: https://auth0.com/blog/rest-architecture-part-1-building-api/
---

This is the first of a two-articles series showing how to build client-server systems by actually applying the REST architecture principles. In this part, you will learn how to create a RESTful API by implementing a simple dashboard wrapper for the Auth0 Management API. In the second part, you will learn how to implement a RESTful client that consumes the API.

In order to build the application, you will use Express.js and React.js, but the principles are valid for any language and platform. 

[Part 1: Building The API](https://auth0.com/blog/rest-architecture-part-1-building-api/?utm_source=dev&utm_medium=sc&utm_campaign=restarchitecture_pt1)
[Part 2: Building The Client](https://auth0.com/blog/rest-architecture-part-2-building-client/?utm_source=dev&utm_medium=sc&utm_campaign=restarchitecture_pt2)

![REST Architecture - Part 1: Building The API](https://thepracticaldev.s3.amazonaws.com/i/k5z77nzyr96vm66e5t06.png)
Write a java program to compare two strings lexicographically.
Tags: replit, java
Published: 2019-09-13 17:31:56

Write a java program to compare two strings lexicographically.

Using the compareTo method for comparing the String .
compareTo method is compare the string is based on the unicode value of character .
It return the positive negative and zero value.
if the string are same it return the zero value otherwise it positive or negative value depend on ASCII value of the character .
for example 
1st string is s1  =  middle
2nd string is s2  =  niddle 
so it return the value is -1.
bcoz the value of m is 77 and value of n is 78 (ASCII)
so 77 -78 =  -1 
so the return  value is -1 .

{% replit @VikasTomar/Write-a-java-program-to-compare-two-strings %}
Back 2 school
Published: 2019-09-13 16:59:52

Last week I started up what will hopefully be my penultimate semester at college. I've completed all of my bullshit boring required classes like English and math which were damn near identical to one's I had in high school, except this time I got to pay for them. Now it's all meat, the good stuff. Web development 2 which is going hard into Javascript, node, jquery and React. I also have an entire class devoted to Javascript itself which is super exciting because it's deep into vanilla so while I'm getting the React training in web dev, I have the basic js knowledge to back it up and help make sense of it all. Then there's object oriented programming with Java. I'm not jazzed about Java, in fact when I took the beginner Java course last semester I damn near failed it. Not trying to shirk the blame but I feel a lot had to do with the professor being bored with his job & unhelpful to the students. My OOP professor this semester is a bit more fun, outspoken and genuinely enjoys programming. I've got high hopes for this class as I'm long overdue for learning some back end languages. Here's to a good semester, cheers!
Browsing files in VIM
Tags: vim, linux
Published: 2019-09-13 16:33:04

---
title: Browsing files in VIM
published: true
description: Some quick tips on browsing the file tree in vim
tags: vim, linux
---

I've once again decided to try to switch 100% to VIM as my day-to-day editor.  I do a lot of work on Linux servers so it's a long-term investment.  

I'm trying to share tips & tricks that might make life in VIM easier.


## Browsing the file tree in VIM

This is one of those things that takes a while to get used to.  Here are some things I've learned:

You can open up the file browser in the current directory using:

- `vim .`

To browse the files, you can use the standard `j/k` to go up/down.

You can also use other standard techniques to jump around, like doing `12G` to jump to line 12 in the list of files, or typing `/index.html` then `Enter` to search & jump to the `index.html` file.

To open a file, press `Enter` on the selected file.

Once you're editing a file, you can type `:b#` to exit back to the file tree.

**That's all for now.  I'll try to post more VIM tips as I learn more.**
React Single File Upload Tutorial with Node, Express and Multer
Tags: expressandmulter, mongodb, node, react
Published: 2020-02-01 18:11:13

---
title: React Single File Upload Tutorial with Node, Express and Multer
published: true
tags: Express and Multer, MongoDB, Node JS,React JS
canonical_url: https://www.positronx.io/react-file-upload-tutorial-with-node-express-and-multer/
---

The post [React Single File Upload Tutorial with Node, Express and Multer](https://www.positronx.io/react-file-upload-tutorial-with-node-express-and-multer/) appeared first on [positronX.io](https://www.positronx.io).

In this tutorial, we are going to learn how to upload files in React app. We will also learn to store image files in the MongoDB database using the Node server. Uploading image files is a day to day task of a web developer, if you are new to React, then this tutorial has the answer which you are looking for.

We will learn to upload files and store those files on the MongoDB database using Node and React.js. We will learn to create a client-side basic React app, along with that we will also create a file upload API with Express, Multer, and other Node packages.

#### Table of contents



[Click here to read more](https://www.positronx.io/react-file-upload-tutorial-with-node-express-and-multer/)
JS Bites: There might be a problem with the project dependency tree.
Tags: javascript, npm, react
Published: 2019-09-13 15:59:52

---
title: JS Bites: There might be a problem with the project dependency tree.
published: true
description: What to do when your NPM install fails and tells you there is a problem with your project dependency tree
tags: javascript, NPM, react
cover_image: https://rane-portfolio-dev.s3-us-west-1.amazonaws.com/js_bites_small.png
---

Sometimes when you try to install a React app you may get a long error that starts out like this:

> There might be a problem with the project dependency tree. It is   
> likely not a bug in Create React App, but something you need to fix   
> locally.

You may also see the following bit of advice:

> If prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an    .env file in your project. That will permanently disable this

## So, what does this mean?

The most likely cause is that you accidentally installed a package in a folder above your project folder. For instance, if you are in `/home/projects/my-project` you may have accidentally installed a package into `/home/projects` at some point. This is easy to do if you are on the command line and try to install a package before changing into the project directory.

To resolve this, `cd ../` into the directory above and do `ls`. Do you see an incorrectly placed `node_modules` and `package.json`? If so, delete both. Otherwise, `cd ../` and check again. Continue to do this until you find the errant installation.

Once the errant installation has been deleted, return to your project directory, delete the node_modules there and try your install again.

----------- ------------------------------------------------------------------
     JS Bites

     Have you ever need a quick solution to a problem, but when you search 
     Google you are met with pages of tutorials and detailed instructions that 
     bury the information you need? That's what JS Bites attempts to solve. 
     Each post is a small, bite-sized primer on a very specific JS topic. The 
     aim is to provide enough detail to boost understanding, but not so much that 
     you become overwhelmed or lost.
How WordPress Will Power Half the Web’s Content (Without Anyone Knowing)
Tags: wordpress, headlesscms, headlesswordpress, gatsby
Published: 2019-09-13 15:15:24

---
title: How WordPress Will Power Half the Web’s Content (Without Anyone Knowing)
published: true
description: The future is headless CMS architectures with WordPress manage the content layer
tags: wordpress, headless cms, headless wordpress, gatsby
---

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ouzv2cxdiqitaqhzbkvo.png)
Tumblr is switching to a [headless CMS](https://www.gatsbyjs.org/docs/headless-cms) architecture. 😲 

While everyone else focused on the low, low price that [Automattic paid for Tumblr](https://poststatus.com/automattic-has-purchased-tumblr/), I was struck by one detail - CEO Matt Mullenweg promised that Tumblr will soon be powered by WordPress, but maintain its front-end and content management UI.

*This means Tumblr will become the largest headless CMS project in existence!*

This is great news for any developer who relies on headless WordPress as a key part of their stack. I believe Automattic will invest in improving the WordPress Rest API to make it as robust and stable as it needs to be to handle Tumblr’s migration.

Famously, Matt Mullenweg was never a huge fan of the REST API project being added to core WordPress, and some people accuse him of allowing it to languish after it was added. Now Matt and Automattic have a business reason to either beef up the REST API, or invest in a different project that makes [headless WordPress possible, like WPGraphQL](https://www.wpgraphql.com).

##The roadmap to 50% of the web and beyond

So my first prediction is WordPress will develop in the direction of being a headless CMS. What happens after that?

I think we will see a wave of innovation from the WordPress community that is less focused on theming and the front-end, and more focused on content management problems. 

Instead of selling a $30 theme to business owners or an SEO plugin to marketers, I think we will see WordPress Developers sell software like "content workflow tools", and "digital asset managers" to larger companies that need them. 

Yes, these plug-ins already exist in the WordPress ecosystem. But let's be honest - they are nowhere near as polished as the products that are focused on the presentation layer of Wordpress.

My third prediction is that web developers will choose WordPress first as an option for Content management no matter what stack they're using to build the front end of their website. WordPress will become the default tool used with Gatsby or any other static site generator.  

That's why I think WordPress will manage half of the popular's webs content, but you won't be able to detect it because most sites will use WordPress as just a CMS that has nothing to do with the cold running in your browser.

Exciting times are ahead for the entire WordPress community!
[Pro Tip] How to analyze your Angular bundle
Tags: angular, webdev, javascript
Published: 2019-09-13 14:53:51

---
title: [Pro Tip] How to analyze your Angular bundle
published: true
description: 
tags: angular, webdev, javascript
---

It's time for another **Angular Knowledge Pill**! 💊 It takes just 10 seconds to learn something new 🔥 Like taking your morning vitamins 😃

Imagine you are building an application with three modules:
- **main** module,
- **records** module (lazy loaded feature module),
- **settings** module (lazy loaded feature module).

Now, you would like to know how much do those modules contribute to the whole application size! Using a webpack-bundle-analyzer it is more than easy! Take a look at how to analyze your application bundles below.

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

This will give you a very detailed overview of your application. You can see how much do the final JavaScript bundles weight and how their sizes refer to each other! The colored diagram below is constructed this way that the bigger the given rectangle the heavier the particular bundle!

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

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

If you would like to receive this kind of knowledge pills directly into your mailbox, subscribe at [angular-academy.com/blog/](https://angular-academy.com/blog). I will be sending them regularly! Remember, it just takes 10 seconds to learn something new! 😃

Also, I would appreciate if you tweet this knowledge pill!
Help others to discover the knowledge!
Multi Theme with native css variables and javascript
Tags: javascript, css, html, json
Published: 2019-09-13 14:48:18

https://stackblitz.com/edit/js-1fwpat

With this example you can set a multi theme site by using native css variables and JavaScript functions.

Basically you set variables and its default values at style.css file
Then we load themes.json as a configuration file where we can specify as much themes as we need, then we set those values with functions.js. You don't need to reload page to see changes applied.

It's my first collaboration in this platform, I appreciate any help to make it clearer.
Background blur filter - backdrop-filter: blur () is already in operation, but
Tags: css, backdropfilter, backdrop, blur
Published: 2019-09-13 14:34:40

Already, many browsers include support for background effects of the backdrop-filter, and they can be used to create the blur effect like Apple (see iOS, MacOS).



How it works?

For the block to be blurred, you need to add a style:

backdrop-filter: blur(degree of blur);

The simplest example:

![example1](https://i.ibb.co/v4rmz1v/Screenshot-1.png)
But does it look like Apple? In the screenshot we have 10 pixels blur. Add a little more blur - 20 pixels, and what do we get:



![example2](https://i.ibb.co/DCHrDBb/img2.png)
We’ll get something strange, at the edges of the block the blur disappears altogether.

Why it happens? — It's hard to tell a person who is not versed in browsers.

Is there a solution to this? — Yes, it is rather strange and simple, but it works.

By a long search for a solution on the Internet, it was impossible to stumble upon something about this filter this year. After about a dozen decisions of the type to create an after element with a size larger than a block, blur it, and give its parent overflow: hidden, the following was noticed:

Adding a shadow to the object, it expands the blur area, and the idea arose to make a transparent shadow, this turned out to be the right decision, and the result was as expected:



![example3](https://i.ibb.co/2gV2QjG/img3.png)
I wish you successful use. look at the source code of the solution and play with it here: https://codepen.io/sergey-popovich/pen/dybepBv
Call for Contributions: Move DelayedJob Calls to ActiveJob
Tags: contributorswanted
Published: 2019-09-13 14:33:56

Hey folks, we've been working on a gradual migration from `DelayedJob` to `ActiveJob` within the DEV codebase.

{% github https://github.com/thepracticaldev/dev.to/issues/3136 %}

Take a look at the issue. We have a lot of merged pull requests to use as a guideline to get you started, for example...

{% github https://github.com/thepracticaldev/dev.to/pull/3566 %}

Happy coding!