teleren/devto huggingface dataset:
Appwrite Loves Open Source: Why I Chose To Sponsor Medito 🧘‍♀️
Tags: meditation, opensource
Published: 2023-03-16 15:04:24


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

Open-source is at the ❤️ of everything we do at Appwrite, and we want to enable and foster the open-source community that helped us grow to nearly 30k stars on GitHub.

As an open-source Backend-as-a-Service (BaaS), Appwrite understands the importance of giving back to the community that made us successful. 
That's why we have started a program where each Appwrite employee gets to pick an open-source project for Appwrite to sponsor for one year.

One of the open-source projects that we are proud to sponsor is the Medito app. The [Medito app](https://github.com/meditohq/medito-app) is built with flutter and offers a variety of guided meditations that can help you reduce stress, improve focus, and achieve mental clarity🧘‍♀️.
What makes this app unique is the ability to tailor guided meditations for your specific needs for free!

In recent years (we suspect Covid), there’s been a surge in the popularity of meditation, almost tripling the number of practitioners since 2012. With this massive rise came the strive for profit, and meditation apps based on monthly pay, sprouted.

Medito’s creators ask: “should something that could potentially help countless people with mental health problems be put behind a paywall? What about the people who can't afford to pay a monthly subscription?”
Research shows that mindfulness can help to reduce depression, stress, anxiety, and many other negative states of mind. Medito chose to gather voulentires to create this 100% free app to guarantee anyone will be able to get help, no matter the financial state they're in.

Like many other open-source projects, the Medito app requires a great deal of effort to maintain and grow...We get it! 
We want to help our community by supporting open-source projects so we can build a better future for everyone. 💪


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

By sponsoring open-source projects like this one, we hope to make a positive impact on the developer community and help create a better future for everyone.
Chat with us on Discord, or learn more about Appwrite by checking out 👉
[Appwrite Discord](https://appwrite.io/discord)
[Appwrite Github](https://github.com/appwrite)
Multiple Dispatch in Modern Languages
Tags: programming, oop, discuss
Published: 2023-03-16 14:55:48

Rock, paper, scissors is a hand game that two or more people can play. Each player chooses one of three shapes: rock, paper, or scissors. The rules are: rock beats scissors, scissors beats paper, and paper beats rock.

We need to implement this logic using object-oriented programming without using if statements.

In a fictional language this could look like this :

```
abstract class Shape;
abstract boolean beats (Shape a, Shape b);

class Rock : Shape;
class Scissors : Shape;
class Paper : Shape;

// "+{ }" means implementation of the abstract function
beats(Shape a, Shape b) +{ return false; }

beats (Rock a, Scissors b) +{ return true; }
beats (Scissors a, Paper b) +{ return true; }
beats (Paper a, Rock b) +{ return true; }
```

A call to the "beats" function for any two Shapes will return the result of the game.

The advantage of this approach is that you can easily extend the logic with new elements. For example :

```
class Lizard : Shape;
class Spock : Shape;

beats (Lizard a, Paper b) +{ return true; }
beats (Lizard a, Spock b) +{ return true; }
beats (Spock a, Rock b) +{ return true; }
beats (Spock a, Scissors b) +{ return true; }

```
We implemented similar logic in our DSL, but our approach does not fit into general-purpose languages. 

What is the most elegant way to implement the described problem in modern programming languages?
Como conectarse por SSH a un servidor Linux sin tener que escribir la clave cada vez
Tags: ssh, linux, terminal
Published: 2023-03-16 14:54:00

En este artículo voy a describir un método muy sencillo pero a la vez muy eficiente a la hora de ahorrarnos tiempo buscando, tecleando, copiando y pegando claves para conectarnos a nuestros servidores SSH. 

Si las respuestas a estas preguntas:

* ¿Cuantas veces te conectas a los mismos servidores por SSH? 
* ¿Cuantas veces tienes que escribir la clave?

Son de muchas para arriba, pues aquí tienes el truco.

Lo primero es asegurarnos que tenemos creada una clave ssh. Con lo que lanzamos este comando:

```
❯ ssh-keygen
```

Y una vez se haya generado nuestra clave, lanzamos este comando, poniendo la IP del servidor al que queremos conectarnos y el usuario con el que realizamos la conexión. Nos pedirá una vez la clave, y ¡listo! ya nunca más tendremos que ponerla:

```
❯ ssh-copy-id -i ~/.ssh/id_rsa root@192.168.1.200
```

Evidentemente, **root** tenéis que cambiarlo por vuestro usuario y **192.168.1.200** tenéis que cambiarlo por la IP del servidor al que os conectáis.

¡Un abrazo para todos y todas!
Which is better, Azure Security or OSCP?
Tags: azure, cloudskills
Published: 2023-03-16 14:39:55

Comparing Azure Security and OSCP is like comparing apples and oranges, as they are two different things. [Azure Security] (https://www.netcomlearning.com/az-500t00-microsoft-azure-security-technologies/course/50000/?advid=1356) is a cloud-based security solution that provides a wide range of security services and features to help protect Azure resources and data. On the other hand, OSCP (Offensive Security Certified Professional) is a highly respected and challenging certification in the field of penetration testing.

Both Azure Security and OSCP have their own unique benefits and can help professionals enhance their security skills and knowledge. Azure Security is relevant for professionals who are working with or interested in working with cloud-based security solutions and want to deepen their understanding of Azure security services. OSCP, on the other hand, is relevant for professionals who want to specialize in penetration testing and learn how to identify and exploit vulnerabilities in different systems and environments.

Ultimately, the choice between Azure Security and OSCP depends on an individual's career goals, interests, and current skillset. If you are interested in cloud security and working with Azure environments, Azure Security may be the right choice for you. If you are interested in penetration testing and security assessments, OSCP may be the right choice for you. It's important to carefully consider your career goals and interests before deciding which certification to pursue.
What i learned from a "simple" Table in Javasript
Tags: javascript, html, css, frontend
Published: 2023-03-16 14:33:47

## As a front-end developer, it's essential to have a good understanding of the language and its functionalities. In this blog post, I will be sharing my experience working on a "simple" table in Javascript and the lessons I learned along the way.


**Lesson 1: Plan Your Project Ahead and Organize It Properly**
When I first started working on the table project, I found myself working all over the place on multiple features simultaneously. I soon realized that this approach wasn't effective, and I needed to organize the project properly. I took some time to plan the project, drew a diagram of the data flow and structure, and broke down the project into manageable chunks. By doing this, I could see everything clearly and tackle each problem in order.

**Lesson 2: Appreciate the Boring Stuff**
As mundane as it may seem, working with a table made me appreciate arrays and users' data. Knowing that real people will find this useful is a delightful experience. It's essential to focus on the basics and build a strong foundation because a project is only as good as its structure.

**Lesson 3: Know When to Take a Step Back**
I found myself getting stuck on small details multiple times during the project, and it took me a long time to fix them. But I soon realized that sometimes, it's better to take a step back and look at the bigger picture. It's easy to get bogged down in the details, but stepping back can help you see things more clearly and make more progress in the long run.

**Lesson 4: Focus on Fundamentals**
A project's success depends on how strong its fundamentals are. I spent a lot of time refactoring the code to make each function bug-proof and as versatile as possible. I learned that it's better to take the time to build a solid foundation rather than rush through the project and end up with a fragile structure.

**Lesson 5: Working with Data Structures and APIs**
Working with arrays and data structures in general was an eye-opener for me. It's essential to have a smooth data flow to make the project compact and work smoothly. I also learned a lot about working with APIs, which was something that I found intimidating at first. But as I delved deeper into it, I found it to be one of the most enjoyable aspects of Javascript.

**Conclusion:**
In conclusion, working on a "simple" table in Javascript taught me some valuable lessons. I learned to plan my project ahead and organize it properly, appreciate the basics, know when to take a step back, focus on fundamentals, and work with data structures and APIs. As a new developer, it's crucial not to shy away from seemingly boring projects because they can provide the necessary foundation for future projects. With time and practice, these skills will become second nature, and you'll be on your way to becoming a proficient front-end developer.
tes
Tags: test, testing, testdev
Published: 2023-03-16 14:11:09


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

lorem ipsumu dolor situ amet
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yo0l0nto96wvd92vsnws.jpg)

```javascript
//# Dengan Promise
const cuciPanci = () => {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            console.log('log:cuci panci');
            resolve('cuci panci');
        }, 1000)
    });
}

const cuciPiring = () => {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            console.log(`log:piring dicuci`)
            resolve('piring dicuci')
        }, 1000)
    });
}

```


Hasil Belajar dari kelas "Belajar Membuat Aplikasi BE untuk Pemula"

- Untuk URL gunakan kata benda daripada kata kerja, serta jamak. Kemudian gunakan hirarki.
Misal, `/articles/:id/comments`

- Pisahkan dev dan prod dengan NODE_ENV=production node app.js

- Gunakan ESlint agar code lebih rapih

- Gunakan NVM agar lebih mudah dalam  memilih versi node js

- response dari API yaitu status, message (biasanya tidak digunakan pada method GET kecuali jika status fail), dan data (tergantung)
The Importance of Code Reviews in Software Development
Tags: codereview, development, software, programming
Published: 2023-03-16 14:05:58

Code reviews are a crucial part of software development. They involve the process of reviewing code written by other developers to ensure that it meets the required standards and is free from errors. There are several reasons why code reviews are important, including:

- **Finding and fixing errors:** Code reviews can help identify bugs and other errors before they become major problems. This can save time and effort down the line.
- **Improving code quality:** Code reviews can help improve the overall quality of the codebase by ensuring that coding standards are followed and that the code is maintainable and easy to understand.
- **Knowledge sharing:** Code reviews provide an opportunity for developers to learn from each other and share best practices. This can lead to a more collaborative and productive team.
- **Ensuring compliance:** Code reviews can ensure that the code meets regulatory and compliance requirements, such as security standards.

In conclusion, code reviews are a critical part of software development that can improve the quality of the codebase and promote collaboration and knowledge sharing within the development team.
Azure Virtual Machine
Tags: cloud, azure, beginners, tutorial
Published: 2023-03-16 14:05:25

Microsoft Azure is a cloud computing platform that provides a wide variety of services. 

**Create Azure Virtual Machine**

- Search for Virtual Machines

![Search Virtual Machines](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jglcm04t905bisq9gdo6.png)

- Clink on create and select Azure virtual machine

![Create](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eww99kc4ts4eb54eheyt.png)

- Select resource group, give virtual machine a name and select region, availability option, image etc. as your need. Then click review + create.

![Configure Virtual Machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zghzqk6klhb6t1na2n5f.png)

- Finally this page will show if everything is ok for the virtual machine and also the cost per hour for using that virtual machine. After that press create.

![Final Create](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/993m19lqb1hmxtmjbyga.png)

- Then like the below picture you have to download private key for SSH connection. So press download private key and create resource.

![Download Private Key](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kur9j8h3i3mb4bbplsx7.png)

- Finally your virtual machine will be created and you will get the dashboard. From here you can configure, stop or delete the virtual machine.


![Virtual Machine Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/duzysct2lr0iesas97bc.png)

- Then if you want to connect via SSH with client search for connect and something like the image below will appear. There you will find commands for connecting. You have to run those commands in the cloud shell.


![SSH connect](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tpn337n3645lmejz484b.png)

- After that to update your software or install anything (for demo let's install nginx) run below command.

```
sudo su
apt-get -y update
apt-get -y install nginx
```

- Also if you know that what you will install before creating virtual machine, then you can configure a cloud init while creating the VM which will automatically run all your commands. For configuring cloud init you have to go to advance tab and write the commands in the custom data and cloud init section like the image below.

![Cloud init](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oi4fxvzkwdgh5fsiwemi.png)

And that's how you create a VM. But you have to know two things --
1. While creating VM it automatically creates a disk which is the storage for the image or operating system.
2. People may think that, if we stop the VM then it will not cost anything. But the truth is, as it has a default disk connected with it, even if we don't have to pay for the VM, we have to pay for the disk. So simply stopping the VM will cost less but it's not going to be 0. 

Thank you everyone. That's it for today. Feel free to ask any question in the comment.
Um resumo sobre: pilha
Published: 2023-02-22 03:36:57

Pilha é uma estrutura de dados que representa um elemento sobre o outro. Imagine uma pilha de papéis ou uma pilha de moedas, repare que quando pensamos em uma pilha de alguma coisa, pensamos em um elemento sobre o outro. Caso deseje retirar um elemento do meio desta pilha você terá uma certa dificuldade, assim, precisará tirar todos os elementos de cima, de um a um, até que o objeto que você deseja retirar seja o último da pilha. Aí está a primeira característica desta estrutura de dados, o primeiro elemento a entrar, será o último a sair **<u>(LIFO - Last-in-First-out)</u>**. Perceba bem que nesse tipo de estrutura nós teremos acesso ao último elemento da pilha (ou elemento do topo). 
Para **<u>inserir</u>** um dado nesse tipo de estrutura nós iremos empilhar, ou seja, colocar um elemento no topo da pilha. Para excluir, nós iremos **<u>excluir</u>** o dado que estará no topo da pilha. Podemos também **<u>pesquisar</u>** somente o topo da pilha. Só é possível pesquisar, inserir e excluir o item do topo da pilha, isso não pode ocorrer no meio dela.

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

Para contextualizar com javascript, imagine um array que iremos **inserir** dados, assim, o método **push(elemento a ser inserido)** passa a ideia de inserção em uma pilha, ele sempre irá inserir no topo/final do vetor. Já o método **pop( )**, funcionará como a **exclusão** de elementos de uma pilha, pois ele irá tirar o último elemento do array. Por fim, se quisermos **pesquisar** o último elemento, nós temos algumas formas, dentre elas temos o **at(-1)**. 

Fiz um exemplo em que eu insiro em JS que insiro vários elementos e depois retiro o último e por fim eu imprimo o elemento do topo.


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

Por fim, segue um exemplo de um algoritmo que fiz em python que utiliza também a ideia de pilha: 


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


Caso tenha alguma sugestão sobre o tema, mande mensagem. Será muito bom evoluir com sua ajuda! Obrigado por chegar até aqui e espero ter ajudado!

[Big-O](https://dev.to/costamateus7/um-resumo-sobre-big-o-2hpk)
[Vetores não ordenados](https://dev.to/costamateus7/um-resumo-sobre-vetores-nao-ordenados-fod)
[Um resumo sobre: vetores ordenados e pesquisa linear e binária.](https://dev.to/costamateus7/um-resumo-sobre-vetores-ordenados-e-pesquisa-linear-e-binaria-49ch)
Optimizing Mob Pathfinding. Improving Game Performance for Smooth Gameplay
Tags: godot, gamedev, news, programming
Published: 2023-03-16 14:00:00

During this week of development, I focused on improving the performance of my game [Escape The Wave](https://github.com/EmilienLeroy/EscapeTheWave) when a lot of mobs are searching for the player. This was a challenging task, but I found some effective solutions. 

First, I updated the mob pathfinding by using a NavigationAgent instead of the get_simple_path function of a Navigation node. This new approach allowed my game to have many more mobs on a small map. Previously, in the demo map, I was limited to around 70 mobs, or else the game would become laggy. But with this new technique, I can have more than 500 mobs without any lag on a small map.


![little](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9rtqlvi090baurtd0e3n.gif)

However, this technique alone did not reduce lagging on a large map. To reduce lag on maps larger than a certain size, I had to make some compromises. Not all mobs can constantly search for the player on the map, as this significantly affects the game's performance. To address this, I used a VisibilityNotifier to detect if a mob is displayed on the screen or not. If a mob is displayed on the screen, it will try to reach the player's position. Once the mob is out of the screen, it will keep its current direction without searching for the player. When a mob spawns, it initially does not have any direction to go, which can cause mobs to stack on a single point, creating performance issues when the player is nearby. To prevent this issue, I simply define a random direction for the mob to go in until it crosses the player's path.


![big](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w3lt5tpnne9dp4d176xg.gif)

Using these techniques, my game no longer lags when many mobs are searching for the player. Only the displayed enemies try to attack the player, while the others go in a random direction. However, in the game, it appears as if all the mobs are trying to find and attack the player. Sometimes the game may experience slight FPS drops, but they are minimal and do not disrupt gameplay.

In conclusion, improving game performance can be a challenging task, especially when dealing with multiple mobs searching for the player. However, by using a NavigationAgent and a VisibilityNotifier, it is possible to significantly increase the number of mobs on a small map without causing lag. Additionally, by defining a random direction for mobs to go in when they spawn, it is possible to prevent stacking and performance issues when the player is nearby. These techniques have helped to make the game smoother and more enjoyable for players.
Paracetamol.js💊| #206: Explica este código JavaScript
Tags: javascript, web, spanish, programming
Published: 2023-03-16 14:00:00

## **<center>Explica este código JavaScript</center>**
#### <center>**Dificultad:** <mark>Intermedio</mark></center>

```js
const getPromise = () => Promise.all([]);

getPromise()
  .then(x => console.log(x))
```

- A. `Promise {<pending>}`  
- B. `Promise {<rejected>}` 
- C. `[]` 
- D. `Promise {<fulfilled>}` 

Respuesta en el primer comentario.

---
ApacheAGE vs Apache Spark and Apache Flink: Which Big Data Engine is Your Perfect Ride?
Tags: apacheage, datascience, database, postgres
Published: 2023-03-16 13:49:47

> "Big data technologies can be a bit overwhelming, especially if you're new to the game. But fear not, my fellow data enthusiasts!"
 
In this article, we'll take a look at ApacheAGE and how it compares to other popular big data technologies like Apache Spark and Apache Flink.

**Apache Spark - The old, reliable station wagon**

> "Spark is like the old, reliable station wagon of the big data world. It gets the job done, but it's not very flashy."
 
Spark can handle batch processing and streaming data, and it has a lot of pre-built libraries for machine learning and graph processing. But it can be a bit slow when dealing with really large datasets.

**Apache Flink - The fancy sports car**

> "Flink is like the fancy sports car of the big data world. It's fast, it's efficient, and it's got all the bells and whistles." 

Flink can handle both batch and stream processing, and it's designed to be highly scalable. It's great for real-time data processing and has some really cool features like complex event processing. But it can be a bit complex to set up and use.

**[ApacheAGE](http://age.apache.org) - The hybrid car**

> "And finally, we have ApacheAGE. AGE is like the hybrid car of the big data world. It's got the best of both worlds." 

AGE can handle both batch and stream processing, and it's highly scalable. But what sets AGE apart is its ability to work seamlessly with graph data. AGE has built-in support for graph processing and can handle both property graphs and RDF graphs. Plus, it's easy to set up and use, which is always a bonus.

**Which one is the best?**

> "So which one is the best? Well, that depends on what you need." 

If you're dealing with large datasets and need to process them quickly, Flink might be your best bet. If you're dealing with a lot of machine learning tasks, Spark might be the way to go. But if you're working with graph data, [AGE](http://github.com/apache/age) is definitely worth a look.

**Conclusion**

> "In conclusion, big data technologies can be confusing, but they don't have to be." 

ApacheAGE is a great option for those who need to handle both batch and stream processing and work with graph data. And with its ease of use, it might just be the perfect fit for your big data needs. So go forth and conquer the world of big data with confidence, my friends!
Integrating Audio/Video calls into your application — Twilio, Agora, Zoom, LiveKit
Tags: android
Published: 2023-03-16 13:48:32

Pricing is the most critical requirement in this industry since the price calculation could be very surprising for newbies.

https://www.inconceptlabs.com/blog/integrating-audio-video-calls-into-your-application-twilio-agora-zoom-livekit
How to force update a mobile app when a new version is available?
Tags: ios
Published: 2023-03-16 13:45:35

If your app is using server-side APIs to get data, then inevitably there will be API changes during the active development period. While it is a good practice to have backward compatibility, you can’t endlessly support the old versions, and one day you would love to upgrade all order users and get rid of that deprecated API.

https://www.inconceptlabs.com/blog/force-update-mobile-app-when-new-version-available