teleren/devto huggingface dataset:
Como utilizar ferramentas de automação de mídias sociais para melhorar sua presença online e aumentar o alcance do seu blog
Tags: webdev, blog, cms
Published: 2023-06-13 11:14:02

Se você é um blogueiro ou dono de uma empresa, é fundamental ter uma presença online forte e ativa nas mídias sociais. No entanto, manter todas as suas contas de mídia social atualizadas pode ser uma tarefa árdua e consumir muito tempo. É aí que entram as ferramentas de automação de mídias sociais.

Essas ferramentas permitem que você agende suas postagens com antecedência, analise o desempenho de suas contas, monitore as menções de sua marca e muito mais. Isso pode economizar uma quantidade significativa de tempo e esforço, permitindo que você se concentre em outras áreas importantes do seu blog ou empresa.

Neste artigo, vamos dar uma olhada em algumas das melhores ferramentas de automação de mídias sociais disponíveis e como você pode usá-las para melhorar sua presença online.

## 1. Hootsuite

Hootsuite é uma das ferramentas de automação de mídias sociais mais populares e conhecidas. Com o Hootsuite, você pode gerenciar várias contas de mídia social em uma única plataforma. Ele permite que você agende postagens, monitore menções, acompanhe a análise de suas contas e muito mais. Além disso, ele oferece uma ampla gama de integrações com outras ferramentas de marketing.

## 2. Buffer

O Buffer é outra ferramenta popular de gerenciamento de mídia social. Ele permite que você agende postagens para várias contas de mídia social, além de oferecer análises detalhadas sobre o desempenho de suas contas. O Buffer também tem integrações com outras ferramentas de marketing, como o Google Analytics.

## 3. Sprout Social

O Sprout Social é uma ferramenta de gerenciamento de mídia social mais avançada, com recursos de monitoramento e análise aprimorados. Ele permite que você agende postagens, monitore menções, acompanhe as análises de suas contas e muito mais. Além disso, ele oferece uma gama de recursos avançados, como relatórios personalizados, análises de concorrentes e gerenciamento de equipe.

## 4. CoSchedule

O CoSchedule é uma ferramenta de gerenciamento de marketing all-in-one que inclui recursos de gerenciamento de mídia social. Ele permite que você agende postagens, crie um calendário de conteúdo, analise o desempenho de suas contas e muito mais. O CoSchedule também tem integrações com outras ferramentas de marketing, como o WordPress e o Google Analytics.

## 5. MeetEdgar

MeetEdgar é uma ferramenta de automação de mídias sociais que se concentra na reutilização de conteúdo. Ele permite que você organize seu conteúdo em categorias e, em seguida, agende as postagens para que o conteúdo seja compartilhado regularmente. Isso é particularmente útil se você tiver um blog com um grande volume de conteúdo já publicado.

Conclusão:

As ferramentas de automação de mídias sociais podem economizar muito tempo e esforço, permitindo que você se concentre em outras áreas importantes do seu
Big Countries | LeetCode | MSSQL
Tags: leetcode, mssql, codenewbie, beginners
Published: 2023-05-27 17:28:00

## The Problem

The challenge involves the table `World`.

`World` table:

| name (PK) | continent | area    | population | gdp     |
|-----------|-----------|---------|------------|---------|
| varchar   | varchar   | int     | int        | bigint  |


Each row of this table provides information about a country, including its continent, area, population, and GDP. We define a country as "big" if it has an area of at least 3 million km2 or a population of at least 25 million.

The task is to write an SQL query that reports the name, population, and area of the "big" countries.

## Explanation

Here's an example for better understanding:

Input: 

`World` table:


| name        | continent | area    | population | gdp          |
|-------------|-----------|---------|------------|--------------|
| Afghanistan | Asia      | 652230  | 25500100   | 20343000000  |
| Albania     | Europe    | 28748   | 2831741    | 12960000000  |
| Algeria     | Africa    | 2381741 | 37100000   | 188681000000 |
| Andorra     | Europe    | 468     | 78115      | 3712000000   |
| Angola      | Africa    | 1246700 | 20609294   | 100990000000 |


Output:


| name        | population | area    |
|-------------|------------|---------|
| Afghanistan | 25500100   | 652230  |
| Algeria     | 37100000   | 2381741 |


Afghanistan and Algeria are considered "big" countries as their population or area exceeds the defined thresholds.

## The Solution

Let's explore two SQL solutions to this problem, examining their differences, strengths, and weaknesses.

### Source Code 1

The first solution retrieves countries from the table where the area is at least 3 million or the population is at least 25 million.

```sql
SELECT
    name,
    population,
    area
FROM
    World
WHERE
    area >= 3000000
    OR
    population >= 25000000
```

This query achieves a runtime of 904ms, outperforming 92.98% of other submissions.

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

### Source Code 2

The second solution is very similar to the first, but it first checks for the population condition before the area condition.

```sql
SELECT
    name,
    population,
    area
FROM
    World
WHERE
    population >= 25000000
    OR
    area >= 3000000
```

This query has a runtime of 983ms, beating 78.89% of other submissions.

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

## Conclusion

Both solutions yield the same output but have minor performance differences due to the order of conditions in the WHERE clause. Thus, the ranking of solutions based on overall performance, from best to worst, is: Source Code 1 > Source Code 2. 

You should choose the solution that best fits your specific performance requirements and expectations.

You can find the original problem at [LeetCode](https://leetcode.com/problems/big-countries/description/).

For more insightful solutions and tech-related content, connect with me on my [Beacons page](https://beacons.ai/ranggakd).

{% embed https://beacons.ai/ranggakd %}
Give an eye to VanJS, it costs nothing and you could be surprised
Tags: vanjs
Published: 2023-05-24 16:07:02

_[VanJS](https://vanjs.org/) (abbr. Vanilla JavaScript) is an ultra-lightweight, zero-dependency and unopinionated Reactive UI framework based on pure vanilla JavaScript and DOM. Programming with VanJS feels a lot like React_

[Sample](https://flems.io/#0=N4IgtglgJlA2CmIBcA2ADAOgKwHYA0IAZhAgM7IDaoAdgIZiJIgYAWALmLCAQMYD21NvEHIQAHigQAbgAIesWqVIBeADog2ENgnUA+VdRkyAarWoApAMoy2LeDICMGAEwBrAEIyAqgEkZhACd6eAB3PlcDMQB6SSl9akjYmWg1EFoAB3S9AyMJaWSoVM1teGzDGWjY+MrpeINuEFJ4BB5NAXImAGYkNBAAXzwaYNEpMwwAK3JeASERJgQ2GXg8NjxqPFhlAHkAI3H4VrwA7b2DtgwAc3g2AAUAvjYHgE90+C3CPBUACmXV9dgAJTKXQ-AD8oK+TTYABUIAw+ABXNhff4AtahGSWa4AgEYWgwL5sNGFYBXRajWBfAHAALXBEBQy2CCkDBsAZQmQUn7UhYyajKJmkDbKaisgDc8AAhMplLAAGRylEYTYy2CgtjKUiEtZ4HgApDwGUi5UK85QZrXeAotGijXLUV8DCEPgBACitB4LC+hOByOWgJxAIGAmooW5wEFGEd6QRpC98CDweUAS+UDREGUht08Aw1D45uhL3goPgSFDIRk0PgAA8-WiEcofngMC2icDCU6FMiHFE0LjnW6PV6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GCBFLjXBQg9Ai7gng+DnOoDIWQQBohkNvXeVIhFGHThaVoEB2iiAcAAFiQM4UuQxK5MHgkoBoddZhsFEDsfMTwT7lB2B6VwFx7g70djPI6rgxSn34LAF0qCoC0ACK4F0ZgrihPKM6QQiMraQFgE8VBMSIAcKSSIhItotAIE8UYIQtZEYcIgBcACx1d5JKMCktgiNSAQAAF6lhkM4WkYAGkyEnjAYKo0ZCdCwOkas+T14AGI1Fjy7l4nxfjETJxkAEC43ivjOCwFgPADgsAoDwAjTAzgUZ9IGZIagwznBoHGV0m51Y7m3OueMvpIRoC2FQds+5fTynNKqTUpAdSkp9Jmms4KqC0AyGto8PpTSWntNLGYgAHC8gwBT6gEAzmcYx2dTFIvzjgfoYFy7DCYPVYwXhTAWEsP0IAA)

```js
import van from "./van.js"

const {span, button} = van.tags

const Counter = () => {
  const counter = van.state(0)
  return span(
    "❤️ ", counter, " ",
    button({onclick: () => ++counter.val}, "👍"),
    button({onclick: () => --counter.val}, "👎"),
  )
}

van.add(document.getElementById("app"), Counter())
```
Clojure Bites - Structured logging with mulog
Tags: clojure, logging, beginners, softwareengineering
Published: 2023-05-24 20:01:33

Full post [here](https://fpsd.codes/blog/clojure-bites-mulog/)

Looking forward your comments!

# Overview

Logging is a fundamental tool to monitor and debug a running system.
Even if we can use logs to gather metrics about our system, these are
often written with the assumption that humans are going to consume them,
which make it hard to extract meaning information from log messages.

Log messages are rarely consistent or even meaningful if read few days
after writing them during your emergency debug session. Writing good log
messages is hard! Almost as hard as naming things and cache invalidation.

Another overlooked problem is that often logs are are context less, what
can we infer by a message like "Failed to process user payment" if we don't
know what triggered the payment process, the affected user or product?


## Structured logging

Structured logging aims to provide query-able, consistent, information rich
logs that can be used for:

-   Business intelligence: derive business relevant data from logged events
-   Monitoring: understand the current state of a system
-   Debugging: understand the context in which an error has been reported
Tech Networking 101: How Are You Building Your Connections?
Tags: discuss, beginners, codenewbie, career
Published: 2023-05-31 07:00:00

How are you going about expanding your professional network and connecting with fellow techies? 

Share your go-to strategies newbies venturing into the industry and more sustainable approaches for coders further along in their careers. Shout out your favorite networking events, and don't forget to include any funny stories of unexpected connections. 

Follow the [CodeNewbie Org](https://dev.to/codenewbieteam) and [#codenewbie](https://dev.to/t/codenewbie) for more awesome discussions and online camaraderie!

*{% embed* [https://dev.to/codenewbieteam](https://dev.to/codenewbieteam) *%}*
A lesson in printing errors within try catch blocks
Tags: javascript, programming
Published: 2023-05-25 03:28:33

# A Lesson in Printing Errors within Try Catch Blocks

Hey there! 👋

Ever been stuck debugging an issue, only to find out it was something minor that could have been quickly resolved if only you had more information about the error?

Well, it happened to me today, and it inspired me to share this piece of wisdom: **Always print the full error object when dealing with try-catch blocks in JavaScript.**

Let's dive into it.

## What Happened?
I was recently debugging an issue in my Node.js server. I was getting a confusing error message. The server was creating a playlist by fetching song IDs using a mocked YouTube API. However, for some reason, those songs were also failing to get their song IDs. The error message was always the same: "Error getting song ID". That's it.

The offending code looked something like this:

```javascript
try {
  song_id = await getSongID(song);
  songs_with_ids.push({
    id: song_id,
    title: song,
  });
} catch (e) {
  console.log("Error getting song id for", song);
  failed_songs.push({
    id: null,
    title: song,
  });
}
```

## The Lesson: Always Print Your Errors
I was confused. The function getSongID was mocked and supposed to return the song ID for all known songs, including the one causing the error.

After a moment of bewilderment, I decided to print the actual error object e in addition to my custom error message.

```javascript
catch (e) {
  console.log("Error getting song id for", song, "Error:", e);
  failed_songs.push({
    id: null,
    title: song,
  });
}
```

Boom! 💥 The error message changed to `ReferenceError: song_id is not defined.` The issue wasn't with the getSongID function at all! Instead, it was an undeclared variable song_id that was causing the failure. This fixed it:

```javascript
try {
  const song_id = await getSongID(song);
  songs_with_ids.push({
    id: song_id,
    title: song,
  });
} catch (e) {
  console.log("Error getting song id for", song);
  failed_songs.push({
    id: null,
    title: song,
  });
}
```

You can probably imagine the face-palm moment I had.

## Takeaway
Writing custom error messages can certainly make your logs easier to read and understand. However, it's crucial to remember that these messages should augment the error object, not replace it.

By including the error object in your logs, you allow for the visibility of all the nitty-gritty details that come with an error: stack traces, line numbers, and the exact error message.

It's a simple practice, but one that can save you a lot of debugging time.

Stay curious, code more, and always print your errors!

I hope you found this post useful and it will save you from a few future headaches. 

Happy coding! 🚀
Edify (online code editor plugin)
Tags: webdev, javascript, opensource, experiment
Published: 2023-05-25 04:43:34

https://github.com/rahulsemwal/edify

Edify is a basic, light weighted web based online editor plugin for web apps, can be useful for developers, code content creators and educational purpose. Currently it supports HTML, JavaScript and CSS languages only. This editor is build on top of prismjs code highlighting library.

# Demo : 
https://rahulsemwal.github.io/edify/examples/index.html

**Uses [It's so easy to use! atleast give it a try]**
- Step 1: Include all files from lib folder like prism.css, edify.css, prism.js and edify.js into your website.
- Step 2: Add below syntax into your website and enjoy writing HTML online with live preview.
  ``` 
  <edify language="html" preview="true"><h1>Hello edify!</h1></edify> 
  ```
- Step 3: Try out demo above and explore code in examples/index.html and examples/sample/
Window Functions In Mariadb (part 2)
Published: 2023-05-25 08:52:34

## AVAILABLE WINDOW FUNCTIONS

MariaDB offers a wide range of built-in window functions to cater to various analytical requirements. These functions include popular ones such as SUM(), AVG(), COUNT(), MIN(), MAX(), and more. Additionally, specialized functions like RANK(), DENSE_RANK(), ROW_NUMBER(), LAG(), and LEAD() enable advanced analytical computations.

## USE CASES

Window functions find utility in a multitude of scenarios. This section explores some practical use cases where window functions can be applied effectively. Examples include calculating moving averages, generating cumulative sums, identifying top-n records, calculating percentage shares, and detecting trends over time.

## PERFORMANCE

While window functions provide immense analytical capabilities, it is essential to consider their performance implications. As window functions operate on a set of rows, their execution requires careful optimization to ensure efficient query processing

## CONCLUSION

Window functions in MariaDB empower users to perform complex analytical computations while maintaining row-level details. With its robustness and performance, MariaDB continues to be an excellent choice for utilizing window functions in relational database environments.
Why open source your project?
Tags: discuss, opensource
Published: 2023-05-25 10:07:51

Hey, devs! I used to think that open-source is needed only for those who want to show their skills to job recruiters. But, as I progressed in my journey, I encountered many open-source projects and wondered why people would share their work for free. Having done more research on this topic I found out that this actually goes far beyond showing one’s skills.

Open-source projects appear to foster communication with other developers, let one develop skills used in a real-world workplace, gain more popularity, ease the developer’s work, and may even bring money.

However, I don’t believe that one should open-source their work just because they use a lot of free stuff and owe the community, or that the primary motivation for open-sourcing is pure altruism. 

I’ve shared what I found out in more detail in the comments. But I can’t tell that for sure because I have no experience of work on a decent open-source (or proprietary project). That’s why I want to call experienced developers to share their thoughts. Here are my questions and topics for discussion:

- What are the pros and cons of open-sourcing your work, whether it be a learning project aimed at gaining experience and creating something valuable or a commercial one that could be reimagined as an open-source venture?
- I’ve always dreamt of working on a team with friends. Open-source seems to be one of the ways toward that dream. Is it really possible to make friends or create a team in this way?
- I would love to hear about your experiences.
- When not to open source your project?
Maximizing Cost Optimization with Well-Architected Programs on AWS
Tags: aws, costoptimization, cloudarchitecture
Published: 2023-07-11 05:46:36



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dn7l1ij4ld4qdhee4sdi.jpeg)
Are you looking to optimize costs in your AWS environment? A well-architected program can be the key to achieving cost optimization goals. Let's explore how a well-architected program can help you drive cost optimization on AWS:

1️⃣ Cost-Aware Architecture: Well-architected programs focus on building cost-aware architectures. By considering cost implications from the start, you can design and deploy solutions that maximize efficiency and minimize unnecessary expenses.

2️⃣ Right-Sizing Resources: Well-architected programs emphasize right-sizing resources to match workload requirements. By accurately provisioning resources, you can eliminate over-provisioning and reduce costs associated with idle or underutilized resources.

3️⃣ Choosing the Right Pricing Models: Well-architected programs guide you in selecting the appropriate pricing models, such as On-Demand, Reserved Instances, or Spot Instances. This ensures you leverage the most cost-effective options based on workload characteristics and usage patterns.

4️⃣ Effective Resource Tagging: Well-architected programs emphasize consistent and meaningful resource tagging. Proper tagging enables accurate cost allocation, cost tracking, and cost optimization across departments, projects, or applications.

5️⃣ Automation and Monitoring: Well-architected programs encourage the use of automation and monitoring tools to continuously assess cost performance. Automating tasks like resource provisioning, scaling, and optimization helps streamline operations and identify potential cost-saving opportunities.

6️⃣ Cloud Governance: Well-architected programs establish cloud governance frameworks that include policies, guidelines, and processes for cost optimization. This ensures adherence to best practices, enables accountability, and fosters a culture of cost awareness.

7️⃣ Cost Optimization Reviews: Well-architected programs advocate for regular cost optimization reviews to evaluate the effectiveness of cost-saving measures. These reviews help identify areas for improvement, validate cost optimization strategies, and ensure ongoing efficiency.

Implementing a well-architected program provides a systematic approach to cost optimization on AWS. By considering cost implications during the architectural design, leveraging appropriate pricing models, and embracing automation and monitoring, you can achieve significant cost savings.

Share your experiences and insights on cost optimization through well-architected programs in the comments below. Let's learn from each other and drive cost efficiency in our AWS environments! 💰💡
Looking for Community Support: Make Security Transparent with Open-Sourced Application!
Tags: swift, ios, opensource, security
Published: 2023-07-11 17:07:10

Hello, I am currently looking for those interested in growing a community that aims to make public/campus security transparent with an open-sourced app (SIMPLE)!

The website is [https://www.simple-secure.org/](https://www.simple-secure.org/), and the source code is [https://github.com/tlsgusdn1107/SIMPLE](https://github.com/tlsgusdn1107/SIMPLE). You can try it out in TestFlight mode at [https://testflight.apple.com/join/rgLKnFfz](https://testflight.apple.com/join/rgLKnFfz).

The idea was to minimize the need to share PII while preventing false alarms. Right now, campus/police security is notoriously invasive in student privacy, and for-profit security apps also compromise user privacy to varying extents for revenue. As an international student in college, I felt horrible and was motivated to start this project.

The workflow is done to prototype level—just a bit of refactoring needed. You can check out some of the ongoing tasks in: [https://github.com/tlsgusdn1107/SIMPLE/issues](https://github.com/tlsgusdn1107/SIMPLE/issues).

Up until now it had been a personal project, but I want to share it and create a community for it. Unfortunately, legal entities (e.g. police departments) are very hesitant to adopt a transparent alternative, so we need a strong community backing it. If you are interested in growing this community together, please join the Discord community at [https://discord.gg/ceCa5SYm](https://discord.gg/ceCa5SYm). Also, feel free to reach out to me at any time!!
Remote Work is Valued Less in 2023
Tags: community, motivation, devjournal, career
Published: 2023-07-11 18:23:34

The argument that remote work justifies lower pay rates is increasingly contentious, especially in our modern era, where technology has blurred the lines between the traditional office space and the home. This perspective is laughable to many, largely because it disregards the value of work itself. Remote or not, the effort, skill, time, and dedication required to perform a task does not diminish. Remote work may demand additional skills such as self-discipline, adaptability, and technical acumen to work effectively from home. This point of view reflects the conviction that the value of work should not be tied to a physical location but to the quality and quantity of the work produced.

Furthermore, the argument seems to dismiss that remote work is not necessarily a "benefit" for the employee but also a cost-saving measure for the employer. Companies save on various overheads when employees work remotely, including rent, utilities, office supplies, commuting benefits, and more. Also, research has indicated that remote workers often work longer hours than their in-office counterparts. Considering these aspects, it is clear why many people find the idea of lowering pay rates for remote work not only amusing but also profoundly unfair. The focus should be on paying what the work is worth and recognizing the value and contribution of the employee, irrespective of where they clock in their hours.

With that said. I am looking for work, but I won't work for peanuts. Give me the fancy cashews! 😀

If you enjoy my technology-focused articles and insights and wish to support my work, feel free to visit my Ko-fi page at https://ko-fi.com/philipjohnbasile. Every coffee you buy me helps keep the tech wisdom flowing and allows me to continue sharing valuable content with our community. Your support is greatly appreciated!