<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jourdan Rodrigues on Medium]]></title>
        <description><![CDATA[Stories by Jourdan Rodrigues on Medium]]></description>
        <link>https://medium.com/@jourdanrodrigues?source=rss-515ef889830------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*RLtLGs5ZiFQIQTIWpppXhA.jpeg</url>
            <title>Stories by Jourdan Rodrigues on Medium</title>
            <link>https://medium.com/@jourdanrodrigues?source=rss-515ef889830------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 09:11:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jourdanrodrigues/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Merging Django Projects (part 1) — Back from the Microservice]]></title>
            <link>https://medium.com/@jourdanrodrigues/merging-django-projects-part-1-back-from-the-microservice-8a1822c94033?source=rss-515ef889830------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a1822c94033</guid>
            <category><![CDATA[django]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Jourdan Rodrigues]]></dc:creator>
            <pubDate>Thu, 23 Apr 2020 17:20:29 GMT</pubDate>
            <atom:updated>2020-04-23T17:23:19.711Z</atom:updated>
            <content:encoded><![CDATA[<h3>Merging Django Projects (part 1) — Back from the Microservice</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vr0yoMjjaEvwtwTJi03Prg.jpeg" /><figcaption>A physical representation of a usual microservice architecture.</figcaption></figure><p>I work in a very &quot;microservice oriented&quot; company. We have dozens of microservices up and running, each one with their own singularities and, sometimes, their own design.</p><p>One particular service (that used to be the company&#39;s monolith) got outdated and we decided to remove it from the big picture.</p><p>That said, what I&#39;m gonna cover in this article is the first part of the process I&#39;m taking to merge the pieces we use of this old service into other of our services by starting with the most difficult component there is to deal with in these cases: the database. I&#39;ll refer to them as &quot;target service/database/apps&quot; and &quot;source service/database/apps&quot;.</p><p>The final output of my use-case is a structure similar to the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*QLwKjt-xu0FieCqUMMgrSA.png" /></figure><p>In my specific case, the source service needs to be kept in place because there are other models and logic that will remain there to be handled in further iterations. Let&#39;s get started, then.</p><h3>Step 1: Reference to the source database in the target service</h3><p>In your settings&#39; DATABASES, place the reference to the source database alongside thedefault one (pick a name that resembles the source service).</p><h3>Step 2: Create a Django app in the target service</h3><ul><li>Create a new module (a directory with an __init__.py file) to be your new app (pick a name that resembles the source service);</li><li>Place an emptymodels.py file and amigrations module in it.</li><li>Place this new Django app in the INSTALLED_APPS settings.</li></ul><p>I had a case that the source service models had foreign keys set to dependencies of its own. You don&#39;t need to install the same dependencies if you don&#39;t want to; instead, you can just go to the dependencies&#39; source code and copy their model(s).</p><p>If you do have the dependency and want to reuse the model, you need to subclass it, override the objects with a manager pointing to the correct database (example in step 3), and use it within the source service models.</p><p>In my case, I copied the Django REST Framework&#39;s Token model to avoid installing it.</p><h3>Step 3: Copy the models to the target service</h3><p><strong>Try</strong> to make it as clean and plain as possible (no mixins or &quot;hidden&quot; logic), you need to have a very clear vision of the models in case you need to find a mismatch.</p><p>You&#39;ll also need to make sure those models only contact the source database. Check the snippet below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d8b8deaefeab7b496f8edf947ed26072/href">https://medium.com/media/d8b8deaefeab7b496f8edf947ed26072/href</a></iframe><p>With those classes, you can safely define your models (or custom managers/QuerySets) knowing they&#39;ll always point to the right database. Just a simple example would be class ModelA(SourceServiceModel): ....</p><h3>Step 4: Copy the migrations from the source service</h3><p>Just copy-paste them in your new Django app&#39;s migration module, then run python manage.py makemigrations to make sure the models are reflecting the database. No migration should show up.</p><p>That said, non-database settings in the models can differ from the original service. One example I can give is a function defined as default in a field can differ drastically if you want, since that default as a function is set at the Django level, not in the database.</p><p>Also worth mentioning that you might need to change the app name in the dependencies section of the migration — it needs to refer to the name that you gave to the app.</p><h3>Step 5: Make migrations run in the correct database</h3><p>Now we&#39;re gonna get to know the concept of database routers, and more specifically, the <a href="https://docs.djangoproject.com/en/3.0/topics/db/multi-db/#allow_migrate">allow_migrate operation</a>.</p><p>Simply put, you&#39;ll need target apps to run in the target database and the source apps to run in the source database.</p><p>In order to accomplish this more easily, I recommend splitting the INSTALLED_APPS in DJANGO_APPS, THIRD_PARTY_APPS and LOCAL_APPS (then &quot;sum&quot; them into INSTALLED_APPS). Their names are quite explicit as to what they contain. That said, this is the script a came up with to allow apps to migrate in the correct database:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f9e60968656c8e6530a092cb7eb690fc/href">https://medium.com/media/f9e60968656c8e6530a092cb7eb690fc/href</a></iframe><p>That class need to be set in the Django settings within <a href="https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-DATABASE_ROUTERS">DATABASE_ROUTERS</a>.</p><h3>Now it depends</h3><p>If you want to manage the source database from the target service, follow <strong>MANAGED</strong> steps, otherwise follow <strong>UNMANAGED</strong>.</p><h3>Step 6 (Unmanaged): Block source database migration in production environments</h3><p>You need 2 things for this:</p><ul><li>A flag telling you whether this command is running on production or not;</li><li><a href="https://docs.djangoproject.com/en/3.0/howto/custom-management-commands/">Override the </a><a href="https://docs.djangoproject.com/en/3.0/howto/custom-management-commands/">migrate command</a> to block running on production for source database;</li></ul><p>The thing is that, locally, we need to be able to manage all databases, but the production database should be managed by the source service. I&#39;m gonna assume that, somehow, you&#39;re settings a flag called PRODUCTION in the settings. This is what the migrate override would look like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/23b7145cb378af2b3e3566ad450266cc/href">https://medium.com/media/23b7145cb378af2b3e3566ad450266cc/href</a></iframe><h3>Step 6 (Managed): Update source database migration information</h3><p>Note: This step does not apply if you named the new app in the target service the same as the source service app.</p><p>Run the following SQL query in the source database:</p><p>update django_migrations set app=&#39;&lt;target app&gt;&#39; where app=&#39;&lt;source app&gt;&#39;</p><p>If you grabbed models from multiple apps in the source service, you need to run this for every source app.</p><h3>Step 7: Push to production</h3><p>This, OF COURSE, implies that you did A LOT of testing (both automated and manual), ran migrations in both databases locally multiple times to catch mismatches, etc.</p><p>This is a quite sensitive operation, do not push this to production with confidence based only on your guts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a1822c94033" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Merging Django Apps — Back from the Microservice]]></title>
            <link>https://medium.com/@jourdanrodrigues/merging-django-apps-back-from-the-microservice-cfe9b57011ee?source=rss-515ef889830------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfe9b57011ee</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[monolith]]></category>
            <dc:creator><![CDATA[Jourdan Rodrigues]]></dc:creator>
            <pubDate>Thu, 23 Apr 2020 14:41:06 GMT</pubDate>
            <atom:updated>2020-05-19T18:09:23.014Z</atom:updated>
            <content:encoded><![CDATA[<h3>Merging Django Apps — Back from the Microservice</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vr0yoMjjaEvwtwTJi03Prg.jpeg" /><figcaption>A physical representation of a usual microservice architecture.</figcaption></figure><p>In this article, we&#39;ll go through (what I believe to be) an extensive yet simple process to merge Django apps. If you didn&#39;t get to any reasons to do such a thing so far, I suggest you read the section <strong><em>Be careful about &quot;applications&quot; </em></strong>from <a href="https://medium.com/@DoorDash/tips-for-building-high-quality-django-apps-at-scale-a5a25917b2b5#db76">this article</a>.</p><p>There are some steps that are not required to accomplish this but can make it much easier. They&#39;ll be labeled as &quot;Optional&quot;.</p><p>Before we jump into this, I must say that having automated tests covering at least 100% of the files (not to be confused with 100% coverage) will help tremendously identify possible import issues. If you don&#39;t have tests, manually test the output of it thoroughly.</p><h3>Step 1: Django model&#39;s table names</h3><p>This is a very important step since default model&#39;s table names are tied to the app name. Change the models&#39; table names with the <a href="https://docs.djangoproject.com/en/3.0/ref/models/options/#db-table">models&#39; </a><a href="https://docs.djangoproject.com/en/3.0/ref/models/options/#db-table">Meta class option </a><a href="https://docs.djangoproject.com/en/3.0/ref/models/options/#db-table">db_table</a>. After changing the table name, run python manage.py makemigrations and push to your production/staging environments. <strong>This is required to be done before continuing.</strong></p><h3>Optional: Squash all migrations into 1 migration</h3><p>python manage.py squashmigrations &lt;yourApp&gt; &lt;lastMigrationNumber/0076&gt;</p><p>Refer to <a href="https://docs.djangoproject.com/en/3.0/topics/migrations/#migration-squashing">Django documentation about squashing migrations</a>. Make sure you have it down to 1 CreateModel operation per model.</p><h3>First of all: Choose one of the apps to stick with</h3><p>Pick one of your apps to contain the other ones. It&#39;s important to keep in mind that the module&#39;s (directory&#39;s) name of the app you pick <strong>should not be changed under any circumstances</strong> right now. This will be covered later as it&#39;s a bit more sensitive operation.</p><h3>Step 2: Copy the migrations&#39; operations</h3><p>Despite it seems dangerous, it&#39;s no harm at all. Django should already have applied all apps migrations, and since models will always refer to the same tables (thanks to step 1), we can move the migrations into any of the apps that there&#39;ll be no difference in Django&#39;s perspective.</p><p>Just grab the migrations&#39; operations and place them inside one of the migrations of the app you picked.</p><p>If you didn&#39;t squash the migrations previously, you need to update the dependencies items to point to the app you chose.</p><h3>Step 3: Move/merge files</h3><p>Copy-paste the codes from existing files (views.py, models.py, admin.pyetc.) and move new files from the old app(s).</p><p>There will certainly be import errors, which should be easily fixed by just importing from the correct place where the code now sits. There may also be cyclic-import conflicts, which I really can&#39;t cover since every project will have its own structure and design, but importing the conflicting classes/functions/variables locally (inside the scope of its usage) can fix the issue temporarily.</p><h3>Step 4: Update Django setup</h3><p>This list can vary from project to project, but these should be most of the files that will need to have old apps removed or redirected:</p><ul><li>manage.py (which points to the settings);</li><li>wsgi.py (which points to the settings);</li><li>settings.py or settings module (INSTALLED_APPS, locales, media/static, etc.).</li></ul><h3>Step 5: Update Django&#39;s ContentType references</h3><p>This is optional if you haven&#39;t used Django&#39;s permission system or even the ContentType model/system.</p><p>If you do have, <strong>before pushing anything to production/staging</strong>, there&#39;s one query to run to adjust the ContentType data. I did it manually (SQL query) because I discovered about this issue later but I assume doing it with a <a href="https://docs.djangoproject.com/en/3.0/topics/migrations/#data-migrations">new migration</a> (that runs <strong>before the updates are pushed to production</strong>)<strong> </strong>works just fine:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1634bd7a89bfd3977b29add82762544c/href">https://medium.com/media/1634bd7a89bfd3977b29add82762544c/href</a></iframe><p>If you rather do it manually too, here&#39;s the query I used:</p><p>update django_content_type set app_label = &#39;&lt;remaining_app&gt;&#39; where app_label in (&#39;old_app_1&#39;, &#39;old_app_2&#39;);</p><p>Highlighting again the fact this step must be done <strong>before pushing the updates to the production/staging environment</strong>. Pushing before will make Django create new entries for the models in the ContentType table and <strong>will be quite difficult to recover from this</strong>.</p><h3>Step 6: Push it to production/staging environments</h3><p>Once all apps are successfully merged into one, push the changes to production/staging. Of course, <strong>don&#39;t forget to test these changes thoroughly</strong>.</p><h3>Optional: Renaming the remaining app name</h3><p>When I went through this process, I was left with a very not-cool app name, and deeply wanted to change its name. If you have this feeling too, it&#39;s very simple to do so, but it requires manual access to the database:</p><ol><li>Rename the app name to whatever you want (I always leave just &quot;app&quot;)</li><li>Run the following SQL query in the database(s): update django_migrations set app=&#39;&lt;new name&gt;&#39; where app=&#39;&lt;old name&gt;&#39;</li><li>Adjust the references on the ContentType model (step 5)</li></ol><p>After doing this, just push the changes to production and you should be all set with a single-app Django project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfe9b57011ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linking containers — a Docker isolation approach]]></title>
            <link>https://medium.com/@jourdanrodrigues/linking-containers-a-docker-isolation-approach-5d81e66a3b6b?source=rss-515ef889830------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d81e66a3b6b</guid>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Jourdan Rodrigues]]></dc:creator>
            <pubDate>Wed, 30 Jan 2019 16:45:43 GMT</pubDate>
            <atom:updated>2019-02-21T12:57:51.609Z</atom:updated>
            <content:encoded><![CDATA[<h3>Keeping Docker containers private</h3><p>While using Docker during development, it&#39;s common to expose the containers in the host&#39;s ports or expose the containers&#39; IPs themselves to be able to communicate between containers.</p><p>This works very well, I can testify that, as I used this approach in many projects. But happens that, in a production environment, exposing the containers themselves unnecessarily might be dangerous for a fair number of infrastructure and container security reasons (that I won&#39;t cover for l̶a̶z̶i̶n̶e̶s̶s̶ objectiveness reasons).</p><p>Isolating the containers from the host consists of creating a network to contain all the services you need to be linked together. The problem with that is that the default hostname of a container is its ID, and you can solve it by specifying the hostname when running the container.</p><p>I know it&#39;s too abstract, so let&#39;s picture an example using <a href="https://docs.docker.com/compose/">Docker Compose</a> to make it clearer. Think of an NGINX container (<a href="https://www.nginx.com/resources/glossary/reverse-proxy-server/">don&#39;t know what a reverse proxy is?</a>), in front of a Python app and a Ruby app, both connecting to a PostgreSQL database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*hMBew2g0JAgMzsJQ3EA4ng.png" /><figcaption>Visual representation of the example</figcaption></figure><p>With that structure in mind, we can see clearly that we&#39;ll need to link the NGINX server to the Python and Ruby apps; and the Python and Ruby apps to the database. Being a little bit more specific, NGINX needs a host/port reference of the Python and Ruby apps; and the Python and Ruby apps need a host/port reference of the PostgreSQL database.</p><p>The be even more specific, below is the <em>docker-compose.yml</em> code for this example.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68edf2cee58ecaa99bb82c80c4cc20ba/href">https://medium.com/media/68edf2cee58ecaa99bb82c80c4cc20ba/href</a></iframe><p>As you probably noticed, the NGINX container is the only one exposed to external contact, since it&#39;s the one that will receive the users&#39; requests.</p><p>So, that&#39;s pretty much it: with this approach you can replacing the host/port value with the container&#39;s hostname, maintaining communication and keeping the containers private.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d81e66a3b6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[1 year on the road…]]></title>
            <link>https://medium.com/@jourdanrodrigues/1-year-on-the-road-4a3cacc5072?source=rss-515ef889830------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a3cacc5072</guid>
            <category><![CDATA[trip]]></category>
            <category><![CDATA[life-goals]]></category>
            <dc:creator><![CDATA[Jourdan Rodrigues]]></dc:creator>
            <pubDate>Tue, 20 Nov 2018 10:52:26 GMT</pubDate>
            <atom:updated>2018-11-20T17:55:04.396Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vi4KJdM4KRizYKqOpv2cfQ.jpeg" /><figcaption>Me in an open field with mountains and city in the back @ Innsbruck, AT.</figcaption></figure><p>Available in 🇧🇷 and 🇺🇸/🇬🇧.</p><p>~~~ 🇧🇷</p><p>Então, hoje, 20 de novembro de 2018, é um dia especial (pra mim). 1 ano atrás eu estava realizando minha 1a viagem de avião, me mudando pra fora da minha cidade natal pela 1a vez, pra trabalhar pra uma empresa com sede principal fora do país pela 1a vez.</p><p>Passei por muitas experiências boas nesse período, muitos choques culturais, muitos amigos legais que sinto muita falta de conversar, muita quebra de padrões e ideias que eu tinha. Experimentei como é ter dinheiro pra fazer o que eu quiser e ir onde eu quiser, mas também experimentei como é ter que ecomonizar cada centavo.</p><p>Conquistei bens materiais que só achei que ia conquistar depois da meia-idade, e visitei lugares achei que teria que esperar até a aposentadoria pra visitar. Andei de bicicleta na maior parte do tempo, andando “longas” distâncias pra conhecer lugares incríveis. Realmente acho que não teria sido o mesmo se tivesse sido qualquer outro transporte.</p><p>Eu não sou uma pessoa muito sociável, de ir em festas virar a noite, ou até mesmo beber, e isso não ajuda nada na hora de fazer amigos, e consequentemente, arranjar companhia de viagem. Ainda assim, acho que o ápice desse ano foi receber amigos em casa, cozinhar pra eles e receber elogios ~que pareciam sinceros~ (melhor sensação da vida).</p><p>Esse ano eu também descobri o que é um relacionamento à distância. Passamos menos de 3 meses juntos nesse período, o que foi absurdamente doloroso pra nós 2. Conseguimos nos falar quase todos os dias que estivemos separados, e isso sempre foi crucial pra me manter são.</p><p>Eu costumava dizer que eu poderia morrer depois que conhecesse algum país fora o Brasil, porque isso meu maior objetivo de vida. Eu realmente não tenho mais muitos objetivos de vida desde que fui pros EUA, tenho vivido bem aleatoriamente desde então, aceitando as oportunidades que me aparecem e tentando seguir com isso.</p><p>Uma coisa é certa: Simone, minha professora de Português do ensino fundamental, uma vez disse pra turma que “Sorte nada mais é do que o encontro da oportunidade com conhecimento”. Demorei alguns anos pra perceber que cálculo é simples: adquirir conhecimento/preparo pra quando as oportunidades aparecerem, ter “sorte”.</p><p>Posso dizer com certeza que essa filosofia me proporcionou a qualidade de vida e as experiências que tenho, assim como o que ainda está por vir.</p><p>~~~ 🇺🇸/🇬🇧</p><p>So, today, November 20th of 2018, is a special day (for me). A year ago I was going for my 1st airplane trip, moving out of my home city for the 1st time, to work for a company with HQ was out of Brazil for the 1st time.</p><p>Had a lot of good experiences in this period, lots of cultural chocks, many great friends which I miss deeply talking to, broke many patterns and ideas that I had. I felt what is like to have money to do whatever I wanted whenever I wanted, but also felt what is like having to save every penny.</p><p>Acquired goods that I thought I&#39;d get only after my fifties, and visited places that I thought would be possible only after I retired. Biked most of the time, going for &quot;long&quot; rides to meet amazing places. I really think it wouldn&#39;t have been the ame if it was any other means of transport.</p><p>I&#39;m not so sociable, of going to parties and keep it till morning, or even drink at all, and it doesn&#39;t help at all on making friends, and consequently, getting trip fellows. Still, I think the summit of the trip was to receive guests in my place, cook for them and receive compliments for it ~they seemed sincere~ (best feeling ever).</p><p>I also figured what a distance relationship feels like, in this year. We spent 3 months of this period together, and it was absolutely painful for the both of us. We managed to talk to each other almost every day that we were way, which was crucial for me to keep my sanity.</p><p>I used to say that I could just die when I get to meet another country, because this was my life goal. Actually, I don&#39;t have any more life goals since I went to USA, and I have been living quite randomly since then, taking the opportunities that appear and trying to get going with it.</p><p>One thing is certain: Simone, my teacher of Portuguese language from high school, once told to the class that &quot;Luck is no more than the meeting of opportunity and knowledge&quot;. It took me a few years to realize that the math is simple: acquire knowledge to have &quot;luck&quot; when the opportunities show up.</p><p>I can tell for sure that this philosophy gave me the life quality and experiences that I have, as well as the ones that are to come.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a3cacc5072" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Minha trajetória profissional]]></title>
            <link>https://medium.com/@jourdanrodrigues/minha-trajet%C3%B3ria-profissional-aa3a86280477?source=rss-515ef889830------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa3a86280477</guid>
            <dc:creator><![CDATA[Jourdan Rodrigues]]></dc:creator>
            <pubDate>Fri, 20 Oct 2017 14:47:28 GMT</pubDate>
            <atom:updated>2017-10-20T14:47:28.240Z</atom:updated>
            <content:encoded><![CDATA[<p>Incrível a sensação de iniciar em uma empresa nova. Todas as promessas de crescimento e sorrisos de chefes e empregados nos fazem crer que é ali que vamos finalmente iniciar a vida que merecemos, mas nada é exatamente como imaginamos.</p><p>Aqui, vou falar (sem brevidade) das minhas experiências e, por questão de ética profissional, não irei mencionar o nome das empresas nos relatos, mas usarei codinomes.</p><p>1 — Contas (1 ano e 12 dias)</p><p>Uma empresa inicialmente magnífica, principalmente por ser meu primeiro emprego. Cargo de atendente de call center. Nas primeiras semanas de treinamento, a sensação de ter uma segunda família toma conta de uma forma impressionante. O bem-estar de trabalhar lá é indescritível…</p><p>Até que a repetitividade do dia a dia começa a incomodar; até que o próximo atendimento será essencialmente igual ao anterior; até que o incômodo de ser pago para se comportar como uma máquina começa a levantar dúvidas sobre a própria capacidade e propósito de vida, e então as coisas começam a se esvair.</p><p>Uma indignação pela empresa tomou conta, o que me fez estudar formas de descontar nela. Eu era imaturo e não entendia porque estava com raiva ainda.</p><p>Entre conversas com advogados trabalhistas e dezenas de horas dedicadas à estudos, eu tomei bastante conhecimento da CLT, bastando para que eu tivesse tempo para pensar direito e decidisse sair da empresa por vontade própria.</p><p>2 — Pônei Cardíaco (2 meses e 20 dias)</p><p>Nessa empresa caracterizada como “pequena”, com relação próxima ao que seria o CEO e mais próxima ainda do que seria o CTO, pude colocar em prática o que aprendi no curso de Mecatrônica (que abandonei, eventualmente). Conserto de catracas e relógios de ponto eletrônicos, principalmente a parte de reparo em placas eletrônicas.</p><p>Com 3 dias, me ofereci para atender um cliente em Sobral, onde foi preciso acordar no meio da madrugada para chegarmos lá cedo. Uma viagem que envolvia o que seria o CMO, o CEO e um outro técnico para me instruir. Nessa mesma viagem, em algumas conversas com o CEO (as que não difamam a mulher ou justificam traições da parte dele), ficou acordado de que eu seria o responsável por manter o site da empresa.</p><p>Um momento radiante pra mim, já que haviam passado cerca de 2 anos estudando desenvolvimento web, mas nunca havia tido oportunidade de colocar em prática. Esse momento foi abalado quando um dos funcionários de lá ficou enfurecido em uma conversa com o CEO, na mesma semana. Não conseguia entender como alguém poderia se enfurecer com uma empresa daquela, com aquele CEO… Então procurei olhar mais atentamente.</p><p>Na semana seguinte fui convocado para assumir o papel do funcionário que havia se enfurecido, pois ele havia pedido demissão. Ele trabalhava com design e fabricação de crachás e eu, gentilmente, neguei a convocação, pois, apesar de saber trabalhar com design, meu foco estava em trabalhar com eletrônica. Para minha infelicidade.</p><p>O CEO iniciou um discurso sobre como os funcionários devem ser multifuncionais e devem se ajudar, já que a empresa é pequena. “Vocês tem que pensar na empresa”, ele disse, e assim eu fiz. Pretendendo não assumir (também!) o cargo de designer, indiquei minha irmã, que se saiu magistralmente bem.</p><p>Durante o tempo que passei lá, me mostrei altamente proativo e, por isso, fui alocado em outras funções, como suporte do comercial, técnico de informática (sendo mais preciso, cuidando da infraestrutura de computadores), lacaio para pagamento de contas e descontar cheques, sendo também cotado para atuar no setor financeiro e cotado para fazer manutenções prediais nos fins de semana. Nenhuma dessas funções me dariam incremento de salário, que, pelo CEO, R$ 1.000,00 cobria mais do que minhas funções e as 10 horas diárias de trabalho (sem contar o horário de almoço).</p><p>Em pouco tempo, a relação próxima com o CEO começou a se distanciar e as verdadeiras faces começaram a aparecer. Depois de 2 meses, minha carteira ainda não estava assinada, sob a justificativa de que eu ainda estava sob análise; meu trabalho estava sendo difamado pelo CEO, mas eu tinha boa relação com os outros funcionários e eles sabiam da verdade; atraso absurdo no pagamento do salário etc.</p><p>Eu senti um pesar enorme ao pedir demissão, pois sabia que podia contribuir muito para a empresa. Os clientes me adoravam e eu sabia ensinar a usar o sistema que a empresa vendia. Esse pesar durou até o momento que o CEO começou a me atacar verbalmente.</p><p>Tenho certeza que me lembro das palavras “mijão”, “menino amarelo” e algo sobre fraldas. Algo formidável de se falar para alguém que tinha toda a empresa dele na palma da mão, mas eu me contive na minha ética profissional.</p><p>Ao retornar para pegar os valores da minha rescisão, onde ele queria pagar consideravelmente menos, discutimos sobre os valores reais, o que o levou a desconsiderar todas as minhas contribuições e melhorias para a empresa (em todos os setores!) e disse, com uma fúria perceptível, disse que eu só havia dado prejuízo e perdido tempo.</p><p>Fiquei abalado pois era meu primeiro feedback de verdade sobre meu trabalho e, especificamente, sobre mim. Demorei para compreender que não estava no meu poder fazer algo para que essa experiência tivesse sido melhor. Eu ofereci meu melhor, que foi aproveitado, mal reconhecido e mal recompensado.</p><p>Soube que a empresa fechou o setor técnico 2 meses depois por falta de pessoal qualificado para atuar tanto nos treinamentos dos clientes quanto nas manutenções dos equipamentos.</p><p>3 — Estágio iLTDA (cerca de 1 mês e meio, sem registros das datas exatas)</p><p>Ao fim do curso de recuperação de placas-mãe de microcomputadores, eu precisava de um trabalho para praticar e, depois, buscar meus próprios clientes. Essa empresa caiu como uma luva.</p><p>Não maior do que uma única suíte no primeiro andar de onde o curso foi dado, foi onde pude me envenenar pelos gases emitidos pelos componentes envolvidos na recuperação de placas-mãe devido ao fato de não se usar EPIs (Equipamentos de Proteção Individual) lá, o que não me impediu de adquirir por conta própria, com meu salário de R$ 400,00 em uma carga horária de 8h (incluso 1 hora de almoço).</p><p>Dando o meu melhor, lembro que, dentre outros serviços, consertava uma média de 8 placas por semana, onde ele ganhava pouco mais de R$ 100,00 por cada uma.</p><p>Depois de fixar bem a prática, sugeri que me desse um aumento ou me deixasse participar como sócio na empresa, mas fui rebatido com “Tem que colocar a empresa em primeiro lugar”, sob o pretexto de que não tinha como pagar mais que isso e que eu devia me contentar. Foi o que eu fiz… Por mais um dia. Quando compareci lá novamente, levei um documento (leia-se um texto) especificando o que eu queria e como queria.</p><p>A resposta foi bem curta, “Certo. Vou dar uma olhada e falo contigo.”, seguida pela minha saída de lá. Cerca de duas semanas depois, talvez mais, eu e o professor do curso começamos a conversar sobre eu assumir uma assistência técnica no mesmo local em nome dele. Foi quando eu descobri que a empresa havia fechado. Eu ofereci meu melhor, que foi aproveitado, mal reconhecido e mal recompensado.</p><p>4 — MicroPhone (1 mês e 21 dias)</p><p>Uma oportunidade maravilhosa para minha carreira: apesar de estágio (voluntário!), era um cargo de desenvolvedor Full Stack (que atua em todas as áreas de um sistema web) com total liberdade de horário e computadores muito rápidos em uma empresa internacional. Apesar de usar tecnologia antiga, eu acabava de ingressar no mundo do desenvolvimento Web. Uma pena que houveram motivos para durar tão pouco.</p><p>Com contribuições significativas em vários aspectos, como documentação, design conceitual, espalhando conhecimento técnico e resolvendo tarefas mais rápido do que elas eram passadas à mim, esbarrei no obstáculo de saber demais.</p><p>Infelizmente, era uma equipe de estagiários liderada por um estagiário, todos monitorados por um coordenador que mantinha certa distância. Eu consegui completar uma tarefa utilizando uma tecnologia atual e baseada em como sites devem funcionar atualmente. Isso acabou me colocando em uma situação inicialmente desagradável, pois tive que explicar em 2 reuniões o que eu tinha feito, pois foi considerado “gambiarra”.</p><p>Incrível pensar que, com 2 anos de pesquisa autodidata, eu consegui estar mais atualizado do que a coordenadora de uma empresa internacional com anos de experiência. Tudo que me pediram foi para sucumbir à hierarquia e fazer o que me fosse pedido, mas eu sou uma pessoa que não consegue trabalhar de forma errada ou inapropriada, eu preciso fazer do jeito certo.</p><p>Com muitas ideias, conhecimento à ser aplicado e profunda desmotivação, sai em busca do meu próximo explorador. Eu ofereci meu melhor, que foi aproveitado e mal reconhecido.</p><p>5 — DeQualquerjeito (1 ano, 5 meses e 22 dias)</p><p>Uma startup promissora, com tudo pra dar certo. Tecnologias relativamente atuais, liberdade de horário, ambiente estilo Google, galera muito boa, chefes que mais parecem velhos amigos, salário bom (pra mim, na época), promessa de aumentos constantes… Definitivamente havia achado a empresa dos meus sonhos. Uma que pela qual eu colocaria a mão no fogo e que eu tinha certeza que colocaria a mão no fogo por mim.</p><p>Ainda na primeira semana, onde uma dúzia de novatos fazia um treinamento básico das tecnologias, eu fui convocado a trabalhar no que seria um dos maiores projetos da empresa. A oportunidade de “ser alguém” me deixava com um sorriso bobo onde quer que eu fosse. Aprendi a ler documentação como se não houvesse amanhã, pois os prazos eram relativamente curtos, mas eu pensava que seria inexperiência da minha parte.</p><p>Quanto mais eu aprendia, mais tarefas eu fazia em menos tempo. Unindo isso ao fato de que queria causar uma boa impressão, passei a comumente trabalhar em casa, deixando a faculdade de lado na maioria das vezes. Mas eu estava trabalhando em um projeto considerado de médio porte, o que contava muito para minha carreira, e eu não podia estragar isso.</p><p>Mas conforme eu ia trabalhando nesse projeto, mais eu percebia o péssimo estado em que o projeto se encontrava e que seria muito difícil construir algo bom em cima daquilo. O cliente tomou ciência desse fato, vindo reclamar com a empresa, que acabou atribuindo à mim a culpa disso. E “disso”, me refiro ao fato de o cliente saber, pois a empresa não se importou em nenhum momento com a qualidade do sistema.</p><p>A partir de então, eu resolvi olhar mais atentamente ao que acontecia. Acabei descobrindo que a empresa não preza a qualidade dos produtos/serviços que entrega aos seus clientes, batendo de frente com um dos meus objetivos profissionais, que fazer o meu melhor, sem exceção.</p><p>Já que meus princípios colidem com os princípios da empresa, óbvio que se originaram atritos. Várias vezes me vi discutindo com líderes de projetos e o próprio CTO da empresa quando era pedido que eu criasse uma “gambiarra” nos sistemas dos clientes. No fim das discussões, quando não restavam argumentos, eu concordava, abaixava minha cabeça e saia. Saía para voltar ao trabalho e fazer do jeito certo. Perturbador pensar que precisei, por incontáveis vezes, trabalhar escondido de forma correta.</p><p>Fiz isso em todos os projetos que participei, sendo fortemente agradecido (com palavras) principalmente pelos clientes, que acabaram por ver uma melhoria significativa em seus sistemas. Digo “todos os projetos que participei” porque eventualmente o cliente do primeiro projeto saiu da empresa, levando com eles alguns bons funcionários. E outros depois desse.</p><p>Passei a participar de outro projeto, com quem eu acreditava ser a pessoa mais qualificada da empresa como líder. Sendo um produto da própria empresa, eu me senti mais seguro e mais importante nesse projeto, até que outros funcionários começaram a me contar maus tratos que meu líder fazia sobre os outros. Alguns eu via por mim mesmo, mas por algum motivo estranho, eu tendia a compactuar com ele nesses casos.</p><p>Entre casos de maus tratos e “gambiarras” requisitadas, o limite da minha paciência se deu quando me proibiram de ajudar meus colegas de outros projetos. Estar disponível quando se precisa é minha marca e abandonar isso estava fora de questão.</p><p>Até aqui já havia recebido alguns aumentos de salário, mas depois desse ocorrido, me vi extremamente desmotivado em trabalhar nessa empresa. A solidão tomou conta em menos de 3 dias. Passei a trabalhar escondido em tarefas de outros projetos que outros líderes me passavam para que eu não trabalhasse no projeto do meu líder.</p><p>Para concluir de fazer da vida do meu líder um inferno, me ofereci ao CTO da empresa para iniciar o setor de DevOps da empresa (preparar os projetos para funcionar nos servidores) e sair do projeto em que estava foi minha única solicitação.</p><p>Tendo em vista o fato de que o choro é livre, meu líder apresentou incontáveis argumentos que apontavam a necessidade de eu estar no projeto e ficou acordado eu trabalharia de meio período como DevOps e meio como desenvolvedor no projeto dele, com o adicional de que passaria a trabalhar Home Office (em casa).</p><p>Passei a ajudar novamente meus colegas, já que eu não estava mais sob monitoria constante, mas já havia decidido que iria sair da empresa. Resumindo o restante, eu sai da empresa acertado de trabalhar como desenvolvedor na primeira empresa internacional da minha carreira, ganhando cerca de 50% a mais do que eu ganhava. Saí da empresa com uma cartela enorme de amigos e conhecimento, apesar de a empresa não ter aproveitado meu potencial direito.</p><p>Eu ofereci meu melhor, que foi muito bem utilizado, muito reconhecido e muito mal recompensado.</p><p>6 — Internet de Fábricas</p><p>Estranho pensar no crescimento que tive num período de cerca de 1 ano e meio. Passei de mero estagiário em uma empresa local à desenvolvedor em uma empresa brasileira internacional. No primeiro dia já fui requisitado à iniciar um projeto usando tecnologia do momento. A sensação de trabalhar com gente profissional e de mais “alto nível” me engrandeceu o ego.</p><p>Não há muito o que falar dessa empresa. Paga bem, paga certo, bons benefícios, bom ambiente, bons amigos, bons incentivos, as pessoas do RH realmente se importam com as pessoas e fazem campanhas para tornar o ambiente melhor ainda.</p><p>Fui selecionado para ser especialista Frontend (digamos sites) em um dos maiores e mais importantes projetos da empresa. Até hoje, não consigo nem expressar o quão bem me senti. Primeiro contato com cliente estrangeiro me deixou meio nervoso, mas me saí excepcionalmente bem, tendo recebido inúmeros elogios.</p><p>Aqui também fiz parte de uma iniciativa Open Source da empresa (projetos abertos para outras pessoas trabalharem, se quiserem), o que me fez ter contato com gente muito legal de conversar e aprender junto.</p><p>Se eu tivesse que reclamar de algo, seria de alguns projetos legados (antigos, de tecnologia muito ultrapassada) e/ou com tecnologias ruins de se trabalhar, mas os próprios desenvolvedores estão em constante reciclagem e a tendência é sempre melhorar, pelo que observei.</p><p>Essa empresa aproveitou relativamente bem o que eu tinha a oferecer em relação à contribuições minhas em projetos, além de que ensinei muita gente coisas que eu sei por meio de treinamento indireto e conversas durante o almoço.</p><p>Infelizmente pra ela, eu recebi uma proposta que supera ela de forma assustadora e estou atualmente no meu aviso prévio para atender à essa nova empresa.</p><p>Eu ofereci meu melhor, que foi muito bem aproveitado, muito reconhecido e muito bem recompensado.</p><p>7 — Compartilhamento Eletrônico</p><p>Empresa do Vale do Sílicio que provavelmente (senão certamente) me levará por um curto período aos Estados Unidos. Estou para iniciar minhas atividades até o fim de 2017 como Engenheiro de Software.</p><p>Só no processo seletivo, os entrevistadores foram capazes de me ensinar conceitos que considerava altamente complicados, que acabaram por melhorar minha habilidade de desenvolver sistemas como um todo de forma impressionante. Eu também fui capaz de ensinar aos entrevistadores algumas coisas, que creio ter sido algo determinante.</p><p>Essas palavras não expressam os ataques de ansiedade que eu tenho aleatoriamente toda vez que minha ficha cai, dando gargalhadas e às vezes pulando com as mãos na cabeça, não importa onde esteja.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa3a86280477" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>