<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vinícius Aarão Caldas da Costa</title>
    <description>The latest articles on DEV Community by Vinícius Aarão Caldas da Costa (@vinycxuz).</description>
    <link>https://dev.to/vinycxuz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F883662%2Fb4f3c8d9-e1ee-4878-9f53-c2842f2ddbb3.jpg</url>
      <title>DEV Community: Vinícius Aarão Caldas da Costa</title>
      <link>https://dev.to/vinycxuz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vinycxuz"/>
    <language>en</language>
    <item>
      <title>Por que usar Docker?</title>
      <dc:creator>Vinícius Aarão Caldas da Costa</dc:creator>
      <pubDate>Thu, 02 Jan 2025 23:40:41 +0000</pubDate>
      <link>https://dev.to/vinycxuz/por-que-usar-docker-1hp8</link>
      <guid>https://dev.to/vinycxuz/por-que-usar-docker-1hp8</guid>
      <description>&lt;h2&gt;
  
  
  Porque você deve aprender Docker o quanto antes
&lt;/h2&gt;

&lt;p&gt;O melhor amigo de DevOps é a padronização, isto é fato, e utilizar container é uma das melhores maneiras de fazer isso aliado a agilidade que é fundamental no desenvolvimento. &lt;/p&gt;

&lt;p&gt;E de antemão já quero mostrar as vantagens de usar Docker, sem enrolações:&lt;/p&gt;

&lt;p&gt;a. Resolve conflitos de dependência&lt;br&gt;
Sem contêineres, as dependências e arquivos ficam todos juntos em um servidor, se quisermos atualizar 1 dependências, terá que atualizar em todo o restante. &lt;/p&gt;

&lt;p&gt;b. Permite fácil expansão&lt;br&gt;
Quando um aplicativo de servidor precisa lidar com o uso maior do que um único servidor, a solução é colocar um proxy reverso e duplicar quantas vezes forem necessárias. Como os contêineres são baseados em imagens, podemos executar quantos contêineres desejar a partir de uma única imagem. Ou melhor ainda, usar um orquestrador, aonde eu só preciso declarar quantos contêineres desejo a partir de uma única imagem. &lt;/p&gt;

&lt;p&gt;c. Permite atualizações contínuas&lt;br&gt;
Com o Docker, podemos facilmente dizer ao orquestrador que atualiza as dependências do container em questão. &lt;/p&gt;

&lt;p&gt;d. Outras vantagens listadas&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cadeia de construção comum&lt;/li&gt;
&lt;li&gt;armazenamento de imagem comum&lt;/li&gt;
&lt;li&gt;maneira comum de implementar e expandir&lt;/li&gt;
&lt;li&gt;hospedagem comum de contêineres&lt;/li&gt;
&lt;li&gt;controle e monitoramento comum&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conceitos básicos entender :
&lt;/h3&gt;

&lt;p&gt;a. Container: é o que queremos executar e hospedar no Docker, como se fosse uma máquina isolada. Do ponto de vista conceitual, container roda dentro do host Docker com tudo o que precisa para funcionar como SO, pacotes, tempos de execução, arquivos, variáveis de ambiente, entrada padrão e saída.&lt;/p&gt;

&lt;p&gt;b. Imagem: qualquer container é criado a partir de uma imagem, descreve tudo o que é necessário para o container ser criado.&lt;/p&gt;

&lt;p&gt;c. Registro: Onde são armazenadas as imagens.&lt;/p&gt;

&lt;p&gt;Espero ter ajudado :)&lt;br&gt;
Vinícius Aarão&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>containers</category>
      <category>development</category>
    </item>
    <item>
      <title>Algorithm to determine if brackets are balanced</title>
      <dc:creator>Vinícius Aarão Caldas da Costa</dc:creator>
      <pubDate>Tue, 24 Sep 2024 19:31:00 +0000</pubDate>
      <link>https://dev.to/vinycxuz/algorithm-to-determine-if-brackets-are-balanced-2lll</link>
      <guid>https://dev.to/vinycxuz/algorithm-to-determine-if-brackets-are-balanced-2lll</guid>
      <description>&lt;p&gt;I start to post a serie of algorithms for help us, I learn the code, english and reinforce about this. And I expected to help you and contribute for the community.&lt;/p&gt;

&lt;p&gt;This algorithm is to easy to understand because your problem is to easy, but it's a excellent example to see how we can get the solution with simples steps.&lt;/p&gt;

&lt;p&gt;The first step is see the problem: &lt;/p&gt;

&lt;p&gt;&lt;em&gt;"we’re going to determine whether or not a set of brackets are balanced or not by making use of the stack data structure that we defined in the previous lesson.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let’s first understand what a balanced set of brackets looks like.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A balanced set of brackets is one where the number and type of opening and closing brackets match and that is also properly nested within the string of brackets." (educative.io)&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples of Balanced Brackets&lt;/strong&gt;&lt;br&gt;
{ }&lt;br&gt;
{ } { }&lt;br&gt;
( ( { [ ] } ) )&lt;br&gt;
&lt;strong&gt;Examples of Unbalanced Brackets&lt;/strong&gt;&lt;br&gt;
( ( )&lt;br&gt;
{ { { ) } ]&lt;br&gt;
[ ] [ ] ] ]&lt;/p&gt;

&lt;p&gt;What is your first thought to solve this? &lt;/p&gt;

&lt;p&gt;My second step to solve problems like this is to put pen to paper (I like to use simple diagrams) every variable that we might use and all data we have (It's similar to solve physics problems).&lt;/p&gt;

&lt;p&gt;Show this new example "}]"&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Array = ["}", "]"]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We need to compare the caracters and when we see over the examples, It's clarely that we can use the array to compare?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def is_match(p1, p2):
    if p1 == "(" and p2 == ")":
        return True
    elif p1 == "{" and p2 == "}":
        return True
    elif p1 == "[" and p2 == "]":
        return True
    else:
        return False


def is_paren_balanced(paren_string):
    s = Stack()
    is_balanced = True
    index = 0

    while index &amp;lt; len(paren_string) and is_balanced:
        paren = paren_string[index]
        if paren in "([{":
            s.push(paren)
        else:
            if s.is_empty():
                is_balanced = False
                break
            else:
                top = s.pop()
                if not is_match(top, paren):
                    is_balanced = False
                    break
        index += 1

    if s.is_empty() and is_balanced:
        return True
    else:
        return False
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our step to declare that is balanced or not is verify the number of the Array (never works in &lt;code&gt;% 2 != 0&lt;/code&gt;), and discover if exist a opening brackets for input in our array and find using is_match the closing brackets.&lt;br&gt;
When over the looping, is declared balanced or not.&lt;/p&gt;

&lt;p&gt;That's it!&lt;/p&gt;

&lt;p&gt;OBS: We need to use the Stack Data Structure. I believe that you know about this methods.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Stack():
    def __init__(self):
        self.items = []

    def push(self, item):
        self.items.append(item)             

    def pop(self):
        return self.items.pop()

    def is_empty(self):
        return self.items == []

    def peek(self):
        if not self.is_empty():
            return self.items[-1]

    def get_stack(self):
        return self.items
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/vinycxuz"&gt;@vinycxuz&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>python</category>
      <category>coding</category>
      <category>interview</category>
    </item>
  </channel>
</rss>
