teleren/devto huggingface dataset:
Fazendo Funcionar vs. Tornando Perfeito
Tags: frontend, desenvolvedorweb, react, nextjs
Published: 2024-05-11 11:53:11

# O Dilema do Desenvolvedor Front-End

No mundo dinâmico do desenvolvimento front-end, a eterna batalha entre "fazer funcionar" e "tornar perfeito" assombra os programadores. De um lado, a pressão para entregar projetos no prazo e atender às expectativas dos clientes impulsiona a busca por soluções funcionais. Do outro, a paixão pela excelência e o desejo de criar interfaces impecáveis ​​lutam para dominar o processo.

## Encontrando o Equilíbrio Ideal

Encontrar o equilíbrio ideal entre esses dois extremos é crucial para o sucesso de qualquer desenvolvedor front-end. É importante reconhecer que ambos os aspectos são essenciais para a criação de um produto de alta qualidade. No entanto, a forma como se priorizam esses aspectos pode variar de acordo com o contexto do projeto, as necessidades do cliente e os recursos disponíveis.

### Priorizando a Funcionalidade:

**Situações em que a funcionalidade é crucial:**

- Lançamentos de produtos com prazos apertados
- Protótipos e MVPs (Minimum Viable Products)
- Implementação de novos recursos em um sistema existente

**Benefícios:**

- Permite o feedback do usuário em um estágio inicial
- Valida a viabilidade das ideias do projeto
- Reduz o risco de investimentos em recursos desnecessários

### Aprimorando para a Perfeição:

**Situações onde a perfeição é essencial:**

- Interfaces que representam a marca de uma empresa
- Produtos com alto valor agregado
- Ferramentas e plataformas críticas para o negócio

**Benefícios:**

- Melhora a experiência do usuário
- Aumenta a confiabilidade e a credibilidade do produto
- Diferencia o produto da concorrência

## Ferramentas e Técnicas para Otimizar o Fluxo de Trabalho:

- **Metodologias ágeis:**
  - Permitem iterações frequentes e adaptações ao longo do desenvolvimento
  - Facilitam a priorização de funcionalidades e a entrega de valor incremental

- **Testes automatizados:**
  - Garantem a qualidade do código e previnem bugs
  - Liberam tempo para focar em aprimoramentos e otimizações

- **Ferramentas de linting e formatação:**
  - Asseguram a legibilidade e consistência do código
  - Facilitam a colaboração entre desenvolvedores

- **Design systems:**
  - Padronizam componentes e interfaces
  - Aceleram o desenvolvimento e garantem coesão visual

## Lembre-se:

- A comunicação com o cliente é fundamental para definir expectativas realistas e gerenciar prioridades.
- A busca pela perfeição não deve impedir o progresso e a entrega de valor.
- É importante ter um processo de feedback contínuo para identificar áreas de melhoria e aprimorar o produto ao longo do tempo.

## Conclusão:

O dilema entre "fazer funcionar" e "tornar perfeito" é um desafio constante para os desenvolvedores front-end. Ao encontrar o equilíbrio certo e utilizar ferramentas e técnicas adequadas, é possível criar produtos que atendam às necessidades dos clientes e representem a excelência em desenvolvimento web.
Local Storage, Session Storage, Cookies
Published: 2024-05-11 11:47:05

**_<u>Session Storage, Local Storage, Cookies</u>_** ->
All 3 are shared for all sessions of a particular domain.
On the contrary all 3 are different for different domains.

For ex - All sessions of linkedIn share same storage data. If we log out of 1 we get logged out automatically of other sessions too.
Moreover, Amazon can't access the storage data of Netflix.


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


**Local Storage V/S Session Storage V/S  Cookies**

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


**_<u>Cookie Value</u>_**
```JS
document.cookie
'_sharedID=de3d9297-7954-4a4c-8a0c-67ca81de78c8; _sharedID_cst=TyylLI8srA%3D%3D; _lr_env_src_ats=false; _ga=GA1.1.1881356554.1713978274; _cc_id=459e38e4f515aaa00f6f403c72df0cf4; _sharedID_last=Sat%2C%2011%20May%202024%2011%3A35%3A57%20GMT; _lr_retry_request=true; panoramaId_expiry=1715513760937; panoramaId=0f47b52cc4648a97ed9f5f997762a9fb927ac7264ca1250414ef6e71d0a09b17; panoramaIdType=panoDevice; __gads=ID=1af2437ee61d3e76:T=1713978275:RT=1715427360:S=ALNI_Mb8t_GAjGLWKJ2QEGALY_hM3AwBoQ; __gpi=UID=00000df95d1a0bfe:T=1713978275:RT=1715427360:S=ALNI_MaKva-B4ZGlQ9UxNANbiRAAfGi2WA; __eoi=ID=0fc95bf2a95362c2:T=1713978275:RT=1715427360:S=AA-AfjZkmIA4405HCva2xUWE3Crs; _ga_9YNMTB56NB=GS1.1.1715427358.6.0.1715427361.57.0.0; cto_bundle=SEKK2V9JdVdnckpnZlBPaUxEaUhZcm5ERFNFWkROcDRBZXdSUkhmTG1RV3NRMXBKNG5ZYjNQM0FobVpOTjl0NXd4d0VUT3loYzBxWmJXR2MlMkJ4WnB0NHolMkI3YkdpJTJCRyUyQlJzSGg3RHp5TjQ3MHRtaUdHSU9hczVMcGRhJTJCNjVKQWMxNUNmTmkyazBJRW4zQU1xR2p1WmhJN2p2U0JIdVBobjhvU3Q3RDJrYkN1RGxNY3U1RjlwWnJyWFVDVUpnd0dkQUpWMnMwbUJMNU04QU5wampmdHlGc0JKWlU1dyUzRCUzRA'
```

**_<u>Session Storage</u>_**
**Write**

```JS
sessionStorage.setItem("abc", 2)
sessionStorage
//Storage {abc: '2', length: 1}
sessionStorage.getItem("abc")
//'2'
```
highlight result search
Tags: angular, nebular
Published: 2024-05-11 11:45:36

I have create a menu with nebular and also search menu, that open the window for searching, now I want add a feature that, when user searching, and results shows, in the results highlight the matches words with the searched words, I did 85% but when shows in the page, not shows the html element, help to do it .......

`


  hightLightText(text: string, searchValue: string): string {
    const regex = new RegExp(searchValue, "gi");
    return text.replace(
      regex,
      (match) => `<span class="highlight">${match}</span>`
    );
  }
`
#The Hilarious Guide to `console.log()`
Tags: javascript, programming, learning
Published: 2024-05-11 11:25:23


So, you've stumbled upon the mystical `console.log()` method, eh? Well, buckle up, because we're about to embark on a journey through the wild jungles of JavaScript debugging, armed only with our wits and a keyboard.

## What's the Deal with `console.log()`?

Imagine you're a detective trying to crack a case in a noir film. `console.log()` is your trusty sidekick, always ready to spill the beans. This method lets you shout out whatever you want to the console, whether it's a secret message, a confession, or just a random thought about the case.

## Syntax Shenanigans

The syntax of `console.log()` is like ordering a pizza—you can have it plain, with just one message, or you can pile on the toppings (objects) until your console is bursting with information. You can even get fancy with substitution strings, like filling in the blanks of a mad lib.

## Logging Objects: Laziness at its Finest

Objects are like lazy cats—they only show you what they want you to see, when they want you to see it. When you `console.log()` an object, it's like catching a glimpse of that cat lounging on the windowsill. But beware! If you poke that cat (mutate the object), what you see might change too. To freeze-frame the moment, you can deep-clone the object, like taking a selfie with your cat and framing it on the wall.

## Wrapping it Up

So, there you have it! `console.log()` is your ticket to unraveling the mysteries of JavaScript. Just remember, with great logging power comes great debugging responsibility. Happy sleuthing!

*P.S. If all else fails, just blame it on the cat.*
The Secrets of Secure Web Access: How OAuth Revolutionizes Online Authorization! 🚀
Tags: oauth, webdev, programming, web3
Published: 2024-05-11 11:23:43

In the early days of the World Wide Web, back in the 1990s, the Internet was a different landscape as we know it today.

As the web began to proliferate and connect individuals and businesses across the globe, the need for secure and reliable access to online resources became an obvious question. However, technologies and standards for safeguarding user data and preventing unauthorized access were still in their infancy.

The Rise of Web Insecurities.

By the late 1990s and early 2000s, web insecurities were on the rise, with incidents of data breaches, phishing attacks, and unauthorized access making headlines. Without robust standards for authentication and authorization, users were at risk of having their sensitive information compromised. Users were increasingly vulnerable to having their sensitive information compromised, and the need for a more robust solution became urgent.

The Dawn of OAuth.

Introduced back in late 2006, OAuth(Open Authorization) is an open standard for access delegation, commonly used as a way for internet users to grant websites and applications access to other third-party websites without giving credentials or passwords.

I know that was a bit technical definition, let’s understand it

Have you seen the phrase “Sign-in with Google or Facebook or Discord”? The mechanisms that work behind it is OAuth. That means you are granting websites you are logging in the information of what is stored on Google, Facebook, or other websites, except the password or other credentials.

Journey of OAuth

In late 2006, OAuth emerged to enhance internet security by enabling the secure sharing of online resources. However, its initial version, OAuth 1.0, proved overly complex and challenging for users. Recognizing the need for improvement, a collaborative effort led to the development of OAuth 2.0. This revamped version simplified the process, making it more accessible and user-friendly. Today, OAuth 2.0 stands as the trusted standard for secure access online, ensuring a safer and more seamless internet experience for all users.

Conclusion

In conclusion, while OAuth revolutionizes online authorization, cyber threats persist. Phishing attacks, token theft, malicious apps, and misconfigurations pose risks. It’s crucial for users and developers to stay vigilant. By implementing security measures and promoting awareness, we can mitigate these threats effectively. OAuth enhances security, but ongoing efforts are needed to ensure a safer internet for all.

Leave your comments down below
How JavaScript's console.log() Surprised Me: A Deep Dive into Its Hidden Gems and Unexpected Behaviors
Tags: javascript, webdev, beginners, learning
Published: 2024-05-11 11:16:44

Hey there, fellow code wranglers! Ever wondered about that trusty sidekick of yours, `console.log()` in JavaScript? Well, buckle up, 'cause we're about to take a rollercoaster ride through its hidden wonders and quirky surprises!

Picture this: You're knee-deep in code, trying to tame those pesky bugs, and in comes `console.log()` riding on a unicorn of debugging magic. But hold onto your hats, 'cause this function isn't just your average Joe—it's got some fancy tricks up its sleeve!

So, what's the deal with `%s`, `%d`, `%f`, and `%o`? Think of them as secret handshakes for your messages. You throw in a placeholder, and `console.log()` fills in the blanks with real values, making your debugging dance a whole lot funkier!

But wait, there's more! Ever noticed how `console.log()` handles objects and arrays like a boss? It's like having a live feed into the matrix of your code! But be warned, sometimes it's like trying to wrangle a herd of cats—things can get wild when those objects start mutating behind your back!

And let's not forget about its posse of pals: `console.warn()`, `console.error()`, and `console.info()`. They're like the Avengers of debugging, swooping in to save the day with their flashy messages and superpowers of severity signaling!

But here's the real plot twist: did you know `console.log()` moonlights as a performance guru? That's right! Strategically placing it in your code is like sprinkling fairy dust on a snail—it helps you track down those sluggish spots and whip your code into shape! Just don't overdo it, or you might end up with a debugging circus instead of a sleek code Ferrari.

In the grand finale, `console.log()` isn't just a sidekick—it's the unsung hero of your coding adventures! So, next time you're knee-deep in JavaScript mayhem, don't forget to give a shout-out to your trusty friend `console.log()`—the real MVP of the coding world!
Shree Creators Model Making Company
Tags: webdev, ai, 3dmodel, beginners
Published: 2024-05-11 11:07:34

Shree Creators Model Making Company offers a wide range of model making services, including architectural model making, industrial model making, marine model making, and engineering model making. Our team of skilled and experienced model makers use the latest techniques and technology to create models that are not only accurate and detailed, but also visually appealing.

More Info : Contact Number : +919967728138
Mail us: info@shreecreators.com
Website : https://shreecreators.com/ 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywkt42orrxrlmhpr5vy1.png)
Can VChart be server-side rendering?
Published: 2024-05-11 10:14:51


### Question title

Can server-side rendering be used?  

### Problem description

Can server-side rendering be used? I want to provide a service to obtain chart images at the server level.  

### Solution

VChart supports Node server-side rendering. The drawing library VRender used by VChart supports Node environment rendering. In addition to VChart, you only need to install the [canvas ](https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fcanvas)package at the server level.  

  

### Code example


```markdown
const fs = require('fs');

const VChart = require('@visactor/vchart');
const Canvas = require('canvas');

// normal spec 
const spec = {
  type: 'radar',
  data: [
    {
      id: 'Map',
      values: [
        { key: 'North', value: 31, category: 'Destroyer' },
        { key: 'Northeast', value: 32, category: 'Destroyer' },
        { key: 'East', value: 21, category: 'Destroyer' },
        { key: 'Southeast', value: 15, category: 'Destroyer' },
        { key: 'South', value: 50, category: 'Destroyer' },
        { key: 'Southwest', value: 44, category: 'Destroyer' },
        { key: 'West', value: 32, category: 'Destroyer' },
        { key: 'Northwest', value: 32, category: 'Destroyer' },
        { key: 'North', value: 31, category: 'Destroyer' },
        { key: 'Northeast', value: 32, category: 'Destroyer' },
        { key: 'East', value: 21, category: 'Destroyer' },
        { key: 'Southeast', value: 40, category: 'aircraft carrier' },
        { key: 'South', value: 25, category: 'aircraft carrier' },
        { key: 'Southwest', value: 22, category: 'aircraft carrier' },
        { key: 'West', value: 18, category: 'aircraft carrier' },
        { key: 'Northwest', value: 7, category: 'aircraft carrier' },
        { key: 'North', value: 24, category: 'aircraft carrier' },
        { key: 'Northeast', value: 43, category: 'aircraft carrier' },
        { key: 'East', value: 42, category: 'aircraft carrier' }
      ]
    }
  ],
  categoryField: 'key',
  valueField: 'value',
  seriesField: 'category',
  legends: {
    visible: true,
    orient: 'bottom'
  }
};
const cs = new VChart.default(spec, {
  // set mode to 'node'
  mode: 'node',
  modeParams: Canvas,
  animation: false // close animation
});

cs.renderSync();

// export image
const buffer = cs.getImageBuffer();
fs.writeFileSync(`./chart.png`, buffer);
```

### Results show


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



Demo: https://www.visactor.io/vchart/guide/tutorial_docs/Cross-terminal_and_Developer_Ecology/node  

### Related Documents

Demo：https://www.visactor.io/vchart/guide/tutorial_docs/Cross-terminal_and_Developer_Ecology/node  

Tutorial:  
- Initialize VChart: https://visactor.io/vchart/api/API/vchart  

- Node server-side rendering tutorial: https://www.visactor.io/vchart/guide/tutorial_docs/Cross-terminal_and_Developer_Ecology/node  


Github：https://github.com/VisActor/VChart/
Matеrial Mattеrs: SAP MM's Impact on Procurеmеnt Dynamics
Tags: beginners, tutorial
Published: 2024-05-11 11:02:20

Introduction:
In thе fast-pacеd world of procurеmеnt, еfficiеnt managеmеnt of matеrials is crucial for organizational succеss. SAP Matеrial Managеmеnt (MM) stands at thе forеfront, rеvolutionizing procurеmеnt dynamics. Lеt's dеlvе into how SAP MM transforms thе landscapе of procurеmеnt procеssеs.
Thе Rolе of SAP MM in Procurеmеnt:
SAP MM, or Matеrial Managеmеnt, plays a pivotal rolе in thе procurеmеnt procеss by intеgrating critical functions such as purchasing, invеntory managеmеnt, and invoicе vеrification. Thеsе intеgratеd functionalitiеs providе a holistic viеw of thе procurеmеnt procеss, from sourcing matеrials to paying suppliеrs. By sеrving as thе backbonе of procurеmеnt opеrations, SAP MM еnsurеs that thеsе procеssеs arе sеamlеssly intеrconnеctеd, еliminating silos and optimizing еfficiеncy.
Efficiеncy Enhancеmеnt:
Onе of thе primary bеnеfits of SAP MM is its ability to еnhancе еfficiеncy within thе procurеmеnt procеss. This is achiеvеd through a variеty of fеaturеs, including automatеd workflows, which еliminatе manual tasks and rеducе procеssing timе. Rеal-timе data accеss еnsurеs that stakеholdеrs havе up-to-datе information at thеir fingеrtips, еnabling fastеr dеcision-making. Additionally, strеamlinеd approval procеssеs minimizе dеlays, еnsuring that matеrials arе procurеd and dеlivеrеd in a timеly mannеr, ultimatеly incrеasing opеrational еfficiеncy.
Conclusion:
In conclusion, SAP MM's impact on procurеmеnt dynamics is profound and far-rеaching. From еfficiеncy еnhancеmеnt to cost optimization and risk mitigation, SAP MM еmpowеrs organizations to achiеvе procurеmеnt еxcеllеncе. Embracing SAP MM is not just about adopting a softwarе solution; it's about еmbracing a transformativе approach to procurеmеnt that drivеs sustainablе growth and compеtitivе advantagе. Embracе thе powеr of SAP MM and unlock a nеw еra of еfficiеncy in your matеrial managеmеnt procеssеs. Elevate your career with comprehensive [SAP MM training](
https://intellimindz.com/sap-mm-training-in-bangalore/
Printable PyCon 2024 schedule
Tags: pycon, python, print, css
Published: 2024-05-11 11:01:33

Want to print out the PyCon US schedule? Paper doesn't run out of batteries, is easy to scribble on, and stuff into a pocket (technical term: _the affordances of paper_).

Here's some custom CSS and JavaScript to make it nicely printable.

1. Install the [Styler browser extension](https://chrome.google.com/webstore/detail/styler/bogdgcfoocbajfkjjolkmcdcnnellpkb?hl=en)

2. View a PyCon schedule page such as  https://us.pycon.org/2024/schedule/talks/ and click the Styler extension's S icon

3. Paste this CSS into the upper box:

```CSS
body.pycon-schedule div.internal-page-header,
body.pycon-schedule div.panel-heading,
body.pycon-schedule footer,
body.pycon-schedule div.badges {
  display: none;
}

body.pycon-schedule .container {
  margin: 0;
  max-width: fit-content;
}
body.pycon-schedule main.content {
  margin: 0;
  width: 100% !important;
}
body.pycon-schedule .calendar {
  left: auto !important;
  width: 100% !important;
}
body.pycon-schedule .slot {
  padding: 5px;
}
@media print {
  a:after { content:''; }
  a[href]:after { content: none !important; }
}
```

4. Paste this JavaScript into the lower box:

```js
$(document).ready(function() {
    if (window.location.pathname.match('2024/schedule/') && 
       !window.location.pathname.match('2024/schedule/presentation/')) {
    $("body").addClass("pycon-schedule");
  }
});
```

5. Print!

It'll run on any of the `https://us.pycon.org/2024/schedule/*` pages, but not the individual presentation pages such as `https://us.pycon.org/2024/schedule/presentation/61/`

It's not perfect, the right edge is slightly cut off, but it's more printable than the original.

Once printed, you can click the Styler icon and the `x` button to disable Styler for the site so you can browse the original version.

See also:

* [Printable PyCon 2023 schedule
](https://dev.to/hugovk/printable-pycon-2023-schedule-251d)
Entendendo os pilares da Programação Orientada a Objetos
Tags: programming, oop, beginners, java
Published: 2024-05-11 11:00:00

A Programação Orientada a Objetos possui quatro pilares, os quais são princípios de design de software usados para escrever um código mais limpo e orientado a objetos. São eles:
- Abstração
- Encapsulamento
- Herança
- Polimorfismo
Vamos conhecer cada um deles.

## Abstração
Abstrair algo significa esconder os detalhes da implementação dentro de algo - às vezes um protótipo, às vezes em uma função. Num código abstraído você não precisa se preocupar com o passo a passo da implementação.

Um exemplo claro do conceito de abstração seria o funcionamento de um carro. Quando acionamos ele para ligar, não precisamos saber quais passos ele faz para colocar o motor em funcionamento. 

Criar a abstração de um objeto do mundo real seria tomar suas caracteristicas mais relevantes e não se preocupar tanto com seus detalhes.

Abstração, portanto, é encontrar coisas semelhantes em seu código e fornecer uma função ou objeto geneŕico e servir em vários lugares/com vários propósitos.

## Encapsulamento
Encapsulamento significa que o código de cada objeto deve controlar apenas seu próprio estado. 
Todas as chaves e métodos (funções) de um objeto são suas propriedades. Se você redefinir ou excluir uma chave, por exemplo, estará alterando o seu estado.

Por isso, é importante limitar o acesso de quais partes do código podem ser acessadas.

O objetivo é esconder os dados em um lugar onde não precise de acesso e expor os dados de modo claro onde for necessário.

O encapsulamento metaforicamente seria uma casca de noz. Vinculando seus dados a algo, seja uma classe, objeto, módulo ou função, e fazendo o possível para mantê-lo o mais privado possível.

## Herança
Herança é um conceito que permite uma classe poder herdar métodos e atributos de outra classe. O principal benefício é a reutilização de código. 

Sempre que usamos herança tentamos fazer com o pai e o filho tenham alta **coesão**. Coesão é o quanto seu código está relacionado. 

Mantenha sua herança simples e previsível de entender. Ao usar herança, ela precisa ter a maior parte das funcionalidades (você nem sempre precisa ter absolutamente tudo).

## Polimorfismo
Polimorfismo é a condição de "ocorrer de várias formas diferentes".

Se você usou **herança** corretamente, agora tanto pais quanto filhos podem ser usados de maneira confiável. Cada filho que estende o pai pode substituir o comportamento do pai por um comportamento mais específico.

O verdadeiro poder do polimorfismo é poder compartilhar comportamentos e permitir substituições personalizadas.

## Conclusão
Espero que assim tenha ficado entendido quais são os pilares da orientação a objetos e que seu uso correto torna o código mais elegante e robusto.

## Referência 
[Os quatro pilares da Programação Orientada a Objetos - com JavaScript](https://www.freecodecamp.org/portuguese/news/os-quatro-pilares-da-programacao-orientada-a-objetos-com-javascript/)
Ibuprofeno.py💊| #104: Explica este código Python
Tags: python, learning, beginners, spanish
Published: 2024-05-11 11:00:00

## **<center>Explica este código Python</center>**
#### <center>**Dificultad:** <mark>Fácil</mark></center>

```py
z = (4, 8, 12)
cuatro, ocho, doce = z
print(doce)
```

👉 **A.** `4`
👉 **B.** `8`
👉 **C.** `12`
👉 **D.** `Ninguna de las anteriores`

---

{% details **Respuesta:** %} 

👉 **C.** `12`

Python posee una característica denominada desempaquetado (es muy similar a la desestructuración de JavaScript). Consiste en separar en variables individuales los items de una lista o una tupla.

En este caso separamos en 3 variables los 3 items de la tupla de manera posicional. Imprimimos `12` y eso es lo que mostramos por pantalla. 

{% enddetails %}
Premium Barbershop
Published: 2024-05-11 10:55:52

Discover the epitome of grooming luxury at our distinguished [3rd ave barbershop](https://premiumbarbershop.com/622-3rd-avenue/) nestled at 622 3rd Avenue. Here, we offer a comprehensive range of grooming services designed to enhance your style and confidence. From meticulous haircuts to relaxing hot towel shaves, our team of barbers is dedicated to providing top-tier service with attention to detail. Immerse yourself in the welcoming atmosphere of our salon and enjoy a personalized grooming experience tailored to your needs.