teleren/devto huggingface dataset:
Otimizando chamadas assincronas com Task.WhenAll
Tags: csharp, performance, promises
Published: 2023-04-20 02:27:54

Imagine que temos uma classe **VeiculoService** e dentro dela dois métodos (**ObterCarros** e **ObterMotos**). E esses métodos fazem uma busca em uma base de dados "recheada", o que faz cada um deles levar 5 segundos para retornar cada informação.

```c#
    public class VeiculoService
    {
        public async Task<string> ObterCarros(string marca)
        {
            await Task.Delay(5000);
            return $"Conclui busca de veiculos da marca {marca}";
        }

        public async Task<string> ObterMotos(string marca)
        {
            await Task.Delay(5000);
            return $"Conclui busca de Motos da marca {marca}";
        }
    }
```
Agora imagine que temos um programa que precise fazer a chamada desses dois métodos para retornar essas duas listas:

```c#
    class Program
    {
        static async Task Main(string[] args)
        {
            var veiculoService = new VeiculoService();

            var carros = await veiculoService.ObterCarros("xpto");
            var motos = await veiculoService.ObterMotos("xpto");

            Console.WriteLine(carros);
            Console.WriteLine(motos);
        }
    }
```

No código acima nós instanciamos a classe **VeiculoService**, chamamos o seu método **ObterCarros**, guardamos em uma variável e logo em seguida chamamos o método **ObterMotos** guardando também em outra variável. Por fim printamos na tela os dois resultados.

Ao executar o programa observamos que o tempo de processo foi em torno de 10 segundos. Isso porque estamos excutando os dois métodos em sequencia e os dois levam aproximadamente 5s para serem executados.

![resultado do console mostrando o retorno do programa executado e o seu tempo de processamento](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ev2duvw4n0lmi82lhxx.png)

É possível diminuir consideravelmente esse tempo de processo com o método **Task.WhenAll**:

```c#
    class Program
    {
        static async Task Main(string[] args)
        {
            var veiculoService = new VeiculoService();

            var veiculos = veiculoService.ObterCarros("xpto");
            var marcas = veiculoService.ObterMotos("xpto");

            await Task.WhenAll(veiculos, marcas);

            Console.WriteLine(veiculos.Result);
            Console.WriteLine(marcas.Result);
        }
    }
```

Observando o console, podemos ver que o tempo de execução caiu pela metade:

![resultado do console mostrando o retorno do programa executado e o seu tempo de processamento](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/atrtv5x56hj8van51ft4.png)

Isso acontece pois o **Task.WhenAll** executa os métodos em paralelo. O que é muito útil para casos em que temos varias chamadas de métodos que não dependem do resultado um do outro, salvando um tempo que muitas vezes pode ser precioso para o seu programa.
24H CÁ ĐỘ
Tags: webdev, javascript, programming, tutorial
Published: 2023-04-20 02:10:49

Đến với 24hcado bạn sẽ được trải nghiệm sân chơi cá cược với nhiều sàn khác nhau. Người chơi có thể tham gia hàng trăm giải đấu từ cả trong và ngoài nước.
Website : https://24hcado.com/
Social : https://twitter.com/24hcado
https://www.instagram.com/24hcado/
https://www.youtube.com/channel/UCe9-r7lrZ99C3HEAerFs9vQ
https://www.pinterest.com/24hcadocom/
https://www.tumblr.com/blog/24hcado
https://www.reddit.com/user/24hcado
https://www.linkedin.com/in/c%C3%A1-%C4%91%E1%BB%99-75b1ba269/?original_referer=
https://vimeo.com/user196016318
https://www.flickr.com/people/197851501@N03/
https://dribbble.com/24hcado
https://www.deviantart.com/24hcado
https://medium.com/@24hcado.com
https://soundcloud.com/24hcado-com
https://orcid.org/0009-0007-7957-9500
https://unsplash.com/@24hcado
https://about.me/cado24h
https://www.imdb.com/user/ur163087526/
https://www.twitch.tv/24hcado
https://github.com/24hcado
https://www.behance.net/24hc
https://www.last.fm/user/cadocom
https://myspace.com/24hcado
https://www.patreon.com/24hcado/about
https://500px.com/p/24hcadocom?view=photos
https://24hcado.blogspot.com/
How can you differentiate between VP Engineering Vs Chief Technology Officer
Tags: programming, engineering, beginners, devjournal
Published: 2023-04-20 02:10:00

In today's technology-driven world, the roles of Vice President of Engineering (VP Engineering) and Chief Technology Officer (CTO) have become crucial for any successful tech company. Here are 6 differences between the 2 roles:

## Difference 1:
VP Engineering is a technical and people leadership role. Vs CTO is a technical visionary.


## Difference 2:
VP Engineering grows and manages an engineering team. Vs CTO drives innovation and technical strategy.


## Difference 3:
VP Engineering ensures the product vision is executed. Vs CTO handles thought leadership.


## Difference 4:
VP Engineering is focused on today's products. Vs CTO is focused on the products of future.


## Difference 5:
VP Engineering is an internal role and working with engineers or peers. CTO is a technical face and talking to customers or board.


## Difference 6:
VP Engineering is in charge of development and engineering. CTO is in charge of the overall technology strategy.


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

Thanks for reading this.

If you have an idea and want to build your product around it, schedule a call with [me](https://calendly.com/pragyanatvade).

If you want to learn more about DevOps and Backend space, [follow me](https://dev.to/pragyanatvade).

If you want to connect, reach out to me on [Twitter](https://twitter.com/pragyanatvade) and [LinkedIn](https://www.linkedin.com/in/pragyanatvade/).
The Rise of Peer-to-Peer ( P2P) Networks
Tags: distributedsystems, p2p, cloudstorage, privacy
Published: 2023-04-20 00:48:38

The Rise of Peer-to-Peer ( P2P) Networks: A Better Alternative to Cloud Storage? 🤔
As the world becomes increasingly digital, more and more data is being generated and shared than ever before. This has led to the rise of Cloud Storage providers, which offer users the ability to store and access their data remotely over the Internet. While Cloud Storage has many benefits, such as easy use and accessibility, it also has some significant drawbacks, such as concerns around data privacy and security😯
In recent years, peer-to-peer ( P2P) networks have emerged as a potential alternative to cloud storage. P2P networks rely on a decentralized architectural concept where users share resources with one another, rather than relying on a centralized storage provider 😛 . This means that P2P networks can provide increased security, privacy, and cost-effectiveness to cloud storage.
Certainly! Here is a comparison table that highlights the key differences between P2P networks and cloud storage 🤓 

I hope this table provides a clear visual comparison of the benefits and drawbacks of P2P networks and cloud storage.

Thank you for taking the time to read my post. I hope you found it informative and useful. If you have any questions or comments, please feel free to share them below. I appreciate your support and engagement. Have a great day!"😉
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vkqyticnasfghkjtfvhh.png)
How I'm Enhancing Contractr: New Features and Brainstorming for Effective User Matching
Tags: webdev, javascript, beginners, programming
Published: 2023-04-20 00:36:13

Today marks Day 79 of my #100DaysOfCode challenge, and I'm excited to share my progress on the Contractr project. Over the past few days, I've been working on adding some new features to the app that will make it even more useful for users.
One update I made was to the chat header, which now displays the profile image and the name of the logged-in user, which will come in handy for the matching functionality, which is the next big task on my to-do list.
Speaking of matching, I've been brainstorming ideas for how to implement it in a way that will be both fun and effective for users. One idea I had was to include a search feature, where users can search for specific keywords (like "developer") and the app will return potential matches based on those keywords. However, I've decided to hold off on this feature for now and focus on getting the basic matching functionality up and running.
While working on the project, I've realized that the more I struggle with a problem, the more creative I become and the more I learn. I love the challenge of building something from scratch and seeing it come to life.
I'm excited to see what the future holds for the Contractr project and for my coding journey in general. Stay tuned for more updates and progress reports as I continue on this exciting path of learning and growth.
Announcing the Contenda + Autocode integration
Tags: automation, webhooks, ai, contentcreation
Published: 2023-04-20 15:58:56

---
title: Announcing the Contenda + Autocode integration
published: true
date: 2023-04-20 00:00:00 UTC
tags: automation, webhooks, ai, contentcreation
canonical_url: https://blog.brainstory.ai/autocode/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4uh4wyzi3pmiogfpzsc2.png
---

# Why Autocode?

Autocode seamlessly handles webhooks without any additional configuration. Contenda has compute-heavy AI features, so when you submit a job to our service, we use webhooks to let you know when that job is finished.

We wanted Contenda’s programmatic features to be accessible to anyone, not just webhook-saavy users, and thus, our official integration with Autocode was born!

If you use Contenda with our new integration with Autocode, you get a user-friendly IDE, access to pre-built templates, built-in secret management, and great community support via [Autocode’s Discord server](https://discord.com/invite/autocode), right out of the box.

![Installing Contenda on Autocode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8vdx8n6mhrv08ioe5w0b.gif)

> _“I’m really excited to see Contenda launch on Autocode. As someone who’s constantly creating content while in a time crunch, the value add of Contenda is clear, and I can’t wait to build with their integration. I’m so glad that Autocode is able to make Contenda accessible to more developer advocates than before!”_

_-Jacklyn Biggin, Developer Relations Lead @ Autocode_

## How do I get started?

It’s super simple! Just make an Autocode account and head over to the [Contenda Autocode page](https://autocode.com/contenda/).

If you want to batch upload a YouTube playlist to Contenda, try this [snippet](https://autocode.com/contenda/snippets/cachsnpt_moZ1R1UCzpCTMNmD6YqwHAkc2GLc4hyJVrQF/)!

In case you missed our most recent announcement, we launched [Confbrew](https://dev.to/cassidoo/announcing-the-markprompt-contenda-integration-confbrew-5066-temp-slug-6808361) recently, which allows you to take a playlist of conference videos, and create a Q&A bot from the content! If you’d like to build your own version, try this [template](https://autocode.com/contenda/templates/contenda-markprompt/)!

If you have a plan and don’t need no man, I’ll take you straight to the [library docs](https://prod.contenda.io/docs#/)!
Mastering Airtable: A Powerful Tool for Developers
Tags: create, airtable, based
Published: 2023-04-19 23:51:01

{% embed https://youtu.be/c3ICWZLW_SA %}

Today, I'm going to introduce you to an amazing tool called Airtable. It's perfect for developers who want to manage their data with a simple interface, allowing them to focus more on the front-end. The best part? It's mostly free for everyone to use! So, let's dive in and explore Airtable together.

### Signing Up and Creating a Base
Head over to airtable.com and sign up for a free account. Once you're logged in, you can create a new base. A base is a set of tables, similar to different sheets in a spreadsheet. By default, Airtable creates four columns: Name, Notes, Assignee, and Status. You can manage different types of fields, such as long text, assignee, and single select.

### Customizing Your Fields
You can easily edit any field by clicking the down arrow and selecting "Edit Field." You can change the field type and other settings. In this example, we'll create an auto number field called "ID," a long text field for the post or tweet, a date-time field for the "Post By" date, and a status field for "Posted" or "Pending."

### Adding Test Posts and Automations
Add some test posts to your table and set their respective statuses. Next, explore the automations at the top of the page. Automations allow you to execute actions based on triggers, such as a record matching certain conditions or a scheduled time.

### Connecting to Twitter
In this example, we'll connect Airtable to Twitter using an automation that posts a tweet. To do this, choose the "Post Tweet" action and connect your Twitter account. You can test the action to make sure it works.

### Filtering Data and Creating Custom Views
Back in the data section, you can create custom views to filter the data based on certain conditions. For instance, you can create a "Pending Tweets" view that only shows tweets with a status of "Pending." You can also add a formula field to determine if a tweet needs to be posted based on the current date and time.

### Setting Up Automations to Post Tweets
With your custom view in place, head back to the automations section and add a step between the scheduler and the "Post Tweet" action. This step will find records, specifically the pending tweets that need to be posted. Once you've set this up, you can create a loop to iterate through each pending tweet and post it to Twitter.

### Conclusion
Airtable is an incredibly powerful and flexible tool for developers. With its simple interface, powerful automations, and seamless integrations with other services like Twitter, it's easy to see why so many developers love it. By following this tutorial, you'll be well on your way to mastering Airtable and leveraging its full potential in your projects.
Securing Your AWS Infrastructure : Best Practices for Cloud Security
Tags: aws, cloudsecurity, cloudskills, awscommunity
Published: 2023-04-19 23:47:04

As more businesses migrate their applications to the cloud, the security of their cloud infrastructure has become more critical. AWS offers a variety of tools and services to help secure your environment. But it's critical to understand how to configure and utilize them properly. This blog article will go through some best practices for safeguarding your AWS environment, such as defining security groups, configuring IAM roles and policies, and leveraging third-party security tools.

#### Understanding AWS Security Features

- Overview of AWS Shared Responsibility Model
- AWS Security Compliance Program and Certifications
- Understanding AWS Security Features such as Security Groups, Network ACLs, Identity and Access Management (IAM), AWS Key Management Service (KMS), AWS Certificate Manager (ACM), Amazon GuardDuty, and more.

#### Best Practices for Securing Your AWS Environment

- Securing your AWS account: Multi-Factor Authentication (MFA), strong passwords, and credential management
- Using Security Groups and Network ACLs to control network traffic
- Managing AWS IAM roles and policies for fine-grained access control
- Implementing encryption with AWS Key Management Service (KMS) and AWS Certificate Manager (ACM)
- Logging, monitoring, and auditing your AWS environment for security events
- Implementing third-party security tools to supplement AWS security features

#### AWS Compliance and Governance

- Understanding and complying with regulatory requirements and best practices
- AWS Compliance Programs and Services
- Best practices for governance of AWS resources, such as tagging, naming conventions, and AWS Resource Access Manager (RAM)

#### Conclusion:

It is crucial to secure your AWS infrastructure to ensure the confidentiality, integrity, and availability of your applications and data. You may limit the risk of security breaches and data loss by applying best practices for AWS security. such as defining security groups, configuring IAM roles and policies, and employing third-party security solutions. AWS offers a variety of security tools and compliance initiatives to assist you in securing your environment, But it is critical that you understand how to utilize them effectively. You may assist ensure the security of your AWS environment by following the standards and best practices provided in this article.
CodeNewbies! Help Us Create Your Community
Tags: discuss, beginners, codenewbie
Published: 2023-04-19 22:55:39

Hey CodeNewbies, we want to create an online community that's perfect for you! What can we do to make CodeNewbie on DEV the best possible resource for your coding journey?

![Cartoon of a cute sloth hugging a smiling tree branch tightly with the words, You're the Tree to My Sloth](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nsdsit8vbgwcwxh7zeir.gif)

Are you feeling lost and overwhelmed in the world of coding? Do you wish you had a supportive and collaborative community that could help you build your skills and confidence? You’ve come to the right place.


{% embed https://dev.to/t/codenewbie %}

---

[CodeNewbie](https://dev.to/codenewbieteam) is an online organization on DEV for new coders. Our goal is to provide a safe and inclusive space where fellow beginners can connect, ask questions, and share experiences and insights. But we don't want to create this community in a vacuum. We want your input! So tell us, please:

- What do you need in an online community?.
- What kind of content would you like to see? 
- What topics do you want to discuss? 
- Basically: How can we make this community as welcoming and helpful as possible for you?

---


##Collaboration is key to achieving our mission

![Colorful monkeys strung together by the hands on a background of clouds](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3x3y75vfoho8qld4tp5f.png)

We want to work together with our community to build a platform that truly meets the needs of our members. 

So, if you're a new coder (or new at heart), we invite you to share your thoughts and ideas with us. Drop your thoughts in the comments and we'll take your feedback into account as we build this community and work to make it the best possible resource for you!
AFFiNE the open source follow up of Miro, Trello and Notoin looks for Supporter
Published: 2023-04-19 22:51:27

AFFiNE the open source follow up of Miro, Trello and Notoin looks for Supporter 


​Open-Source Nachfolger von Miro, Notion & Trello: AFFiNE-Projekt entwickelt sich rasch u. sucht Supporter


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


Social Links:
AFFiNE Community: https://community.affine.pro/home
GitHub: https://github.com/toeverything/AFFiNE
Discord: https://discord.gg/Arn7TqJBvG
Telegram: https://t.me/affineworkos
Twitter: https://twitter.com/AffineOfficial
Reddit: https://www.reddit.com/r/Affine
Medium: https://medium.com/@affineworkos​​
Starchart: 1.0a
Tags: opensource
Published: 2023-04-19 22:17:17

We're nearing the end of the project development life cycle. We're simply adding changes based on customer feedback, and other important features that we still haven't implemented.

For this week I focused fixing small bugs and changes, to ensure that we get to release 1.0.0 with as little issue as possible.

### Certificate ###

I had to create an information page for what a certificate is, and why it is important. Another piece I had to consider when creating the page is to ensure that it would make it easier for new developers to understand how everything works. Simply providing them with information wouldn't cut it, I need to ensure that it's less technical as possible.

What I have noticed with information pages is that they are meant for people who have an understanding of the concept that they want to work with. It makes it so that there are new information piled up on top of the one they want to learn, which can be a hassle.

### Conclusion ###

This week has been a "boring" week, at least according to the professor. There aren't as many issues as expected, and everyone is working on areas that need patching. Overall, the road to the release doesn't seem as rocky as we had foresaw.
Day 739 : It's Euphoric
Tags: hiphop, code, coding, lifelongdev
Published: 2023-04-19 21:20:23

_liner notes_:
- Professional : Pretty good day. Worked on my Proof of Concept project. Helped out with a community question. Sat in on a company wide townhall meeting. I also started getting ready to pack for my trip.

- Personal : Went through a bunch of tracks for the radio show. I think I have enough for the starter tracks. Did some refactoring of my side project. I think I'm almost ready to apply it to my real project. I found an article on possible ways to speed up loading images. I read that and went to sleep. Giving me ideas on how to use it in my site.

![View from a mountain top over looking a lake and another mountain range in the distance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1f19taq1tp8z3w2o43jr.jpg)

Didn't get to finish the installation instructions of the Proof of Concept project for work, so I'll probably spend some time working on that. I also want to start ironing the clothes for my trip and get my suitcase packed. I want to get the starter tracks for the show figured out and typed up. I also may have thought of a way using the information from the article last night to help speed up the loading of images in my side project. The feeling to see the images load so quickly, it's euphoric. hahaha Alright. Back to work.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube m_FvJAwN-ks %}