teleren/devto huggingface dataset:
Avoid "delete" keyword in JavaScript to remove property
Published: 2023-01-11 17:53:09

The delete keyword is used to remove a property from an object in JavaScript. When a property is deleted, it cannot be accessed. The syntax for using the delete keyword to remove a property is as follows:

```
delete objectName.propertyName;
```

For example:

```
const myObject = { a: 1, b: 2 };

// Removing the 'a' property from the object
delete myObject.a;
console.log(myObject);  // Output: { b: 2 }
```

Using delete on variable will remove variable from memory as well, so be careful and make sure that variable is not being referenced anywhere else before deletion.

## Deleting property in JavaScript using destructuring
Using destructuring, you can easily create a new object without the property you want to remove. Destructuring allows you to extract properties from an object and assign them to variables. When you destructure an object, you can specify which properties you want to extract and which properties you want to ignore.

Here's an example of how you can use destructuring to create a new object without a specific property:

```
const myObject = { a: 1, b: 2, c: 3 };

// Using destructuring to create a new object without the 'b' property
const { b, ...updatedObject } = myObject;
```
In this example, the properties of myObject that are not b is assigned to updatedObject variable. This b variable will contain the value of b property from myObject. This will not mutate the original object `myObject`.

You can also use destructuring in a function argument

```
function myFunction({ a, c }) {
    // The 'b' property is not destructured and is therefore not accessible within this function
    console.log(a,c)
}

myFunction(myObject);
```
In this way you can filter out the specific properties that you don't want and also you can use destructuring in function argument to only extract the specific properties you want.

Happy Coding!
Pointer events in JS
Tags: webdev, javascript, react
Published: 2023-01-11 17:44:41

While practicing JS or mostly while making projects with JS we all have used "mouse" events, like onmousedown, onmouseover, ...onmouse etc

These mouse events are for desktop only apps but for mobile & tablets we use touch events like touchmove, touchcancel, touchover etc.

We can use both at a same time but that makes code bulkier and it's hard to use both at same time.

To resolve this we can use the pointer events of JS which has
*unique PointerId
*height,
*width,
*tiltX,
*tiltY,
*twist etc like properties..

Events are:
pointerdown, pointerup, pointercancel, pointerover etc

In the image I have attached, it's clear that
the pointer type is "touch", which was detected by the event itself
and above that there is unique pointerId present

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r85fh32g0bn6jgng2hb2.jpeg)
String widget that represents interger?
Tags: flutter
Published: 2023-01-11 17:35:52

I'm building an app based on the Wordpress API. I want to use the API to return all of the post categories and load build a list of Buttons/Choice Chips from them. I'd use the Buttons/Chips to update an API Call on the page that gets the posts from that Category.

Since categories can get added over time, I'd like to be able to have them load dynamically, as to not have to actually update the app every time a new category is added. 

Each category has a name (string) and an ID (interger). The problem is that by default Buttons/Choice Chips can only represent one or those other. Obviously the users don't care what ID of the Category is, only the human-readable name. 

So, I need the value that the users sees to be name, but when the Button/Chip is clicked/tapped, the API call on the page is updated with ID. 

The best solution I've come up with so far is to make two completely overlapping chips in a stack. One of the buttons will have the ID, the other will have the Name. The one with the ID will be be invisible. 

Are there any other easy-to-maintain ways to do this?
5 ótimos livros NÃO modinha que vai ALÉM de linguagem e que você DEVERIA ler em 2023
Tags: programming, books, leadership, devjournal
Published: 2023-01-11 17:20:53


![O projeto Fênix](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sdscps32ao6e8njunom1.png)
1. O projeto Fênix – Edição comemorativa: um romance sobre TI, DevOps e sobre ajudar o seu negócio a vencer.


![Accelerate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iiyf9mlu40nukusawhbi.png)
2. Accelerate: The Science of Lean Software and DevOps: Building and Scaling High Performing Technology Organizations.


![Engenharia de Software Moderna](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ms7zreu47lede5lsa54b.png)
3. Engenharia de Software Moderna: Princípios e Práticas para Desenvolvimento de Software com Produtividade.


![The Programmer's Brain](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5qjmb7tp4odxm8nie3h6.png)
4. The Programmer's Brain: What Every Programmer Needs to Know about Cognition.


![A Philosophy of Software Design](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sx5qw9vk6adlyat5kwxl.png)
5. A Philosophy of Software Design.


![e-Programar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xw7rig27pie47vuugs9n.png)
E ai, já leu algum desses livros ?
Qual livro você indicaria pra entrar nessa lista ?

diz ai nos comentários.
Code Your Way Out
Published: 2023-01-11 17:15:46

---
title: Code Your Way Out
published: true
description: 
tags: 
canonical_url:
# Use a ratio of 100:42 for best results.
# published_at: 2023-01-11 17:10 +0000
---
We are taught that code reuse is good.

Depending on big famous library X is better than reimplementing the features from scratch.

As it turns out, sometimes it is true, some other it's not, and you are better off reimplementing your own solution, provided you have a good understanding of the problem you are going to address.

This is true for common features as it is for Security.
It's true for the 1-user app as it is for scalable systems for 1 billion users.

Reuse, dependency on features we don't fully understand are bad, and usually come back and bite us badly:

https://kevwe.se/weekly/202302
Day 8: Making Cool Raspberry Pi Projects even Cooler with Voice AI (3/4)
Tags: challenge, 100daysofcode, beginners, raspberrypi
Published: 2023-01-11 17:00:00

Today is the day for on-device audio transcription for Raspberry Pi

**SDKs**
[.NET](https://picovoice.ai/docs/quick-start/leopard-c/)
[C](https://picovoice.ai/docs/quick-start/leopard-dotnet/)
[Go language](https://picovoice.ai/docs/quick-start/leopard-go/)
[Java](https://picovoice.ai/docs/quick-start/leopard-java/)
[Node.js](https://picovoice.ai/docs/quick-start/leopard-nodejs/)
[Python](https://picovoice.ai/docs/quick-start/leopard-python/)
[Rust](https://picovoice.ai/docs/quick-start/leopard-rust/)

Let's use C!
**Compatibility**
C99-compatible compiler
**Requirements**
CMake version 3.13 or higher
Picovoice [AccessKey](https://console.picovoice.ai)
**Build**
Run this from the root of the repository:
```
cmake -S demo/c/ -B demo/c/build
cmake --build demo/c/build
```
Prints the usage:
```
usage: -a ACCESS_KEY -l LIBRARY_PATH -m MODEL_PATH [-d] [-v] audio_path0 audio_path1 
```

Replace ${ACCESS_KEY} with yours and ${AUDIO_PATH} with the path to an audio file you want to transcribe.

- Use the -d flag to disable automatic punctuation
- Use the -v flag to enable the printing of word metadata

This tutorial is intended for Raspberry Pi 4. If you're looking for Raspberry Pi 3 or Raspberry Pi 400 or Raspberry Pi 4 (64-bit) check out [Leopard C Demos on GitHub](https://github.com/Picovoice/leopard/tree/master/demo/c)
```
./demo/c/build/leopard_demo \
-a ${ACCESS_KEY} \
-m lib/common/leopard_params.pv \
-l lib/raspberry-pi/cortex-a72/libpv_leopard.so \
${AUDIO_PATH}
```
Diferencia entre Hashing y Salting
Published: 2023-01-11 16:58:25

Cuando vamos aprendiendo sobre las buenas prácticas al momento de guardar información sensible en nuestras bases de datos, viene la interrogante del cómo puedo almacenar mis contraseñas de forma segura.

Para ello en seguridad informática y en muchas de sus áreas (Desarrollo web, Big Data, machine learning, etc..) se habla de #hashing y #salting.

## Hashing
Es considerado hasta una violación a las leyes de seguridad informática en muchos países, el guardar las contraseñas de los usuarios en texto plano (tal y como el usuario las digite). Para evitar esta mala práctica en la mayoría de casos nos auxiliamos de un algoritmo criptográfico el cual convierte la contraseña ingresada en una combinación de letras, números y caracteres especiales que al final no serán entendibles por el ojo humano.

Ejemplo

Usuario: admin
Contraseña: admin1234 (por cierto mala práctica el colocar en tu contraseña tu nombre usuario)

Después de realizar el hashing quedaría algo así $2a$12$LtZ9b2NeQga0BAdi8ntTn.9fcAfAP0y1sbYEPN/Naikw5424gtYAG
Salting

## Salting

En ocasiones es necesario agregar otra capa de seguridad como una llave privada (como cuando hablamos de SSH) en este aspecto entra en escenario el salting. El cual consiste en que antes de que se genere el hash de nuestra contraseña agregar un conjunto de letras, números y símbolos (entre mas largo mejor) para así en caso de que alguien malintencionado obtenga acceso a nuestras bases de datos a pesar de tener el hashing, sin el salting correcto no podrá hacer match.

Puedes encontrar mas información del tema en el siguiente [link](https://www.authgear.com/post/password-hashing-salting)
Maximizing Your Cloud Computing Experience with AWS
Tags: aws, beginners, career
Published: 2023-01-11 16:57:00







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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3gxyxbkj3s9u0y71ixbz.jpg)
AWS ([Amazon Web Services](https://aws.amazon.com/)) is one of the most widely adopted cloud computing platforms available today. With a wide range of services and tools, it can be difficult to know where to begin. But with a little guidance, you can unlock the full potential of this powerful platform.

One of the most valuable aspects of AWS is its scalability. Whether you're just starting out or need to expand your existing infrastructure, you can easily add or remove resources as needed. This allows you to only pay for what you need, when you need it, making it a cost-effective solution.

AWS also offers a wide range of services, including compute, storage, and database services. Some of the most popular include Amazon Elastic Compute Cloud (EC2), Amazon Simple Storage Service (S3), and Amazon Relational Database Service (RDS). These services can be combined to build highly-available and scalable applications, with minimal maintenance overhead.

AWS also provides a comprehensive set of security features, including identity and access management, encryption, and network security. These features allow you to protect your data and applications, and comply with industry regulations.

AWS also provides a variety of tools for monitoring and logging your resources, including CloudWatch, CloudTrail, and Config. These tools allow you to gain insights into your resources, troubleshoot issues, and improve performance.


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

Overall, AWS is a powerful platform that can help you to achieve your goals in the cloud. Whether you are building a new application, migrating an existing one, or simply looking for a cost-effective way to store and manage your data, AWS has the tools and services you need to succeed."

[](url)
Monitoring infra cost: which tool do you use?
Tags: devops, cloud
Published: 2023-01-11 16:55:47

Hey everyone,

To monitor the costs of your infrastructure, what tools do you use? Those provided by cloud providers (e.g. aws cost explorer), third-party services or a solution created by yourself?

FYI, I ask this question because we are building an open-source version for cloud monitoring and we are trying to understand what people are using today
An Introduction to Solidity
Tags: solidity, ethereum, web3, blockchain
Published: 2023-01-11 16:27:33

## What is Solidity?

In order to create applications on Ethereum and the EVM chain, i.e. smart contracts on the Ethereum blockchain, Solidity is one of the programming languages utilized. One of the most popular decentralized smart contract platforms in crypto is this one. Decentralized exchanges (DEXs), digital art markets (NFTs), financial Decentralized Main (DeFi), Metaverse, etc. may all be created on Ethereum.

Ethereum application developers use the Solidity programming language, which is aimed for high-level programmers. The Solidity programming language makes it easier for developers (developer) to build programs since it uses a mix of letters and numbers.

The language was created by Ethereum contributors under the leadership of Christian Reitwiessner, Vitalik Buterin, Alex Beregszaszi, and others after it was first suggested by Gavin Wood in 2014.


## How Solidity Works on Ethereum

Smart contracts on Ethereum are created using the Solidity programming language, which enables a wide range of possibilities, including the following:

- Fungible, Non-Fungible tokens should be minted (NFT).
- Compound, Aave, and other fungible tokens may be lent out in decentralized lending markets
- Token exchange marketplaces like Opensea, SuperRare, etc. have been established.

The EVM is a critical part of executing Solidity Code once developers have written it in Solidity. EVM is a blockchain-based "virtual computer" that aids in the conversion of developers' Solidity code into Ethereum-based apps.

Solidity enables developers to create "machine level" code that may be run on the EVM at a higher level. Compilers are then used to break down the code that developers write into instructions for processors to execute.
Luos quests for sharper edge controls in just one line of code
Tags: programming, startup, cps, luos
Published: 2023-01-11 16:30:00

Big thanks to [Adrian Bridgwater](https://www.techrepublic.com/meet-the-team/us/adrian-bridgwater/) for featuring Luos on **Tech Republic!** 

In the article he talks about how the integration with Freedom Robotics & Luos brings a new level of simplicity and power to any cyber-physical system by enabling remote monitoring and control of edge devices with just one line of code! 

💬”This is particularly helpful when, for example, you’re wanting to see the status of a specific sensor in real time, remotely, from anywhere.”

▶️ Read the full article [here](https://www.techrepublic.com/article/luos-sharper-edge-controls/)
Upgrading to PostgreSQL 15 on Mac OS
Tags: postgres, upgrades, devops
Published: 2023-01-11 16:24:27

---
title: Upgrading to PostgreSQL 15 on Mac OS
published: true
description: Using pg_upgrade, Postgres.app, issues, and fixes while upgrading from 14 to 15
tags: [postgresql, upgrades, devops]
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

This post has moved!

https://andyatkinson.com/blog/2022/12/12/upgrading-postgresql-15-mac-os
Ramen has file Downloads now! (New Backend Framework)
Tags: webdev, javascript, programming, typescript
Published: 2023-01-11 11:51:48

So I have been busy with all the examination and stuffs which is going on right now. But apart from that I have added typescript to ramen now. It's in the main branch! And now you are also able to send files as a response. I'm still working on the fact that You can not yet upload files in ramen. But I don't think it should take that long, I will look into some different open source file uploads / downloads packages available in npmjs.com like `multer` or something like that. And from That I'd probably figure out how to do something like this

This is the current status about Ramen. I would love to get more suggestions on what I should do next in the future updates and what I should fix. All the bug reports and issues are appreciated in the [git repository](https://github.io/ohayouarmaan/ramen)

This is what I'm thinking of doing with the current version of Ramen in future:

* add inbuilt request caching mechanism
* I don't really know what else can I add to make this better lol 

anyways here's a cat till then :) see ya in the next blog which I write on ramen :D
![cutu cat](https://media.giphy.com/media/MWSRkVoNaC30A/giphy.gif)
Cap III: Todo es cuestión de principios, El libro negro del programador. 💻
Tags: programming, spanish, books, productivity
Published: 2023-01-11 16:22:57

* La diferencia entre un proyecto profesional y uno de novatos está en un uso correcto de patrones de diseño y arquitectura del software. 

* Al igual que un escritor de literatura que plasma una idea, reflexión o moraleja en sus obra, un programador podría considerarse «autor» de código.

* El buen código expresa más que un resultado, una idea, una solución sencilla a un problema complicado.

* El resolver un problema complejo de manera sencilla tiene más genialidad que resolverlo intrincadamente con algo difícil de entender.

* La presencia excesiva de comentarios en un código denota falta de sencillez en la solución propuesta, un buen código debe ser auto comprensible.

* El código que escribimos hoy, será leído por otros desarrolladores o inclusive por nosotros mismos en el futuro, es muy importante que este sea sencillo de comprender.

* Un buen punto de partida es aprender principios S.O.L.I.D., para ello podemos buscar y hacer pequeños ejemplos y leer mucho código de gente más experimentada que nosotros.

* Es más importante desarrollar código limpio que dominar un lenguaje de programación al 100%.

* Debemos presionarnos a nosotros mismos y tratar de escribir código con mayor abstracción, al principio costará, pero luego será natural.

* Pan para hoy, hambre para mañana: Entregar un proyecto con malas prácticas pero que funcione puede ser útil para el momento, pero las fallas saldrán a flote en el futuro e involucró costes elevados, estrés, horas extras, etc.

* Una mala práctica que es sencilla de evitar es no usar _hard-coded_.

* Invertimos mucho tiempo en estar actualizados con las últimas tecnologías que olvidamos temas de arquitectura y patrones de diseño a segundo plano. 

* El buen desarrollador debe ser capaz de generar soluciones elegantes siempre a partir de la aplicación de principios y patrones bien identificados además de buenas prácticas de arquitectura. 

* La genialidad consiste en saber encontrar una solución sencilla y abordable a algo realmente complejo.

---

Te dejo el link gratuito de [*El libro negro de programador*](https://underpost.net/ir/pdf/cy3/el-libro-negro-del-programador.pdf) por si te intesa leerlo, o dale click a la imagen:



[![libro](https://www.digitalskillsinstitute.com/assets/media/books/5541eba31b4b42b5bb021dc77c70d658-480.jpg)](https://underpost.net/ir/pdf/cy3/el-libro-negro-del-programador.pdf)
make your JavaScript code more efficient, readable, and maintainable.(Part 1)
Tags: javascript, productivity, beginners, tip
Published: 2023-01-11 16:20:48

Here are a few JavaScript tips and tricks with examples and reasons.


##Use `let` and `const` for variable declarations:

Instead of using `var` for variable declarations, use `let` and `const` to ensure that your variables are block-scoped and that they cannot be reassigned. This can help prevent accidental bugs in your code.

```javascript
let x = 5;
const y = 10;
```
**Reason:** variables declared with `let` can be reassigned, while variables declared with `const` cannot. This feature can be useful in scenarios where you want to prevent variables from being reassigned accidentally.


##Use arrow functions when possible:

`Arrow functions` make your code more concise and easier to read. They are particularly useful when defining small callback functions or when working with higher-order functions.

```javascript
// Using a traditional function
setTimeout(function() {
    console.log('Hello');
}, 1000);

// Using an arrow function
setTimeout(() => console.log('Hello'), 1000);
```
**Reason:** Arrow functions are more concise than traditional functions and can make your code more readable, especially when working with callbacks and higher-order functions.

##Make use of template literals:

Instead of concatenating strings, use `template literals` to make your code more readable and easier to maintain.

```javascript
// Using string concatenation
let x = 5;
let y = 10;
console.log('The sum of ' + x + ' and ' + y + ' is ' + (x + y));

// Using template literals
console.log(`The sum of ${x} and ${y} is ${x + y}`);
```
**Reason:** `Template literals` make it easier to create strings that include expressions and make it more readable.
 
##Utilize Array.prototype methods:
Instead of using for loops to iterate over arrays, use `Array.prototype` methods such as `.map()`, `.filter()`, and `.reduce()` to make your code more efficient and readable.

```javascript
// Using a for loop
let numbers = [1, 2, 3, 4, 5];
let doubleNumbers = [];
for (let i = 0; i < numbers.length; i++) {
    doubleNumbers.push(numbers[i] * 2);
}

// Using .map()
let doubleNumbers = numbers.map(x => x * 2);
```
**Reason:** `Array.prototype` methods are more readable and efficient than for loops and also are chainable, which makes it more convenient for complex operations.
We're developing a web3 social network protocol open source!
Tags: desmos, desmosnetwork, socialnetwork, blockchain
Published: 2023-01-11 16:11:23

Hello everyone! We are called [Desmos Network](https://www.desmos.network/), we are a team of people gathered from different continents, and we have been developing a completely open source protocol to develop decentralized social networks since 2019. 

The Desmos project identifies the following components:

[Desmos Network](https://bigdipper.live/desmos): the layer 1 blockchain built using Cosmos SDK;

[Desmos Core](https://github.com/desmos-labs/desmos/tree/master/x): the set of modular modules that enable the development of platforms with social functionality on Desmos Network;

[Desmos SDK](https://docs.desmos.network/developers/tools-to-build/): the set of tools provided to developers to simplify development as much as possible.

Given the completion of the main features of the protocol during the second quarter of 2022, we are looking for both people who want to actively contribute to our project and teams who will use it to build their own decentralized platform.
The coolest part of this project, is that the modular structure allows simply any developer with front-end knowledge to develop their own decentralized social network without knowing blockchain-related languages or having any special notions. 

If anyone is interested in the project, I leave the link to join our [Discord](https://discord.gg/Yt5D6zAW) server!

Thanks everyone!
We're on vue.land
Tags: meta, vue, fediverse
Published: 2023-01-11 16:03:34

The best of Vue content on DEV Community is now available via Toot 🦣

We've syndicated our [@The_Vue_Dev Twitter feed](https://twitter.com/The_Vue_Dev) with [@devcommunity@vue.land](https://vue.land/@devcommunity) using [moa.party](moa.party).

{% embed https://vue.land/@devcommunity %}

Follow us there from anywhere in the Fediverse. Happy Vue-ing!