teleren/devto huggingface dataset:
My favourite Javascript learning resources on Github 🌟
Tags: javascript, beginners, webdev, github
Published: 2020-07-27 14:19:13

I started to learn Javascript about a year ago, there are so many online tutorials, blogs, courses and even the GitHub, it's not only the place I push my codes, but also a place to learn! And I realised that the most important thing to learn any languages is to understand the core concepts of it and get your hands dirty. 

These are the curated resources on GitHub that I have used myself or at least gone through, so I can definitely recommend them. Let's dive into the core pillars of the JavaScript language.

&nbsp;

[JavaScript Algorithms and Data Structures
](https://github.com/trekhleb/javascript-algorithms) 
- 📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

[JavaScript Questions](https://github.com/lydiahallie/javascript-questions) 
- A long list of (advanced) JavaScript questions, and their explanations ✨

[clean-code-javascript](https://github.com/ryanmcdermott/clean-code-javascript) 
- 🛁 Clean Code concepts adapted for JavaScript

[What the f*ck JavaScript?
](bit.ly/wtfjavascript) 
- A list of funny and tricky JavaScript examples

[33-js-concepts](https://github.com/leonardomso/33-js-concepts) 
- 📜 33 concepts every JavaScript developer should know.

[Awesome JavaScript Learning](https://github.com/micromata/awesome-javascript-learning) 
- A tiny list limited to the best JavaScript Learning Resources

[Learn-JavaScript](https://github.com/CodementorIO/JavaScript-Learning-Resources) 
- Best Collection of JavaScript Tutorials including where to find online help


[Become-A-Full-Stack-Web-Developer](https://github.com/bmorelli25/Become-A-Full-Stack-Web-Developer/#learn-javascript) 
- Javascript part of Free resources for learning Full Stack Web Development

[30-seconds-of-code](https://github.com/30-seconds/30-seconds-of-code)
- Short JavaScript code snippets for all your development needs

[modern-js-cheatsheet](https://github.com/mbeaudru/modern-js-cheatsheet)
- Cheatsheet for the JavaScript knowledge you will frequently encounter in modern projects.

[Functional-Light-JS](https://github.com/getify/Functional-Light-JS)
- Pragmatic, balanced FP in JavaScript.

[javascript-dev-bookmarks](https://github.com/didicodes/javascript-dev-bookmarks)
- A collection of articles that will help you get better at JavaScript.

[30-Days-Of-JavaScript](https://github.com/Asabeneh/30-Days-Of-JavaScript)
- 30 days of JavaScript programming challenge.

&nbsp;
&nbsp;

![](https://media0.giphy.com/media/1kenyYNFG9wTUyHMjk/giphy.gif?cid=ecf05e47nx7xho2jh5q4z9elb0s7sziw92bq32fu0ojqe3qt&rid=giphy.gif)
Thanks for reading! I hope you will find it useful and feel free to share your favourite Javascript learning resources. Keep curious 😃
Increase your code reviews productivity with this Github action
Tags: management, productivity, github, codequality
Published: 2020-07-27 14:06:36

As a dev manager I’d always try to improve the performance on my team, and the **code reviews are a key step** to maintain quality and reduce prevent bugs.

However code reviews usually become a bottleneck due to problems like:

* People who take a lot of time to review.
* A few people gets a lot of reviews assigned, while others none.
* Some just “approve” the pull requests but don’t make a quality review.

## The solution

To avoid it I made a Github action that analyzes the latests reviews and prints **relevant stats to improve the team’s performance**:

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

* `Average review time`: To make each one compare to others and try to be more efficient.
* `# reviewed pull requests`: Useful to distribute more evenly the reviews among the team.
* `# of comments`: An indicator of who is doing quality review and who doesn’t.

## Add to your project

To get this insights, add this [Github Action](https://github.com/flowwer-dev/pull-request-stats) to your project.

Just create a file `./github/workflows/stats.yml` and add the following (**no need to change anything**):

```yml
name: Pull Request Stats

on: [push]

jobs:
  stats:
    runs-on: ubuntu-latest
    steps:
      - name: Run pull request stats
        uses: flowwer-dev/pull-request-stats@v1
```

**That’s it!** It will run and print the stats in your next Pull Request.

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

## *Bonus:*

If you prefer more visual stats and add a bit of gamification, pass the option `charts` and sort the table by your preferred metric:

```yml
name: Pull Request Stats

on: [push]

jobs:
  stats:
    runs-on: ubuntu-latest
    steps:
      - name: Run pull request stats
        uses: flowwer-dev/pull-request-stats@v1
        with:
          charts: true
          sort-by: 'COMMENTS'
```

You’ll end up with stats like this:

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

## The end
Daily Challenge #273 - Remove Duplicates
Tags: challenge
Published: 2020-07-27 13:38:16

---
title: Daily Challenge #273 - Remove Duplicates
published: true
series: Daily Challenge
description: Remove the left-most duplicates from a list of integers and return the result.
tags: challenge
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/ykre2o6b1gw567m2afzg.png
---
In this challenge, you will remove the left-most duplicates from a list of integers and return the result.

```
// Remove the 3's at indices 0 and 3
// followed by removing a 4 at index 1
solve([3, 4, 4, 3, 6, 3]); // => [4, 6, 3]
```

Tests: 
`solve([3,4,4,3,6,3])`
`solve([1,2,1,2,1,2,3])`
`solve([1,1,4,5,1,2,1])`
`solve([1,2,1,2,1,1,3])`

Good luck!

***
_This [challenge](https://www.codewars.com/kata/5ba38ba180824a86850000f7) comes from KenKemau on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Day 2: Operators - 30 Days of Code HackerRank
Tags: python, cpp, javascript
Published: 2020-07-27 13:17:19

#### **Task**

Given the meal price (base cost of a meal), tip percent (the percentage of the meal price being added as tip), and tax percent (the percentage of the meal price being added as tax) for a meal, find and print the meal's total cost.

![Day 2: Operators - 30 Days of Code HackerRank](https://dev-to-uploads.s3.amazonaws.com/i/j58efdk1n0ti27qk794x.jpg)

Operators hackerrank solution in c++(cpp)

```cpp
#include <bits/stdc++.h>

using namespace std;

// Complete the solve function below.

void solve(double meal_cost, int tip_percent, int tax_percent) {

    int total_cost;
    total_cost =  meal_cost + meal_cost * tip_percent/100 + meal_cost * tax_percent/100;
    cout << total_cost <<endl;
}

int main()
{
    double meal_cost;
    cin >> meal_cost;
    cin.ignore(numeric_limits<streamsize>::max(), '\n');

    int tip_percent;
    cin >> tip_percent;
    cin.ignore(numeric_limits<streamsize>::max(), '\n');

    int tax_percent;
    cin >> tax_percent;
    cin.ignore(numeric_limits<streamsize>::max(), '\n');

    solve(meal_cost, tip_percent, tax_percent);

    return 0;
}
```

Operators hackerrank solution in Python

```python
import math
import os
import random
import re
import sys

# Complete the solve function below.
def solve(meal_cost, tip_percent, tax_percent):

    total_cost =  meal_cost + meal_cost * tip_percent/100 + meal_cost * tax_percent/100
    print(round(total_cost))
    
if __name__ == '__main__':
    meal_cost = float(input())

    tip_percent = int(input())

    tax_percent = int(input())

    solve(meal_cost, tip_percent, tax_percent)

```

Operators hackerrank solution in JavaScript

```javascript
// Complete the solve function below.
function solve(meal_cost, tip_percent, tax_percent) {
    
    let total_cost;
    total_cost =  meal_cost + meal_cost * tip_percent/100 + meal_cost * tax_percent/100;
    console.log(Math.round(total_cost));
}

function main() {
    const meal_cost = parseFloat(readLine());

    const tip_percent = parseInt(readLine(), 10);

    const tax_percent = parseInt(readLine(), 10);

    solve(meal_cost, tip_percent, tax_percent);
}
```

### Problem Statement Link : 

https://www.hackerrank.com/challenges/30-operators/problem

**Check out [30 Days of Code| CodePerfectplus](https://codeperfectplus.com/category/hackerank-30daysofcode) for All solutions from this series.**
How much time do you spend on education during the week?
Tags: discuss, career, codenewbie
Published: 2020-07-27 13:09:03

Dev education is so important in our job. How much time do you speed each week on your education?

I do one day per week. Most of the times it's Friday. In stressy times its about 2 hours per week.

Cheers marc

---

<span>Photo by <a href="https://unsplash.com/@kimberlyfarmer?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Kimberly Farmer</a> on <a href="https://unsplash.com/s/photos/education?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
The Building an Indie Business Podcast- Donating the Podcasting Book Proceeds
Tags: podcast
Published: 2020-07-27 13:06:07

<p><a href="https://podcasts.google.com/feed/aHR0cHM6Ly9hbmNob3IuZm0vcy85YjAyYzM4L3BvZGNhc3QvcnNz/episode/N2I4ZmFmZTctZjliNC00MjQ2LTliN2UtYjNlY2FjZjUyNTk0?sa=X&ved=0CAQQ8qgGahcKEwiI0sK5v-3qAhUAAAAAHQAAAAAQAg">Listen Here</a></p>
<p>In this episode, I discuss donating the proceeds of the podcasting book, where it's going, accountability, and my nephew.</p>
<p><strong>Show Notes:</strong></p>
<p><a href="https://blog.openpodcast.xyz/podcast-book/">Buy the book I wrote</a></p>
<p><a href="https://occurnow.org/">Occur</a></p>
<p><a href="https://drive.google.com/drive/folders/1DTspRuJEKbU7UFniMkRHylnBeS_xhUo_?usp=sharing">Google Spreadsheets</a></p>
<p><a href="https://gum.co/xczrxd">Get a free list of the tools I use to make the podcast</a></p>
<p><a href="https://forum.openpodcast.xyz">Open Podcast Forum</a></p>
<p><a href="https://blog.openpodcast.xyz">Open Podcast Blog</a></p>
<p><a href="https://Openpodcast.xyz">Open Podcast Website</a></p>
<p><a href="https://baib-podcast.com/podcasting-benefits.html">BAIB Episode Page</a></p>
<p><a href="http://eepurl.com/gj04vH">BAIB Email List</a></p>
[Revenue Research](https://revenueresearch.co/)
Conway's Life in Z80 Assembly
Tags: programming, rc2014, z80, assembly
Published: 2020-07-27 18:03:37

---
title: Conway's Life in Z80 Assembly
published: true
date: 2020-07-27 12:48:03 UTC
tags: programming, rc2014, z80, assembly
canonical_url: https://ncot.uk/z80-homebrew-computer/conways-life-in-z80-assembly/
---

After the fun of writing the Zombies game in Z80, I had a go at writing a version of Conway’s Life in Z80.

## Watch the video!

{% youtube DelPw_fY1J0 %}

## Grab the code!

The source code and compiled binary can be obtained from my [Github Repo here](https://github.com/ncot-tech/z80-life). Feel free to copy it and make modifications. If you fix or improve it, let me know!

## Life? What is Life?

Life is a type of program called a _cellular automaton_ which is just a fancy way of saying it’s a simulation. In this simulation there are small units called cells, and each cell can be either alive or dead. Their state is dictated by a set of rules, and their neighbouring cells. The rules are really simple

- A cell with 2 or 3 neighbours remains alive if it already is
- A cell with 2 neighbours comes back alive if it’s dead
- A cell with anything else dies off, or stays dead

From these simple rules you can get incredibly fascinating patterns, and it’s a great example of something called _emergent behaviour_
Create simple cloud resume in html and css.
Tags: cloudresumechallenge, cloud, 100daysofcode, resume
Published: 2020-07-27 12:46:14

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

Here's how I created my cloud resume for #CloudResumeChallenge.

# 1. Template
When searching for simple html and css resume templates in GitHub here's I got simple Bootstrap repo.
`https://github.com/StartBootstrap/startbootstrap-resume`

# 2. Installation
Either you can clone the template using the steps described in the Readme file. Or download the code and copy the files from `repo-name\dist` folder.
We need exactly following files for our resume.

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

# 3. Create your resume repo.
In GitHub, create new repository called "resume" with ReadMe file and add the above files to it and do initial commit.

#4. Test default resume.
Open index.html file to view default resume you have downloaded.

#5. Add/ Modify your content.
Modify the resume in Visual code Editor. I modified following.
* Change your profile photo in `repo-name/assets/img/profile.jpg`
* Modify your basic information
* Modify your Experience
* Modify your Education
* Modify your Skills
* Modify your Interests
* Modify your Awards.

#5. Commit
After verifying your changes, commit and push to GitHub.


**And Your Resume is Ready!**


> **Next Step**: Use information on #CloudResumeChallenge to host this local resume using Amazon Web Services.


**Thank you for reading!** 😊
Javascript Explained | sketch-notes PART4
Tags: javascript, webdev, tutorial, node
Published: 2020-07-27 12:43:11

Hey There! 🙌🏾

Here are the latest #sketchnotes that I created for my 'You Don't know JS' series that I post on twitter:

This one is about the **ternary operator** in Javascript:
{% twitter 1287709618018201600 %}

This one is about a hot topic- **closures** in Javascript:
{% twitter 1287709618018201600 %}

Hope you liked them, follow me on [twitter](https://twitter.com/Kokaneka) for more!

Cheers!
Dicas para revisão de código e equipes saudáveis
Tags: codequality, collaboration, codereview, softwaredevelopment
Published: 2020-07-27 12:39:36

# Primeiro, as premissas:
## 1) Ninguém é dono/a do código
Pessoas vêm e vão. É parte da vida. Além disso, um projeto de software é feito em equipe. As pessoas do time precisam se sentir confortáveis para mexer no código e co-proprietárias dele (atenção para o prefixo "co-"!).

## 2) Receber comentários não é um demérito

Isso é parte da construção coletiva de um projeto, e decorre naturalmente da premissa 1. Além disso, ninguém sabe absolutamente tudo. 

# Agora, as dicas:

## 1) Desapegue

Ideias melhores do que as suas podem vir de colegas que estão revisando. 

## 2) Incentive a revisão no seu código

Mesmo se você for uma liderança ou referência técnica, incentive que revisem seu código. Ou melhor: especialmente se você for, faça isso para dar o exemplo! Lembre-se da premissa 1: todo mundo tem propriedade do código. Subiu um pull request? Incentive as pessoas a revisarem.

## 3) Seja gentil 

Hoje, você está revisando o código de alguém. Amanhã, alguém vai revisar o seu. Lembre-se que a pessoa escreveu aquele código dando o melhor de si nas circunstâncias que teve para gerá-lo.

## 4) Seja propositivo/a 

Ao apontar um problema, pode ser que a pessoa não saiba como resolvê-lo. Por isso, sempre proponha alternativa(s).

## 5) Receba as sugestões de bom grado

Você aprende algo novo e o código fica melhor com a colaboração proposta. Se você discordar, debata amigavelmente. 

Quando todo mundo participa do código de cada pessoa, a equipe fica mais parceira e se fortalece tecnicamente.

Desapegue!
Como concatenar o texto de várias linhas em uma única sequência de texto no SQL server?
Tags: sql, sqlserver
Published: 2020-07-27 12:20:27

Em algumas situações necessitamos retornar apenas uma sequência de texto, mesmo existindo mais de um registro na tabela.
Para isso, podemos utilizar o seguinte esquema:
```
SELECT TOP 1 STUFF( 
SELECT DISTINCT
   ', ' + CAST(*campoTextoDesejado* AS VARCHAR(MAX)) 
FROM
   *TabelaDesejada* 
WHERE
   *Filtro* FOR XML PATH(''),1,1,'' ) 
FROM
   *TabelaDesejada* 
```
A função STUFF serve para limpar o primeiro caracter que, sem ela, seria uma vírgula. Utilizando a função a vírgula é retirada.
Python script for cloning repositories
Tags: python, script, github, token
Published: 2020-07-27 12:02:11

---
title: Python script for cloning repositories
published: true
description: This is a script for cloning repositories from a given organization in the GitHub ecosystem
tags: python, script, github, token
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/rx4zhyla06qdy64ahjql.jpg
---

A couple times it happened to me this year that I had to pull again the repositories from a given organization.

Mostly it happened to me because my computer broke, so a friend of mine lend me his computer so I could work. After mine was fixed I had to pull everything again.

So for not having to clone the repositories manually I wrote a Python 3 script for doing it for me:

{% gist https://gist.github.com/nisevi/a7a08fa3e63ce9b0f75c8b97e4a7faf1 %}

The name of the organization is the GitHub username. So for example Facebook GitHub URL is https://github.com/facebook, if you would like to clone all their repositories you will have to replace **organization-name-goes-here** with **facebook**.

If you don't know [how to create a personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token), click the link for going to the GitHub documentation. It is well explained with screenshots of where to go and everything. Once you get it, you will have to place it where it says **token-goes-here**.

If you don't know how to install different versions of python on your machine, you could take a look to:
* [The right and wrong way to set Python 3 as default on a Mac](https://opensource.com/article/19/5/python-3-default-mac);
* [Managing Multiple Python Versions With pyenv](https://realpython.com/intro-to-pyenv/);

You will need to install [PyGithub](https://pypi.org/project/PyGithub/) the library that I'm importing in the script:

```
pip install PyGithub
```

If you don't have `pip` installed, take a look [here](https://pip.pypa.io/en/stable/installing/) for setting it up properly.

Finally for running the script you just need to write in the terminal of your choice:

```
python cloner.py
```

Where `cloner.py` is the name of the file where we wrote our script. Be aware that all repositories will be cloned in the path where you are executing the script.

Have a great week everyone!!
Daily Developer Jokes - Monday, Jul 27, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-07-27 12:00:20

---
title: "Daily Developer Jokes - Monday, Jul 27, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Monday%2C%20Jul%2027%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258a87ad7e.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___!false___

It's funny 'cause it's true.
 -->
New Client: Lasalle Investments - Phoenix American
Published: 2020-07-27 12:00:04

<b>Phoenix American Financial Services - Announces New Client Partnership with LaSalle Investment Management</b>

Phoenix American Financial Services, Inc. (“Phoenix“) is pleased to announce its new client partnership with LaSalle Investment Management (“LaSalle”) to support their new 1031 platform of products. Phoenix will support LaSalle with its advanced proprietary <a href="https://www.phxa.com/transfer-agency/ ">transfer agent system</a>, STAR-XMS, and industry leading investor services platform, which combines advanced technology, a focus on customer service and decades of experience with the unique operational requirements of real estate funds and 1031 exchange funds.

<a href="https://www.phxa.com/press-releases/lasalle-investment-management/">Read More:</a> 

<b>Contact Details:</b>
415-485-4500
<a href="https://www.phxa.com/fund-accounting/">Fund Accounting Service</a>

Visit Reference Profile Websites:
<a href="https://www.phxa.com/">Fund Administration Service</a>
<a href="https://bit.ly/30Tl3tp">https://bit.ly/30Tl3tp</a>
<a href="https://bit.ly/30Pll4K">https://bit.ly/30Pll4K</a>
<a href="https://bit.ly/2P1uWQw">https://bit.ly/2P1uWQw</a>
<a href="https://bit.ly/30JtAPy">https://bit.ly/30JtAPy</a>
<a href="https://bit.ly/3hySzvQ">https://bit.ly/3hySzvQ</a>
<a href="https://bit.ly/3f7YMNI">https://bit.ly/3f7YMNI</a>
<a href="https://bit.ly/30UuYis">https://bit.ly/30UuYis</a>
<a href="https://bit.ly/3f6eoBn">https://bit.ly/3f6eoBn</a>
<a href="https://bit.ly/3f0SXBD">https://bit.ly/3f0SXBD</a>
<a href="https://bit.ly/3hJK69n">https://bit.ly/3hJK69n</a>
<a href="https://bit.ly/3jCE6AS">https://bit.ly/3jCE6AS</a>
<a href="https://bit.ly/2OZy1Au">https://bit.ly/2OZy1Au</a>
<a href="https://bit.ly/3eXt85y">https://bit.ly/3eXt85y</a>
<a href="https://bit.ly/303yVlH">https://bit.ly/303yVlH</a>
<a href="https://bit.ly/3jKJvG4">https://bit.ly/3jKJvG4</a>
<a href="https://bit.ly/2BC9pe4">https://bit.ly/2BC9pe4</a>
<a href="https://bit.ly/39we39N">https://bit.ly/39we39N</a>
<a href="https://bit.ly/2EnyLxk">https://bit.ly/2EnyLxk</a>
<a href="https://bit.ly/3g5sF2q">https://bit.ly/3g5sF2q</a>
Como funciona o segundo argumento do useEffect
Tags: react, hooks, useeffect
Published: 2020-07-27 11:41:41

Normalmente desenvolvedores que estão começando a trabalhar com o React Hooks esbarram na compreensão do useEffect. Primeiramente, uma introdução ao useEffect:
No React baseado em classes nós temos alguns métodos para "controlar o tempo" na aplicação, tais como componentdidmount, componentdidupdate, métodos disparados na renderização inicial da aplicação e na re-renderização, respectivamente.
No React Hooks, esse controle do tempo é realizado pelo useEffect. E podem ser utilizados diversos useEffect. Inclusive, é uma boa prática utilizar um para cada objetivo.
E ai que entra o problema. Cada useEffect será disparado a cada re-renderização, porém, muitas vezes nem sempre é necessário esse disparo. E muitas vezes é até custoso para a performance disparar todos os useEffect.
Para isso utilizamos o segundo argumento. Veja o exemplo:
```
  useEffect(() => {
    filtraOperacoes();
  }, [entrada, saida, operacoes]);
```
Nesse caso, o método de filtro de operações só precisa ser chamado se uma das três variáveis muda seu estado. Para casos diferentes desse, o método é irrelevante. Por isso, se eu preciso que sempre que uma dessas três variáveis mudem de estado seja disparado o método filtraOperacoes eu utilizo esse recurso.