teleren/devto huggingface dataset:
Por suerte no termine mi maestría
Tags: writing, spanish
Published: 2024-02-23 20:10:14

Hace unos días me di a la tarea de recuperar mi titulo profesional en la universidad que estudie ingeniería, y el motivo de irlo a traer es porque no culmine mi maestría, me tomo por sorpresa la pandemia y no logre superar ese momento. Sinceramente creo que estudiarla en el mismo lugar en donde hice mi licenciatura no era el lugar correcto, porque no me estaba exigiendo, sino simplemente la estaba haciendo tener una falsa sensación de logro y de estar avanzando falsamente.´

Viendo mas en retrospectiva mi universidad en el momento que me toco estudiar ahí, habían bastantes personas que te impulsaban a que dieras lo mejor de ti (la gran mayoría doctores y maestros), que hora lamentablemente ya no están, y eso claro por no saber el concepto de retención de talento. Algunas de las cosas que me di cuenta ese día en mi visita fue que realmente.

Parte de este texto es desahogar un poco de los sentimientos encontrados ese día y sí me di cuenta de que yo no quería llevar con orgullo un titulo de maestría de una universidad en donde sus procesos son lentos, no es moderna y no esta alineada a lo que yo represento, no me había sorprendido con lo que aprendí y claramente no llenaban mi sed de curiosidad. 

Es por ello que decidí buscar al otro lado del mundo en el continente Europeo, nunca había estudiado 100% en línea y di el salto en una institución que me llamo la atención y no me equivoque, no íbamos con rodeos y empecé desde el día uno en materia (Inteligencia Artificial y Machine Learning), me gusto mucho y ya que estoy a punto de terminar me doy cuenta que eres lo que estudias y en donde te relacionas, yo creo que he acortado años de mi vida literalmente por esa escuela y estoy muy contento de poder finalizar esa formación, mi proyecto final reto mis habilidades tanto de programador como de los nuevos conocimientos que he adquirido a lo largo de este proceso, me gusto y el equipo es increíble. 

En este punto de mi vida considero que una maestría es para las personas que con curiosas y nunca dejan de aprender, las maestrías te hacen dar cuenta el mundo que todavía te falta por descubrir y maravillarte por esos pasos que están dando que forman parte de tu crecimiento profesional. Saberlo todo no es la meta, sino disfrutar del camino que te hace llegar a las metas que esperas.
Lessons from opensource: What does process.exit do in Nodejs?
Tags: nextjs, opensource, webdev, javascript
Published: 2024-02-23 20:04:57

As I was reading through the open source code at next.js’s create-next-app, I saw process.exit being used a lot of times. This made me read further about it and the following are my findings:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pro8mtqog3b5mjxvpfsv.png)
https://github.com/vercel/next.js/blob/canary/packages/create-next-app/create-app.ts#L79

## What is process.exit()?

> The process.exit() method instructs Node.js to terminate the process synchronously with an exit status of code. If code is omitted, exit uses either the 'success' code 0 or the value of process.exitCode if it has been set. Node.js will not terminate until all the 'exit' event listeners are called. — [Source](https://nodejs.org/api/process.html#processexitcode)

Fun fact is that exit’s success code is 0 and failure code is 1, quite contradictory to what we conventionally use 1 aka true for success and 0 aka false for error.

```
// source: https://nodejs.org/api/process.html#processexitcode
import { exit } from 'node:process';

// This is an example of what *not* to do:
if (someConditionNotMet()) {
  printUsageToStdout();
  exit(1);
}
```

The above code is not recommended because you could have some asynchronous operations in the function `printUsageToStdout`, these operations can vary from parsing a document, logging the operations info to writing to database. 

Because, `exit(1)` forces the process to exit before your function could finish those additional operations, this could mean if you were to call exit(1) in your catch block and you log some info to a file, this might be incomplete as your program ends.

## Use exitCode instead:

```
// source: https://nodejs.org/api/process.html#processexitcode
import process from 'node:process';

// How to properly set the exit code while letting
// the process exit gracefully.
if (someConditionNotMet()) {
  printUsageToStdout();
  process.exitCode = 1;
}
```

When you use exitCode, you allow the process to exit naturally without any force shut.

> If it is necessary to terminate the Node.js process due to an error condition, throwing an uncaught error and allowing the process to terminate accordingly is safer than calling process.exit(). — [Source](https://nodejs.org/api/process.html#processexitcode)

## Conclusion:

I used to write articles with the title Nextjs Codebase analysis, but after a couple of weeks, I realised it is more appealing and helpful to the developer community when I specifically write about the code used in open source that looks interesting. 

I did not know there is exitCode until I read the docs further. You can gain a lot of knowledge by reading open source code and see how the elitists are doing it. 

If you are looking to improve/learn frontend, checkout my website: https://tthroo.com/ where I write project based tutorials.
Things that have been happening to me too often lately
Tags: security, webdev, rant
Published: 2024-02-23 20:00:39

* I am denied read-only access to some websites because I use a VPN. This makes no sense at all, but it happens anyway.
* I am not allowed to register in some forums because I use a VPN. Because everyone knows that anyone who uses a VPN is a serious criminal. There is no other option.
* I am subsequently banned from forums because the moderators realise that my IP address is not unique because I use a VPN. My posts don't matter at all, IP addresses obviously unambiguously identify every person on this planet.
* I'm supposed to confirm that I'm not a robot because I use a VPN. The fact that the company asking for these confirmations (usually Google) is itself sending robots marauding through the internet doesn't matter, because Google is Google and I'm just a bloke with a VPN.

Guys, a VPN is self-defence. A website banning VPNs is like a brothel banning condoms. I mean, of course the house rules apply, but I'd like to see a bit more judgement. What's happening right now is ridiculous and hardly does justice to the security aspect of these "tests". If you find yourself as a contributor to this list, I urge you to stop. I am not a bad guy. All I do is use a VPN.

Thank you.
AES Decryption in NodeJs
Tags: javascript, node, aes, encryption
Published: 2024-02-23 19:43:23

I am working on a project where I need to implement a program that generates a 32-byte AES key (symmetric key), sends that key to a server, and then uses the same key to decrypt data received from the server. However, I am facing challenges in implementing this process effectively.

I am using the crypto module in NodeJs.

To generate the AES Key I used the following code: 
`

```
const key = crypto.randomBytes(32); 
// Output: aesEncryptionKeyaesEncryptionKey (example)
```
`

Then I encoded that key and sent it to the server where they used that key to encrypt data

Upon receiving this encrypted data I need to use the key that I generated in step 1 to decrypt the data.

```
let key = 'aesEncryptionKeyaesEncryptionKey';
let encrypted_text = 'wHCS+Op6ZDc2fy2xwezssW/ThsVq7r2bozo7zze5w5r8d5vtTjlwmZXZWb/d2H7z';

const decipher = crypto.createDecipheriv('aes-256-ecb', Buffer.from(key, 'utf8'), Buffer.alloc(0));
let decryptedKey = decipher.update(encrypted_text, 'base64', 'utf8');
decipher.setAutoPadding(true);
let decryptedKeybuffer = Buffer.concat([decryptedKey, decipher.final()]);
```
But I am getting the following error

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k5o7zojup31ohhu8x8dc.png)
js error
Bass Music MCs Free Download
Published: 2024-02-23 19:38:42

**["Bass Music MCs"](https://audioloops.com/product/bass-music-mcs/)** unleashes a sonic revolution, a meeting of the rhythmic beats of bass music and the dynamic artistry of masterful MCs. This powerhouse collection isn't just an album; it's a collaborative showcase that celebrates the synergy between bass-heavy soundscapes and the lyrical prowess of skilled MCs. From the thumping beats that reverberate through your core to the razor-sharp verses that cut through the sonic landscape, "Bass Music MCs" is a testament to the marriage of two dynamic worlds within the realm of electronic music. The tracks are more than a fusion; they're a collaborative dance where the beats and lyrics engage in a rhythmic dialogue, creating an immersive experience for listeners. The basslines within this collection aren't just a foundation; they're a heartbeat that pulses with energy, driving the momentum of each track. These beats provide the canvas upon which the MCs paint their lyrical tapestries, giving voice to the raw energy, social commentary, and storytelling prowess that define their craft. The MCs featured in "**[Bass Music MCs](https://audioloops.com/product/bass-music-mcs/)**" bring an unparalleled level of charisma and wordplay, seamlessly navigating the intricate rhythms and drops. Whether delivering rapid-fire verses over high-energy beats or crafting introspective rhymes that ride the melodic waves, each MC adds a layer of depth and dimension to the sonic experience. This collection transcends traditional genre boundaries, offering a versatile sonic landscape where the energy of bass music intertwines with the authenticity and skill of MCs. It's not just about beats and rhymes; it's a collaboration that pushes the boundaries of creative expression, inviting listeners to engage not only with the music but also with the stories and perspectives embedded in the verses. As the bass frequencies pulse and the MCs unleash their verbal artillery, "Bass Music MCs" becomes a sonic battleground, where the fusion of beats and lyrics creates an electrifying atmosphere. It's an album that challenges the status quo, showcasing the evolution of bass music beyond the confines of the dancefloor into a realm where words and beats collide, creating a symphony of sonic rebellion and lyrical mastery. So, whether you're a bass music aficionado or a connoisseur of clever wordplay, "Bass Music MCs" beckons you to experience a genre-defying journey where the beats hit hard, and the MCs hit harder.
Debuggar os projetos CDK em Python no VS Code
Tags: aws, cdk, python, tutorial
Published: 2024-02-23 19:08:12

O CDK, ou Cloud Development Kit, é uma estrutura de código aberto que simplifica o trabalho com serviços de nuvem. Ele permite que os desenvolvedores definam recursos de nuvem usando linguagens de programação conhecidas, incluindo Python. A depuração desses projetos é essencial para garantir que eles funcionem conforme esperado, para identificar e corrigir erros e melhorar a eficiência do código.

Através do Debug, é posível realizar análises de pacotes, variáveis, funções, e todas as entradas e saídas do código. Com esse recurso, fica fácil localizar bugs ou gargalos dentro da aplicação.

Para realizar o Debug do CDK em Python, primeiro é importante criar o ambiente venv, instalar os pacotes necessários, setar as variáveis de ambiente, e depois escolher o interpretador correto:

1. Crie o ambiente virtual Python (venv) usando o comando `python3 -m venv .venv` 
2. Ative o ambiente venv com `source .venv/bin/activate` 
No Windows: `.venv\Scripts\activate`
3. Instale os pacotes necessários com `pip3 install -r requirements.txt` 
4. Crie o arquivo launch.json, clicando no ícone de debug, em seguida em “create a launch.json file” 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yzh14gow71asfavunof9.png) 
5. (Opcional) Caso o arquivo já tenha sido criado, aperte Ctrl+Shift+P e pesquise por `launch.json`
6. Preencha o arquivo launch.json, alterando as configurações necessárias:
```
{
      "version": "0.2.0",
      "configurations": [
    
        {
          "name": "Python: Attach using Process Id",
          "type": "debugpy",
          "request": "attach",
          "processId": "${command:pickProcess}",
          "justMyCode": true
        },
        {
          "name": "Python: Current File",
          "type": "debugpy",
          "request": "launch",
          "program": "${file}",
          "console": "integratedTerminal",
          "justMyCode": true,
          "env": {
            "Var1": "TestValue",
    				"Var2": "TestValue"
          }
        }
      ]
    }
```
7. Digite Ctrl+Shift+P e procure Interpreter
8. Selecione o interpretador python.exe que está dentro da .venv 
No windows, \Scripts\python.exe
9. Abra o arquivo inicial do código, coloque um stop point, e clique na opção
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fq0x79cxwi696x8fdet6.png)
10. Troubleshooting: Caso haja algum problema na hora de rodar os comandos do cdk, como por exemplo comando de synth, deploy, não estiver localizando o pacote. Tente executar tanto com python ou python3, o interpretador pode estar errado.
Handling Data: Buffers and Streams in Node.js
Tags: javascript, webdev, programming, react
Published: 2024-02-23 18:54:00

Hey there, Node.js navigators! Welcome back to our action-packed series, “Streaming Through Node.js: From Basics to Mastery.” Today's episode is not for the faint-hearted as we’re leveling up our game with a more complex example involving Buffers and Streams. Let’s dive into the deep end!

### Buffers: The Data Wranglers

Remember, Buffers are like Node.js’s Swiss Army knife for handling binary data. They're essential for dealing with data chunks that are just streaming in, eager to be processed.

### Streams: The Data Conduits

Streams in Node.js are your data's journey from source to destination. They are perfect for handling data torrents too big to be managed in one go.

### A Buffers and Streams Symphony: A Complex Example

Let's set up a scenario. We want to read a large file, compress its content on the fly, and then write it to a new file. This example will use Buffers, Readable and Writable Streams, and the `zlib` module for compression.

```jsx
const fs = require('fs');
const zlib = require('zlib');
const { Transform } = require('stream');

// A Transform stream that compresses the data
const gzip = zlib.createGzip();

// Our custom transform stream that will process each chunk
const processStream = new Transform({
  transform(chunk, encoding, callback) {
    // Process the chunk (e.g., you can modify data here)
    // For this example, let's just convert the chunk to uppercase
    this.push(chunk.toString().toUpperCase());
    callback();
  }
});

// Create a readable stream from a large file
const readableStream = fs.createReadStream('largefile.txt');

// Create a writable stream to a new file
const writableStream = fs.createWriteStream('largefile-compressed.gz');

// Pipe the streams
readableStream
  .pipe(processStream) // First, process each chunk
  .pipe(gzip) // Then, compress the processed data
  .pipe(writableStream) // Finally, write the compressed data to a file
  .on('finish', () => {
    console.log('File compression completed.');
  });

```

In this code, we’re doing something a bit more ambitious:

1. **Reading a Large File**: We start by creating a readable stream from a large file.
2. **Processing Data**: As each data chunk flows in, our custom Transform stream converts it to uppercase.
3. **Compressing Data**: The `zlib` module's `gzip` stream then compresses this processed data.
4. **Writing to a New File**: Finally, we write the compressed data to a new file.

This example demonstrates the power of Node.js's stream API, especially for handling large-scale data transformations and processing.

### Conclusion: Mastering the Art of Node.js Streams

Streams and Buffers in Node.js are like the dynamic duo of data handling. They make processing large datasets look easy. As you continue to explore and experiment with these concepts, you’ll discover just how versatile and powerful Node.js can be.

Stay tuned for more in our “Streaming Through Node.js: From Basics to Mastery” series. Until next time, keep streaming and may your code run as smoothly as a serene river! 🌊💻🌟
3-Step guide to drive thousands of users to your app or website.
Tags: startup, career, watercooler, productivity
Published: 2024-02-23 18:45:43

Do you have a SaaS app, Open Source project, blog, or other website you want to drive traffic to, but cannot afford AdWords or other expensive advertising platforms?

In this guide, I will highlight 3 simple steps you can use to drive hundreds, if not thousands of users to your website for free every month.

## Step one: Find communities

Head over to [https://thehiveindex.com/](https://thehiveindex.com/) and search for your niche.

The hive index is a powerful and free tool to help you find thousands of communities on Discord, Reddit, and other community-type portals.

Other options include:

1. Reddit.
2. Facebook groups.
3. Twitter.
4. Discord.
5. Google groups.
6. Quora.

# Step two: Build trust

Join relevant communities, engage with community members, and try to make a meaningful impact. Be as consistent as possible i.e. don't show up once every 6 weeks and expect good results, you should be engaged in these communities at least once a week answering questions or posting content.

It is important to respect each community's rules. Do not spam! The goal is to invest time and energy into the community so that you build a respectable brand.

In doing so, you will earn the trust and respect of the community. Thus allowing you to promote yourself wherever and whenever possible.

# Step three: The lead magnet

You should give away stuff; either knowledge, ebooks, or advice. Doesn't matter what you give away exactly, so long as it's free and useful to your community members.

By doing so, you then can drive traffic to your landing page and collect their email addresses for your newsletter or market to them in a tasteful way.

Lead magnets should be of high quality, it's a good way to show users what value you bring to the table. This will ultimately help you convert visitors into paying clients.

# Conclusion

Similar to SEO, this is a slow process. It takes time to build an audience and earn the trust of random strangers on the internet.

Ultimately patience and offering great value beyond just selling a product or promoting a service will help you drive traffic in a much more meaningful way.
WooCommerce Releases 8.6 & 8.6.1 :: sechs neue Layouts für die Produktkollektion
Tags: wordpress, beginners, tutorial
Published: 2024-02-23 18:23:08

WooCommerce Releases 8.6 & 8.6.1 :: sechs neue Layouts für die Produktkollektion :: Woocommerce wurde weiterentwickelt und nun in einem neuen Release veröffentlicht: viele interessante Neuerungen!  vgl. https://wptavern.com/woocommerce-releases-8-6-8-6-1
Put the freeze on cold outreach! Hifive is a LinkedIn browser extension that delivers warm intros.
Tags: productivity, softwaredevelopment
Published: 2024-02-23 18:01:37

It's time to face the dark truth: our oversaturated sales and marketing channels put all B2B companies in a tough spot.

Leveraging relationships to reach the people you need to grow your business can be challenging. You are stuck manually combing through mutual contacts, playing "email tennis," and measuring success in a spreadsheet.

That's why we've built Hifive — a browser extension that sits directly on top of LinkedIn for effortless introduction requests while automating email enrichment and delivery!

Features include:
▪ Batch intro requests - request many intros at once via the Chrome extension
▪ Data enrichment - Hifive will find the most appropriate email(s)
▪ AI Assist - Leverage AI-powered messaging to craft the perfect intro
▪ Templates - Build and manage intro request templates
▪ Track and manage intros - never let another intro slip through the cracks.

Hifive works with LinkedIn's free version and LinkedIn's paid Sales Navigator accounts.

Break through the noise with introductions at scale, leveraging Hifive!


https://hf.app/
🚨OpenAi secret you should know 🚨
Tags: ai, openai, php, laravel
Published: 2024-02-23 17:40:31

I think almost everyone in the dev.to community has given OpenAI prompts a shot in the past year.😂

The first time I made a prompt, I was excited to see the results. After a few tries, I got some ideas and thought about creating a few AI products.🚀

The first tool I tried to build was for keeping an eye on crypto news 💸. It was a simple idea: analyze RSS feeds, collect content, and send it to AI for summarization. To get useful insights for crypto investments, we needed to analyze a lot of information. The best way to understand the data was to make charts. But to make a chart, we needed metrics. So, we decided to create a prompt with JSON output containing metrics. My metric was simple: a scale from 1 to 5, showing whether to buy a coin or not (1 means "should not buy," and 5 means "all in").

We launched the first version of the tool, looked at cryptonews for two weeks, and saw that the chart was completely empty. I checked a few log records and found out the results had invalid JSON. That disappointment led to a good idea that has helped me make many successful JSON prompts. In the System section, make sure to tell the AI that it's a RESTful JSON API and give an example of the output. You can see my example in the screenshots below.

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

After these updates, the results were really good. I finally got a useful chart. So, the main trick with OpenAI is to use it like a RESTful JSON API.

Give it a try yourself with my example at https://gpt-sdk.com. Just create a free account and explore what you can do.
Introducing Hello Bubblies: Where Comfort Meets Code!
Tags: javascript, css
Published: 2024-02-23 17:32:21

Welcome to the next level of slide footwear experience brought to you by Hello Bubblies—a brand that seamlessly merges comfort with code! Much like a well-crafted algorithm, our slides are designed to optimize your style and comfort quotient.

At Hello Bubblies, we believe in the elegance of simplicity and the power of precision, much like the clean lines of a perfectly written code. Our slides are engineered with the finest materials and ergonomic designs, ensuring that every step you take feels like a smooth function call.

But just like programming, it's not all about functionality—style matters too! With our versatile range of colors and patterns, you can accessorize your attire with the precision of a well-indented script.

Whether you're lounging at your favorite café or hacking away at your next big project, Hello Bubblies slides are your reliable companions, offering unparalleled comfort and style.

So, step into the world of Hello Bubblies where comfort meets code, and let your footwear make a statement as bold as your favorite programming language. Experience the difference and elevate your stride with [Hello Bubblies](https://hellobubblies.com/bubble-slides/) slides—where every step is a syntactically stylish statemen