teleren/devto huggingface dataset:
Implementing Authorization using Role Based Access Control (RBAC) in Phoenix Web Applications

Tags: elixir, phoenix, authorization
Published: 2020-02-27 17:34:57

{% youtube 6TlcVk-1Tpc %}

## Setting up Authorization in Phoenix web applications

Here's an exchange I've had on a few occasions when discussing a new
web app project:

![Authorization Conversation](https://www.knowthen.com/static/50f247878e7e0f8f10a2a1ff3a877dc4/e85cb/authorization-conversation.png)


Ok, I can't blame Bob for not wanting to talk about security and
authorization, it's not interesting or fun, however dodging these types of
questions can leave us, developers, in a tough spot.

So what do you do in a situation like this, where the details are vague, but
you've got to start implementing something?

Well, you need to be careful, because you're facing a couple of big risks.

Without clear direction, you might end up:

- Adding too few authorization features 
- or adding unnecessary authorization features.

Here's my suggestion, for dealing with authorization when the requirements
are vague.

Choose an approach that:

- is simple and well understood 
- is widely adopted 
- follows the 80/20 rule (on features)

**So what approach is simple and well understood?**

This would have to be Role Based Access Control (RBAC), which is been around
for almost 3 decades. RBAC doesn't solve every authorization problem you
might have, but it is relatively simple, and well understood.

**So what's the most widely adopted approach?**

Well, that would have to be Role Based Access control as well, in fact, most
larger businesses use some form of Role based access control, in the systems
they use.

**What do I mean by "follows the 80/20 rule"?**

It means, choosing the solution that takes ~20% of the effort, compared to the
more sophisticated options, yet it covers ~80% of the use cases you have.

**Role Based Access Control, feels like the perfect 80/20 solution.**

So, how might you implement Role Based Access control in a Phoenix Web
application?

Check out the above free screencast to learn more.

## Links

[Screencast Git Repo](https://github.com/knowthen/elixir_authorization_tutorial)

[Phoenix LiveView](/introduction-to-phoenix-liveview)

[Authorization In Elixir & Phoenix with pow and pow_assent](/easy-authentication-in-elixir-and-phoenix-with-the-pow-and-pow_assent-libraries)

## Want to learn more about Elixir & Phoenix?

Checkout my new course: [**Elixir & Phoenix for
Beginners**](https://knowthen.com/elixir-and-phoenix-for-beginners)
WP&UP #PressForward Podcast: Helping my future self help itself – #038
Tags: mentalhealth, wellness, productivity, selfhelp
Published: 2020-09-24 22:14:01

---
title: WP&UP #PressForward Podcast: Helping my future self help itself – #038
published: true
date: 2020-02-27 17:04:00 UTC
tags: mentalhealth, wellness, productivity, selfhelp
canonical_url: https://leogopal.com/curated/wpandup-podcast-helping-my-future-self-help-itself/
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/zpn0vj13rx1sgg01f7y5.png
---

In this podcast episode on WPandUP (now Big Orange Heart), I have a lovely chat with Nathan Wrigley around mental health sharing a lot of my own story to help others and myself realise we are not alone. Originally posted → Helping my future self help itself – #038

{% spotify spotify:episode:1GYgUt9cLOxxfnVLYBp6u1 %}

The post [WP&UP #PressForward Podcast: Helping my future self help itself – #038](https://leogopal.com/curated/wpandup-podcast-helping-my-future-self-help-itself/) appeared first on [Big Orange Heart](https://www.bigorangeheart.org/podcast/helping-my-future-self-help-itself-038/) with [Leo Gopal](https://leogopal.com).
List of DevOps/SRe Conferences in 2020 
Tags: devops, sre, conferences
Published: 2020-02-27 16:50:09

Hi everyone, I compiled some conferences in 2020. Please add suggestion... Open a [PR](https://github.com/adrianocanofre/devops-sre-conferences).




{% github adrianocanofre/devops-sre-conferences %}
🤨5+1 Tips for Developers | Sketch (+ 🤦‍♀️bloopers)
Tags: tech, humor, developer, coder
Published: 2020-02-27 16:39:51

👋Hello, I'm Eleftheria, an app developer, master student, content creator, and chocolate lover

In this video you'll watch: 5+1 tips for developers with a twist...
Watch the video and see what I mean :)


😎Top 3 list:
- How to stay motivated | A developer's edition | @BatsouElef: https://youtu.be/qMvEtb5OxNo
- How to be a Better Problem Solver | Tips and solutions: https://youtu.be/dELt7yKIxIA
- Simple Tips to Build a Personal Brand as a Developer (+ personal examples): https://youtu.be/7s0o1gi0iP0

🥰If you liked this video please share

🍩Would you care about buying me a coffee? You can do it here: [paypal.me/eleftheriabatsou](paypal.me/eleftheriabatsou) but If you can't that's ok too!


**************************************

🙏It would be nice to subscribe to my [Youtube](https://www.youtube.com/c/EleftheriaBatsou) channel. It’s free and it helps to create more content.

🌈[Youtube](https://www.youtube.com/c/EleftheriaBatsou) | [Codepen](https://codepen.io/EleftheriaBatsou) | [GitHub](https://github.com/EleftheriaBatsou) | [Twitter](https://twitter.com/BatsouElef) | [Site](http://eleftheriabatsou.com/) | [Instagram](https://www.instagram.com/eleftheriabatsou/)
Filter google search results by date time
Tags: todayilearned, productivity
Published: 2020-02-27 16:36:51

When you search on Google, it shows you mixed results. If you search for generic questions related to PHP, JavaScript, jQuery etc, chances are you will get older search results on the top. 

Example below:
![Google Search Results](https://dev-to-uploads.s3.amazonaws.com/i/oeorexkqq8rfy6q31aen.png)

There is probability that approaches in these search results are **outdated**. So you only want recent articles in search.
Well, we can do just that in Google search **Tools**.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/zlpect6bkzcyw16fdpks.png)

Better late than never, right? 🤷🏻‍♂️

Happy Googling 👨🏽‍💻🙏🏼
Devart SSIS Components and ADO.NET Data Providers Support The Latest SSIS 2019
Tags: database, dataconnectivity, ssis, visualstudio
Published: 2020-02-27 16:36:41

---
title: Devart SSIS Components and ADO.NET Data Providers Support The Latest SSIS 2019
published: true
description: Devart announced support for the latest SQL Server Integration Services in its SSIS Data Flow Components and dotConnect ADO.NET Providers for databases.
tags: database, data connectivity, SSIS, VisualStudio
---
*Devart announced support for the latest SQL Server Integration Services in its SSIS Data Flow Components and dotConnect ADO.NET Providers for databases.*

Devart, a recognized vendor of professional database management software for developers and data connectivity, announced support for the latest SQL Server Integration Services – SSIS 2019 – in its [SSIS Data Flow Components](https://www.devart.com/ssis/) and [dotConnect ADO.NET  Providers](https://www.devart.com/dotconnect/). 

Now customers can use Devart Data Flow Source, Lookup, and Destination components for various data sources (and the corresponding connection managers) in their SSIS packages, running on the latest SQL Server version and designed in the latest version of Visual Studio.

**Devart SSIS Data Flow Components** provide easy to set up and cost-effective data integration using the SSIS ETL engine. They deliver high-performance data loading, convenient component editors, SQL support for cloud data sources, and lots of data source specific features.

**dotConnect** is an enhanced data connectivity solution built over ADO.NET architecture and a development framework with innovative technologies. dotConnect includes high-performance data providers for the major databases and popular cloud applications and offers a complete solution for developing data-related applications and web sites. 

**About Devart**

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.
For additional information about Devart, visit https://www.devart.com/
Changelog: Query the DEV API from a JavaScript Frontend!
Tags: changelog
Published: 2020-02-27 16:12:29

We recently updated the [DEV API](https://docs.dev.to/api) to allow it to be queried directly from JavaScript frontends.

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

A persistent problem with querying the DEV API is the [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) restriction. `CORS` (Cross-Origin Resource Sharing) is a built-in mechanism that enables browsers to access resources belonging to another origin when initialized by scripts. This mechanism means that a page at `http://example.com` can only access data at its *own* resources (for example, `example.com/hello`) but it cannot access a resource at another domain (for example, `anotherdomain.com/hello`). If the HTTP server on `anotherdomain.com` wants to let a script running on `http://example.com` (or any other website) access its own resources, it has to do it through `CORS`.

For DEV community members, this restriction meant that having to create [some workarounds](https://dev.to/jrsofty/cors-problem-workaround-for-consuming-dev-to-api-on-your-website-44jb) for this issue. But with this change, everyone can now retrieve publicly-available endpoints directly from their own browsers. The one caveat here is that the endpoints that can be queried are limited to the ones that require no authorization (ie. no `api-key` header).

Here's an example of a query to the `/api/articles` endpoint from the JavaScript console:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ftm5s1l4nqpmxduzyn2g.png)

We hope that this feature to the DEV API be helpful to the many frontend developers out there. Try it out, and let us know what you think!
Go is not OOP
Tags: go, beginners
Published: 2020-02-27 16:09:00

<a href="https://golang.org/">Go</a> is a programming language that was created as an experiment. 

If you programmed in languages like Java, C#, C++ or Python you may be used to having classes and objects everywhere in your code.

It may surprise you that Golang is not object orientated. In fact, Go intentionally leaves out many features of modern OOP languages.

* No classes. All code is split into packages. Go has only <a href="https://golangr.com/struct/">structs</a>.
* No support for inheritance
* No Execeptions
* No generics
* No annotations
* No constructors

Everything is just a little bit different, but it's a very powerful language that is great for *concurrency*.

In 2009 Go came around, during that year multi-core processors were already available. Go is designed while keeping concurrency in mind. 

Go has <a href="https://golangr.com/goroutines/">goroutines</a> instead of threads. You can run as easy as

```
go function()
```

Compare that to threading in Java! You can spin millions of goroutines at any time.


* Goroutines have faster startup time than threads.
* Goroutines use channels (a built-in way to safely communicate between eachother).
* Goroutines and OS threads do not have a 1:1 mapping. A single goroutine can run on multiple threads. Goroutines are multiplexed into small number of OS threads.
How to fork GitHub repository and use as npm dependency inside a react-native project
Tags: reactnative, github, npm, opensource
Published: 2020-02-27 16:06:09

Forking is the one thing I have never used in git. Yesterday I came to know how can we use it. 

Why we use a fork?

Open source is a great thing, someone writes a library, so that others can use it, others can add up to it. Let's assume you are using an open-source library in your project, the library has everything you need except that the one thing you need for your project. That's where forking comes to help. Basically forking means you are creating a copy of the open-source library, making appropriate changes, committing back or submitting a pull request to the author of the open-source library.


How to fork an open-source library

1. Click on the Fork button on the right top corner of open-source GitHub repository 

2. Then clone the forked library inside your local directory 
- git clone "forked lib URL"

3. Make appropriate changes to the library and commit it 
- git add .
- git commit -m “commit message”
- git push origin master


Now all the changes you want to make in the open-source library are there, the only thing remaining is to use this forked library as a dependency in your react native project.


How to use GitHub repository as an npm dependency in a react-native?

We make changes in open source libraries because we want the library to behave different for our project. Now consider a scenario 

1. You went to node_modules/open_source_library

2. You made the changes 

3. You are done here but in the future, there will be a case where we need to delete node_modules in order to resolve Android Studio’s linking with react-native libraries.

4. Now you will run npm install in order to install the open-source library. All your changes now has override by the original library. This means you need to make those changes again.

That’s why we fork the library and make changes so that we can use it as an npm dependency. Only question here is "How can we so that?”

It's very simple, You just need to run following command.

1. You should be in your project directory
2. npm install --save git+https://git@your fork repository URL without https://.git

You will notice that inside package.json in the dependency section, Instead of the open-source library version you will see your fork library.

That’s it. I hope this blog will help you in any way possible. 

If you want to read more Do visit [my website](https://www.pradnyanandpohare.in). Cheers.
VScode Extension For Converting Documentation In MD Files
Tags: showdev, javascript, vscode, slimcoder
Published: 2020-02-27 15:52:18

---
title: VScode Extension For Converting Documentation In MD Files
published: true
description: 
tags: showdev , JavaScript , vscode , slimcoder
---

Guy's i have created a vscode Extension for converting md files written in any language to urdu language .

I would like to extend this idea the project is already open source you can contribute if you want to I'm sharing youtube video as prototype and github link for you .

YouTube : https://youtu.be/YjdElOfG-Yw

GitHub : https://github.com/Techistan/md2urdu

In this project I'm using google translate api but the idea is very unique.
Finite State Machine - How vending machines know you're actually a good guy that pays the right amount
Tags: computerscience, architecture, challenge
Published: 2020-02-27 15:13:49

Ever wonder how those vending machines act like they are something so intelligent but does not actually have a chance to proclaim that they'll conquer the world? You don't? Oh I see... Well let's talk about it anyway. You never know... 

These darlings uses something called "Finite State", hence the term "Finite State Machine". They actually works without any memory but instead dwell on their current "state". 
No memory yet they can remember where they are? 
Yep, but let's not use the term "remember", as it will become confusing. Instead, they "stay" in a place and from there, they'll know what do they need to reach your desired drink on that vending machine. This is what we call "state".

Every time the machine needs to know what it needs, it just knows its current state. It does not hold any history data or anything that will tell it "where" it came from. It just knows what state it is in. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gc2rjg4ogrnkrc55xdhj.png)

Note that the currency is simplified to 5 & 10 gold for simplicity. Also, it's more like a game if we do it that way. Yes, I just went for a cooler currency I apologize for reasoning it as basely for simplicity. 

The above chart illustrates a simple FSM (Finite State Machine) logic behind those seemingly-intelligent vending machine buddy of yours. As you can see, whenever you insert a 5 gold, it goes into its next state, from 0 to 5, it does not need to know "How much do I need?", it just needs to know "Am I there yet?" (To its accepted state, which is 20). When it reaches the accepted state, that's the only time you can get your desired drink. 
You can think of it as a conversation between you and that vending machine:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8bqnmcvikss5dzkyjwz3.png)

Though there's that possibility that what if you put in too much gold? Well, there are vending machines that are just accepts that, well it's profit anyway but there are vending machines that weren't put in too much effort and just errors out as it came across an invalid state. That's rare nowadays as vending machines are quite advanced now, but in reality, they don't need that much of an advancement, they're capable enough of giving you your drink but of course we're humans, we level up things. Otherwise, it wouldn't be fun ain't it?

Kudos to you for spending time with me! Now for a challenge, why don't you create a program that replicates vending machines? It'll be fun!
Where to get Linux help
Tags: linux, beginners, webdev
Published: 2020-02-27 14:54:38

---
title: Where to get Linux help
published: true
description: Where to get help with Linux
tags: linux, beginners, web-dev
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/mam751kjlupvb6ywae0c.jpg
---

_cover image: [HenSti](https://commons.wikimedia.org/w/index.php?curid=81799692)_

Where you find useful help online may change with the [flavor of Linux](https://dev.to/heroku/the-path-to-linux-wizardry-know-the-five-flavors-238g) you are using. You need to know the distribution you are using so you can get the right help when you have specific questions. Distribution specific forums; Such as the [Arch Linux BBS](https://bbs.archlinux.org/) or the [Ubuntu Forums](https://ubuntuforums.org/); are indispensable. Beyond that, some of the topics covered for one distribution might be relevant for any other. General forums like [Linux Questions](https://www.linuxquestions.org/questions/linux-forums-50/) or [Unix Stack Exchange](https://unix.stackexchange.com/) can help you with general questions. Hopefully, not before taking a peek at the man pages!
New and Improved:   It's NiFi
Tags: 2020, apachenifi111
Published: 2020-03-12 21:12:17

---
title: New and Improved:   It's NiFi
published: true
date: 2020-02-27 14:40:00 UTC
tags: 2020,apache-nifi-1.11
canonical_url: 
---

## Apache NiFi 1.11.3
  
[http://nifi.apache.org/download.html](http://nifi.apache.org/download.html)  
  
If you have downloaded anything after NiFi 1.10, please upgrade now.   This has some major improvements and some fixes.  
  
Release note highlights can be found here:  
[https://cwiki.apache.org/confluence/display/NIFI/Release+Notes#ReleaseNotes-Version1.11.3](https://cwiki.apache.org/confluence/display/NIFI/Release+Notes#ReleaseNotes-Version1.11.3)  
  
I am running this now in Anaheim, and it's no Mickey Mouse upgrade.   It's fast and nice.  
  
Some of the more recent upgrades:  
  
[https://www.datainmotion.dev/2019/11/exploring-apache-nifi-110-parameters.html](https://dev.to/tspannhw/exploring-apache-nifi-1-10-parameters-and-stateless-engine-44n4)  
  
For parameters and stateless, and ability to download a flow as JSON is worth the price of install.  
  
 ![](https://1.bp.blogspot.com/-9VwvGvE4WTU/XlAuusRNSNI/AAAAAAAAZdk/J2rJNuIKCIEifAA2w0qpUaRLRJ1nQ5WEACEwYBhgL/s320/nifi11downloadFlowAsJSON.png)  
  
See some more NiFi 1.11 features here:   [https://www.datainmotion.dev/2020/02/edgeai-google-coral-with-coral.html](https://dev.to/tspannhw/edgeai-google-coral-with-coral-environmental-sensors-and-tpu-with-nifi-and-minifi-updated-efm-oh9)
Question to CTOs: Do you hire Junior Web Devs?
Tags: webdev, career, codenewbie
Published: 2020-02-27 14:37:22

Is it a thing to hire Junior Devs or most companies are looking for Mid-level folks?

If you do hire Junior Devs: 
1. What skills are you looking for?
2. What is a no go in candidate's CV?
3. Does your company provide training for juniors?

Super excited to hear your thoughts on that!
Bring out yer dead!
Tags: javascript, eslint
Published: 2020-02-27 14:08:56

This is the post about the necessary cleaning. The spring cleaning of your code. Removing dead code paths, removing unused files... our conversion/migration towards angular (typescript) from AngularJS is starting to make way. I removed sooo many files from the application (that really ought to have been done when they were made into components instead) but, as always, there's some aftermath/cleanup to do regardless. 

I removed dead code paths in entire block of scripts, not touching the components that are in use because those will be covered when linting for "no-unused-var" for instance. I removed scripts that were bundled, but no longer in use since they were made into components...

###"But I'm not dead!"
Similarly I found scripts that might have been in use at first glance, so I had to search and make sure that the code was not being in use anywhere (a custom event extension for IE11 for instance) as well as scripts that were not removed but also were not included in the MVC Script bundling so they could be safely removed.

I let eslint auto-fix files for whitespace/indent issues, missing semi-colons and dot-annotation conversions.

And lastly i added .eslintignore for webpack and vendor folders. Our errors went from 132k linting errors down to 621.

Drastic difference. 

P.S.
Webpack doesnt do linting very well in it's output.
D.S.
Who are the most influential people to follow on Twitter?
Tags: programming, development, twitter
Published: 2020-02-27 14:07:18

Hi all,

I have recently gone on my Twitter account which I had for years and decided I wanted to make it a lot more relative to what I like. 

I want the feed of my account to mainly consist of development and programming content.

I started by unfollowing a lot of accounts that didn't post content that is useful to me as well as not as relative to what I want.

I then followed a few suggested accounts and it's already looking better but now I am reaching out to you guys to get your knowledge on any accounts with useful development content to help me expand my knowledge and keep up to date with the industry as well as get influenced by them.

Thanks!