teleren/devto huggingface dataset:
Are Devs Dog or Cat People?
Tags: discuss
Published: 2021-04-01 00:38:55

Are you a cat person or a dog person? Most of my dev peers are cat people, and I wonder if that is true across the dev space. Based on my barely statically valuable sample I think developers might be cat people. I am both a dog and cat person, but I lean to the puppy power side. 
I found this blog to try to penetrate devs' minds and thought I would share it with the team.  https://devetry.com/blog/not-cat-person-how-work-with-a-software-engineer/
One dev had this to say, "Dogs are like Windows, requires a lot of attention. Cats are like Linux, low maintenance."

<B>The Typical Dog Person<b>

If dogs tend to be energetic, faithful, and easy to get along with, well, so do the people who love them. But survey author and psychologist Sam Gosling, Ph.D., admits that the differences between cat and dog people aren't huge. "There are certainly many, many cat people who are extroverts and many, many dog people who aren't," Gosling says.

<b>The Typical Cat Person<b>

Do you prefer to spend time on your own? Always game to try new things? Then you could be a cat person. The survey found that cat owners were more likely to be curious, unconventional in thinking and actions, and more prone to worry than dog people.

<b>Can a Pet Predict Your Personality?<b>

Are you a cat person or a dog person? The answer may say a lot about your personality. A survey done by the University of Texas at Austin found that some common ideas about pet lovers may be true. You may also be a lot more like your furry friend than you ever realized.

<b>Personality Trait: Conscientious<b>

The online survey asked people to rate themselves as "cat people" or "dog people." Then people answered questions designed to reveal their true personality. Dog people were 11% more conscientious than cat people. What it means:
•	Self-disciplined
•	Strong sense of duty
•	Tend to be "planners"

<b>Personality Trait: Extroverted<b>

Do you seize the day? If you're a dog person, you likely do. Dog people were 15% more extroverted than cat people in the survey. What it means:
•	Outgoing
•	Enthusiastic
•	Positive
•	Energetic

<b>Personality Trait: Extroverted<b>

Do you seize the day? If you're a dog person, you likely do. Dog people were 15% more extroverted than cat people in the survey. What it means:
•	Outgoing
•	Enthusiastic
•	Positive
•	Energetic

<b>Personality Trait: Agreeable<b>

According to the survey, if you're a dog person, you're 13% more likely to agree with a cat person. Agreeable people tend to be:
•	Trusting
•	Altruistic
•	Kind
•	Affectionate
•	Sociable

<b>Zoom Out<b>

If we zoom outside of the dev arena, a current study shows 46% are dog people, and 12% are cat people.

Are you a dog or a cat person? Please comment below and I will keep you posted on the results.
Azure Security Center
Tags: azure
Published: 2021-04-01 00:28:32

---
title: Azure Security Center
published: true
description: Azure Security Center
tags: Azure
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/hzsi5utitr6z3gdq92fq.jpg
---
**Task 1: Security Center Recommendations**
In this task, you will review Security Center Reommendations.
1. In the Portal, navigate to Security Center.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/homd2lwbi1bsmwgs8swz.png)
2. Under, Resource Security Hygiene, select Recommendations.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/guq4esc6pux3rkzjeeaw.png)
3. Review Secure Score, Recommendations status, and Resource Health.
4. Scroll down and under Controls review several recommendations. For example, Enable encryption at rest,
Manage access and permissions, and Enable endpoint protection.
5. Discuss how implementing the recommendations improves the Secure Score.
6. Under, Resource Security Hygiene, select Compute & Apps. Notice the tabs along the top to focus in on VM
servers, VM Scale Sets, and Containers.
7. Under, Resource Security Hygiene, select Networking. Review the Network map and Recommendations.
8. As you have time continue to explore

**Task 2: Security Center Policy**
In this task, you will review effective security policies.
1. You can control what Security Center recommends.
2. Under Policy & Compliance select Security policy.
3. Select your subscription and then click View effective policy.
4. At the top, click the assignment you want to modify.
5. Move to the Parameters tab
6. Review several different parameter settings by hovering over the information icon. For example, System
updates should be installed on your machines. Notice parameters can be disabled.
7. As you have time continue to explore.
8. Cancel any changes you made.

**Task 3: Security Center Regulatory Compliance**
In this task, you will review regulatory compliance.
1. You can review what regulatory compliance tasks Security Center is checking for you.
2. Under Policy & Compliance select Regulatory compliance.
3. Notice the tabs for different regulations. For example, HIPAA.
4. Select a regulation of interest and review where regulatory compliance is applicable.
5. As you have time continue to explore.
Standardizing Code — EditorConfig
Tags: editorconfig, standard, code
Published: 2021-04-01 00:11:51

[[Clique aqui para ler em português]](https://medium.com/walternascimentobarroso-pt/padronizando-c%C3%B3digo-editorconfig-7bab301bfdcb)

Defining a standard is very difficult, and most of the time we go into legacy projects that make it even more difficult to write in a standard, and then there are issues like frameworks and programming languages, but we don’t need to define everything from the beginning, standardization is something that we are building little by little and so today I am going to present the editorConfig.

With the editorConfig we define language-independent metrics and with that, even if someone on the team uses a different IDE, the code will have the same indentation in another IDE.

> EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.

## Installation

To install .editorConfig just go to the download page and choose your IDE, but for some publishers it is even easier, as in the case of vscode, just access the plugins page and type editorConfig and ready your IDE is already compatible.

## How to use

Now that your IDE is already set up, just create a file at the root of the project with the name .editorconfig and add your settings to it.

In vscode the EditorConfig plugin offers an option to automatically generate the file. Just right-click on an empty space in the file area and click Generate .editorConfig

{% gist https://gist.github.com/walternascimentobarroso/7c6ac0e38187ee59ee78bc7883c0327a %}

* **root**: Set the file as the default for the entire project;
* **[*]**: Creates a group, of which everyone will have the same pattern (in place of * you can put the extension of your language, eg: * .php or * .js and etc);
* **indent_style**: Indentation using spaces or tab;
* **indent_size**: defines the number of spaces;
* **charset**: standard fileset charset;
* **trim_trailing_whitespace**: Should you delete blank spaces at the end of each line or not;
* **insert_final_newline**: Whether or not to insert a blank line at the end of each file;

## More information

For more information visit the official website
https://editorconfig.org/

***

## Thanks for reading!

If you have any questions, complaints or tips, you can leave them here in the comments. I will be happy to answer!

😊😊 See you! 😊😊
How to check if a file exists asynchronously in Node.js?
Tags: node
Published: 2021-04-01 00:00:00

---
  title: How to check if a file exists asynchronously in Node.js?
  published: true
  tags: Nodejs
  date: Thu Apr 01 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/check-if-file-exists-asynchronously-nodejs
  cover_image: https://melvingeorge.me/_next/static/images/main-6918f960c3221ffd3dfc99fe9eccd382.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/check-if-file-exists-asynchronously-nodejs)
  
To check if a file exists asynchronously, you can use the `access()` method in the `fs` (filesystem) module in Node.js.

Let's say I want to check whether the path `/myFolder/myFile.txt` to my file exists or not. Here we can use the `fs.access()` method and pass 2 arguments:

- the first one is the `path` to the file to check
- the second one is an `error` first callback function. The callback function will be passed an error object if any error has occurred.

It can be done like this,

```js
// require filesystem module
const fs = require("fs");

// check if file exist
// using fs.access() method
fs.access("./myFolder/myFile.txt", (error) => {
  //  if any error
  if (error) {
    console.log(error);
    return;
  }

  console.log("File Exists!");
});
```

See the above coed live in [repl.it](https://replit.com/@melvin2016/check-if-file-exists-asynchronously-using-nodejs#index.js).

That's it! 😃

### Feel free to share if you found this useful 😃.

---
Show Today's Git Commits
Tags: git
Published: 2021-07-05 15:39:20

---
title: Show Today's Git Commits
published: true
date: 2021-04-01 00:00:00 UTC
tags: git
canonical_url: https://tech.serhatteker.com/post/2021-04/todays-git-commits/
---

We use `--since` flag in order to show the commit logs of today:

```bash
$ git log --since="yesterday"
# or
$ git log --since="midnight"
```

This flag is very humanized, e.g:

```bash
$ git log --since="2 weeks ago"
$ git log --since="4am"
```

For more info: [git-scm]

### Default Log

My default `git log` command is:

```bash
$ git log --oneline --decorate --graph --all
```

So I can use it with `--since` flag:

```bash
$ git log --oneline --decorate --graph --all --since="yesterday"
```

### Alias

An alias would be:

```bash
alias gloga='git log --oneline --decorate --graph --all'
alias glogay='git log --oneline --decorate --graph --all --since="yesterday"'
```


All done!




[git-scm]: https://www.git-scm.com/docs/git-log
Web Components!
Published: 2021-03-31 23:45:44

**What exactly are Web Components?**
Web components are a massive element of web pages. They are a set of features that provide the standard model for the internet. These components allow for encapsulation and interoperability of HTML code. These components give the website their own design and is what you are viewing when visiting a website, it defines the overall look of a webpage.

**Below is an highlighted example of what a web component looks like!**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6z3tdru5fjjsdb31j36d.png)

**How do Web Components Improve Accessibility?** 

First of web components make it a possibility to create your own HTML elements. They also have self contained modules of Java that can be used over and over again. And finally they allow the reuse of DOM fragments and are also able to encapsulate DOM itself.  

**Future Proofing**
What does it mean to future proof something? It means that over the test of time that something won't have to have huge changes made to it. Web Components have many problems that might lead to its demise. First they do not interact that well with the existing CSS and JavaScript elements. Second they cannot interchange different components from one framework to another. Third, it's very difficult to create or even customize components. But the last and final example is that integrating new components onto an already existing website is very difficult. But even though there are some downsides web components are getting better at every iteration.

**Who is Using Them?**

Here are some examples

**Youtube**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oiddmlktqwk00iaj03cg.png)
**Google**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/myn9gm2n2a79ozbc7ed9.png)
**Twitch**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qyfsp1cfeybcyrc6tgeq.png)


**Youtube Link**--- https://www.youtube.com/watch?v=TXKzWgNlW5k

**Sources**
-https://www.erikkroes.nl/blog/accessibility/the-guide-to-accessible-web-components-draft/
-www.youtube.com
-www.twitch.com 
-www.google.com
The Importance of naming in code...
Tags: javascript
Published: 2021-03-31 22:48:46

Choosing appropriate names when coding is always a good idea. IMHO. Many think that using cryptic, (single, double, triple) letters for naming is appropriate. Unfortunately, I beg to differ. we are forgetting one thing: **"We don't code for machines, we write for humans!"**

We spend the majority of our time reading code which accounts for 60-70% of our coding time and the remainder writing it. If we write code to be understood at a later time. Then shouldn't we always choose meaningful names? Wouldn't you agree? I don't know about you but I write and forget practically the very next day if I don't need to touch the code for a while. This is my own way to keeping sane and not storing or perhaps, I can say it in a nicer way: not overloading my brain with extra information, not required for my everyday upkeep. ;-)

A simple example: 

```
const a = [10, 5, 50, 6];
let t = 0;
for(i=0; i < a.length; i++){
   t += a[i];
}
console.log(t);
```

As you read the example above you will be able to follow it very simply as you are only dealing with a couple of variables. But you won't be able to follow the intent (or reason) why this code block was created.

Let's take the same example and add meaningful names to our variables and put some additional thoughts into our coding habits.

```
const priceList = [10, 5, 50, 6];
let totalPurchasedPrice = 0;
for(index=0; index < priceList.length; index++){
   totalPurchasedPrice += priceList[index];
}
console.log({totalPurchasedPrice})
```

I think you know where I am going with this. At a glance you don't have to think too much to know that someone is taking a list of prices, iterating over them and arriving at the *Total Purchased Price.*

You are probably going to say that the names are too long. Or that you don't need anyone else to read your code. I can argue that with minification the first issue will be taken care of. Specially with libraries and frameworks like ReactJs and Angular. But ultimately, I would like to leave you my intro statement: **"We don't code for machines, we write for humans!"** Save the sanity of your future self and those of your coding colleagues.

D-Agency
Primeiro Post
Tags: frontend, web, mobile, firstpost
Published: 2021-03-31 22:24:25

**Fala Devs**, meu nome é Otávio, tenho 22 anos, sou formado em Engenharia de Computação e atualmente trabalho como desenvolvedor *Front-end* *Web* e *Mobile* utilizando tecnologias como *Angular*, *React*, *Ionic* e *React Native*.

Pretendo começar a realizar alguns *freelancers* agora que finalizei a faculdade e surgiu a ideia de documentar todas as minhas descobertas e desafios aqui no [dev.to](https://dev.to) durante essa jornada. A ideia é desenvolver um canal de consulta que seja aberto a outros *devs* que venham a cair nos mesmos problemas que eu.

Espero conseguir manter uma frequência semanal de *posts* e alcançar a maior quantidade de *devs* precisando de ajuda! Fique a vontade para me contatar seja para tirar dúvidas ou só trocar uma ideia.

###### Foto de Capa by <a href="https://unsplash.com/@florianolv?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Florian Olivo</a> on <a href="https://unsplash.com/s/photos/programming?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Ternary Operations: the 1+ Line If/Else Statement
Tags: javascript, tutorial, beginners
Published: 2021-03-31 22:40:09

If/else statements represent one of the purest forms of programming. Logic gates and conditional functionality is often what makes the tech world go 'round. If/else is so ubiquitous and essential to writing effective code that it is often one of the first concepts and syntaxes learned by new programmers and really shouldn't need much explanation here. In contrast, there exists an alternate form of the if/else, often discovered later in one's learning, called a conditional/ternary operator, or simply ternary. Ternaries can be harnessed to write much more concise and elegant code, but not without the risk of over-complicating things if overused.

Take, for example, this bland and reductionist if/else:
```
if X
  A;
else
  B;
end
```
The code above can be transformed into the following ternary:
```
X ? A : B
```
Much prettier, concise, and some even say more readable! As stated before, care needs to be taken to not overdo it.
Try turning this into a single-line ternary:
```
if X
  A;
else if Y
  B;
else if Z
  C;
else
  D;
end
```
Tecnhically, it can be done. I might consider trying to use a case statement instead of turning this into a ternary, or I might even leave it alone, unchanged. But the point of this article is to show that it ___can___ be done! Check it out:
```
X ? A : (Y ? B : (Z ? C : D))
```
I'd argue that this is not easy to read, and might even be considered 'uglier' code than a traditional if/else. But what if we tried some chaining and formatting magic to make it a bit more readable?
```
X ? A      // if X is true, do A
: Y ? B    // else if Y is true, do B
: Z ? C    // else if Z is true, do C
: D        // if all else fails, just give up and do D
```
This is functionally identical to our traditional if/else defined above, but with the added bonus of cutting the number of lines used by more than half, and also finishing with (subjectively) more elegant code.

You can even have multiple actions occur for a condition by separating with commas:
```
X ? A, C      // if X is true, do A, then do and return C
: Y ? B, D    // else if Y is true, do B, then do and return D
: Z ? C       // else if Z is true, just do C
: D           // if all else fails, give up and just do D
```
The final action in a comma-separated list will be the returned value of the whole ternary operation.


There are lots of other ways to utilize the ternary operator, with plenty of documentation from [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) to help give you some ideas. The key is to be creative, but don't lose sight of the importance of readability!
Reset a Form in Just One Step!
Tags: javascript, html
Published: 2021-03-31 22:37:20

How do you clear a form? for years *I have been doing it the long way*, maybe you have too?

## Why?
Let's get the why out of the way, as a user I have been sent back to a form with stale data and I don't want to sit there and delete each field! 😡 every held backspace will make me hate this form and the product more and more.

##What is the long way?
Simply put, you query all the elements of the form with which could have a value (even doing this has the potential to balloon in complexity) loop through them and set all Thier values back to blank, but you must consider validation, disabled inputs especially.

## Wow that's alot of work!
Yes, and it got me thinking, surely there's a native way?! Yes there are 2!
So let's try the basic HTML only way first:

``` html
<form>
    <input type="text" name="description"/>
    <input type="reset"/>
</form>
```
Here we have a reset type input, have you ever seen such a thing? Let me know down in the comments. It's a button just like a submit and you guessed it, it resets the form.

Now onto JS
```js
HTMLFormInput.reset()
```
In other words, query a form and call the reset method and hey presto, no more data.

Thanks for reading 😬
100 Bytes Of Wisdom: Day 37
Tags: career, journey, advice
Published: 2021-03-31 22:08:15

---
title: 100 Bytes Of Wisdom: Day 37
published: true
description: Bytes of Wisdom is a new project by Sam Jarman that brings together snippets of advice for software engineers
tags: career, journey, advice
//cover_image: https://direct_url_to_image.jpg
---

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tye9w1v99bv1sec1s2pk.png)

JavaScript is great, sure, but your best tool you can work on is empathy. The ability to feel and think of what someone else might be feeling. This will help in a big way with any team situation during your software engineering career. In general, your soft skills should be the thing you work on the most over your career.

Heads up: As with any terse bit of advice, there will be exceptions of course, and subtleties and nuance that can't possibly be captured in a Byte of Wisdom. This has been what I've experienced, I'd love to hear yours in the comments too!

You can catch up with all the other bytes at http://bytesofwisdom.com/
how i become rich 
Published: 2021-03-31 21:47:58

Reach out to Mr Oscar Richie he has helped me a lot when it comes to trading as I ran into a lot of loss with different brokers. I lost more than $29,400 to two different brokers but I got all my lost funds recovered with the help of Mr. Oscar Richie and with his assistant and guidance I have been able to make good trade with him and it has been highly profitable to me. If there is anyone in need of an account manager who will show you how to best trade and  make formidable profit weekly using good and professional signals, Reach out on his Email oscarrichieworld@gmail.com or whats-app +1(513)-299-8247
Being an Influencer at Local Hack Day: Share
Published: 2021-03-31 21:46:25

## About LHD: Share
Local Hack Day: Share is an event run by Major League Hacking. It's a week full of learning, challenges and most importantly, *sharing*. After all, it is called LHD: SHARE.

## Why I Enjoy it so Much
I love LHD, or as some say it should be, Global Hack Week, considering it is now a whole week event. I really enjoy attending this event because
1. I get to meet so many new people, including both coaches and those taking part in the event, like me.
2. There is **SO MUCH** to learn & build during the week!
3. Guilds like BLAHAJgang help with collaboration across the world.

## What is There to Learn?
**TONNES**! There is something for everyone, be it a simple `hello world` or developing full stack programs. There's stuff in so many different languages that there has to be something for everyone. Even for non-technical people, there was a workshop just about making a dataset look good.

## Why Should YOU Take Part in a Local Hack Day?
LHDs are welcoming to ALL. You should join LHD: Share because you can improve yourself. Be it new connections, learning new things or even just to play some mini events, it is totally worth it!

## What is BLAHAJgang?
I'm glad you asked. BLAHAJgang is, as said by the leader, 'MLH's meme of the century'. What does this mean for you? There is gonna be a lot of memeable moments. Some of our events include karaoke, ASMR and a virtual pizza party!

## To Conclude
You should join Local Hack Day: Share. Come see the fun we have at [BLAHAJgang](https://blahajgang.lol) if you want. We also have thanks [MELONsquad](https://melon.blahajgang.lol)