teleren/devto huggingface dataset:
My first npm package: sequelize-airtight
Tags: node, sequelize, validation, mutators
Published: 2020-10-31 18:51:14

I've recently published my first npm package: [sequelize-airtight](https://www.npmjs.com/package/sequelize-airtight)

There are some features to add before bumping to v1.0.0 but it's taking shape and progressing a little bit every day.

The goal is to extend the validation methods available in sequelize (through `validate.js`) in order to make your models and data safer and reliable.

Additionally, it includes `mutators` that allow you to transform values on write (overloading each field's `set` method) or on read (overloading each field's `get` method).

All validators and mutators are opt-in meaning that just installing the module won't cause any changes to your models.
Per field, you can add a new attribute `airtight` that can contain the validators and mutators to apply. 

I'll surely write more about how everything works closer or at time of the release of v1.

I took this opportunity to learn and use GitHub Actions workflows and also dependency aliases which allowed me to easily test against `sequelize` v5 and v6 continuously.

Today, I'm just putting the word out and inviting you to have a look and possibly find something I've overlooked till now.
All constructive feedback is highly appreciated.

Very curious to know if this "clicks" with the community.

Package: https://www.npmjs.com/package/sequelize-airtight
Repository: https://github.com/alex-parra/sequelize-airtight

Best
Where vs Having in Postgress
Tags: beginners, postgres
Published: 2020-10-31 18:43:24

Lately, I've been working with postgreSQL, and one of the concepts that have been really helpful but at the same time I found it difficult was the difference between WHERE and HAVING. So I wanted to give a little context and show with an example.

The WHERE clause applies the condition to individual rows before the rows are summarized into groups by the GROUP BY clause. However, the HAVING clause applies the condition to the groups after the rows are grouped into groups. That's why the HAVING clause is applied after whereas the WHERE clause is applied before the GROUP BY clause.

### The example

Let's suppose that a school offers courses in which students can enrol, the school considers a star student to those that at in the final grade achieve a score superior of 8, let's see the table.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ozap02k0e00yqovp1k8w.PNG)
If the directives want to see who are the star students in general we use a query like this 
```
select * 
from inscription
  where final_grade > 8
```
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gr0lpwvofvuu7h3zmamw.PNG)

But if the directives would like to see in which groups are more than one star student they will need to use the HAVING clause
```
select course_id, count(*) enrolled_students 
from inscription
  where final_grade > 8
  group by course_id
  having count(*) > 1 
```
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6jsbck7l65batygwcgtz.PNG)

I hope this really dummy example will help you, and thanks for reading!!
My First HacktobeFest Experience
Tags: hacktoberfest, github, 100daysofcode
Published: 2020-10-31 18:38:37

# What is HacktobeFest?
Hacktoberfest 2020 is a month long virtual festival event to celebrate open source contributions presented by Digital Ocean, Intel and DEV. It is the easiest way to get into open source!

## How did I know about HacktobeFest?
I learned about HacktobeFest at a tech talk organised by seven Academy on open source
It was so inspiring how I could learn and apply in the code base of other people.
So I set forth to do by first open source contributions.
I stumbled across several repositories and was able to contribute and send my 4 pull request. In some days later, I recieved notifications telling me that my pull request were merged.
Though all these repositories were just simple repositories teaching me about how to use GitHub and sending pull request,and some of my pull request are yet to get matured it was a great learning opportunity.
## Repositories
1. [Best Programmer Websites](https://github.com/sdmg15/Best-websites-a-programmer-should-visit/pull/529)
2. [Developer community](https://github.com/subeshb1/developer-community-stats/pull/400)
3. [Dash2001 HacktobeFest](https://github.com/Darsh2001/HACKTOBERFEST-2020/pull/103)
4. [Arjunadhikary/HacktobeFest](https://github.com/arjunadhikary/Hacktoberfest/pull/154)
5. [Potentially/HacktobeFest](https://github.com/Potential17/Hacktoberfest-2020/pull/158)

## My thoughts
I learned alot and it was an awesome experience. I was glad I could complete the challenge. From now henceforth, I know how to go by looking into other open source projects and contributing meaningful code.

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

Thank you so much HacktobeFest 2020.
Hacktoberfest 2020 challenges
Tags: hacktoberfest
Published: 2020-10-31 18:30:34

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->


### [Intro Heading]
<!-- If you are new to the DEV community, introduce yourself and share a bit about why you joined DEV and decided to participate in Hacktoberfest this year.  --> 
### Background

<!-- Are you brand new to open source? What about coding in general? Tell us about how you got here →

### Progress

<!-- Share a bit about where you’re at in your Hacktoberfest journey. What stage are you at? How has the process been?  -->

### Contributions

<!-- This is where you can list the contributions you made and explain why you chose the projects you did. Don’t forget to add links!  -->


### Reflections
<!-- Overall, how has your Hacktoberfest 2020 experience been? If you’re a first-timer, will you participate again? What have you learned? Have you made any interesting connections? What is your next step in open source?  -->
Criando expressões CRON com 
Published: 2020-10-31 18:28:50

![CRONTAB demo](https://dev-to-uploads.s3.amazonaws.com/i/8bmojzflzc366mor8vxq.gif)
Em softwares comerciais, é comum a existência de algum runtime, que executa em background, tarefas de rotina na aplicação.
Essas tarefas, executam periodicamente. E para especificar a periodicidade, utilizamos expressões *cron*.

Sendo assim, a ferramenta [CronTab Guru](https://crontab.guru/) auxilia nesse trabalho.

![crontab using](https://dev-to-uploads.s3.amazonaws.com/i/v69jawsrpw0l06kmwbt2.png)

Ao clicar em cada um dos espaços, você visualiza uma lista de possíveis valores daquele campo.

Outros recursos:
- simulação de quando novas execuções vão ocorrer (baseado na data/hora da sua máquina e fuso horário)
- geração randômica de expressões cron.
Customize Your Thunderbird
Tags: thunderbird
Published: 2020-10-31 18:24:00

Thunderbird is my favourite email client in Linux. But on an 2013 MacBook Pro, using it became a pain.

## Stop Crazy CPU Usage

Due to some internal problems, my thunderbird CPU usage went up to 40% during idle time. Found this solution and worked:

<https://rainbow.chard.org/2013/02/19/thunderbird-high-cpu/> and <https://www.reddit.com/r/Thunderbird/comments/49ur6w/finally_got_thunderbird_to_stop_freezing_and/>

Open "Preferences" > "General" > "Config Editor...", set `mail.db.idle_limit` from `300000` to `300000000`.

Open "Preferences" > "General", turn off indexing service.

## Set the Default Sort Order

Open "Preferences" > "General" > "Config Editor..." again.

If you wanted to sort all mail by Thread, Descending (newest at top), the preferences in the config editor will look like this:
```
mailnews.default_sort_order:    default     integer      2
mailnews.default_sort_type:     default     integer     22
```

## Change the Font Size

This works on Thunderbird 78.4.0.

First, go to "Help" > "Troubleshooting Information", click the button "Show in Finder" next to "Profile Folder". It will open the profiles folder.

Find the folder named `xxxxxx.default-release`, create a new folder `chrome` along side with the `Mail` folder.

Inside the `chrome` folder, create a file `userChrome.css` with following content:

```css
/*
* Do not remove the @namespace line -- it's required for correct functioning
*/
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/* Set font size in folder pane */
#folderTree >treechildren::-moz-tree-cell-text {
    font-size: 1.2rem !important; /* You can also use em, pt or other units here.*/
}

/* Set font size in thread pane */
#threadTree >treechildren::-moz-tree-cell-text {
    font-size: 1.2rem !important;
}

/* Set height for cells in folder pane */
#folderTree >treechildren::-moz-tree-row {
   height: 22px !important;
}
/* Set height for cells in thread pane */
#threadTree >treechildren::-moz-tree-row {
   height: 22px !important;
}
```

This code is from https://superuser.com/questions/175135/how-can-i-change-the-font-size-of-a-thunderbird-thread-list-on-a-mac, modified a little to suit my need.

Next, you need to open "Preferences" > "General" > "Config Editor...", accept the warning dialog.

Search for `toolkit.legacyUserProfileCustomizations.stylesheets` and double click it to set its value to `true`.

Finally, restart your Thunderbird.

More readings:

- [Pane and menu fonts](http://kb.mozillazine.org/Pane_and_menu_fonts)
- [userChrome.css](http://kb.mozillazine.org/UserChrome.css)
Day 1 of 100 Days of Code
Tags: 100daysofcode, html, css, braziliandevs
Published: 2020-10-31 18:20:10

# Hello everyone :)

As promissed, this is my [repo][repo] from the first day of the 100DaysofCode, enjoy! :)

In this repo, i focused on customizing my Github's home page with some info and fun facts about me

### Connect with me:

[<img alt="ricardo.digital" width="22px" src="https://raw.githubusercontent.com/iconic/open-iconic/master/svg/globe.svg" />][website]
[<img alt="ricardocas | LinkedIn" width="22px" src="https://cdn.jsdelivr.net/npm/simple-icons@v3/icons/linkedin.svg" />][linkedin]
[<img alt="clickdoricardo | Instagram" width="22px" src="https://cdn.jsdelivr.net/npm/simple-icons@v3/icons/instagram.svg" />][instagram]


[repo]: https://github.com/ricardo-cas/ricardo-cas
[website]: http://www.ricardo.digital/
[twitter]: https://twitter.com/rcosta_digital
[instagram]: https://www.instagram.com/clickdoricardo/
[linkedin]: https://www.linkedin.com/in/ricardocas/
Happy Halloween!
Tags: halloween, zim, zimjs, costume
Published: 2020-10-31 18:18:35

Don't forget to leave your computer for Halloween!

![Dr Abstract Instructing you to leave your computer](https://dev-to-uploads.s3.amazonaws.com/i/4n280jmx4tj0aludu9wy.JPG)

---

But come tomorrow - we look forward to seeing you at ZIM.  https://zimjs.com where you can Code Creativity on the Canvas!  Feel free to join us on [SLACK](https://zimjs.com/slack)!
S3 vs HDFS
Tags: bigdata, aws
Published: 2020-10-31 18:06:00

---
title: S3 vs HDFS
published: true
description: All sorts of big data engineers confuse S3 and HDFS systems, assuming that S3 is the same as HDFS
tags: bigdata, aws
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/k4218bl3jkk1rfnnyri2.jpeg
---

I am very annoyed that all sorts of big data engineers confuse S3 and HDFS systems, assuming that S3 is the same as HDFS.

That’s not true.

HDFS is a distributed file system designed to store big data. It runs on physical machines that can run something else. S3 is the storage of AWS objects, it has nothing to do with storing files, all data in S3 is stored as Object Entities to which the key (document name), value (object content) and VersionID are associated. There is nothing else you can do in S3 because it is not a file system. S3 has “ presumably” unlimited storage in the cloud, but HDFS does not. S3 performs deletion or modification of the records in a eventually consistent way.

There are many other criteria like cost, SLA, durability, elasticity (you can create a custom lifecycle and version control over objects). But let’s not think about it, S3 wins there anyway.

Hadoop and HDFS have made it cheap to store and distribute large amounts of data. But now that everyone is moving to cloud architectures, the benefits of HDFS are minimal and not worth the complexity that it brings. That’s why now and in the future organizations will use S3 as a backend for their data storage solutions.

------

**Thank you for reading!**

Any questions? Leave your comment below to start fantastic discussions!

Check out [my blog](https://luminousmen.com/) or come to say hi 👋 on [Twitter](https://twitter.com/luminousmen) or subscribe to [my telegram channel](https://t.me/iamluminousmen).
Plan your best!
Drawing a Witch with HTML and CSS
Tags: css, html, codepen, showdev
Published: 2020-10-31 17:24:36

---
title: Drawing a Witch with HTML and CSS
published: true
description: How to draw a witch in CSS... with video of the process!
tags: css,html,codepen,showdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/jpl7iid4crgd8cq0nrrs.png
---

Today is Halloween, and this will be the last Halloween-themed CSS illustration for a while. I really enjoyed drawing this wicked witch from scratch.

{% codepen https://codepen.io/alvaromontoro/pen/VwjXVzy %}

There are two time-lapse videos of how this illustration was drawn. A [longer video (at 20x)](https://www.youtube.com/watch?v=cjt-EK4m3JA) and a [shorter video (at 40x)](https://www.youtube.com/watch?v=vFgyp6c0ROA):

{% youtube vFgyp6c0ROA %}

...Then I realized that you can put the 20x video at 2x speed on Youtube and get the same result as the 40x video 🤦... I guess than the short video can be put at 80x for people that don't want it even faster.
Don't Live with Broken Windows
Tags: programming, pragmaticprogrammer, pragprog
Published: 2020-10-31 17:17:40

---
title: Don't Live with Broken Windows
published: true
description: Fix bad designs, wrong decisions, and poor code when you see them.
tags: programming, pragmaticprogrammer, pragprog
cover_image: https://yordi.me/uploads/matt-hearne-LA0NPeHdp5A-unsplash.jpg
---

> Fix bad designs, wrong decisions, and poor code when you see them.

There was a car in an abandoned parking lot. The car was completely intact and shiny new, as if it just rolled out of the factory. A few weeks already it stood there on his own, noticed by some people who passed by, but didn't care too much.

Then, during one hell of a hailstorm, one hailstone decided to find its way to one of the car's windows, leaving a crack. The car that was once new and shiny got its first sign of deterioration. A few days later, after weeks of being untouched, people stripped it completely. From its seats to its steering wheel and from its wheels to its rearview mirror, nothing remained intact. And if it was its funeral, the last thing the car saw were bright flames circling all around him.

![](/uploads/matt-hearne-LA0NPeHdp5A-unsplash.jpg)

This is the "Broken Window Theory" in full glory. Leave a dent in your code and it will soon grow into an unmanageable piece of software. The amount of entropy tends towards a maximum, in the physical world as well as in the "soft world". Developers who work with beautiful code try to avoid being the first ones littering it. On the other hand, developers who encounter code smells are less careful, thinking the code is already broken anyway. Their own bad addition to it doesn't matter that much, does it?

> "All the rest of this code is crap, I'll just follow suit."

For that reason, fix each "broken window" in your code as soon as you find it. And if there is insufficient time, board it up and promise that you will fix it later.
The Most Important task of a Lead Software Engineer
Tags: leadership
Published: 2020-10-31 17:13:19

## The case
Whenever you see the role description for a lead Engineer, you will often find responsibilities such as "implement the best practices", "perform code reviews", "participate in standups"; While I agree that those tasks are part of the daily routine for any Lead Engineer they are far from being responsibilities of a ***True Leader***

## Light the spark
The most important task of a Leader is to light the spark within his team to not only follow his orders or assignments but to lead by themselves. 

Empower your team to make the big decisions without your direct input in each step, a decentralized team can grow horizontally as any well-architected framework should.

 
## Task Oriented vs Growth Oriented 
A good task-completion, project-oriented approach will only get your company so far, that is ***"Ok"*** when you don't want to grow. A well-distributed capable team of leaders will make it possible to explore areas you've never thought of, take on impossibles challenges for just one thinking head, and above all your company will be able to take on more projects.  

## What to do?
To accomplish that you must:
- Push your team to communicate their ideas to you, to the project manager, to his teammates.
- Be always open for debate
- Let them take control of pushing their changes to production
- Help them to develop a system thinking outside of their localhost 
- Encourage the team to be critical 
- Let them know that you are not always right 
- Provide clear, honest, and individual feedback for each.

##Not every senior wants to be a leader
The desire to command must come from within, is not something that you could impose as any other Jira item, not every senior wants to be a leader. 

Is your role to spot the signs "The proactive", "The new guy's coach" "The go-to", "The one who says I want" is no use trying to push the technical developer who only cares about the ***Big O*** to lead, your task is to inspire and provide guidance when required.

##Two Pizza 
Building leaders is the only way a ***two pizza*** team can become a large enterprise.
Fix for when Spotify name is a number
Tags: spotify
Published: 2020-10-31 16:58:15

Every now and then my _Spotify_ decided that instead of displaying my _nickname_, it will just spit out some **pseudo random number**, that I can't change and is apparently something called `Username`.

![Spotify Username](https://dev-to-uploads.s3.amazonaws.com/i/zqbyulymba217had4a1b.jpeg)
 
It was a bit annoying to see this number in the **Spotify app** and also my friends reported that my **Discover weekly** they've been following display this weird mish-mash.

Apparently there are multiple ways to solve this. This one worked for me.

## Not all apps are equal

But one thing I noticed that is very much worth noticing: Spotify on each platform has **different capabilities**. That is: Some things are **only** availale on _Spotify web_, some are only on _Spotify desktop_ and some are only on _Spotify (Android) app_. No need trying to find function X on platform Y, it's not there.

## How to get back a nice name in Spotify

1. In the **Spotify desktop app** go to **Settings** and choose **disconnect from facebook**: 
![disconnect-from-facebook](https://dev-to-uploads.s3.amazonaws.com/i/vt7wyu6twqjr7b37w47p.jpg)
2. Wait few minutes for things to settle / sync
3. In the **Spotify for Android** go to **Settings -> View profile -> Edit profile** and fill in your **Name**:
![Edit profile in Spotify for Android](https://dev-to-uploads.s3.amazonaws.com/i/lgflmf77n5wqx1mbi81b.jpeg)
4. Again wait a little bit
5. Tah-Dah!
![Spotify Discover weekly with correct nickname](https://dev-to-uploads.s3.amazonaws.com/i/da46vwx6tunwergrqk4y.png)
 
Hope this will help shining some light on this weird, weird behaviour.
My Hacktoberfest experience
Tags: hacktoberfest
Published: 2020-10-31 16:38:48

### Hey there! I am Samriddhi Agarwal an avid learner, a tech-enthusiast and now an open-source contributor as well ✨
My first DEV post is about my Hacktoberfest 2020 experience and what it needs to be a part of open-source, so if it holds your interest please carry on reading...

### Background
I started using GitHub about a year ago only, but since then I have worked only on my repositories and projects, and being a novice I never even thought of any other use of it. It was in the month of September when I came to know about Hacktoberfest through my college seniors. And that's when I decide to be a part of it.

### Progress
I checked out my mail a few days ago and the subject says "You’ve completed the Hacktoberfest challenge!", and I felt that experience worth sharing. The whole process of sending PRs and seeing them getting merged sets a new milestone in the journey of being a tech-developer. Searching for repositories to contribute, exploring things to send meaningful PRs, raising issues on own repositories, everything has been amazing.

### Contributions
Although it requires only 4 PRs to be merged successfully to complete the Hacktoberfest challenge, I sent a total of 8 PRs in the month of October and still counting for many many more. I made contributions to a shell command interpreter repo, a hacktoberfest repo by Mr.Vinit Shahdeo, and more. You can check out the links below:
https://github.com/DedAvocado/shell-interpreter
https://github.com/vinitshahdeo/Hacktoberfest2020

### Reflections
I believe that there are many first time experiences in a developer's life, it can be the first hackathon, the first published article, the first PR, and what not! For me, it was my first Hacktoberfest, and I have learned much about open-source contributions. Definitely, looking forward to making new contributions and mark my impression in this world of open-source.
Creating Scoreboard in Unity | Under 5 minutes!
Tags: unity3d, score, board, save
Published: 2020-10-31 16:21:15

In this tutorial i'll show you how you can create a score board / high score board for your game in unity under 5 minutes and also save the score board between sessions using JSON!
come watch!

{% youtube x0Wy7jQ7EFU %}

> Like this post? 
> Consider Support me via [Patreon](https://www.patreon.com/eranelbaz)
> Or Subscribe to my [YouTube Channel](https://www.youtube.com/channel/UCVUNeBGM5wZJKcOx0QwAaTA?sub_confirmation=1)
> You can also follow me on [Twitter](https://twitter.com/elbaz_eran)
Completed 4 pull requests in hacktoberfest!
Tags: hacktoberfest
Published: 2020-10-31 16:12:49


### hacktoberfest 2020
I have successfully completed the hacktoberfest challenge thus completing my 4 pull requests on Github.
### 

This was my first hacktoberfest challenge and completing it has surely given me a lot more confidence for the open-source contributions.

### Progress
I am currently learning android development and am keen to learn various new technologies around me.
<!-- Share a bit about where you’re at in your Hacktoberfest journey. What stage are you at? How has the process been?  -->

<!-- This is where you can list the contributions you made and explain why you chose the projects you did. Don’t forget to add links!  -->


### Reflections
Participating in this year's hacktoberfest has made me more confident in terms of open source development and has taught me ways in which I can learn new technologies and frameworks for my current field of interest. This was truly an amazing journey.
<!-- Overall, how has your Hacktoberfest 2020 experience been? If you’re a first-timer, will you participate again? What have you learned? Have you made any interesting connections? What is your next step in open source?  -->