teleren/devto huggingface dataset:
How to Add Multiple Reporting Email Addresses to DMARC Record?
Published: 2022-05-09 00:25:59

![Multiple Reporting Email Addresses in DMARC Record](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hfyws0qpprfjnzv2qpbm.png)
Can you add multiple reporting email addresses to a single DMARC record? The answer is yes, you can add multiple **rua** and/or **ruf** reporting email addresses to your DMARC record. That way, you will receive a copy of each DMARC report at each of the email addresses.

While a DMARC monitoring service like DMARCLY comes in handy, sometimes people might want to obtain report copies for various reasons. Achieving this goal is simple enough: adding your own email address to the rua and/or ruf tags in the DMARC record is all you have to do.

For example, let's say you already have a DMARC record published on your domain like below:

``` text
v=DMARC1; p=none; rua=mailto:6064dd50128e7@ag.dmarcly.com; ruf=mailto:6064dd50128e7@fo.dmarcly.com; sp=none;
```

Now you want to receive the same aggregate reports at **aggregate_reporting@yourdomain.com**, and forensic reports at **forensic_reporting@yourdomain.com**, you can update the above record to:

``` text
v=DMARC1; p=none; rua=mailto:6064dd50128e7@ag.dmarcly.com,mailto:aggregate_reporting@yourdomain.com; ruf=mailto:6064dd50128e7@fo.dmarcly.com,mailto:forensic_reporting@yourdomain.com; sp=none;
```

Remember to use our [free DMARC record checker](https://dmarcly.com/tools/dmarc-checker) to check your updated DMARC record.

Once this is done, you should receive DMARC reports at your own email addresses in a couple of days.

If you are not getting any reports after a few days, refer to this post to learn why: [Why Am I Not Receiving DMARC Aggregate or Forensic Reports?](https://dmarcly.com/blog/why-am-i-not-receiving-dmarc-aggregate-or-forensic-reports) Specifically, you need to make sure external domain verification (EDV) is set up.

Original post: [How to Add Multiple Reporting Email Addresses to DMARC Record?](https://dmarcly.com/blog/how-to-add-multiple-reporting-email-addresses-to-dmarc-record)
Running a Single Test with Spaces in Minitest
Tags: rails, minitest
Published: 2022-05-08 23:45:23

In Rails, if you want to run a specific test without the others in the file, you can pass the method's name to the `--name` flag. 

```ruby
def test_controller_name
  # assert ...
end

>  ruby -I test test/controller/renderer_test.rb --name test_controller_name
```

But, Rails also provides a `test` method that takes a test name and a block. 

```ruby
test "creating from a controller" do
  # assert ...
end
```

How do you run this test that allows you to pass a string containing spaces?

<!--more-->

For this, we need to step inside the `test` method and see what it's doing. If we open the source code for the `test` method, this is what it does:

```ruby
def test(name, &block)
  test_name = "test_#{name.gsub(/\s+/, '_')}".to_sym
  defined = method_defined? test_name
  raise "#{test_name} is already defined in #{self}" if defined
  if block_given?
    define_method(test_name, &block)
  else
    define_method(test_name) do
      flunk "No implementation provided for #{name}"
    end
  end
end
```

The first line replaces all the spaces in the `name` string with an underscore `_`, and adds a `test` at the beginning. So, the test name `creating from a controller` becomes `test_creating_from_a_controller`. Then, using metaprogramming, it defines a method with that same name. So the above test method becomes:

```ruby
def test_creating_from_a_controller
  # assert ...
end
```

Now that you know the name, you can run this test as follows:

```ruby
>  ruby -I test test/controller/renderer_test.rb -n test_creating_from_a_controller
```

Hope this helps.
O que é um produto?
Tags: discuss, motivation
Published: 2022-05-08 23:32:21


Faz tempo que penso em criar algum produto / empresa com as habilidades que adquiri ao longo dos anos como desenvolvedor, mas nunca tive um feeling **do que** fazer.

E ai um tempo atrás no trabalho aconteceu uma coisa que achei muito interessante.

Durante uma chamada de vídeo, com um possível fornecedor, eles apresentaram o produto deles e eu fiquei de boca aberta **porque eu tinha desenvolvido a mesma coisa em 2018!!**

## O ano era 2018
Uma empresa da Estônia entrou em contato comigo pelo LinkedIn interessada no meu perfil e depois de uma conversa rápida marcamos a primeira entrevista.

Logo em seguida me passaram o teste técnico que era fazer uma API capaz de ler arquivos `.csv` e salvar o conteúdo em um banco de dados.

Se você quiser dar uma olhada no resultado desse teste ele está público no meu GitHub.

Mas vou deixar um disclaimer aqui devido ao fato dele ser bem antigo então não sei se ele funciona ainda hahaha.

Em todo o caso: [Fractory](https://github.com/leonimella/fractory)

Cumpri os requisitos do teste e ainda fiz uma parada que se houvesse um erro em uma linha, ele retornava a mesma para o usuário pedindo para ele corrigir.

Ficou um projeto bem legal! Feito em PHP (com Laravel) e JS (front em React).

Apesar de gostarem do resultado e me chamarem para a última entrevista acabei não passando para a vaga, mas sem problemas, faz parte.

## Voltando para 2022...
Eu conheci a [FlatFile](https://flatfile.com/), uma empresa fundada em 2019 que levantou ~7.9M de dólares e o que eles fazem é exatamente a mesma coisa que o meu repozinho em PHP faz!!!

Claro que eles fazem de um jeito **MUITO** melhor e mais elegante, mas cara, o que eu fiz foi no mínimo o MVP da **FlatFile**.

## E isso me faz pensar...
Deve existir mais um monte de coisas simples que nós fazemos e resolvemos durante nosso dia que teria espaço para crescer em algo maior.

Igual a FlatFile fez com uma ideia tão simples, mas que é uma dorzinha chata em várias aplicações e sistemas.

E também após esse episódio fico me perguntando:

>"o que mais eu já fiz ou que eu faço que poderia virar um produto oferecido por uma empresa?"

Ainda não tenho uma resposta para essa pergunta.

Será que você também já não fez alguma coisa que poderia ter um valor grande e que pessoas estejam dispostas a pagar por isso?

Faz a gente pensar nas possibilidades, né?

Obrigado pelo tempo

🖖
What’s your placeholder name?
Tags: discuss, watercooler
Published: 2022-05-08 23:31:40

We all know *foo*, *bar,* and *baz*. But when I see people actually needing a placeholder name for a function or variable... I’ve often seen other placeholders.

---

Mine are: coxinha, coisa, test.

“test“ you probably understand.

“coisa” is ‘thing‘ in portuguese.

“coxinha” can be translated as “little thigh”, but it’s actually a fried snack. (the cover image!)

---

**From what I saw, each one has one... so what’s yours?**

---


[![buy me a coffee](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2x3l74e5ch9vabwpng2z.png)](https://buymeacoffee.com/noriller)
Declarative vs Imperative - Vader Buys a Cake
Tags: umkc, cs441
Published: 2022-05-08 22:56:37

*Photo by [TOMMY VAN KESSEL](https://unsplash.com/photos/n6cUGwvxygA?utm_source=unsplash&utm_medium=referral&utm_content=creditShareLink) on Unsplash*

---

There are 2 main programming paradigms:

- **Declarative.** What to do. Think SQL.
- **Imperative.** How to do it. Think C++.

## 🎂 Vader Buys A Cake

As a memory trick, let's imagine buying a chocolate cake with each approach.

- Declarative: You go to the bakery and declare you want one. You don't care *how* it gets done, you just want the final product.
- Imperative: You stand over the baker and tell him exactly what to do. The [imperial march](https://www.youtube.com/watch?v=B_iFRoJJLzc) plays in the background.


## Other Paradigms

Here's how a few other common approaches can be categorized:

| 📢 Declarative          | 🎂 Cake                 |
|------------------------|------------------------|
| Procedural Programming | Logical Programming    |
| Object Oriented        | Functional Programming |
| Parallel Processing    | Database Queries       |
TOTAL POS - Table Control
Tags: flutter, spanish, opensource, totalpos
Published: 2022-05-08 22:33:32

Terminamos de agregar el controlador de mesas para la versión de postgres 🍾🍾🍾 (Que es en la que estoy invirtiendo mi tiempos libres actualmente).

## Controlador de mesas 🎮
Con lo fácil que es hacer drags and drops en Flutter. Fue sencillo hacer esta parte.
![controladorMesasGift](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jgcog3tm9haefcozoy70.gif)
 
## Comandar orden 📒
La parte laboriosa fue que la misma pantalla de cobranza sirviera para comandar y para cobrar (Admito que aun tiene detalles, pero se irán puliendo).

![Comandar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aj46g9dktyo1f6ijcs24.gif)
 
## Cobrar 💵
Ya por ultimo hacer que solo los usuarios con rol cajero pudieran liberar las mesas al cobrarla.

![Cobrar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbtl6as0eqmmiqhz2xx0.gif)
 
## Dokcer 🐳
Como últimamente trabajo en mas de una estación de trabajo controlar versiones de dependencias podría ser un dolor de cabeza a futuro; decidí ir trabajado en Docker. Sirve que para aquellos que quieran probarlo será mas sencillo ahora.

## Que sigue? 🐛
La verdad que si se me complico mas de lo esperado, por eso he tenido que trabajar dos fines de semana es esta implementación, pero ya va quedando el asunto, y se que hace 15 días dije que trabajaría en la REST pero bueno... quería terminar esta parte primero.

Te dejo el [repo](https://github.com/ushieru/total_pos/tree/postgres) para que le eches un ojo.

Sin mas por el momento nos vemos en otra ocasión y Happy Hacking 🧑‍💻🎉
Why are there few rails job postings for early career devs?
Tags: discuss, watercooler, beginners
Published: 2022-05-08 21:56:54

My contract is elapsing soon and I am currently in the throws of the job search. One thing I noticed across LinkedIn, Indeed, RailsGigs, GoRails etc etc, is that most of the opportunities there that are remote are all looking for mid to senior level developers. 

Could a recruiter explain this to me?
CSS Learning Guide 2022
Tags: webdev, beginners, css, html
Published: 2022-05-08 21:35:29



CSS Stands for Cascading Stylesheet, it is a scripting language for controlling the presentation, flow, and style of HTML Elements. To be honest CSS is not an easy thing to master, it requires practice and practice, in this article I will show you the roadmap of how you can start your CSS Journey.

#### Completely New To CSS
If you are completely new to CSS I personally recommend one of the best teachers on youtube The Net ninja, he will take you nice and easy and teach you so many CSS concepts such as The basics, positioning, responsive design, etc. [Check Him out](https://www.youtube.com/c/TheNetNinja).
If you are the type that prefers reading search out `freecodecamp.org` or `mdn` on Google.

#### Familiarity With The Basics
After you are familiar with the basics of CSS, what you will need to do is apply that knowledge and build useful stuff. There is a great website called `https://frontendmentor.io` it offers you design problems you can try out yourself and get community feedback when you submit them. if you are stuck building these challenges check out these youtube channels.

- [Tech Upfront](https://www.youtube.com/channel/UCtYwIkUNYGg0JVs0i4zBm5Q)
- [Tsbsankara](https://www.youtube.com/c/tsbsankara)

#### Practice and Consistency
Even though you can  build one or two challenges you can't stop, you have to keep on practicing and practicing and that's why I highly recommend checking out [frontendmentor. io](https://frontendmentor.io). Frontendmentor challenges are from newbie to Guru levels, so build up your skills with newbie -challenges and slowly progress to junior-challenges then to intermediate-challenges, then to advanced-challenges and finally Guru-challenges.
#### Basic CSS Roadmap

1. CSS First Steps (what is css, why use it, etc.)
2. CSS Building Blocks
   - CSS Selectors
   - The box model
   - Backgrounds and border
   - overflowing content
   - values and units
   - images, media, and forms
   - Styling Tables
3. CSS Layouts
    - Flexbox
    - CSS Grid
    - Positioning
    - Reponsive design and media queries
4. Styling Text
  - Fundamental text and font styling
  - styling lists
  - Google Fonts
  - Responsive typography(typography is a fancy word for font,)
 
#### Good Refrences

1. [MDN](https://developer.mozilla.org/) 
2. [css-tricks](https://css-tricks.com/)
3. [freecodecamp](https://www.freecodecamp.org/)
4. [internetingishard](https://www.internetingishard.com/html-and-css/)

#### Good Youtube Channels To Follow
1.  [The Net Ninja](https://www.youtube.com/c/TheNetNinja)
2. [tsbsankara](https://www.youtube.com/c/tsbsankara)
3. [Tech upfront](https://www.youtube.com/channel/UCtYwIkUNYGg0JVs0i4zBm5Q)
4. [kevin powell](https://www.youtube.com/kepowob)
5. [Florin pop](https://www.youtube.com/c/FlorinPop)

#### Conclusion
CSS Requires practice and dedication, just keep on building websites, and evenentually you will become a CSS pro, and learn some important CSS concepts.  Do not forget to check out the references list above,  thank you for reading see you next time ✌🏽✌🏽.
Conditionally Comparing Strings in JavaScript
Tags: javascript, webdev, beginners, programming
Published: 2022-05-08 21:19:13

**Comparing two strings to see if they’re the same.**
Use the equality operator (==) within a conditional test:
```
var strName = prompt("What's your name?", "");
if (strName == "Shelley") {
 alert("Your name is Shelley! Good for you!");
} else {
 alert("Your name isn't Shelley. Bummer.");
}
```
Two strings can be compared using the equality operator (==). When used within a conditional statement, a block of code is run if the test evaluates to true (the strings are equal):
```
if (strName == "Shelley") {
 alert("Your name is Shelley! Good for you!");
}

```
If the strings are not equal, the first statement following the conditional statement block is processed. If an if...else conditional statement is used, the block of code following the else keyword is the one that’s processed:
```
if (strName == "Shelley") {
 alert("Your name is Shelley! Good for you!");
} else {
 alert("Your name isn't Shelley. Bummer.");
}
```
**Factors that can influence the success of the string comparison:**
Strings have case, and can consist of uppercase characters, lowercase characters, or a combination of both
Unless case is an issue, you’ll most likely want to convert the
string to all lowercase or uppercase, using the built-in String methods toLowerCase and toUpperCase, before making the comparison, as shown in the following code:
```
var strName = prompt("What's your name?", "");
if (strName.toUpperCase () == "SHELLEY") {
 alert("Your name is Shelley! Good for you!");
} else {
 alert("Your name isn't Shelley. Bummer.");
}
```
**Note **that the toUpperCase method (and toLowerCase) do not take any parameters.
Comparison operators work numerically with numbers, but lexically with strings.
For instance, the value “dog” would be lexically greater than “cat”, because the letter “d” in “dog” occurs later in the alphabet than the letter “c” in “cat”:
```
var sOne = "cat";
var sTwo = "dog"
if (sOne > sTwo // false, because "cat" is lexically less than "dog"
```
If two string literals only vary based on case, the uppercase characters are lexically greater than the lowercase letter:
```
var sOne = "Cat";
var sTwo = "cat";
if (sOne >= sTwo) // true, because 'C' is lexically greater than 'c'
```
There is no strict greater than or strict less than operators, so it makes no difference if the data type of the operands differs:
```
var sOne = new String("cat");
var sTwo = "cat";
if (sOne <= sTwo) // both equal, so true, as data type doesn't matter
```
Finally, The localeCompare method takes one parameter, a string, which is compared against the string value to which it is attached.
The method returns a numeric value equal to 0 if the two strings are the same; –1 if the string parameter is lexically greater than the original string; 1 otherwise:
```
var fruit1 = "apple";
var fruit2 = "grape";
var i = fruit1.localeCompare(fruit2); // returns -1
```
🗳️ NodeJs WebSocket Real Time Voting App
Tags: voting, node, websocket, chartjs
Published: 2022-05-08 21:15:55

This is the original question: how to create a voting app so that everyone is updated in real time, 
at the very moment you vote?
This is the answer: via WebSocket!

### BackEnd
In Nodejs you can install [WS](https://www.npmjs.com/package/ws),
The WebSocket API tecnology allows you to create a communication client/server, and therefore to send
and receive data in real-time.

First of all you need to create a new WebSocketServer instance, you must indicate a Port number

```
import WebSocket, {WebSocketServer} from 'ws';

const wss = new WebSocketServer({port:8080});

```
now it is very simple, when a user votes you have to make a broadcast of the updated data,
in this case an object with string values and an array of numbers

```
wss.clients.forEach(c=>{
	if(c.readyState === WebSocket.OPEN){
		c.send(JSON.stringify({time:datetime, message:`Updated data`, data:jsonData.data}))
	}
});
		
```
### FrontEnd

In the client side you need to do the same, first create a WebSocket instance pointing to the server

```
const ws = new WebSocket('ws://localhost:8080');

```
now when the user gives the preference sends the data to the server that sends it back to all connected 
clients and then updates the UI

```
ws.send(JSON.stringify({data:chartData.datasets[0].data}));

```

very straight forward!

In this video guide you can see a super simple implementation of this, Have a nice day!

[Video Guide](https://youtu.be/5VEbSbM5m3Q)
🆗 👋
When not to refactor. Dealing with legacy systems as a responsible professional
Tags: softwaredevelopment, legacycode, refactoring, unittests
Published: 2022-05-08 21:11:01

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o0ls6sum69sy2zrjwo5j.png)
 
What can be better than driving to Cambridge to see a school friend? Same thing, but listening to the “Fireside Chat #37: Dealing with the most common problems in legacy systems” audio podcast from @Codurance, by José E. Rodríguez, Sandro Mancuso and Mashooq Badar.
 
Most of all I liked an idea of not being too hasty with adding a testing framework for all the cases in a legacy system. A professional’s approach may be not creating a full blown testing framework for bash script in 2 months time, if the script may be created in 2 days with similarl quality testing done “in the old ways”. 
 
I also like the idea of “the legacy system might be not the best one you have ever seen, but it has been working well enough for quite some time”.
 
Another idea was that “refactoring makes sense if it’s cost is comparable to the amount of money which it will bring to the business.
 
I cannot quote the podcast, as I was driving and couldn’t take notes. Sorry-not-sorry, safety comes first :) I might have even mixed 2 of the firechats a bit :)) Well, one more reason for you to actually listen to the podcast yourself :)))
 
I will continue overviewing the best podcasts, stay tuned.
 
Link to the podcast:
https://open.spotify.com/episode/7FMEr6D6A94zPbomcFbusP

Link to the events from Codurance. Some of the best things in life are free. 
https://www.codurance.com/events/
Do you work during your off time ?
Tags: mentalhealth, onestepbacktwofoward
Published: 2022-05-08 21:06:22

Have you ever wanted to finish a task, start a side project, learn new skill while you're off your working hours ? 

Of course you did. So do I.

Hello, my name is Anthony and i wanted to talk and share about time off. How i think doing something totally unrelated to your field is a game changer for when you go back to work.

I am a student, i am eager to learn, to know more, to do as many projects as i can. There is so much to learn yet not so much time in a day. How i wish i had a "Seishin to Toki no Heya" so i could master everything that i want, web3 stuff, blockchain, python, javascript etc.

My last holidays i spend them on my tasks, on my project, it was good to practice but i came back not as strong as i wanted to be. Sure my skills were better but what about my motivation and my focus ? I think they were not at their best.

This time, things were different, i didn't lunch vscode a single time for a week, hell, even my laptop started dusting on my desk. Instead i went hiking, biking, visit friends and familly, eat well, i took time for myself, for my **mental** **health**. I can only advise you to do so. 

I feel strong, full of power, ready to code and move foward with new challenges, let's make the world a better place!

Share your point of view about all of this! Do you feel more productive working on your days off ? Or when you took time for yourself ? 

I look foward to hear from you guys ! _Take care of your time_, it's one of the most precious thing you have
Concatenating Two or More Strings in JavaScript
Tags: javascript, webdev, programming, beginners
Published: 2022-05-08 20:56:37

**Merging two or more strings into one**
Concatenate the strings using the addition (+) operator:

`var string1 = "This is a ";
var string2 = "test";
var string3 = string1 + string2; // creates a new string with "This is a test"`
The addition operator (+) is typically used to add numbers together:
`var newValue = 1 + 3; // result is 4`
In JavaScript, the addition operator(+) is overloaded, meaning it can be used for multiple data types, including strings.
When used with strings, the results are concatenated, with the strings later in the equation appended to the end of the string result.
It can be used to add two strings:
`var string3 = string1 + string2;`
or you can add multiple strings:
`var string1 = "This";
var string2 = "is";
var string3 = "a";
var string4 = "test";
var stringResult = string1 + " " + string2 + " " +
 string3 + " " + string4; // result is "This is a test"`

There is a shortcut to concatenating strings, and that’s the JavaScript shorthand assignment operator (+=).
`var oldValue = "apples";
oldValue += " and oranges"; // string now has "apples and oranges"`
is equivalent to:
`var oldValue = "apples";
oldValue = oldValue + " and oranges";`
The shorthand assignment operator works with strings by concatenating the string on the right side of the operator to the end of the string on the left.
There is a built-in String method that can **concatenate** multiple strings: concat. It takes one or more string parameters, each of which are appended to the end of the string
object:
`var nwStrng = "".concat("This ","is ","a ","string"); // returns "This is a string"`
The concat method can be a simpler way to generate a string from multiple values, such as generating a string from several form fields. However, the use of the addition operator is the more commonly used approach.