teleren/devto huggingface dataset:
Find “Toxicity/Profanity” of a comment using Google Perspective
Tags: socialmedia, trolls, onlineharassment, abuse
Published: 2018-11-16 12:35:53

---
title: Find “Toxicity/Profanity” of a comment using Google Perspective

published: true
description: Build a shield within minutes
tags: #SocialMedia #Trolls #OnlineHarassment #Abuse
cover_image: https://thepracticaldev.s3.amazonaws.com/i/bjysn29igdz5dhgtitaq.jpeg
---


Social media has become a huge part of everyone’s lives. As of 2017, daily social media usage of global internet users amounted to 135 minutes per day. When it comes to extreme averages, teenagers take the prize. Their daily average time spent on social media is nine hours a day. That’s longer than most people spend sleeping or in school.

As we spend increasing amounts of time online, and new technologies allow us to connect further in the virtual world, the further we connect, the further we create online issues. One such major issue is online harassment.

In a survey of over 3,000 Americans, 47% reported experiencing some sort of online harassment or abuse. To curb this issue, one of the steps taken from Google is to come up with a technology which could help improve online conversations. Introducing Google Perspective.

##Google Perspective:##
Perspective is an API that makes it easier to host better conversations. The API uses machine learning models to score the perceived impact a comment might have on a conversation. Developers and publishers can use this score to give real-time feedback to commenters or help moderators do their job, or allow readers to more easily find relevant information. Perspective identifies whether a comment could be perceived as “toxic” to a discussion.

##How to use Google Perspective?##
1. Well, first you need access to Google’s Perspective API. Which can be availed by getting whitelisted by the perspective team. Apply here

2. Once you get whitelisted, go ahead & create a Google Cloud project.

3. Search for ‘Perspective API’ from the list of Google API’s, then go to the Perspective API’s overview page and click Enable.

4. To authenticate your requests, you’ll need to generate credentials for your project. Using an API key is the simplest option. Go to the API credentials page, click Create credentials, and choose “API Key”.

*Now you have everything, except a nodejs client to find “Toxicity/Profanity” of a comment using Google Perspective.*

> Tada…. & here is your open source nodejs client for Google Perspective:
I, open sourced a nodejs client for Google perspective with a clear-cut documentation for a quick start. Click on the below link, use it & feel free to raise an issue if you find any.

{% github sandeshbsuvarna/Comment-Toxicity-Profanity-Analyzer %}


                        The Internet Should Be a Good Place
How does dev.to handle bots, fake accounts, and promotional accounts?
Tags: meta, discuss
Published: 2018-11-16 09:31:21

---
title: How does dev.to handle bots, fake accounts, and promotional accounts?
published: true
tags: meta, discuss
---

I don't know if this is the right place to write this, but I've recently been followed by an account named Craigslist Escort. This account is clearly only for promoting what its name suggests, and has no intention of joining any development related discussions or knowledge sharing. Does this account violate any rules you have on dev.to? If so, is there a way to report this kind of accounts? How are they handled?

On a more general topic, it is inevitable that bots, fake accounts, and promotional accounts will try to swarm a website that has an increasing number of users. What is dev.to's current and future plans regarding the elimination of these malicious accounts?

Edit: I've looked around and saw that there is a report abuse form under Code of Conduct, which seems to be the place to report stuff like these. Even though it's rather easy to find, I think it can be placed somewhere more accessible though.
Any JavaScript application that I can look at and try to convert it into TypeScript? For learning purposes.
Tags: javascript, typescript, webdev, discuss
Published: 2018-11-16 10:14:46

---
title: Any JavaScript application that I can look at and try to convert it into TypeScript? For learning purposes.
published: true
description: 
tags: JavaScript, TypeScript, webdev, discuss
---


I thought of converting an existing JavaScript application to TypeScript would be a fun way to relearn and refresh my knowledge and skills with TS.

Thanks!
Nested Loops on the JS Party Podcast
Tags: podcast, javascript, music, jsconf
Published: 2019-03-02 16:52:34

---
title: Nested Loops on the JS Party Podcast
published: true
tags: podcast, javascript, music, jsconf
canonical_url: https://www.kahlillechelt.com/2018/11/16/nested-loops-on-the-js-party-podcast/
---

[Jan](https://twitter.com/thedeftone) and I had the distinct honor to guest on the JS Party podcast last week to talk about [Nested Loops](https://nestedloops.github.io). First of all it was a really great experience to be a guest on there. The Changelog family of podcasts are very professionally run and it was a great pleasure to be on. [@noopkat](https://twitter.com/noopkat), [@jerodsanto](https://twitter.com/jerodsanto) and [@adamstac](https://twitter.com/adamstac) made us feel very welcome and comfortable.

We talked about how Nested Loops was founded and immediately had band problems. Why I am rapping with a Jamaican accent. What [@bonotes](https://twitter.com/bonotes) role is. How the tech works and evolved on the music, video and effects sides. I think it came out great and you should definitely give it a listen.

Get it by looking for JS Party in your favorite podcast app or listen right now, right here:

<audio data-theme="night" data-src="https://changelog.com/jsparty/52/embed" src="https://cdn.changelog.com/uploads/jsparty/52/js-party-52.mp3" preload="none" controls></audio>

[JS Party 52: Nest ‘dem loops](https://changelog.com/jsparty/52) – Listen on [Changelog.com](https://changelog.com/)

<script async src="//cdn.changelog.com/embed.js"></script>
MySQL vs. MongoDB 
Tags: mysql, mongodb
Published: 2018-11-15 21:20:22

---
title: MySQL vs. MongoDB 
published: true
description: 
tags: MySQL, MongoDB

---

Recently, I learned about MySQL from my Coding Boot Camp class in addition to MongoDB which has been the main database we used in the class. I wanted to share what I have learned so far about these two databases.

The main difference is that MySQL uses structured query language (SQL) while MongoDB uses NoSQL. What is the difference between SQL and NoSQL? In one of the blogs I read, it used an analogy as living in a town where everyone speaks the same language vs. a town where people speak different languages.  

SQL databases use structured query language (SQL) for defining and manipulating data. This is extremely powerful, but it can be restrictive. SQL requires that you use predefined schema to determine the structure of your data before you work with it. In addition, all your data must follow the same structure.

A NoSQL database, on the other hand, has dynamic schema for unstructured data, and data is stored in many ways: it can be column-oriented, document-oriented, graph-based or organized as a Key Value store.

MySQL is an extremely established database, meaning that there’s a huge community, extensive testing and quite a bit of stability. It is open source and free. It is available for all major platforms, including Linux, Windows, Mac, BSD and Solaris.
 
MongoDB, on the other hand, is a non-relational database that stores data as ‘documents’ in a binary representation called BSON (Binary JSON).  It gives you flexibility to change your data schema without modifying any of your existing data. MongoDB is horizontally scalable, which helps reduce the workload and scale your business with ease. It is flexible, so you can add new columns or fields on MongoDB without affecting existing rows or application performance.

I will wrap up with some query examples below.

<pre>
Select/Get statement:

MySQL: SELECT * FROM inventory
MongoDB: db.inventory.find({})

Insert/Post statement:

MySQL : INSERT INTO inventory (item_id, type) VALUES ('ab123', ‘electronics’)
MongoDB: db.inventory.create({item_id: ‘ab123’, type: ‘electronics’})
</pre>

Thanks for reading!
Technology Radar vol.19 by ThoughtWorks
Tags: thoughtworks, technologyradar
Published: 2018-11-16 09:09:23

---
title: Technology Radar vol.19 by ThoughtWorks
published: true
description: Volume 19 of the Technology Radar by ThoughtWorks it out, highlighting interesting software development technologies and tools.
tags: thoughtworks, technology radar
cover_image: https://thepracticaldev.s3.amazonaws.com/i/7rw01ew5veuhoa6i62qa.png
---

Every year [ThoughtWorks](https://www.thoughtworks.com) publishes a new version of their **[Technology Radar](https://www.thoughtworks.com/radar)**. This Technology Radar is an overview of what they think are interesting software development tools, techniques, frameworks, and platforms. These items are mapped into the levels: Adopt, Trail, Assess, and Hold.

I am not going to explain how this radar works, because [they do that themselves](https://www.thoughtworks.com/radar/faq) quite well. I just want to bring it to your attention that a new version is out, and you should check it out. It will give you some insight in things you might not even knew about. If there is one thing difficult it is finding out and assessing all the different pieces in the software development world. 

[![](https://thepracticaldev.s3.amazonaws.com/i/d8u6gf402tmnebp656mq.png)](https://www.thoughtworks.com/radar)
Over 2000 Followers!
Tags: meta, blog, writing, dart
Published: 2018-11-16 08:50:30

## Unbelievable!!! I'm so grateful my friends 🙌🏾

It was just [2 months ago](https://dev.to/graphicbeacon/over-1000-followers--ill-take-that-as-a-good-sign--11e3) that I celebrated having a 1000 followers. I am super _pumped_ right now as I continue to see support and engage in conversations with more of you on Dart.

I challenged myself to make a video proclaiming thanks when this happened so here you go. Enjoy!

{% youtube umxnnZG4CFA %}
→ [**Subscribe to the channel**](http://bit.ly/fullstackdart)

**I would love to connect with each one of you on my YouTube channel** for the latest videos on Dart. I release videos every week, so do subscribe to the channel and hit the bell icon 🔔 to be notified on new videos. I've got lessons planned on [the Aqueduct framework](https://aqueduct.io), [Angular Dart](https://webdev.dartlang.org/angular), integration with various APIs and more...

I am also excited to say that **I've been approved to produce a Dart course for Egghead.io**! It will be an overview covering the language, libraries and tools to give you confidence to get started with Dart. It's due to be released in the New Year and it's gonna be free to watch too 😊

Lastly, I'm thinking of setting up a [Patreon](https://patreon.com) page in order for you to help drive future content. Writing is not an easy skill to cultivate, and it's always great when content-producers are supported in their work. I wish to gather your thoughts on this idea and learn what your expectations are should you become a Patreon. Let me know in the comments below!

**Like, share and [follow me](https://twitter.com/creativ_bracket)** 😍 for more content on Dart.
Receiving selected text and URL into our app from other apps.
Tags: reactnative, javascript, android
Published: 2018-11-16 08:49:43

---
title: Receiving selected text and URL into our app from other apps.
published: true
description: Receiving selected text and URL into our app from other apps.
tags: react-native, javascript, android
---

We are building a Android app which should receive the selected text and the current URL from browsers like chrome and browser on Android. 

Currently there are separate activities for sharing the selected text and for sharing the URL. But we need both the selected text and the current URL. Is this even possible? If yes how?
AnyChart JS Charts Clojure Integration Templates: Clojure + MySQL (chart), and Clojure + ClojureScript + PostgreSQL (dashboard)
Tags: clojure, webdev, dataviz, javascript
Published: 2018-11-16 07:22:51

---
title: AnyChart JS Charts Clojure Integration Templates: Clojure + MySQL (chart), and Clojure + ClojureScript + PostgreSQL (dashboard)
published: true
description: AnyChart presented two Clojure integration templates that show how to create interactive data visualization using this JS charting library with Clojure and MySQL/PostgreSQL database.
tags: #clojure, #webdev, #dataviz, #javascript
canonical_url: https://www.anychart.com/technical-integrations/samples/?filter=clojure
cover_image: https://i.imgur.com/NyPbuRv.png
---

AnyChart, one of the global leaders in interactive data visualization, officially presented the updated [Clojure integration templates](https://www.anychart.com/technical-integrations/samples/?filter=clojure), showing how to create cool interactive dataviz using their [award-winning](https://www.anychart.com/blog/2018/02/06/best-javascript-technology-anychart-js-charts-library-devies-award/) [JavaScript charting library](https://www.anychart.com) with this programming language and a MySQL or PostgreSQL database.

There are two integrations demonstrated:
* Clojure + MySQL (chart), and
* Clojure + ClojureScript + PostgreSQL (dashboard).

Look them up on the [AnyChart Integrations](https://www.anychart.com/technical-integrations/samples/?filter=clojure) page.
Code navigation in Visual Studio Code
Tags: devhelp, webdev, productivity
Published: 2018-11-16 06:49:43

---
title: Code navigation in Visual Studio Code
published: true
description: Navigation in visual studio code
tags: devhelp, webdev, productivity
series: VSCode productivity features
---

The navigation features look straightforward, but, at first glance, they don't seem very useful. So, for this part of the tutorial I suggest you one thing:

**Take the mouse from the side it's currently on and move it to the other side of the keyboard**

This will force you to start using the shortcuts I am about to tell you, believe me, after using them for a few hours you will regret not knowing about them before. This is how much more efficient it makes you!

## 1) Back / Forward (`ALT` + `←` / `→`)

By far, the best way to jump from a part of a file to another is through this shortcut. Some may argue that `CTRL` + `TAB` does the same thing although this is a more complete feature since it retains history in places on the same file and the history is retained even after using this shortcut (you can go back and forth without changing the actual history)

{% instagram BqFDG8MFjMg %}

## 2) Open previous file (`CTRL` + `TAB`)

I am sure many know about this feature so I won't get into detail here. All you need to know is, similarly to the Back / Forward feature, this let's you navigate to/from previously viewed files.

One important note here, you can also navigate forward with (`CTRL` + `SHIFT` + `TAB`).

{% instagram BqKDm5ggP5b %}

## 3) Navigate to next error (`F8`)

When refactoring, this feature is one of the best. You can hit `F8` and fix every single error until you run out and have finished refactoring. It's simply a breeze to fix errors using this.

Similar to the previous one you can navigate backwards (to the previous error) using `SHIFT` + `F8`.

One issue with this feature is that there is no way to navigate on only the errors or only the warnings. Do you guys know of any way to customize this?

{% instagram BqMnsyClb3t %}

## End

And that is it for code navigation, I will later on, create a post about navigating through the editor for completeness sake.

 * Have you ever tried unplugging your mouse and work only from your keyboard?
 * Which of the shortcuts have you learned about in this post?
SDL2 Update
Tags: sdl, cpp
Published: 2018-11-16 05:52:36

# Where have I been?

It makes me glad when people enjoy my articles and it makes me frustrated when I can't deliver my articles on time. Originally, I was taking a break because I needed a rest from making articles.

# The processing of making articles

The way I create my articles is to code while I also write. Something that I'm sure many of you have noticed is the frequent refactoring of code or needing to add a line or two of code for some functionality to correctly work. The reason for this is simple: because I code along with the creation of a new article, sometimes I miss something in the code that needs to be reflected in the article. Of course, I could simply go back, scratch the section with the missing information and redo it, but, to be honest, I can be lazy. Laziness isn't the only factor for this. Another goal I had in mind was to release articles daily. If I had to constantly go back and redo a section because I forgot something in the code, it felt I wouldn't get to release an article on that day. It's also a contributing factor to why I took a break.

From now on, I plan to first add the code that needs to be done then create the article. This way I know my code works in advance and we don't need any more annoying "Oh I forgot something!" sentence.

# When is the next article going to be released?

Honestly, I don't know. I'm busy with other obligations that need my attention. Also, I'm not even sure I want to continue the series after I complete the Pong clone. When I first came into the series, I had the plan to explain enough of the library for you to get on your own. Now I'm not sure if my articles are of any help to anybody. I'm not sure if I'm explaining everything enough. I'm not sure if it is well articulated for people to easily understand.

If you want me to continue this series after the Pong clone, then leave a comment expressing your desire for me to continue.

Happy coding!
Flip the Switch to Reactive Programming
Tags: reactiveprogramming, rxjs, functional, learning
Published: 2019-03-02 17:23:15

---
title: Flip the Switch to Reactive Programming
published: true
tags: reactiveprogramming, rxjs, functional, learning
canonical_url: https://www.kahlillechelt.com/2018/11/16/flip-the-switch/
---

Reactive Programming is a paradigm that solves a lot of problems that many JavaScript frameworks partly implement by introducing some sort of “reactivity”.

That typically ties the reactivity down to one use case in the framework itself. Reactive Programming can be helpful in many more scenarios though.

One huge hurdle for adoption seems to be to grasp the actual concepts. Specifically doing push-based programming instead of pull-based.

I can relate because it did take me quite some time to get there but once the switch was flipped, so to speak, I started to think in terms of Reactive Programming instantly.

That seems to be exactly the problem, it’s not a hard concept to understand. It just takes a lot of effort to start thinking about your programming problems differently.

I am currently putting together a talk that is trying to flip that switch. I have a few ideas based on things I wished I knew in the beginning.

Basically it will focus on making you understand three things about RxJS Observables:

- Observables are just functions receiving an observer
- Observables are lazy
- Observables are ubiquitous

This could work 🤔… maybe?
I'm an email developer and totally not a spammer. Ask me anything.
Tags: ama, email, development, design
Published: 2018-11-16 05:45:42

---
title: I'm an email developer and totally not a spammer. Ask me anything.
published: true
description: 
tags: ama, email, development, design
---

![No junk mail](https://thepracticaldev.s3.amazonaws.com/i/u411cpls69sd1i4gze3p.jpg)

From spam to scams, email gets a bad rap sometimes.

As an email developer, we're faced with challenges such as a lack of email standards and inconsistent rendering across devices.

Ask me anything. 

💌

_Photo by Pau Casals on Unsplash_
Need to set tabIndex=0 to enable tab navigation
Tags: selfnote, a11y, react
Published: 2018-11-22 03:43:02

---
title: Need to set tabIndex=0 to enable tab navigation
published: true
tags: self note, a11y, React
canonical_url: https://www.slightedgecoder.com/2018/11/15/need-to-set-tabindex0-to-enable-tab-navigation/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/0oy7tunypafcx43albqz.jpg
---

_Photo by [Abigail Lynn](https://unsplash.com/photos/MNXIZgzKw4U?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)_

_**Note to self + Question**_

I recently answered a Stack Overflow question, [React focus items list in child component after action from a different child component](https://stackoverflow.com/questions/53327522/) and learned that to enable HTML element navigation using tabs, you need to set tabindex values to 0.

I have researched for the question and [replied.](https://stackoverflow.com/a/53327974/4035)

What I still don’t get is why it’s not recommended to use tabindex value greater than 0.

Following articles urges you not use any values other than 0 & -1.

- [Using tabindex](https://developers.google.com/web/fundamentals/accessibility/focus/using-tabindex)
- [Don’t Use Tabindex Greater than 0](http://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html)

I’ve googled again and again but can’t find any satisfactory answers, yet.

At least I was able to answer the question and provided the [Sandbox](https://codesandbox.io/s/002pz9kp20).

Used [React.forwardRef](https://reactjs.org/docs/forwarding-refs.html) for the first time and worked like a charm.

## Question

Does anyone know why using `tabindex` value greater than 0 is not recommended?