teleren/devto huggingface dataset:
It's This For That
Tags: discuss, fun, startup
Published: 2020-08-01 07:00:15

---
title: It's This For That
published: true
description: 
tags: ["discuss", "fun", "startups"]
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/en4l3maisvcssu2opohv.png
---
The post in the cover image screenshot showed up in my LinkedIn feed. Here's what I commented:

> Which one? In the cringiest "it's like this for that" format, to avoid giving away too much:
- It's Zoom for intimacy.
- It's Ring for coffee.
- It's Wix for everything.
- It's (a tiny part of) Snapchat for dining.
- It's a product lab for developer education and societal/criminal justice reform and underprivileged/underrepresented opportunity and bucking industry obsession with degrees (actually, it's exactly that, but that's not telling half of the story).

In one sentence (for each, feel free to share multiple), what's yours? Something you're actually working on or just an idea you've got on the back burner (trust me, I have plenty of the latter including some in here), it doesn't matter.

While you don't have to use my "it's like this for that" format, it's a pretty fun exercise and might help you avoid giving away too many details.
The space shooter game using Unity
Tags: unity3d, opensource, github, gamedev
Published: 2020-08-01 06:46:16

Hi. This is my first post on dev.to.
I have made a small space shooter example with Unity.
I want to share it with you.
This is a small project, but I paid a lot of attention to writing clean code.
If you want to make a space shooter-style game, this would be a good starting point for you.

Github
- https://github.com/sunduk/MinimalShooting

Documentation
- https://github.com/sunduk/MinimalShooting/wiki

## Description
You could learn how to implement the below features.
- How enemies to be created randomly.
- Basic controller types to use on mobile devices. (Keyboard, Virtual joystick, Touch and Drag)
- Collision detection.
- Basic weapon system. (Straight, To the player, Missile)
- Various movement system. (Straight, To the player, Circle, Zigzag)
- A little of particle systems.
- Some useful scripts. (Singleton, Shuffle, Rotator, etc)

I have written the documents for this project. (https://github.com/sunduk/MinimalShooting/wiki) It might be a little strange for you to understand because I'm not a native English speaker. I had tried to fix the grammar errors using Grammarly but please let me know if there are too awkward sentences.

If you have any questions or suggestions, feel free to ask me.
Thank you.
Self review 2019-2020
Published: 2020-08-01 06:39:14

---
title: Self review 2019-2020
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

I have a slew of problems that might hinder my personal success and development.
I have difficulty with starting and also with getting to a resolution.
While they could equally be points to draw strength from at some later date when some success has been achieved I currently lack belief and harbour many grave doubts.

So what i have tried is 
abstinence and sobriety. -- not enough to achieve greatness but with them at least i am through the door that continued my life.
studying self help books -- at least i do not drop out from the vision
studying self help influencers and channels -- i occasionaly watch too much of that
writing on the topic of flow and 10X productivity in programming
numerous little attempts to study programming topics --not enough i drop out early
numerous attempts at completing a self paced and self set programming project --not enough i fail eventually
since self efficacy is the problem i keep thinking how to improve on grit resilience and self efficacy itself. I have to believe and stay the course. And perhaps more importantly what distracts me?

...this was in late september, 2019, by then i had cracked a few parts of the problem

exercising self regulation and self discipline are part of the solution
keeping to a morning ritual
small coding exercises  or code reading - keeping my mind on the course of programming
daily planning of three points 
growing the number of small tasks in my morning ritual list to improve myself

soon after making these findings in september i began to code on a consistent basis…

recently i dropped some of the rituals from my morning practice and the result was a several month long hiatus in programming


Conclusion

that did not create well-being. i am strongly motivated by the endogenous chemistry of intrinsic incentives. and i am just now reviewing my progress and adjusting my morning ritual to include cold showers, daily plans and the nine to five(9 minute timed exercise to find 5 bugs, read 5 functions or write/rewrite 5 lines of code or do 5 refactorings),  debugging, as well as code reading rituals , again.
SAM: Serverless Application Model (CloudResumeChallenge)
Tags: aws, 100daysofcloud, cloudresumechallenge
Published: 2020-08-01 06:21:27

After creating simple Resume with html and css and uploading into S3 with CloudFront tools, here come's the difficult task for creating DynamoDB table, API and Lambda function using Python using SAM (Serverless Application Model).

I spent some time in learning Python and boto3 and how to use both in SAM templates which are in yaml files.

Being first time working on yaml files, it took some time to go through examples and understand the concept.

Then created required assets one by one in SAM Template.
1. **Dynamo DB**: To save the number of visits to my resume site.
2. **Lambda**: A python function to fetch, create and update the visit count into Dynamo DB Table.
3. **API**: Do get the number of visits from Lambda function to avoid direct communication with Dynamo DB from the frontend code.

# DynamoDB

Added parameter in the template to get the Tablename in CLI.
And use it in the template to create user defined table name.

**Parameters in CLI**:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tmevzi672n9cdcqllfwi.png)

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

# Lambda

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

# API Gateway

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

# SAM Stack Creation

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

# API endpoint Created

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

So till now our Architecture will look like below:

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


> Pending: Set up GitHub Actions to automate build, test and deployment of Code.

Hopefully i will complete it ASAP.

Thank you for reading! 😊
www norton com enroll
Published: 2020-08-01 06:15:07

Norton product key is 25 alphanumeric characters codes that you can enroll at <a href="https://enroll-enroll.com">www.norton.com/enroll</a> site using Norton account. You can purchase it online like as well as offline. In the case of online purchases, go to online stores such as Walmart and purchase the product key. It will send you the Norton product key in your email. In the offline purchase, go  to website <a href="https://enroll-enroll.com">norton.com/enroll</a> store and purchase the retail card.
Lorem Ipsum
Published: 2020-08-01 06:04:59

_Lorem Ipsum_ is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the **1500**s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 

```java
public static void main(String[] args) {
  System.out.println("Hello World!");
}
```

- sdfkjdks
- 235343
- 4msd;k;fdkgrf

It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularized in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

```scala
final case class User(name: String, age: Int)

object App {
  def main(args: Array[String]): Unit = {
    println("Hello World")
  }
}
```
How do you manage passwords?
Tags: webdev, discuss, security
Published: 2020-08-01 06:01:05

---
title: How do you manage passwords?
published: true
description: 
tags: webdev, discuss, security
cover_image: https://www.safetydetectives.com/wp-content/uploads/2020/06/10-Best-Secure-Password-Managers-in-2020-with-Coupons.jpg
---
I've tried [1Password](1password.com), [LastPass](lastpass.com), [Dashlane](dashlane.com) before finally settling down on [Bitwarden](bitwarden.com). 

What password managers have you tried and which ones would you recommend to others?
Promise.allSettled() and Promise.any()
Tags: javascript
Published: 2020-08-01 05:56:51

Sometimes when we work on a front-end app and need to call backend API multiple times for user. And we may have another requirement here is that it should stop at any successful request.

```Typescript
const promise1 = axios.get(url1)
const promise2 = axios.get(url2)
const promise3 = axios.get(url3)

// some codes check promise
// ...
```

But problem here is
1. It won't stop when we made any successful request.
2. Code looks ugly, if we add some logic deal with resolve and reject.

We cannot use `Promise.all()`, since it will immediately reject if any promise is rejected

Best solution here should be using `Promise.any()`, it will resolve first successful request, and raise AggregateError if all rejected.

```Typescript
const promise1 = axios.get(url1)
const promise2 = axios.get(url2)
const promise3 = axios.get(url3)

const promises = [promise1, promise2, promise3]

const response = await Promise.any(promises)
// do something...
```

However, `Promise.any()` is available in ES2021 and supported after Chrome 85 beta. Unfortunately, we can't use it right now.


Another alternative (not elegant) solution is using `Promise.allSettled()`. It will respectively solve and reject every promises.
```Typescript
const promise1 = axios.get(url1)
const promise2 = axios.get(url2)
const promise3 = axios.get(url3)

const promises = [promise1, promise2, promise3]
const results = await Promise.allSettled(promises)
results.forEach((result) => {
  if (result.status === 'fulfilled') {
    const { value } = result
      // do something..
  } else { // results.status === 'rejected'
    const { reason } = result
    // do something...
  }
}
``` 

Code above is dumb :( 
Wish we can get native support from our browser soon.
Don't Just Say Hi....
Published: 2020-08-01 05:14:16

As tech enthusiasts, we would at some point, for one reason or another need to reach out to someone. It could be that you need help with a bug in your code, career advice, or mentorship....whichever case, just **go straight to the point**.


 - You're most likely going to get a response if you go straight to the point rather than just saying _hi_ or _hello_.
 - You'll save yourself a lot of time, especially if you have a bug you need help with. Rather than going through the whole process of exchanging pleasantries, just go straight to the point.

Imagine I have a bug in my code I've been trying to fix, and I need help from someone. Rather than just saying hi and waiting for a response, here's how I would reach out to them

`Hi, I have issues trying to setup docker on my computer, I keep getting xxxx error message. Here's a screenshot of the error`

Or I could go further to introduce myself
`Hi, I'm xyz and I got your number from abc. I get this error in my console, it says xxxx and it happens whenever I click on xxxx button. Here's the function called whenever the button is clicked`

It's that simple. You don't have to go through the whole **hello, how are you, how's your day going....**. Like I said, it saves you a lot of time, and you're most probably going to get a response.

**Note**: This is just my opinion. If you have contrary opinions and you would like to discuss them with me, my DMs are open on [twitter](https://www.twitter.com/ibn_abubakre), feel free to reach out...and don't just say hi 😉
COOL THING WITH PSEUDO ELEMENT IN CSS. (:before)
Published: 2020-08-01 04:46:36

CSS has a property called content. It can only be used with the pseudo elements :after and :before. It is written like a pseudo selector (with the colon), but it’s called a pseudo element because it’s not actually selecting anything that exists on the page but adding something new to the page. This is what it looks like:

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

With this CSS in place, we could have this HTML:

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


And the output would be like:

• Email address: chriscoyier@gmail.com
Fetch to var
Tags: javascript, webdev, node
Published: 2020-08-01 03:45:38

In this huge world of JSON APIs, `fetch` is the most common implementation for receiving an HTTP response from an API. However, it's a lot more difficult for newbies to get the fetch data into a variable. Here it is:
{% runkit 
const fetch = require("node-fetch")
%}
// A function to get data from a URL
async function getData(url) {
    const x = await fetch(url)  // We wait for the data to arrive
    return await x.json()  // We wait for the data to convert to JSON
}

// We wait for the data to arrive
const data = await getData("https://jsonplaceholder.typicode.com/todos/1")

// We log/print the arrived JSON data
console.log(data)
{% endrunkit %}
How to use JSX in markdown documents
Tags: react, html, css, javascript
Published: 2020-08-01 03:23:49


![How to use JSX in markdown documents](https://i0.wp.com/blogreact.com/wp-content/uploads/2020/07/Introductory-Guide-to-Markdown-for-Documentation-Writers-01.jpg?w=750&ssl=1)

Have you ever wondered what if there is a way to write JSX in markdown documents. That will make writing code faster like never before. MDX is an authorable format that lets you seamlessly use JSX in your markdown documents. In this article we will gonna learn how to use JSX in markdown documents.

## What is MDX ?

MDX is an authorable format that lets you seamlessly use JSX in your markdown documents. You can import components, like interactive charts or notifications, and export metadata. This makes writing long-form content with components a blast.

**For example**

```
import { Chart } from '../components/chart'

# Here’s a chart

The chart is rendered inside our MDX document.

<Chart />
```

MDX is markdown for the component era. It lets you write JSX embedded inside markdown. That’s a great combination because it allows you to use markdown’s often terse syntax (such as # heading) for the little things and JSX for more advanced components.

## Features of MDX

It offers a lot of features but most important features are given below:

-   Blending JSX and markdown makes it powerful.
-   You can use existing components inside your MDX.
-   We can import MDX files as components.
-   Decide which component is rendered for each markdown element (`{ h1: MyHeading }`).
-   All compilation occurs at build time this makes its super fast.

## Usage

You can initialize your project using below command

```
npm init mdx
```

You can read how to setup MDX with Webpack, Parcel, Create React App, Next.js and Gastby from  [official](https://mdxjs.com/getting-started)  documents.

## Comparison

```
<h1>Hello, world!</h1>
```

```
# Hello, world!
```

Both syntax will gonna show same output.

Traditionally, Markdown is used to generate HTML. Many developers like writing markup in Markdown as it often looks more like what’s intended and it is typically terser.

Instead of the following HTML:

```
<blockquote>
  <p>A blockquote with <em>some</em> emphasis.</p>
</blockquote>
```

You can write.

```
> A blockquote with _some_ emphasis.
```

[Demo](https://mdxjs.com/#try-it)

I hope you have learned about how we can use markdown with JSX using MDX.

[Tip 2: Create an array of n size without lodash](https://blogreact.com/create-an-array-of-n-size/)
Day 61 : #100DaysofCode - Omniauth?
Published: 2020-08-01 02:54:58

Today I wanted to practice adding Omniauth to rails projects. What is Omniauth? It pretty much allows users to login into your application using a third party like Github, Facebook, or Twitter. I am still in the process of adding it but found this useful youtube video for others who may be interested in learning. 

{% youtube Dd8dOAL6WYs %}

Once I have implemented it to my practice project I will share with the #DevCommunity.

Hope the video helps, like it has helped me.

Sincerely, 
Brittany
Self-development and motivation focus outside of work 💪
Tags: webdev, motivation, sideprojects, womenintech
Published: 2020-08-01 02:42:25

I’ve been actively spending the majority of my spare time, about a year, working on side projects outside of work. I do this because I came to realise that my self development is a priority is a developer, and that being in the tech industry it’s important to learn and improve skills continuously. At times I can feel overwhelmed because there is so much out there and to learn, but for the most part I’m passionate, motivated and I love the work I do. Looking back when I didn’t code in my spare time, I really don’t know what I did instead 😂 - I’m sure people say that when they have kids?!

I don’t have a routine or manage my time per say, it’s different for everyone. If I feel like doing it, I do and if not I don’t kick myself. 🤷🏻‍♀️

Previously in another job role as a software dev I became very unhappy, unmotivated and bored. I wasn’t getting enough exposure to new tech and not learning anything new. This was the big kick in the bum for me to do something about it. I decided it was time to leave, but a few months before I did I decided to delve into a side project I was really interested and excited to do. I used the tech stack that I wasn’t getting enough exposure too and became confident with it. 💪🏼

That was really the start of prioritising my self-development. So like a year later, I have a few side projects on the go - all at various stages and completed my portfolio site! 

I absolutely love programming and couldn’t imagine doing anything else. 👩🏻‍💻 With working full time and other commitments, I like to spend a few hours a day at least working on side projects. I usually have the one day off on the weekend. It’s addictive, it’s hard to stop... Especially when the work is super interesting and exciting! Keeps your brain ticking and I love a challenge. 

Something I do want to work on though is managing my time better. ⏰ 

Thanks for reading.

Do you spend time outside of work on side projects? And if so how do you manage it? Appreciate any feedback! ☺️
DAY 02 AND KEEP WORKING
Tags: 100daysofcode, html, womenintech, webdev
Published: 2020-08-01 02:33:25

Hoje é meu segundo dia dentro do desafio de 100 dias e pra ser bem honesta já não queria fazer haha.
A questão aqui é que eu acho importante demonstrar que a minha vida (igual a de todo mundo) também acontece fora do desafio, muito mesmo. 
Então hoje eu estava desanimada, ando meio sem vontade por coisas que estão acontecendo na minha vida e além disso, gente sendo honesta, **DEU PREGUIÇA**. 
Tudo bem com isso gente, ninguém é de ferro e é sempre um bom ponto a se destacar.

Sobre os estudos em si, hoje eu continuei meus estudos dentro do curso que eu estava fazendo. O que realmente me animou dentro disso é, perceber que o olhar mais profundo dentro de algo que consideramos simples e muita vez aplicamos sem dar importância acabou me motivando mais a estudar.
Dentro dessa nova percepção, minha uma hora de estudo hoje foi basicamente teórica, entretanto me deu confiança o suficiente para começar o básico do html do meu primeiro projeto (dentro do desafio).
Então amanhã eu começo o meu site. Sei que vai ser extremamente básico, mas a sensação de ter algo palpável e finalmente saindo do papel me agrada. :)


Até amanhã e obrigada a quem está acompanhando. :)
Proyecto: Gear
Tags: proyecto, react, apollo, graphql
Published: 2020-08-01 02:21:58

Tengo otra carrera profesional: La fotografía (https://danielyafacb.tumblr.com). Y lógico en mis almacenes tengo mucho equipo, a la cual siempre le he prestado mucho cuidado (pues cuestan mucho dinero). He buscado alguna APP que me solucione el control o gestión de mis activos pero no he encontrado uno a mi gusto, así que haré uno a mi gusto ... por yo quiero, y porque - creo - que yo puedo.
Lo llamaré: Apliset Gear (no pregunten que significa Apliset).

Estoy utilizando:

Apple iMac 27"
VS Code (Después de VBA, lo mejor de Windows)
Google Firebase: Firestore + Search Customer + Storage + Auth
Express
Nodemon
Babel
React
React-Router
Apollo Client 3.0
Axios
FortAwesome
React-Bootstrap

Y dejé de usar React-Apollo y ahora soy full Hooks!
Use lookup tables for cleaning up your JS/TS code
Published: 2020-08-01 02:10:57

---
title: Use lookup tables for cleaning up your JS/TS code
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

# Overview

You might use the `if` of `switch` statement like the code below when the output of your function is dependent on the given value. 

## Using the If statement

```tsx
const colorMapper = (color) => {
  if (color == "yellow") {
    return "amarillo";
  } else if (color == "blue") {
    return "azul";
  } else if (color == "red") {
    return "rojo";
  } else {
    return "No aplica";
  }
};

colorMapper("yellow"); //=> amarillo
colorMapper("pink"); //=> No aplica
```

## Using the switch statement

```tsx
const colorMapper = (color) => {
  switch (color) {
    case "yellow":
      return "amarillo";
    case "blue":
      return "azul";
    case "red":
      return "rojo";
    default:
      return "No aplica";
  }
};

colorMapper("yellow"); //=> amarillo
colorMapper("pink"); //=> No aplica
```

# Using lookup tables

You can achieve the same result by creating a lookup table like the code below.

As you can see, the code is cleaner and much easier to read!

```tsx
const colorsTable = {
  yellow: "amarillo",
  blue: "azul",
  red: "rojo",
};

const colorMapper = (color) => colorsTable[color] || "No aplica";

colorMapper("yellow"); //=> amarillo
colorMapper("pink"); //=> No aplica
```

If you wanna use the lookup table in TypeScript, you can give types to the lookup table like below.

```tsx
type ColorEn = "yellow" | "blue" | "red";
type ColorEs = "amarillo" | "azule" | "rojo";

const colorsTable: Record<ColorEn, ColorEs> = {
  yellow: "amarillo",
  blue: "azule",
  red: "rojo",
};

const colorMapper = (color: ColorEn): ColorEs | "No aplica" => colorsTable[color] || "No aplica";

colorMapper("yellow"); //=> amarillo
colorMapper("pink"); //=> No aplica
```

# Resources

- [Javascript Patterns - Lookup Tables](https://medium.com/@omwri/javascript-patterns-lookup-tables-26bbaf693e24)
- [Replacing if statements with object lookups](https://www.codereadability.com/replacing-if-statements-with-object-lookups/)
- [Consider lookup tables instead of switch or if/else (Example)](https://coderwall.com/p/6e7rea/consider-lookup-tables-instead-of-switch-or-if-else)