teleren/devto huggingface dataset:
Please Explain Passwords Like I'm Five
Tags: explainlikeimfive, webdev, security, question
Published: 2022-10-10 01:50:07

While I was trying to create a new website (the hobby kind of site, not the business kind), I encountered a problem: user login.

And yes, I'm a beginning coder. I need the five-year-old-level of this.

My friend saw me code the more typical "one-uppercase, one-lowercase, one number, and one special character" version with a minimum of 12 characters. That that's when he hit me with both the US National Institute for Science and Technology (NIST) guidelines  guidelines ([800-63b](https://specopssoft.com/blog/nist-800-63b/)) and XKCD comic about [Correct Horse Battery Staple](https://xkcd.com/936/).

But then someone else overheard, and sent me [this rather awful slippery-slope straw-man article](https://blog.diogomonica.com/2014/10/11/password-security-why-the-horse-battery-staple-is-not-correct/). And when I went to get the actual thinking behind each, I found there was more subjectivity than sound reasoning.

The debate quickly devolved into each side calling the other side names like "idiot" and "fascist", while neither side really made its case (other than taking lots of time to show me "what ifs" and engage in slippery-slope, strawman, red herring, and various other fallacious arguments). 

So, what's the actual logic behind the answers? Can you please explain to me the actual thinking as if I'm five years old?
Smallest Common Multiple (freecodecamp)
Tags: javascript
Published: 2022-10-10 01:36:24

My solution without comments: 

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

with comments: 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5up3s6xe2gkhur3ici09.png)
[Desafio] - Sistemas Distribuídos: Tempos Ruins de Resposta Percebidos pelos Usuários
Published: 2022-10-10 01:19:12

> Conteúdo original em https://twitter.com/zanfranceschi/status/1579279644720738304

---

Ei dev,

Quando falamos de sistemas distribuídos, às vezes, a distribuição é geográfica também! E com isso, questões de saltos de redes, latência, tempo de resposta, etc. começam a ser aspectos bem enfáticos.

Se curte o assunto, pega esse desafio!

cc @sseraphini

↓
![Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q6xcz8b23lne35tvjcex.png)

---

Você descobriu que o povo brasileiro tem um potencial enorme pra comprar bumerangues! Por isso, criou uma loja virtual.

Só que existe um problema: os pedidos são feitos numa API que fica na Austrália ─ os tempos de respostas estão altíssimos e usuários estão reclamando muito!

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

---

Você fez um estudo e entendeu que tempos de resposta a partir de 220 ms são inaceitáveis para seus usuários! O ideal é que sejam de 130 ms para menos. O grande ofensor desses altos tempos de resposta estão na integração com a API na Austrália.

Como você resolveria isso? 👀

![Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qezbypb3mxjiahkj4ygi.png)
ActionText: Safe listing attributes and tags
Tags: actiontext, rails, ruby, webdev
Published: 2022-10-10 01:12:52

To safelist tags and attributes in ActionText we need to inspect the source since I was unable to find anywhere in the documentation how to do so.

Rails has a separate gem for sanitizing which can be found here:

https://github.com/rails/rails-html-sanitizer

The gem is utilized within ActionText by the content helper here:

https://github.com/rails/rails/blob/4328d0e16028a46bba79ab775e509a743ceaf18c/actiontext/app/helpers/action_text/content_helper.rb#L7-L10

What we can do with these `mattr_accessor`s is override them by creating an `initializer`.

We can create a file called `config/initializers/action_text.rb` and fill it with some custom contents for allowable things. Let's say for example we wanted to add table editing. We'd need to add `<table>`, `<tr>`, `<td>`, `<th>`, `<thead>`, and `<tbody>`.

In addition, we may also want to add some additional attributes which we could also do here say perhaps `target` for links.


```rb
# config/initializers/action_text.rb

# Add table tags
ActionText::ContentHelper.allowed_tags += ["table", "tr", "td", "th", "thead", "tbody"]

# Add link attributes
ActionText::ContentHelper.allowed_attributes += ["rel", "target"]
``` 

You can also see an example from @excid3 's latest ActionText episode:

https://github.com/gorails-screencasts/modify-actiontext-html-output/blob/master/config/initializers/action_text.rb

https://gorails.com/episodes/modify-and-customize-actiontext-html-output?autoplay=1

If you're feeling real wild, you could even replace the sanitizer and scrubber with your own custom sanitizer / scrubber!
Turbulence in Flocking Behavior Versus Fuel Injector
Tags: python
Published: 2022-10-10 00:25:02

Here's a cool project in the works. The aim is to, with low computational-cost Python codes, connect turbulence to flocking behavior using a boid algorithm, and show its results in comparison to a fuel injector program. It's interactive and has a lot of features. Could be of use for anyone trying to build any physics-related codes.

https://github.com/aarushkuk/Turbulence-in-Flocking-Behavior-Versus-Fuel-Injector

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i95xwgg5w5j2iz3kgufs.png)
[Desafio] - Error Handling em Consumo de Mensagens
Published: 2022-10-09 23:50:31

> Conteúdo original em https://twitter.com/zanfranceschi/status/1579256484533190656

---

Ei dev,

Você lida bem com seus erros? E os erros dos sistema que desenvolve? Deveria lidar bem com pelo menos um deles, né? 🥲

Enfim, tenho um desafio caprichado pra você: é um cenário de ERROR HANDLING usando processamento assíncrono via filas!

Bora?!

cc @sseraphini

↓

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

---

Esse é um desafio pra quem já conhece pelo menos um pouquinho de integrações via filas/tópicos ─ um desafio de nível médio.

Para que o desafio faça sentido, você precisa saber o que ACK (acknowledge) significa. Se não souber, dê uma procurada sobre isso antes, fechado?

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

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

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

---

O cenário do desafio são mensagens que possuem listas de itens não relacionados que precisam ser processados individualmente.

A questão central é o que fazer em caso de falha no processamento de apenas alguns desses itens quando nenhum item válido pode deixar de ser processado.


![Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/213c99ne20jp5fchdtt9.png)

---

Esse diagrama de sequência mostra em alto nível os possíveis casos:

- ok ─ quando tudo dá certo

- erro transiente/temporário ─ ex.: um serviço indisponível

- erro persistente/irrecuperável ─ quando não faz sentido tentar processar de novo; ex.: um CPF ou data inválida

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

---

Agora, o desafio:

Me diga como você lidaria com cada um dos cenários aqui apresentados. Como faria o error handling deles?

obs.: já usei esse desafio como parte de uma etapa de system design de processos seletivos.

![Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1zplrfz76lhyzfzwx1xn.png)

---

Resumindo o desafio:

Um consumidor lê uma mensagem. Essa mensagem possui uma lista de itens a serem processados individualmente. O que fazer quando o processamento de apenas alguns itens falham?

Lembre-se: você não pode deixar de processar itens válidos!

---

É isso!

Muito obrigado se leu até aqui! ♥️

Se curtiu, dá um RT no primeiro tweet pra ajudar, like, comenta, compartilha no grupo da família, manda pro crush, etc.
Is it still necessary to learn Webpack in 2022?🤔
Tags: javascript, beginners, discuss, programming
Published: 2022-10-09 23:28:34

Currently, I am on the journey of completing The Odin project Full-stack JavaScript curriculum. The current project I'm working on is the Restaurant page project. But for the life of me, I have a hard time understanding how to use Webpack. Well, I kind of understand the basics of using Webpack. Such as the entries, outputs, loaders and so fort. But when it comes to adding multiple web pages, that's where I get stuck. Yes I understand you need to use the HTMLWebpackPlugin but it's still not clicking. I can do a single webpage using Webpack.I just can't understand how to create a bigger project using Webpack.

So my question is, how important is it to learn Webpack as a frontend developer in today's job market?
Flutter + Dart Frog
Tags: webdev, flutter, dart, spanish
Published: 2022-10-09 23:00:23

Requisitos:
- Flutter 3.3.4
- Dart 2.18.2
- Dart Frog 0.1.2

Dart frog nos brinda esta oportunidad de volvernos Fullstack developers sin pasar por la complejidad de adquirir otro lenguaje si ya somos desarrolladores de Flutter. Así que veamos como combinar estas dos tecnologías para crear un stack completo para la web.

## Init proyect
### Creamos una carpeta para nuestros archivos
```sh
$ mkdir dartfrog+flutter
$ cd dartfrog+flutter
```
![Create folders](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hyrjulwr8g3oqf3h24rn.png)

### Creamos el frontend
```sh
# /dartfrog+flutter
$ flutter create frontend
```
![create frontend](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ip4qtzi0dogy4aban158.png)

### Creamos el backend
```sh
# /dartfrog+flutter
$ dart_frog create server
```
![create backend](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rj0o08s39ldn1vp6t2po.png)

## Abre la carpeta *dartfrog+flutter* en tu editor favorito
### Creamos una carpeta public en nuestro servidor
![create public folder](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0azvuds3lb1avmmakcb.png)
### Modifiquemos el *index.dart* para que sirva nuestro html
![serve index](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03qq9ftoohxq0vqqgxjr.png)
### Creemos una version web de Flutter
```sh
# /dartfrog+flutter/frontend
$ flutter build web
```
![Flutter build web](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r7oikje010aa6uzf0bth.png)
### Movamos el build a nuestra carpeta public en el servidor
```sh
# /dartfrog+flutter
$ mv .\frontend\build\web\* .\server\public\
```
![mv flutter build to server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szjq0q7cuzeksllaqidc.png)
## Probemos nuestro proyecto
### Corramos el servidor con dart_frog
```sh
# /dartfrog+flutter/server
$ dart_frog dev
```
![dart frog in dev](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i25edxutcuj3zhbdfzg1.png)
### Revisemos si todo funciona en la web
![flutter app on dart frog](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lufmfdzjb6z1xryqtyj8.gif)

## Y listo 🚀
Te dejo el [repositorio](https://github.com/ushieru/dart_forg-flutter) si quieres echarle un ojo.

Gracias a Dart frog los desarrolladores mobile con experiencia en Flutter pueden dar este paso a la web sin tener que aprender un nuevo lenguaje, minimizando la curva de aprendizaje. Y que opinas la próxima hacemos deploy de nuestra app?

y Happy Hacking 🧑‍💻🎉
Issues using Android SDK on Mac (Apple Chip)
Tags: javascript, android, mobile
Published: 2022-10-09 21:44:17

Hi
I am following the steps to install the Android SDK on my mac but I am getting the following error about Java
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9c9fc1th2l6mqgc5mht7.png)

Any ideas on how to resolve this, I've searched the web and not found anything that helps :-)

https://docs.unrealengine.com/5.0/en-US/how-to-set-up-android-sdk-and-ndk-for-your-unreal-engine-development-environment/

Thanks in advance

Stephen
How the CTO of a Cannabis Banking Company Improves His Productivity
Tags: productivity, management, techtalks, todayilearned
Published: 2022-10-09 22:03:00

{% youtube Jo9cJTYLdqc %}

Dama Financial's CTO Zach Goldberg listens to books at 3X speed for a reason: it helps him learn more crucial and useful info in a shorter amount of time when he's out driving or doing errands. Learn why you should do this too and more tips to become a better CTO in this episode of the Dev Interrupted podcast hosted by Dan Lines. Listen to the full episode here ► https://www.youtube.com/watch?v=tObejf6Ew0U

-------------------------------------

## [You’re invited to Interact on October 25th!](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog)

*Want to know how engineers at Slack and Stripe connect their dev teams’ work to the business bottom line? Or how team leads at Shopify and CircleCI keep elite cycle time while minimizing dev burnout and maximizing retention?*

*These are just two of the topics we’ll tackle at [Interact](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog) on October 25th.* 

*A* ***free, virtual, community-driven engineering leadership conference,*** *[Interact](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog) is a one-day event featuring over 25 of the most respected minds in development, all selected by the thousands of engineering leaders in the Dev Interrupted community.* 

## [Register now!](https://devinterrupted.com/event/interact/?utm_source=dev.to&utm_medium=referral&utm_campaign=202210%20-%20Event%20-%20Interact%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog)


![Register now!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p9xpvwbw5xfawom98qga.jpg)
Avoiding the Bloat with Microservices
Published: 2022-10-09 21:37:43

---
title: Avoiding the Bloat with Microservices
published: true
description: 
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/drucycksgsiwep9kkcfr.png
canonical_url: 'https://kevwe.com/weekly/202240'
# Use a ratio of 100:42 for best results.
---

When we implement microservices, the first tought is to reuse what we know well from the Old World.

In fact, reuse is a good thing.

But we should not miss the opportunity for smarter pieces to fill in.

Smarter technologies, niche libraries that help get the job done with less legacy.

A lot can be achieved with small microservices that get the job done, and done well.

I am thinking small Go services wherever Java is simply too much:

https://kevwe.com/weekly/202240
No Datas, No Marketing
Tags: tech, marketing, entrepreneurship, linkdb
Published: 2022-10-09 20:57:32



## How the LinkedIn Database Can Power Your Tech Startup?

In a world where data is everything, your tech startup needs to have a strong dataset if you want to be successful. And there's no better dataset than the LinkedIn database. With over 17 million companies and people's profiles from all over the world, this database has everything you need to power your marketing efforts.



If you have a business that needs to target or research professionals, then the LinkedIn database is an incredible resource. It's especially useful for recruiting, sales intelligence, and market research. It's a nearly endless source of data that can be used to find new leads, customers, and business opportunities.

In short, the LinkedIn dataset is a goldmine for startups and businesses alike. If you're not using it, you're missing out on a huge opportunity.


## So the question you're asking now is, how can I access these data? 




!["Francisco Inoque"](https://images.pexels.com/photos/3760607/pexels-photo-3760607.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1)
 
**This is where [LinkDB](https://nubela.co/proxycurl/linkdb) comes in.**
LinkDB is a complete LinkedIn dataset of people and companies that provides you with an opportunity to integrate the vast sea of LinkedIn public data into your business applications in an easy, efficient and legal manner.

Google and Bing scrape public LinkedIn profiles and index them as part of their search results, so you know this data is reliable. And given the recent Supreme Court ruling on public datasets, you have the legal precedent backing this up.

So how can you use this data to power your marketing? First, you can use it to create targeted lists of companies or individuals that match your ideal customer profile. Then, you can reach out to them through LinkedIn or other channels with personalized messages.

There are endless possibilities for how you can use this data to power your marketing efforts. So if you're not using [LinkDB](https://nubela.co/proxycurl/linkdb) yet, now is the time to start. Your tech startup will thank you for it!

### [Use LinkDB to power your marketing efforts and grow your startup!](https://nubela.co/proxycurl/linkdb)
I made a new visual UI to HackerNews
Published: 2022-10-09 20:54:17

https://v20.ohayo.computer/?filename=ohayo.ohayo&nodeBreakSymbol=%7E&edgeSymbol=_&data=hackernews.submissions_500_breck%7E_hidden%7E_rows.sortByReverse_score%7E__hidden%7E__vega.scatter_breck%27s_most_recent_500_submissions_to_news.ycombinator.com%7E___yColumn_score%7E___xColumn_time%7E__columns.keep_score_title_url%7E___hidden%7E___tables.basic
Code Smell 167 - Hashing Comparison
Tags: webdev, programming, java, blockchain
Published: 2022-10-09 20:46:19

*Hashing guarantees two objects are different. Not that they are the same*

> TL;DR: If you check for the hash, you should also check for equality

# Problems

- [Bijection fault](https://dev.to/mcsee/the-one-and-only-software-design-principle-3086)

# Solutions

1. Check for hash (fast) and then check for Equality (slow)

# Context

In 2022 Oct 7th one of the larger blockchains had to be halted.

[This news](https://www.coindesk.com/business/2022/10/06/binance-linked-bnb-price-falls-close-to-4-on-hack-rumors/) was shocking since most blockchains are decentralized by definition.

You can read a full article here:

{% post https://dev.to/mcsee/how-a-hacker-stole-566m-usd-exploiting-a-code-smell-2fkn %}

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/b97afa5814c25e6d9c53e35f3fc5f09e)
```java
public class Person {
 
public String name;
// Public attributes are another smell  
 
 @Override
 public boolean equals(Person anotherPerson) {
   return name.equals(anotherPerson.name); 
 }
 	
@Override
 public int hashCode() {
   return (int)(Math.random()*256); 
 }
 // This is just an example of non correlation  
 
 // When using HashMaps we can make a mistake 
 // and guess the object is not present in the collection
 
}
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/4a40df553e8d08860b23f35fb4400c0e)
```java
public class Person {
 
public String name;
// Public attributes are another smell  
 
 @Override
 public boolean equals(Person anotherPerson) {
   return name.equals(anotherPerson.name); 
 }
 	
@Override
 public int hashCode() {
   return name.hashCode(); 
 }
 // This is just an example of non correlation  
 
}
```

# Detection

[X] Semi-Automatic 

Many linters have rules for hash and equality redefinition.

With mutation testing, we can seed different objects with the same hash and check our tests.

- Identity

- Security

# Conclusion

Every performance improvement has its drawbacks.

Caches and replications are notable examples.

We can (must) use them carefully.

# Relations

{% post https://dev.to/mcsee/code-smell-49-caches-2734 %}

{% post https://dev.to/mcsee/code-smell-150-equal-comparison-ok1 %}

# More Info

[Equality and Hash](http://forum.world.st/Is-it-always-needed-to-redefine-hash-message-when-you-redefine-message-td4828721.html)

[Hashcode in Java](https://stackoverflow.com/questions/3563847/what-is-the-use-of-hashcode-in-java)

[Hashcode vs Equal](https://www.digitalocean.com/community/tutorials/java-equals-hashcode)

# Disclaimer

Code Smells are just my [opinion](https://dev.to/mcsee/i-wrote-more-than-90-articles-on-2021-here-is-what-i-learned-1n3a).

* * *

> This will surprise some of your readers, but my primary interest is not with computer security. I am primarily interested in writing software that works as intended.

_Wietse Venema_
 
{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}
what happens when your type google.com in your browser and press enter
Published: 2022-10-09 20:29:23

what happens when your type google.com in your browser and press enter
#
dns
#
network
#
tcp
#
loadbalancer
step 1:
Check the cache for the domain's IP address, for a sites like google.com it's usualla embedded in most browsers as a trusted site that uses https (this was done after a few man in the middle attacks which would hijack the initial request since the browser uses http (port 80) by default and is re-routed to https:(port 443) )
it might also check

OS cache
router cache
ISP cache
If the requested URL is not in the cache, the browser checks the DNS registry

step 2:
The browser initiates a TCP connection with the server.
Once the browser receives the correct IP address, it will build a connection with the server that matches the IP address to transfer information. Browsers use internet protocols to build such connections. There are several different internet protocols that can be used, but TCP is the most common protocol used for many types of HTTP requests.

To transfer data packets between your computer(client) and the server, it is important to have a TCP/IP connection established. This connection is established using a process called the TCP/IP three-way handshake. This is a three-step process where the client and the server exchange SYN(synchronize) and ACK(acknowledge) messages to establish a connection.

The client machine sends a SYN packet to the server over the internet, asking if it is open for new connections.

If the server has open ports that can accept and initiate new connections, it’ll respond with an ACKnowledgment of the SYN packet using a SYN/ACK packet.

The client will receive the SYN/ACK packet from the server and will acknowledge it by sending an ACK packet.

Then a TCP connection is established for data transmission!
after that an SSL connection is initialized to supprt communication over the secure https

step 3:
The browser now sends the request and the server's loadbalancer will then redirect your request to the respective destination and send a response back t the application

step 4:
The browser then renders the response html and awaits further interactions
Communication Culture
Tags: discuss, career, management, productivity
Published: 2022-10-09 20:12:40

How do you and your company think about communication and the culture around it? Especially curious as more people move to remote or hybrid models. I've found that a lot of companies do interesting things like:

- Ensure you always talk in public channels
- Recording Zoom meetings and making them public
- Always taking meeting notes

What does your company do?