teleren/devto huggingface dataset:
Updates from the 95th TC39 meeting
Tags: javascript
Published: 2023-03-24 00:58:36

There were several items on the agenda, this post focuses on feature proposals and their progress from the 95th TC39 meeting.

__Stage 3:__

* [Async Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management): Address a common pattern in software development regarding the lifetime and management of various resources (memory, I/O, etc.).

* [import attribute](https://github.com/tc39/proposal-import-attributes): Import Assertions re-adanced to Stage-3. Proposal for syntax to import ES modules with options, e.g. for JSON modules.

__Stage 2:__

* [Async Context](https://github.com/tc39/proposal-async-context): proposal is to provide a mechanism to ergonomically track async contexts in JavaScript.

* [Float16Array](https://github.com/tc39/proposal-float16array): Float16 on TypedArrays, DataView, Math.f16round.

* [Iterator.range](https://github.com/tc39/proposal-iterator.range): A proposal for ECMAScript to add a built-in `Iterator.range()`

__Stage 1:__

* [Await Dictionary](https://github.com/tc39/proposal-await-dictionary): A proposal to add `Promise.ownProperties()`, `Promise.fromEntries()`

* [Class Method Parameter Decorators](https://github.com/tc39-transfer/proposal-class-method-parameter-decorators): Decorators for ECMAScript class method and constructor parameters

* [Promise.withResolvers](https://github.com/tc39/proposal-promise-with-resolvers): Creates a Promise with the `reject`,`resolve`and`promise` functions placed as methods
 on the promise object itself.

* [Time Zone Canonicalization](https://github.com/justingrant/proposal-canonical-tz): TC39 Proposal (stacked on Temporal) to improve handling of changes to the IANA Time Zone Database.


<hr />

<center>
[@gnumanth](https://twitter.com/gnumanth)
<center />


<hr /> 

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Elections for the 2023 TC39 Chair Group are complete 🎉<br><br>The Chairs this year are...<br><br>🔸 <a href="https://twitter.com/SoftwareChrisGo?ref_src=twsrc%5Etfw">@SoftwareChrisGo</a> Chris de Almeida (IBM)<br>🔸 <a href="https://twitter.com/robpalmer2?ref_src=twsrc%5Etfw">@robpalmer2</a> Rob Palmer (Bloomberg)<br>🔸 <a href="https://twitter.com/ryzokuken?ref_src=twsrc%5Etfw">@ryzokuken</a> Ujjwal Sharma (Igalia)</p>&mdash; TC39 (@TC39) <a href="https://twitter.com/TC39/status/1638646280036691968?ref_src=twsrc%5Etfw">March 22, 2023</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Gerar uma nova chave SSH no Windows
Tags: tutorial, ssh, window
Published: 2023-03-23 23:56:13

Seja para acessar seu servidor, banco de dados, fazer transferência de arquivos ou fazer commits seguros no Github ou Gitlab, provavelmente você usará o SSH. Com este artigo, procuro falar um pouco sobre o SSH e como gerar uma nova chave para você adicionar onde quiser.

## Sobre a chave SSH

O SSH é um protocolo de rede para nós acessarmos remotamente e de forma segura nossos serviços, como por exemplo, nossos servidores, banco de dados ou até mesmo fazer transferência de arquivos (SFTP). Toda essa comunicação acontece acontece utilizando criptografia para que nossa comunicação passe a ser confiável e segura.

Umas das vantagens de você considerar utilizar sempre comunicação por SSH, é o fato dele inviabilizar ataques do tipo [Força Bruta ou bruteforce](https://www.welivesecurity.com/br/2020/06/26/o-que-e-um-ataque-de-forca-bruta/), já que, o tempo para quebrar essa segurança iria demorar um tempo absurdo para descobrir a senha do seu serviço.

Hoje, tenho a preferência por utilizar SSH onde é permitido, desde o acesso as minhas VPS até a transferência de arquivos (SFTP).

Vamos ao que interessa!

## Gerando uma nova chave SSH

### 1. Abra o seu terminal favorito e execute o seguinte comando

```
ssh-keygen -t rsa -b 4096 -C "seu-email@gmail.com"
```

O comando acima irá gerar uma nova chave SSH, usando o e-mail como um identificador para esta nova chave.

### 2. Será solicitado escolher um nome para o arquivo. Clique Enter

```
Enter file in which to save the key (C:\Users\iagof\.ssh\id_rsa): [clique Enter]
```

Caso você queria ter mais de uma chave, escolha um nome semântico para se confundir mais tarde. Tenho dicas para você no final. 😉

### 3. Será solicitado uma senha. Digite e confirme clicando no Enter

```
Enter passphrase (empty for no passpharse): [digite sua senha e clique Enter]

Enter same passpharse again: [digite sua senha novamente e clique Enter]

```

Será solicitado digitar uma senha duas vezes para confirmar.

### 4. 🎉 Congratulations! Sua chave SSH foi criada com sucesso!


![Finalização do processo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rg0o39unr0r2gg093jgc.png)

Caso esteja vendo uma tela parecida com essa, você conseguiu com sucesso gerar sua chave SSH.

## Dicas

>“Certo. Criei minha chave e como faço para copiá-la?”
> -- Leitor

Sua chave privada e a pública, estão na raiz da pasta do seu usuário. No meu caso, ela está localizada no seguinte caminho

```
C:\Users\iagof\.ssh
```

Para copiar a sua chave para a área de transferência, execute o seguinte comando

```
cat .\.ssh\id_rsa.pub | clip
```

---

{% embed https://dev.to/iagofrota/deploy-com-git-bare-2m59 %}
Codeium - The AI-Powered Coding Tool for Productivity and Security
Published: 2023-03-23 23:10:13

As a web developer, technical writer and tech enthusiast, I'm always looking for ways to improve my productivity and efficiency. I've spent a lot of time wrestling with clunky regexes, searching for files and code, and struggling to write code quickly and accurately. This was really tiring until I found [Codeium ](https://codeium.com)- the ultimate AI-powered coding tool that revolutionized my coding game.

So, Codeium is a powerful coding tool that helps me write code quickly and accurately. With AI-powered autocomplete, coding superpowers, intelligent search, and top-notch security and privacy, Codeium is the ultimate tool for coders of all skill levels.

Codeium's AI-powered autocomplete is faster than thought, making it a powerful tool that saves you time and helps you ship products faster. With its generative code feature, Codeium can predict your next lines of code and complete them for you, making coding a breeze. And, with its coding superpowers available on all your favourite IDEs, you can finally unleash your full coding potential.

<img width="100%" style="width:100%" src="https://media.giphy.com/media/KKqsGJtbAcb0aZYVZF/giphy.gif">

Say goodbye to tedious file searches with Codeium's intelligent search feature. Using AI, Codeium can help you find the files and code related to your intent quickly and efficiently. You can spend less time searching and more time coding, boosting your productivity and efficiency.

But that's not all - Codeium is completely free forever! With unlimited autocomplete and support for over 40 programming languages (and counting), you can level up your coding skills without breaking the bank. Plus, Codeium is proud to offer top-notch security and privacy, ensuring that your code and personal information are always safe.

Whether you're a web designer, web developer, technical writer, or tech enthusiast like me, Codeium can help you take your coding skills to the next level. 

Don't settle for slow and inefficient coding - [download Codeium](https://codeium.com) today and experience the power of AI!
Gamification
Tags: programming, productivity, architecture, computerscience
Published: 2023-03-23 23:08:49

_Gamified Abstraction Modeling Engine._

A general solution-oriented methodology for dealing with common problems

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fl19cwwt6qzd9s4ci0bl.jpg)

# What is Gamification?

Gamification is an abstraction pattern by which the mind is able to form universal properties of distinct objects. This encourages people to engage with and enjoy all type of system contexts by incorporating game elements and mechanics. Succinctness is key.
A successful gamification strategy involves identifying game design principles and rewards that align with project objectives and user preferences, managing time effectively, and updating the strategy over time based on user feedback and behavior.  This can also be used to reinforce positive behaviors and create new habits by breaking down complex tasks into smaller, more manageable steps and rewarding positive behaviors.

# Stages of a Game
Creation, Update, Behavior:
* Creating a World
* Updating the Goals
* Behaving the Player

## Elements of a Game
World
- DOM
- NPC

Goal
- Long
- Short

Player
- Control
- Stats

# Types of Games
- 1 = Toy
- 1 + 2 = Sandbox
- 1 + 2 + 3 = Mission

# Stages of a Game

### Create
The "create" aspect of gamification involves designing game-like elements that will engage and motivate users, such as points, goals, tasks, and rewards. It's important to establish a game diagram to define how these elements will be used.
The next step is to "observe" how users interact with the gamified system and update the game logic as needed.

Update
This involves monitoring user behavior and collecting and managing data on things like how often users engage with the elements, which actions are most popular, and what types of behaviors are being encouraged.
To make the most of gamification, specific, measurable, achievable, relevant, and time-bound (SMART) goals need to be created to track progress, stay motivated, and achieve success.

### Behave
Finally, the "behave" step involves using the insights gained from observing user behavior to refine and optimize the gamification elements.
The success of a gamification strategy ultimately depends on how users behave and feel when using the system, and making adjustments as necessary is key to maintaining its effectiveness.

# Conclusion
Gamification is a powerful tool for engaging users and motivating positive behaviors. Regular updates and adjustments are necessary to ensure its effectiveness. Remember, play is the highest form of research.
Swapping Databases: SQLite to PostgreSQL for Deployment
Tags: rails, postgres
Published: 2023-03-23 23:03:03

I am officially graduated from Flatiron School coding bootcamp! But the work is never finished ;)

One of my goals was to upgrade my projects by deploying them and a couple of weeks ago I created a documentation on how to deploy your Rails & React app with Render for free! You can check out that article [here](https://dev.to/timtran007/deploying-a-react-rails-app-on-render-4lo4). This will come in handy later.

I did some searching, but couldn't find exactly what I was looking for, so here is the compilation of deploying a Rails-React application that uses SQLite3.

We are going to dive into converting a SQLite3 database into PostgreSQL to deploy projects that you have created with SQLite3. 

### Step 1: Swapping out SQLite3 for PG

This first step is based on the assumption that you have postgres installed on your local machine.

First we need to locate our Gemfile, and make the update to the following: 

```
gem "sqlite", "~> 1.4"
```
to
```
gem "pg", "~> 1.1"
```

then we are going to run the following in the terminal of the directory:

```
bundle install
```

### Step 2: Update database.yml file

This file will allow us to point to our database within our different levels of environment.

```
default: &default
  adapter: postgresql
  encoding: unicode
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>

development:
  <<: *default
  database: meal_time_app_development

test:
  <<: *default
  database: meal_time_app_test

production:
  <<: *default
  url: <%= ENV['DATABASE_URL'] %>
```

(notice that database is name_of_your_app followed by the respective environment)

### Step 3: Deleting SQLite3

We are going to look in the db folder and delete the following files development.sqlite3 and test.sqlite3

### Step 4: Running Migration
We are now going to run the following in our directory:

```
rails db:create db:migrate db:reset
```

### Step 5: Follow the Guide to Deploying a React & Rails App.

You are all set! Now you can follow my previous [post] (https://dev.to/timtran007/deploying-a-react-rails-app-on-render-4lo4) on deploying a Rails-React app using Render!

##Conclusion
Now enjoy the luxury of deploying your projects on Render by converting your SQLite3 database to PostgreSQL.
[shorts] Saiba a diferença entre DELETE e TRUNCATE - Banco de Dados
Tags: database
Published: 2023-03-23 23:00:00

Esses dias bateu a curiosidade de saber a diferença entre os comando SQL TRUCANTE e DELETE. Apesar de pequena a primeiro momento, encontrei e entendi a explicação para utilizar um ou outro dependendo da situação.

Borá lá ( ͡👁️ ͜ʖ ͡👁️)

# Comparativo entre DELETE e TRUNCATE

| **Comparação** | **DELETE**                                                                                    | **TRUNCATE**                                                                  |
|----------------|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
| Tipo           | [DML (Data Manipulation Language)](https://pt.stackoverflow.com/a/262868/31086 )              | [DLL (Data Definition Language)](https://pt.stackoverflow.com/a/262868/31086) |
| `WHERE`        | Pode ser utilizado a clausula `WHERE` para especificar as tuplas ( ou linhas, registros, ...) | Não tem a opção de usar a clausula `WHERE` e irá apagar todas as tuplas       |
| locks          | Será dado lock para cada linha que for ser excluída (requer mais recursos)                    | Será dado lock somente na data page (requer menos recursos)                   |
| Velocidade     | É mais lenta devido fazer operações linha a linha e fazer muito uso de log                    | É mais rápido por registrar apenas o data page e fazer menos uso do log       |
| Reverter       | É possível dar `ROLLBACK` e desfazer a operação de exclusão                                   | Não é possível reverter a operação de exclusão                                |


> TRUNCATE é mais eficiente e performático para excluir tuplas sem especificar um filtro (cláusula WHERE)
> 
> DELETE é mais lento, porém consigo dar ROLLBACK e reverter a operação
> 
> 
> TRUNCATE vs DELETE


# Conclusão

A minha intenção foi mostrar o comparativo entre os comandos e dar uma maior compressão dos motivos de se utilizar um ou outro. Espero que eu tenha conseguido clarear essa diferença.
Weekly Challenge #4 - Start the Singularity
Tags: weeklychallenge, beginners, codenewbie
Published: 2023-03-23 22:34:55

---
title: Weekly Challenge #4 - Start the Singularity
series: Weekly Challenge
published: true
tags: weeklychallenge, beginner, codenewbie
# cover_image: https://direct_url_to_image.jpg
---
Hey everyone! For this week's programming challenge, we're getting our hands dirty with machine learning. 

I've been eager to try out @vincenius' fastai tutorial and playfully shirk my other responsibilities so I can learn how to teach a machine what a dinosaur is: {% embed https://dev.to/vincenius/coding-your-own-ai-in-2023-with-fastai-2pbk %}

I love these stepping stone style posts that give you enough to get started but not so much that you're overwhelmed. After hearing so much about artificial intelligence and machine learning, I've been excited to explore it myself.

Vincent's post is an approachable way to dive in without spending hours on fundamentals if you're unsure you'll enjoy it. After dedicating lots of time recently to web dev, I haven't had a lot of time to work with Python like I used to for projects I've built in the past. I'll be sharing what I get done by the end of the week, so if you're a hands-on learner like me, follow along and then use this foundation to make changes and expand on it. 

If you have more ML/AI experience, I'd love to see how you can improve or add to Vincent's work. You can also share any AI projects you've made to inspire others.

Good luck and happy coding!
Ordinare la numerazione di un documento o lista espressa a livelli: 1.0, 1.1.2, 2.0,5.2.7
Tags: javascript, array, sorting
Published: 2023-03-23 22:34:18

_Cosa ho imparato oggi?_ per **ordinare delle stringhe** che rappresentano la numerazione di un documento non possiamo ricorrere all'ordinamento alfanumerico.
Tipicamente un documento è ordinato usando un metodo per punti:
`2.1.3`

Quando vediamo questa numerazione traduciamo questi numeri cardinali in ordinali: di fatto leggiamo qualcosa come per esempio
_terzo paragrafo del primo sottotitolo del secondo capitolo_.
In più potremmo dover considerare che abbiamo casi del tipo
`2.2`
quindi mancanti della terza componente della numerazione in quanto questa si presuppone 0.

## Normalizzare le parti che compongono la numerazione

La soluzione che ho trovato cercando [risorse](https://stackoverflow.com/questions/40201533/sort-version-dotted-number-strings-in-javascript) in internet è quella di normalizzare prima di tutto il numero di parti in modo che ne abbiamo sempre lo stesso numero da valutare. 
Quindi passare da
```
1.3.5
2.1
5.3.5.6
10
```
a
```
1.3.5.0
5.3.5.6
2.1.0.0
10.0.0.0
```

## Rendere ininfluente la posizione del numero aumentando il valore che lo esprime

Per evitare che 10 risulti minore di 2, come è per l'ordinamento alfanumerico, il trucco è quello di aumentare le cifre che compongono la numerazione sommando un numero più alto della cifra che ci aspettiamo essere il massimo. Per esempio sommando sempre 100 ad ogni parte otteniamo:
```
101.103.105.100
105.103.105.106
102.101.100.100
110.100.100.100
```
Quello che abbiamo, nonostante siano espressi da numeri, lo andremo a valutare come stringa in quanto semplifica di molto la comparazione e inoltre permette anche di gestire numerazioni contenenti lettere. Per esempio potremmo avere
```
7.1.b
7.2
```
che diventa
```
107.101.10b.100
107.102.100.100
```

Il codice per implementare questo algoritmo l'ho scritto così
```typescript
// considerando che si possa arrivare ad una numerazione di centinaia
const templatePart = '1000';
// numerazione composta da 6 livelli di annidamento
const template = [templatePart, templatePart, templatePart, templatePart, templatePart, templatePart];
const convertForComparing = (parNumeration: string) => {
  // "somma" del numero template
  let parts = parNumeration.split('.').map(
    (p) => templatePart.substring(0, templatePart.length - p.length) + p);
  // normalizzazione del numero di parti
  parts = [...parts, ...template.slice(parts.length)];
  return parts.join('.');
};

const sortByParagraphNumeration = (a: Item, b: Item) => {
  const pa = convertForComparing(a.par.toLowerCase() || '');
  const pb = convertForComparing(b.par.toLowerCase() || '');

  if (pa < pb) {
    return -1;
  }
  if (pa > pb) {
    return 1;
  }
  return 0;
};
```

La spiegazione di sicuro è manchevole di formalismo e fin troppo empirica ma nel mio caso pare funzionare a dovere.
E voi come avreste risolto?
Data Engineering Zoomcamp
Published: 2023-03-23 22:21:18

#Week6 of the Data Engineering Zoomcamp featuring **Irem Ertürk**, **Ankush Khanna**, and **Alexey Grigorev** by #DataTalksClub.

Week 6 repo ➡️ https://lnkd.in/dznfw5bw
🛠 Tools
🧵 Apache Kafka
🧵 Docker
🧵 Confluent cloud

🏹Week 6 (Stream Processing) Summary:

🎯 Introduction to Stream Processing
🎯 Introduction to Kafka and Confluent Cloud
🎯 Kafka Configuration
🎯 Stream processing using PySpark and Apache Kafka.
🎯 Faust - Python Stream Processing
🎯 ksqlDB and KSQL
🎯 Kafka Streams
🎯 Kafka Connect
🎯 Schemas (avro)

What a way to end the week.
#dataengineer #dataengineering #dezoomcamp #datatalks #docker #confluent
Team Topologies: Organizing Business & Technology Teams
Tags: productivity, management, podcast, devops
Published: 2023-03-23 22:13:11

Effective software teams are essential for any organization to deliver value continuously and sustainably. But how do you build the best team organization for your specific goals, culture, and needs?

That's the question posed by authors Matthew Skelton and Manuel Pais in their highly-acclaimed book, Team Topologies: Organizing Business and Technology Teams for Fast Flow.

On this week's episode of Dev Interrupted, we revisit Dan's 2021 conversation with Matthew and Manuel. Since first airing, their book has received broad recognition for its step-by-step advice, approach to team patterns and interactions, and compelling analysis of the communication pathways that lead to organizational success. 

{% spotify spotify:episode:14hfIMjoP9V5MDLb0n5KPr %}

## Episode Highlights:
* (1:58) Manuel's start in the organization design space
* (5:02) Matthew's work in cybernetics
* (9:38) Intro to Team Topologies
* (17:28) Examples of team organization
* (26:18) Practical first steps for organizational transformation
* (33:14) Why high trust leads to fast flow
* (36:46) How to know if your team has reached its cognitive load
* (40:30) Understanding Conway's Law

***While you’re here, check out this video from our [YouTube channel](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1), and be sure to like and [subscribe](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1) when you do!*** 

{% youtube SAGqASUmwiM %}

### Want to cut code-review time by up to 40%? Add estimated review time to pull requests automatically!
*gitStream is the free dev tool from LinearB that eliminates the No. 1 bottleneck in your team’s workflow: pull requests and code reviews. After reviewing the work of 2,000 dev teams, LinearB’s engineers and data scientists found that pickup times and code review were lasting 4 to 5 days longer than they should be.* 

*The good news is that they found these delays could be eliminated largely by adding estimated review time to pull requests!*

### Learn more about how gitStream is making coding better [HERE](https://linearb.io/blog/why-estimated-review-time-improves-pull-requests-and-reduces-cycle-time/?utm_source=Substack%2FMedium%2FDev.to&utm_medium=referral&utm_campaign=gitStream%20-%20Referral%20-%20Distribution%20Footers).

![Start using gitstream today!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xg1l6hxt134px501bf7d.png)
GPT Commands launch
Published: 2023-03-23 22:12:05

# Introducing GPT Commands: A Powerful Chrome Extension for GPT-4

Hello Dev.to community! We are excited to announce the launch of **GPT Commands**, a Chrome extension designed to make your life easier using the power of GPT-4.

## What is GPT Commands?

GPT Commands is a Chrome extension developed by Emanuele Pavanello, leveraging the remarkable capabilities of GPT-4 to assist in various tasks. With a simple `/gpt` command, you can choose from an array of functions such as answering questions, fixing grammar, translating text, and much more.

## Key Features

* **Answer Mode**: Ask GPT-4 any question, and get concise, relevant answers.
* **Fix Grammar**: Polish your text by fixing grammar and syntax.
* **Translate**: Seamless translations for multiple languages, powered by GPT-4.
* **And More**: Additional features include sentence completion, summarization, and idea generation.

## Installation & Usage

1. Download and install GPT Commands from the Chrome Web Store.
2. Activate the extension and enter your API key.
3. To use GPT Commands, type `/gpt` followed by a command (e.g., answer, fix grammar, translate) and see the magic unfold!

Get ready to transform the way you interact with the web using GPT Commands. Try it today and enhance your productivity like never before!

https://gpt-commands.com/