teleren/devto huggingface dataset:
Pair Programming with a senior is invaluable.
Tags: beginners, rails
Published: 2022-05-04 00:09:09

I recently got in touch with a senior developer at Forem and we got to talking. I asked them if we could pair on a github issue that was posted on Forem's repo and they agreed. It was about a 2 hour call, and all I can say is that I valued that they could spare time to share knowledge. 

## What I learned
### They learn from you as you learn from them.
Small differences in your setup is what will cause this knowledge exchange. If you use VS Code and they use atom, there are things that you can do that they will want to learn how to do as well. If you're still learning a new language or framework, there may be some syntax that you may have recently learned that they forgot. All the while, they advice on your code and how best to express it to be legible to others.

### It's fun. 
I love learning. I will always take up an opportunity to learn. This means that when I sit down to pair with a senior, it means that I know I'm going to learn something new, no matter how small. And that is always an exciting prospect.

### It's eye-opening for both parties.
Sometimes, you may write code and open PRs for review, get feedback, change the code, ... etc etc. That whole process can abstract away your supervisor. You do not get to see how they think through the code. Pairing with them will allow them to ask you questions that make you rethink why you wrote the code the way you did. Conversely, it allows them to understand why you write code the way that you do. This can and will increase cohesion between the two of you. Win win. 

## Conclusion
Get a day, pair with a senior dev on a project you're working on. Even if they aren't from your team, or your company. It always helps.
How does Facebook receive incoming chat data through web socket ?
Published: 2022-05-03 23:42:25

So I was poking around with Facebook messenger web sockets , a strange thing I noticed that incoming socket event response ( when a message is received ) does not contain the message itself but some sort of JS code like this [link](https://ideone.com/3nfrkH) , then ok I thought when this code executes then it might call some API to retrieve the actual message but I did not find any follow-up requests that gets the actual message !! . Am I missing something ? where does the actual text message come from ?
100 Days of Code: Day 1
Published: 2022-05-03 23:14:04

On day 1 of my 100 days of code journey I learned how to use string manipulation, variables and the len, print and input function.

For example:

print("Hello " + input("What is your name? ")) 

The above line of code prompts you to enter your name and then greets you with a hello, followed by your name. 

print(len(input("What is your name? ")))

By using the len function (short for length) I was able to return the number of characters that you enter as your name. For example, entering "John" will print the number 4 to the console. 

name = "Henry"
print(name)

The above line of code stores a string in a variable. By using the print function and referring to the variable name in the parentheses I was able to print the value that the variable was holding, to the console, i.e. "Henry". 

Finally to finish off the day I created a band name generator. It works by asking you 2 simple questions. The city you grew up in and the name of your pet. It then combines these 2 values to give you a name for a music band, or any type of group.
[Desafio] - Busca em Fontes Desestruturadas
Published: 2022-05-03 23:02:09

> Conteúdo original [nessa thread do Twitter](https://twitter.com/zanfranceschi/status/1521625628109262848)

---

Ei dev,

Aceita um desafio pra fazer alguma coisa diferente? Já pensou uma API que faz buscas em coisas diferentes, tipos de fontes heterogêneas?

Cola mais pra entender o desafio!

cc @sseraphini

↓

![img](https://pbs.twimg.com/media/FR3mcYoVUAEQNT2?format=png&name=small)

---

Alguns anos atrás, trabalhei numa empresa onde era bem difícil achar as coisas. Tinha wiki, bancos de dados, repositórios git, arquivos, etc. Ficava agoniado procurando as coisas até que implementei uma busca que procurava por termos em diversas fontes e isso me ajudou muito!

---

Bom, o desafio é o seguinte. Implemente uma busca que procure em pelo menos duas fontes de dados distintas como, por exemplo, um banco de dados e arquivos/diretórios. Seria mais legal se vc usasse outras coisas (excel, um site, etc.).

Faça algo como nesse desenho aqui.

![img](https://pbs.twimg.com/media/FR3mc45VkAAjH_e?format=jpg&name=small)

---

Alguns pontos:

- Uniformize o retorno;
- Pense em como poderia paralelizar as buscar;
- Tente criar componentes especializados para cada fonte;
- Descubra algum design pattern que poderia ser usado;
- Projete para que seja fácil adicionar outras fontes.

---

Se você já fez alguma coisa parecida, compartilha aí pra gente saber.

Muito obrigado por ter lido até aqui!
Day 25: Project started!
Tags: productivity
Published: 2022-05-03 22:54:31

Hi!
Finally finally! I got started on my personal project after may days of procrastination I got started working on my own project I had always pushed it but today thanks to my two articles I was able to follow them and now I already completed those two thanks in less than an hour 
I can't forget when I spent like a week on each of those two task I just created my repo is now up and running and i can't help to continue adding more to it every day and writing more article guides 
Today also I refactored my paper and even thought i didn't do much I added a couple few pages and I think today was a good one

today will be a day back to work so I plan to have a busy one but I hope I will find something exciting to document maybe back to yesterday redux book who knows? we'll see
Signing off...
"Deploying Elixir: Advanced Topics" eBook
Tags: elixir, aws, kubernetes
Published: 2022-05-03 22:19:57

---
title: "Deploying Elixir: Advanced Topics" eBook
published: true
description: Deploying Elixir clusters to Production using Kubernetes
tags: elixir, aws, kubernetes
//cover_image: https://direct_url_to_image.jpg
canonical_url: https://blog.miguelcoba.com/deploying-elixir-advanced-topics-ebook
---
I have written a new Elixir book:

## Deploying Elixir: Advanced Topics

![Deploying Elixir: Advanced Topics](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5uzxyr3drmiwc3ib5u54.png)

It is based on the feedback and suggestions I got from the readers of my previous book "Deploying Elixir".

They asked me to write more about clustering in Elixir and deploying to Kubernetes.

**I'll take you from zero to deploying a Kubernetes cluster in the three big Cloud Providers.**

In this book:

- I'll show you how to create an Elixir Release from your application and Dockerize it
- Learn what an Erlang cluster is and how to create one
- We explore the different strategies to create clusters using the `libcluster` library
- I'll show you how to deploy it to a Kubernetes cluster using minikube
- When you feel comfortable scaling your app I'll show you how to deploy to Amazon Web Service, Microsoft Azure, and Google Cloud Platform

You can download a sample chapter here:

[Download sample chapter](https://miguelcoba.com/deploying-elixir-advanced-topics-sample.pdf)

If you prefer a video version, I presented part of chapter 4 in the this Elixir meetup talk:

[Watch it here](https://youtu.be/AvUPX6cAjzk?t=995)

Get the full book here:

## [Deploying Elixir: Advanced Topics](https://store.miguelcoba.com/l/advancedtopics)
My semi-formal Introduction
Published: 2022-05-04 22:11:08

---
title: My semi-formal Introduction
published: true
date: 2022-05-03 22:18:05 UTC
tags: 
canonical_url: https://hannan.codes/introduction/
---

Hello World,

<!-- Write about what defines you cause that's really important? -->

Every now and then I have to write a page introducing myself to the world and convey that somehow I matter and this is just one of those.

I am Hannan Ali, and I have been coding for a long time now. Before, I introduce you I just want to tell you that I love software development and playing with computers. So much so, that I happily gave up my formal education to pursue it full time before time.

### What is my stack, you ask?

I don’t like boxes personally, and defining one’s stack is just that. A box.

As long as it requires code and the problem is interesting enough, I am always open to learn new technologies, languages, frameworks, you name it!

Saying that, I would leave you confused, if I don’t give you a relative measure for my technology prowess.

Hence, I hereby proclaim, to all thy fellow readers, that I can be confidently placed in the categories below for hiring purposes ;) .

- Node.js and it’s frameworks and libraries
- Cloudflare Workers
- Google Cloud Platform
- React.JS (maybe get a smaller box when it comes to this)
- HTML
- CSS
- JavaScript
- TypeScript
- Fixing Cross Browser Compatibility Issues

### Do I learn new things?

Yes, I love to learn new things.

Right now, I am learning Rust programming language so I can write Cloudflare Workers in Rustlang.

Also preparing for a Google Cloud Certification at the moment.

### Do you have one of those PDF documents called Resume?

Why Yes? Thank you for asking for one. Email [resume@hannan.codes](mailto:resume@hannan.codes) and it’ll be sent to you quickly.
Always Keep Learning
Tags: carreras, camino, seniority
Published: 2022-05-03 18:08:57

---
title: Always Keep Learning
published: true
description: Como mantenerse actualizado en un mundo de constantes cambios?
tags: carreras, camino, seniority
//cover_image: https://direct_url_to_image.jpg
---

Desde hace un par de años, estoy participando en las mesas de *Polemica en /var* de los chicos de [sysarmy](https://sysarmy.com), y ayer me dejaron un comentario en el vivo de Youtube preguntándome *"siempre comentas el tema de que siempre estas aprendiendo, estaria bueno que ampliaras un poco ese concepto"*... asi que aca intentaré explicar un poco lo que quiero decir con esto.

Hace más de 20 años que trabajo en el área de sistemas, en varios puestos. Empecé como programadora, después fui software architect, luego fui tech leader, un poco de project manager, y ahora he vuelto un poco a programar. El camino es siempre bastante sinuoso, y no es único. Hay programadores que SOLO les interesa programar, y cualquier tarea de management, hace que se le ericen los pelos. Hay managers que nunca pasaron por código. Para gustos, colores, decía mi abuela. Hay mil combinaciones.

Pero entonces, cómo nos mantenemos "actualizados" en una profesión donde lo que aprendimos hace una semana ya es viejo, o ya hay una nueva tecnología dando vueltas? **Pues, aprendiendo todos los días algo nuevo**.

A ver, no estoy diciendo que todos los días tenemos que pasarnos 4 horas leyendo documentacion o leyendo capítulo tras capitulo de un libro. Simplemente les sugiero que se pongan como meta, aprender **solo una cosita** cada dia. Algun comando nuevo de GIT, algo de la consola, alguna nueva forma de codificar, aprender a automatizar algo chiquito, etc. Pero no dejen pasar un dia sin aprender **ALGO** nuevo. La suma de esas pequeñas cosas va a traerles beneficios a muy largo plazo!

*"Y qué puedo aprender? no se me ocurre por dónde empezar"* ... el otro día me crucé con este roadmap (no recuerdo dónde, perdon por no poner el source!), y me pareció una excelente forma de indicar las tecnologías, y cómo una puede relacionarse con la otra. Obviamente son CIENTOS de cosas, y no vamos a aprender "Cloud" en un dia, jaja. Pero la idea de como ir ampliando nuestros conocimientos, más allá de nuestro rol puntual, me parece EXCELENTE, y para mi, es muy divertido. Yo, particularmente, no me imagino sentada detrás de un escritorio, haciendo **lo mismo** durante 20 años. Si a Uds. les atrae esa idea, tal vez sistemas en general no sea la carrera correcta para ustedes :) 

![Roadmap](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wk50iqusj2of4c68xonj.jpg)
Container With Most Water
Tags: leetcode, array, twopointer
Published: 2022-05-03 21:41:26

---
title:  Container With Most Water
published: true
description: 
tags: leetcode, array, twopointer
//cover_image: https://direct_url_to_image.jpg
---

### You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).

Find two lines that together with the x-axis form a container, such that the container contains the most water.

Return the maximum amount of water a container can store.

Notice that you may not slant the container.

#### Problem statement taken from: https://leetcode.com/problems/container-with-most-water/
---
**Brute Force Approach**
```javascript
var maxArea = function (heights) {
    let maxArea = 0;
    for (let p1 = 0; p1 < heights.length; p1++) {
        for (let p2 = p1 + 1; p2 < heights.length; p2++) {
            const length = Math.min(heights[p1], heights[p2]);
            const width = p2 - p1;
            const area = length * width;
            maxArea = Math.max(area, maxArea);
        }
    }
    return maxArea;
}
```
*Time Complexity* : O(n^2)
*Space Complexity* : O(1)

**Optimized Approach**
```javascript
    let maxArea = 0, p1 = 0, p2 = heights.length - 1;
    while (p1 < p2) {
        const height = Math.min(heights[p1], heights[p2]);
        const width = p2 - p1;
        const area = height * width;
        maxArea = Math.max(maxArea, area);
        if (heights[p1] <= heights[p2]) {
            p1++;
        } else {
            p2--;
        }
    }
    return maxArea;
```
*Time Complexity* : O(n)
*Space Complexity* : O(1)
My thoughts.
Published: 2022-05-03 21:23:08

I'm definitely overthinking this first blog post, but here we go. In the beginning of this program I was so excited to learn a new skill, switch career paths, connect with new people following the same path as I. Then I had several things happen that slowed the process down for me, made me lose motivation. I'm slowly but surely gaining that motivation back. I want nothing more than to become a successful coder. 

Right now, I'm learning the basics of JavaScript. Creating functions and seeing your code actually works gives me such a proud feeling. It may not be a big deal to others, but it is to me. I don't know much as of now, but I cannot wait to get further into this program and look back on this post to see how much I have learned from now.
How to create blob storage in Azure
Published: 2022-05-03 21:08:04

**Creating a storage account**

- Sign in to Azure portal

- From the all service blade search for storage account

- Click on create fill the resource and storage account name as shown in the below image proceed to create and review
![storage account creation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/14ifixm0avmhexq9ig8b.jpg)

- once validated click on create and wait for the storage to deployed. Search for storage to verify if the storage account name entered earlier is created 

![storage account creation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sieo4d6s3dc52y1gx6ki.jpg)

**Working with blob storage **

- Click the name of the new storage account(qadriumarr), scroll to the Data storage section in the left menu, and then click Containers.

Click + Container and complete the information. When done click Create as shown in the below images

![blob storage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ic6xg4vzbug8y41gsfj1.jpg)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4h7rhaslxgna5y402z3w.jpg)
Back in the Portal, click on (qadriumarr) , and then select Upload.

Browse for the image file you just saved on your local computer. Select it and then select upload.

Click the Advanced arrow, leave the default values but review the available options, and then click Upload.

Note: You can upload as many blobs as you like in this way. New blobs will be listed within the container.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5xokmi1goklvku1jstda.jpg)

Once the file is uploaded, right-click on the file and notice the 
options including View/edit, Download, Properties, and Delete.


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

**Monitoring the created storage account**

Return to the storage account blade and click Diagnose and solve problems.

Explore some of the most common storage problems. Notice there are multiple troubleshooters here.

On the storage account blade, scroll down to the Monitoring section and click Insights. Notice there is information on Failures, Performance, Availability, and Capacity. as shown in the below images

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

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

Note: To avoid additional costs, you can optionally remove this resource group. Search for resource groups, click your resource group, and then click Delete resource group. Verify the name of the resource group and then click Delete. Monitor the Notifications to see how the delete is proceeding.

Thank you allll
Upwork jobs and its statistics.
Tags: upwork, python, copywriting, programming
Published: 2022-05-03 19:56:00



I was exhausted about the projects on upwork. I could not find my favourite jobs or projects. I would lose my patience every time I look at the job postings. No job is matching my skillsets. I would like to know about all the jobs and its statistics. So, I went for searching for all the skills on upwork. I found that other job skills have some pros and cons.But for you I'm cutting down all the details. The final result is that, 'copywriting' is the winner. It gets the most job postings and get less competetion. So you could go for the job skill easily. Just learn about copywriting from youtube. That's it for today. Thank you.
Develop a component with Style System in AEM
Published: 2022-05-03 19:53:33

---
title: Develop a component with Style System in AEM
published: true
description: These are the notes taken during the training. This guide is for developing a component with Style System in AEM
tags: 
//cover_image: https://direct_url_to_image.jpg
---

🐣 Creating a heading component with style system

Creating a heading component from title component.

Create a component called heading inside **/apps/your-project-flder/components/content/~create component**

create **heading.html**
```html
<div class="cmp_heading_textbox" data-sly-use.headingObject="heading.js">
    <h1 class="cmp_heading_text" data-sly-element=${currentStyle.type}>${headingObject.title}</h1>
</div>
```
create heading.js 
```javascript
"use strict";
use(function() {
	var titleByAuthor = granite.resource.properties["titleProperty"];
    var jcrtitle = currentPage.title;
    var pageName = currentPage.name;
    var title = titleByAuthor || jcrtitle || pageName;

    return {
        title:title
    };
});
```
Next thing we need is the **dialog boxes**. So copy *cq:dialog* and *cq:design_dialog* from title component. 

Now in order to have *style tab*. Copy *styletab* node from any core component and paste it inside *items* node in *cq:design_dialog*  

Add a styles in your *clientlib-components* folder. Create a clientlib folder for your component. create css.txt and styles.less files inside css folder as per the standard practice for adding styles to the component.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/th8u1djrcpdg6eb9dwlb.png)
 
We are using BEM notation to create the styling.
**style.less**
```css
.headingTextBox-dark {
    .cmp_heading_textbox {
	padding: 2px;
        background-color:#555555;
    }
    .cmp_heading_text {
	color: #ffffff;
    }
}
.headingTextBox-light {
    .cmp_heading_textbox {
	padding: 2px;
        background-color:#FFFFFF;
    }
    .cmp_heading_text {
	color: #555555;
    }
}
.headingTextBox-bordered {
    .cmp_heading_textbox {
	border: 2px solid #00b2b2;
    }
}
.headingText-center {
    .cmp_heading_text {
	text-align: center;
    }
}
```
Once done content author can create styling by adding styles to the component via component policy.
Something like this 👇
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2ny5rkut402449l4bkm.png)

Once done you can see pencil ✎ symbol in your component which shows different styles assigned.
How to save time by NOT learning IntelliJ IDE shortcuts
Tags: intellij, ide, productivity, keyboardshortcuts
Published: 2022-05-03 19:53:11

Many devs don´t like using mouse too much as it is slow. Luckily, modern IDEs provide us with hundreds of shortcuts, which shall theoretically save us some time. 

Unfortunately, sometimes in practice we spend more time memorizing shortcuts than actually use these very shortcuts.

Let me use my favourite Java IDE (IntelliJ Idea) as an example. It has numerous default shortcuts and your can also add your own ones. Just look at this list!...

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7syupnvwjl208vb7rkfp.png)
 
Somehow I learned those which I need for my work. How?
Easy. I have found the most important shortcut in the IntelliJ. Ctrl+shift+A

This shortcut is called "find action". It allows us to quickly look up *any shortcut by typing in few words from description*.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e5b8i6zr3m9owfi2kbq6.png)

The key idea is to use this shortcut every time you need to do a repetitive action for which you "feel" a shortcut must exist. This advice is easier to follow as it only takes 1 second, so our lasiness is not under a direct threat :) 

For example, you want to add a new line below the current line and move your cursor to the beginning of the new line.
*ctrl+shift+A
*new line
*read the shortcut
*shift+enter


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



Do not try to memorize the shortcuts, just look them up when you need them. The way human psychology works, after N number of *usages*, you will naturally memorize the shortcut. 

Even if your IDE doesn´t have such a shortcut, you can use same PDF file and quickly look it up. However, in this case it will require considerably more time. Let´s say it takes only 30-60 seconds. It does not look much, but I think such small delays actually are the ones which stop us from getting more productive with the tools we already have.

Good luck improving the quality of your adventure with an IDE of your choice.