<?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: Felipe Martins</title>
    <description>The latest articles on DEV Community by Felipe Martins (@fefas).</description>
    <link>https://dev.to/fefas</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%2F25354%2F70ea576a-c02d-415f-97e8-94e1943628c2.png</url>
      <title>DEV Community: Felipe Martins</title>
      <link>https://dev.to/fefas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fefas"/>
    <language>en</language>
    <item>
      <title>Pivotal Partnership Integration</title>
      <dc:creator>Felipe Martins</dc:creator>
      <pubDate>Wed, 10 Jan 2024 18:00:00 +0000</pubDate>
      <link>https://dev.to/fefas/pivotal-partnership-integration-3l4g</link>
      <guid>https://dev.to/fefas/pivotal-partnership-integration-3l4g</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;How I quickly got onboarded onto a pivotal project and led the team to make a crucial architectural decision, enabling its delivery in half of the initial estimated time by leveraging the existing CQS design and correctly applying simple Domain-Driven Design and Hexagonal Architecture principles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project
&lt;/h2&gt;

&lt;p&gt;Integrate the company’s financing product as a payment option within e-commerce checkouts through a partnership with a well-established brand that already holds a widespread presence across numerous online stores.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.dev%2Fassets%2Fimages%2F2024-01-10-pivotal-partnership-integration-project.jpg%3Fversion%3D289d029f7cfd9fc33938852f5e506c5e0d1287fd" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.dev%2Fassets%2Fimages%2F2024-01-10-pivotal-partnership-integration-project.jpg%3Fversion%3D289d029f7cfd9fc33938852f5e506c5e0d1287fd" alt="Project"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Context
&lt;/h2&gt;

&lt;p&gt;The project held immense pivotal and strategic value, with expectations set remarkably high.&lt;/p&gt;

&lt;p&gt;Given its extensive presence and renowned brand in the e-commerce market, the partnership not only promised immediate access to a vast customer base but also aimed to associate the company’s maturing financing product with a trusted brand. A failure would have been catastrophic as such an opportunity with a major partner was a once-in-a-lifetime chance for a startup.&lt;/p&gt;

&lt;p&gt;The project’s execution fell under the scope of the “e-commerce integration” department, then composed of two product teams with around 8 engineers in total. These teams had recently encountered delivery delays and inconsistencies, making the successful accomplishment of this partnership project a crucial opportunity to rebuild trust.&lt;/p&gt;

&lt;p&gt;And this is where I stepped in.&lt;/p&gt;

&lt;p&gt;Joining as a Senior Software Engineer in one of those two teams just weeks before the much-anticipated kickoff, I found a draft solution already on the table.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Context
&lt;/h2&gt;

&lt;p&gt;To bring this partnership to life, we needed to create a public HTTP API that complied with the specifications our new partner has handed over to us. It looked like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /start-payment
POST /authorize-payment
GET /autorized-payments/{id}
POST /...

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The entire specification included around 10 REST-like endpoints with request and response bodies clearly defined. Additionally, there were response time limits. Pretty straightforward, right?&lt;/p&gt;

&lt;p&gt;The company’s existing architecture followed a microservices-like approach, using both asynchronous and synchronous communication methods. While most services adhered decently to bounded contexts, a few technical concerns immediately caught my attention, but that is another discussion not relevant here… let’s get back to the project.&lt;/p&gt;

&lt;p&gt;As mentioned earlier, there was already a preliminary solution in place which entailed the creation of a new shiny microservice with the purpose of housing partnership mapping data and redirecting calls to the involved services. Essentially, the solution was an anti-corruption layer (ACL) as a microservice between the partner client and our internal services.&lt;/p&gt;

&lt;p&gt;Another justification for creating this new service was scalability. The argument presented was that this new service could supposedly scale independently based on the partner’s demand.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.dev%2Fassets%2Fimages%2F2024-01-10-pivotal-partnership-integration-proposed-solution.jpg%3Fversion%3D289d029f7cfd9fc33938852f5e506c5e0d1287fd" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.dev%2Fassets%2Fimages%2F2024-01-10-pivotal-partnership-integration-proposed-solution.jpg%3Fversion%3D289d029f7cfd9fc33938852f5e506c5e0d1287fd" alt="Proposed Solution"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Contribution
&lt;/h2&gt;

&lt;p&gt;After familiarizing myself with the project’s context, understanding the related microservice’s domain and delving into their relevant use cases, getting to know my teammates, and absorbing the technical details crucial for project success, I began questioning and challenging the new microservice. It became evident to me that implementing it posed significant risks.&lt;/p&gt;

&lt;p&gt;Upon scrutinizing the endpoints demanded by the partner, I noticed an important detail: all use cases behind each required endpoint were already implemented in one existing service. This service held many responsibilities, being one of them the direct integration with common e-commerce checkout solutions, such as Magento. There was only one use case previously unnecessary to the directly integrated e-commerce platforms but required for this project. Since its logic was also closely related to e-commerce integration, it would fit well in this same service.&lt;/p&gt;

&lt;p&gt;Within my second week at the company, I presented my takes to the team:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Creating a new service for this project seemed unnecessary as there wasn’t a meaningful bounded context justifying such segregated codebase and deployment isolation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scalability wouldn’t be resolved solely by creating a new service. The existing service would remain the bottleneck regardless of a new and faster service. Moreover, the new service would likely compromise response time and reliability by introducing another potential failure point, hurting our SLA agreement.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The high complexity associated with setting up the new service would heavily drain team resources without commensurate future benefits.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Following discussions, a consensus was reached and documented. With this simpler solution, the implementation scope was streamlined from a new microservice to a collection of controllers contained in a designated module for this new client type, alongside a table to map inner-vs-outer data and other minor changes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.dev%2Fassets%2Fimages%2F2024-01-10-pivotal-partnership-integration-contribution.jpg%3Fversion%3D289d029f7cfd9fc33938852f5e506c5e0d1287fd" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.dev%2Fassets%2Fimages%2F2024-01-10-pivotal-partnership-integration-contribution.jpg%3Fversion%3D289d029f7cfd9fc33938852f5e506c5e0d1287fd" alt="Contribution"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Result
&lt;/h2&gt;

&lt;p&gt;We surpassed the original tough 4-month estimation by delivering the first store integration within a remarkable 2 months. What initially was apprehension of failure turned into an impressive outcome that resonated throughout upper management and investors. This success affirmed our identity as a startup capable of timely delivering a product meeting the expectations of a major market player.&lt;/p&gt;

&lt;p&gt;During the subsequent quarterly meetup, our team received immense recognition for our work. We transitioned from being known for delays to celebrating how our achievement could pivot the product and company.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learnings
&lt;/h2&gt;

&lt;p&gt;After reading this story, you might think: “Yeah, that was the obvious solution… not impressed”. It was indeed obvious, but not so much for those immersed in context and facing problems in the service we ended up changing.&lt;/p&gt;

&lt;p&gt;My past experience with microservices combined with relevant technical knowledge and argumentation skills has proven key to guiding the team to an architectural decision that would really help us instead of causing future frustration.&lt;/p&gt;

&lt;p&gt;A second and even more important learning emerged almost two years later. My contribution could only hold significant weight because of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;My teammates’ openness to listening to a fresh newcomer with far less overall context than they possessed.&lt;/li&gt;
&lt;li&gt;Management full trust and support.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I am immensely grateful to all my teammates during that period. Their openness and support enabled me in ways I couldn’t fully comprehend at the time.&lt;/p&gt;

&lt;p&gt;Moving forward, I gotta watch myself to &lt;strong&gt;never push others back&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The next statements are probably irrelevant to most of the audience, but this is still a blog :)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I had many personal taken from this project since it is the work from my recent career path I am most proud of.&lt;/p&gt;

&lt;p&gt;I do believe I nailed this one. While I still gotta much to improve on my argumentation skills, I naturally had the courage to challenge a solution that I knew would burden the team with unnecessary stress and useless work, ultimately escalating costs for the company. Standing up allowed us to collectively deliver a successful outcome with considerably less effort.&lt;/p&gt;

&lt;p&gt;Moreover, this project marked my realization that my enthusiasm for microservices isn’t an all obsession. Prior to this project, I had primarily operated in environments where careful extracting services from monoliths brought or could bring substantial benefits. However, here, I proved to myself the importance of striking a balance between the advantages and disadvantages of any decision.&lt;/p&gt;

&lt;p&gt;This project also presented to me as the first clear opportunity to bring technical impact beyond coding. While I did also code, the real impact came from learning, challenging, discussion, assessment, and decision. This milestone is aligned with my career goals.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Your Foreignisation</title>
      <dc:creator>Felipe Martins</dc:creator>
      <pubDate>Sun, 03 Jan 2021 23:00:00 +0000</pubDate>
      <link>https://dev.to/fefas/your-foreignisation-3ngm</link>
      <guid>https://dev.to/fefas/your-foreignisation-3ngm</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VbLst4YA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://blog.fefas.dev/assets/images/2021-01-04-your-foreignisation-van-travelling.jpg%3Fversion%3D2d71311" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VbLst4YA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://blog.fefas.dev/assets/images/2021-01-04-your-foreignisation-van-travelling.jpg%3Fversion%3D2d71311" alt="Van Travelling" width="800" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is that?
&lt;/h2&gt;

&lt;p&gt;By googling the term &lt;em&gt;foreignisation&lt;/em&gt;, you will find out that this word is used to name a translation style.&lt;/p&gt;

&lt;p&gt;Translation work is much more than just converting words from a language into another one just by using a dictionary. Let’s take &lt;a href="https://www.quora.com/What-is-a-foreignization-translation"&gt;this text from the web&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Every morning, I walk through the nearby forest to pick up the cherries on the ground.”&lt;/p&gt;

&lt;p&gt;Cherries are not common in Brazil, so in a domestic approach the translator could translate “cherries” into “pitangas” (a very Brazilian fruit) without any content loss, prioritizing the target culture and audience. In the foreignizing approach “cherries” would be literally translated into “cerejas” (cherries in Portuguese) although most Brazilians never saw a cherry tree. The cultural gap would outweigh the audience’s culture in the translator’s preference.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yet &lt;a href="https://termcoord.eu/2017/05/foreignization-or-domestication"&gt;another text from the web&lt;/a&gt; gives us a more disgested definition:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;[…] translators divided into two translation groups: those who opted for foreignisation and those who supported domestication.&lt;/p&gt;

&lt;p&gt;The best distinguished difference between these two main translation strategies was made by Lawrence Venuti, who explained that “you can bring the author back home” or just “sending the reader abroad”.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Many of you there are just like me and have decided at some point to leave your country of birth. Many others have already returned, others are still dreaming about it, and few might be packing just right now (few… well, this text was written within corona times).&lt;/p&gt;

&lt;p&gt;The word &lt;em&gt;Your&lt;/em&gt; in the title is probably even more significant since it is indeed very personal. &lt;em&gt;Your foreignisation&lt;/em&gt;, which are composed of the steps you’ve taken in the past and the ones you will take in the future, is highly attached to you, to your goals, to your feelings, to your experiences, to the opportunities which were offered to you, your choices… it is &lt;strong&gt;your path&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Moving to an European country sounds exciting and many are jealous of me, but they don’t realize the entire thing is also:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A process of losing your identity.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Buhhh! Get out of the stage! This is so negative!&lt;/p&gt;

&lt;p&gt;Okay… okay… for this world demanding positiveness from us all the time, let’s pretend to be positive and formulate your foreignisation as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A process of rebuilding your identity.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Come on, what are you talking about?
&lt;/h2&gt;

&lt;p&gt;First of all, let me introduce myself.&lt;/p&gt;

&lt;p&gt;The very first thing you need to know about me is: everybody calls me fefas (well, except my dad). I am a Brazilian software developer currently living in Berlin. I am 31. I am more exactly from São Paulo city; a huge metropole. My background is Physics and I somehow got very much interested in software. I started learning it during my Bachelor’s degree. I love music, especially rock. I spend a lot of my free time playing my acoustic guitar. I am also into cycling, chess, photography, skating, tattoos. I enjoy getting drunk sometimes. Recently I have become more interested in history as well (not unexpected for someone living in Berlin). Ahh… you will hardly be able to square me in any well known standard stereotype. Living in Berlin was a dream. I am a happy and optimistic person, but very melancholy at the same time… well, it is not that hard giving all this sh&amp;amp;! happening around us every day.&lt;/p&gt;

&lt;p&gt;Having this all, you start understanding my path. It is important to know who I am since this post is a result of my so-far-foreignisation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mh… what is your point then?
&lt;/h2&gt;

&lt;p&gt;It is hard to explain.&lt;/p&gt;

&lt;p&gt;Let’s ask the expats: your foreignisation is being harder than you expected, or am I mistaking? At least mine is being &lt;strong&gt;much harder&lt;/strong&gt; than I expected.&lt;/p&gt;

&lt;p&gt;Another important thing to mention is once you did it, there is no turn back. The song &lt;a href="https://open.spotify.com/track/6VltRkmJbCTqgKrTHk4Ulw"&gt;My My Hey Hey from Neil Young&lt;/a&gt; says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Once you’re gone, you can never come back&lt;br&gt;&lt;br&gt;
When you’re out of the blue and into the black&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Back in 2015, I and my dad were talking about these very same lyrics. I still remember like it was yesterday he telling me his interpretation of this passage:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It is just like when you read a book. Once you did it, you cannot unread it. You are now yourself plus this book forever.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Well, moving to a country with a different culture changes you. I mean… a lot!&lt;/p&gt;

&lt;p&gt;Have you noticed I am using “country of birth” instead of “home country”? Why? For the expats I ask: which is your home country? Where is your home? Is it hard to find an answer? What kind of feelings did you have while trying to find an answer?&lt;/p&gt;

&lt;p&gt;It is hard to describe your foreignisation with words. It is a feeling you have in there: some days it makes you feel like a stranger in a very wrong place, some other days it makes you feel like conquering the entire world.&lt;/p&gt;

&lt;p&gt;Each time I am back in Brazil, I am happy and relieved, I feel just back home… but not really. After some days I start missing my place, my home. A friend of mine which has a very particular path once told me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What I have here, I don’t have there. What I don’t have here, I have there.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Is moving abroad that bad?
&lt;/h2&gt;

&lt;p&gt;Don’t get me wrong! It is fu&amp;amp;!ing incredible!&lt;/p&gt;

&lt;p&gt;Putting yourself in such a challenge requires a lot of courage and brings outstanding experiences. Just thinking how much I have learned and how many times my life has completely changed since Aug 2017 is mind-blowing.&lt;/p&gt;

&lt;p&gt;I have worked at two companies in Germany so far. The first one is huge and my team of ten was composed of seven different nationalities, while my team at the second company had six people from four different countries.&lt;/p&gt;

&lt;p&gt;Another interesting stat: I have worked with people from Germany, Brazil, India, England, Poland, Serbia, Russia, Lithuania, Ukraine, Turkmenistan, Nigeria, Spain, France, Italy, Hungary, and others I can’t remember right now… this has been being quite a culture exchange.&lt;/p&gt;

&lt;p&gt;Even though now I want to create some roots and reduce the number of crazy changes in my life, I can do it with confidence just now. I mean… in the past, it was impossible to see myself living in São Paulo, and nowadays it seems natural to just settle in Berlin.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;That all was possible only because I moved out.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Quitting my job, canceling my rent and all other contracts, selling/donating everything I had, packing the rest into two bags, applying for a visa, saying goodbye to friends, family, and girlfriend… that all to get into a plane in less than 30 days and never walk back… that was a thing! It changed my life in such a manner that I would never imagine back there. Here I also want to thank everyone who supported me somehow.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, what then?
&lt;/h2&gt;

&lt;p&gt;I don’t wanna bring any bad mood to anyone. If you do consider moving, don’t think too much about the negative parts, otherwise, you might even give up.&lt;/p&gt;

&lt;p&gt;My goal after sharing this all is to let everyone aware it is hard! Be prepared for hard times. Be resilient and don’t give up. It will be normal to struggle for basic stuff and it is fine to make mistakes.&lt;/p&gt;

&lt;p&gt;Just go through it and find your place! If you feel something is wrong, don’t be afraid to move again, or don’t be ashamed if you ever decide to return. After all it is &lt;strong&gt;your path&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Pack, go, enjoy, and be proud of your achievements. Great things will happen.&lt;/p&gt;

&lt;p&gt;I hope this open letter helps you :)&lt;/p&gt;

</description>
      <category>abroad</category>
    </item>
    <item>
      <title>Clean Code, bullshit or common sense?</title>
      <dc:creator>Felipe Martins</dc:creator>
      <pubDate>Sun, 08 Apr 2018 03:00:00 +0000</pubDate>
      <link>https://dev.to/fefas/clean-code-bullshit-or-common-sense-3lal</link>
      <guid>https://dev.to/fefas/clean-code-bullshit-or-common-sense-3lal</guid>
      <description>&lt;h2&gt;
  
  
  Common story
&lt;/h2&gt;

&lt;p&gt;Bob started to work at a new company. Soon he realized his new job would have a lot to do with a very old and complex legacy system. It was an anemic code without tests. There was neither any documentation. No explanations about underlying workflows which should represent the decisions made to solve business requirements which someday were asked by some stakeholder, then added to the backlog, implemented and delivered. However, that stakeholder wasn’t in the company anymore as well as the first developers.&lt;/p&gt;

&lt;p&gt;What should be called the domain was always very coupled to the infrastructure concerns… many classes had more than one thousand lines… methods had so many if statements creating so many paths to go through… namespaces 10 levels deep… a large usage of classes extensions…&lt;/p&gt;

&lt;p&gt;Almost every task would be to solve a bug. Some of them were created a long time ago and others were introduced recently by a new fix. Trying to investigate the code history to figure out the reason of some changes and how they could be related with other parts of the code wasn’t even helpful because the commits weren’t well-organized and had poor messages…&lt;/p&gt;

&lt;p&gt;For changing a small behavior he had to spend hours debugging and trying to understand what was written there. After a whole day of work, the result sometimes was changing or adding ~10 lines. Most of the new code was one more if statement deciding to update some value because it was wrong somehow causing a bug… the classes didn’t validate themselves… there were getters and setters everywhere…&lt;/p&gt;

&lt;p&gt;&lt;em&gt;He was experiencing bad code…&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.net%2Fassets%2Fimages%2F2018-04-08-clean-code-bullshit-or-common-sense-washing-bunch-of-dirty-dishes.jpg%3Fversion%3Dcc840fd" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.net%2Fassets%2Fimages%2F2018-04-08-clean-code-bullshit-or-common-sense-washing-bunch-of-dirty-dishes.jpg%3Fversion%3Dcc840fd" alt="Washing bunch of dirty dishes" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does it happen so commonly?
&lt;/h2&gt;

&lt;p&gt;Let’s start clarifying something: please, don’t get me wrong! I don’t want to say simply the code is a $#@&amp;amp; and to blame developers or companies, because it won’t lead us to anything. That is true, we do have a lot of unprofessional developers, but just blaming isn’t the point and we have to consider a broader scenario to get deeper.&lt;/p&gt;

&lt;p&gt;So, why does it happen? Why are we always wading?&lt;/p&gt;

&lt;p&gt;There are many factors that contribute to it. Let’s picture a company growing, hiring more employees to grow faster, new developers come in, old developers leave, the dynamic business changes the requirements quite constantly, the communication between IT and business has gaps, developers are so focused to achieve the sprint commitment, the rush is always putting pressure on everyone working on the project, no one cares to learn about the user-product relationship, no one cares to write tests, developers cannot design as it seems not to deliver short term value, TDD is philosophical, the company doesn’t invest time to train its teams, the most valuable practice is what solves the today’s problem, hero culture rises, we always need more logs to try to realise what is going on, we need to lead the market…&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I could summarize it as the result of &lt;em&gt;rush and no study&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Given that scenario, the output bad code is at least comprehensive. Our world isn’t a nice place sometimes and we have to deal with this reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the point then?
&lt;/h2&gt;

&lt;p&gt;I haven’t brought you here to give an &lt;em&gt;easy-solution-answer&lt;/em&gt;, because it simply doesn’t exist.&lt;/p&gt;

&lt;p&gt;My goal with this post is to reply the person who has that canned answer when developers complain about bad code: &lt;em&gt;Look… the system works and makes money for the company. That is what matters and the developers are paid to maintain it&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Okay… I see the point and I agree with “the most valuable thing is a running software”. It sounds like magic and can comfort us, developers. However, we still have a big problem there.&lt;/p&gt;

&lt;p&gt;Is it really a running software valuable?&lt;/p&gt;

&lt;p&gt;A company which highly depends on technology to be running and wants to be innovative will never achieve its goals when software turns into a maintenance issue instead of pushing up the business. Coming back to Bob’s situation, it’s almost impossible to add or change behaviors of the application. How would be possible to deliver a new feature which would change the business workflow without breaking anything else? The risk is too high, the unknown side effects could be catastrophic and, in this way, the company is trying to survive instead of being innovative… it’s now just brute force… the competition is out there rising up.&lt;/p&gt;

&lt;p&gt;For me, it’s hard to see the value being generated given this scenario.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Software making money today doesn’t mean software still making money in the future.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Bad code can break established companies and make startups die early… &lt;strong&gt;it isn’t because developers aren’t the front line that we can’t be the fault reason&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Clean code, aka having care for code, aka testing first, is the way to achieve a software the business can truly grow with. Let’s study, let’s improve our craft, let’s learn how to manage the rush!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As developers, it’s our responsability to write clean code… that isn’t about achieving the goal of tomorrow faster, that is about achieving the goal of the next year faster and safer…&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Have you ever asked yourself what your manager expects from you? Would you guess short time result or long time result?&lt;/p&gt;

&lt;p&gt;I know, I know… the perfection isn’t reachable… sometimes we do have to work on urgent issues. Nevertheless, my point is we shouldn’t conform ourselves to the bad code just going along with it…&lt;/p&gt;

&lt;h2&gt;
  
  
  What does my experience say?
&lt;/h2&gt;

&lt;p&gt;I do have a real case where we’ve spent more time in the beginning to achieve well parity dev-prod environments, completely isolated database for each running instance of the project, end-to-end tests for the whole application, feature and unit tests for each codebase, automated deployment, hexagonal architecture… well… a lot of themes which are unreachable and philosophical for many out there… just bullshit for them…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.net%2Fassets%2Fimages%2F2018-04-08-clean-code-bullshit-or-common-sense-tdd-chaos-vs-time-graph.jpg%3Fversion%3Dcc840fd" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.net%2Fassets%2Fimages%2F2018-04-08-clean-code-bullshit-or-common-sense-tdd-chaos-vs-time-graph.jpg%3Fversion%3Dcc840fd" alt="TDD chaos-vs-time graph" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It wasn’t easy… it was challenging. However, the result of our work turned into a product with almost zero bug rate. When a new bug is discovered, a new test scenario is written. Deployments are fast, safe and can be executed anytime. New features are easy to add and the old ones easy to change… that are the TDD benefits… that is an agile team!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We should fight against bad code and always do our best. There is only one error: not to try…&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here are some references:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Robert C Martin, 2008. &lt;a href="https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882" rel="noopener noreferrer"&gt;Clean Code: A Handbook of Agile Software Craftsmanship&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Nat Pryce; Steve Freeman, 2009. &lt;a href="https://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627" rel="noopener noreferrer"&gt;Growing Object-Oriented Software, Guided by Tests&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tdd</category>
      <category>cleancode</category>
      <category>craftsmanship</category>
    </item>
    <item>
      <title>What should a developer really catch?</title>
      <dc:creator>Felipe Martins</dc:creator>
      <pubDate>Thu, 04 Jan 2018 21:09:53 +0000</pubDate>
      <link>https://dev.to/fefas/what-should-a-developer-really-catch-1a6j</link>
      <guid>https://dev.to/fefas/what-should-a-developer-really-catch-1a6j</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally published at &lt;a href="https://blog.fefas.net/posts/what-should-a-developer-really-catch" rel="noopener noreferrer"&gt;blog.fefas.net&lt;/a&gt; in 2017-06-18.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In my first post I would like to write about something that isn't found so often on the internet and most &lt;del&gt;experienced&lt;/del&gt; developers are missing.&lt;/p&gt;

&lt;p&gt;Maybe because they seem to worry more about &lt;em&gt;tech-hacks&lt;/em&gt; than realistic professionalism... that is my guess.&lt;/p&gt;

&lt;p&gt;First of all, I would like to say that this post is both something I have to vent out and a self-critique.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are we, developers?
&lt;/h2&gt;

&lt;p&gt;Stop it! Let's bring something up:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When we write code, we write solutions... or that's what we're supposed to do.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;No, we aren't coding the next &lt;del&gt;magic&lt;/del&gt; wonderful architecture. We SHOULD just translate business solutions to a code language that SHOULD solve business problems by adding some value somehow and it SHOULD be delivered in the simplest and fastest possible way. But we don't!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"We are unprofessional"&lt;/em&gt;, Robert Martin has already said that.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In my short career I've seen more than once smart developers having the opportunity to work on an outstanding business model and using that business complexity as their motivation to build nice, sophisticated and high-tech applications which, as it turned out, &lt;del&gt;helped the company grow up&lt;/del&gt; were just another group of hard-to-understand words and far far away from the business itself. In other words, a waste of time and money resulting in a code that was already legacy at the first day after deployment. A total mess!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsjomdn8dxsnn3r15qoa.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flsjomdn8dxsnn3r15qoa.jpg" alt="Total Mess" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What I am trying to put in words is strictly related to the professional attitude of a software developer. You are never going to be a respected CTO or even a senior if you don't give a damn to the next people that will continue the work; the next person can always be you again and again...&lt;/p&gt;

&lt;p&gt;We have to face the truth by caring about how our current code will help the next developer in maintaining it. When we go a little deeper, we should ask &lt;em&gt;why, what, how&lt;/em&gt; before coding anything. We have to know the way our work is going to impact the users. Understanding the final users and the business requirements is a critical gap between good and bad code.&lt;/p&gt;

&lt;p&gt;If a developer doesn't have those concerns in mind, he is writing a bunch of lines that don't make sense together and, instead of improving users' experience, the growing mess isn't adding any value... the company may go out of business quickly.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Just to be clear: when I say good code I mean &lt;em&gt;expressive&lt;/em&gt; code, not an agglomeration of design patterns. Good code is simple and direct.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Where is our problem then?
&lt;/h2&gt;

&lt;p&gt;This could be an endless discussion. So, I selected only two of my guesses I judge being the most critical ones.&lt;/p&gt;

&lt;p&gt;Many developers, just like me, didn’t pursue software-related degree at university. Actually, some of us didn't even go to college; and those who took software-related courses realized they didn't study exactly what is required to solve real problems. In other words, we teach ourselves almost everything by digging the internet.&lt;/p&gt;

&lt;p&gt;That proves we are extremely self-motivated and curious. Indeed, we really enjoy learning more and more. The problem is that the internet has so much information that the beginners &lt;strong&gt;end up placing so much importance on what gives short-term results&lt;/strong&gt;, that is tools.&lt;/p&gt;

&lt;p&gt;Programming languages, frameworks, libraries and so on are important and make you powerful, but they all are &lt;strong&gt;still just tools&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A very important point to note on tools is when you stop to follow that nice framework for a couple of months and then you are suddenly out of date. But don't bother! You can read the new documentation and update yourself again quickly. Tools are ephemeral, easy to learn, abundant on the web and, trust me, most of them don't give a &amp;amp;$%# to your business domain.&lt;/p&gt;

&lt;p&gt;On the other hand, when developers come across some new subject or tool, instead of taking the needed time to search and really understand it before coding, they go straight ahead and want to adopt it everywhere, because the &lt;del&gt;new silver bullet&lt;/del&gt; solution was discovered. The result (not to say problem) is predictable...&lt;/p&gt;

&lt;p&gt;For me, this kind of developer is the most dangerous, because they normally have more work-experience and are still acting like the ninja ones. Their attitude brings premature and wrong usage of tools, procedures and methodologies, putting the whole business and the collaborators in risk. They have no idea about their positions' value.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, what should we really study?
&lt;/h2&gt;

&lt;p&gt;Years ago at university I heard someone saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"What makes a snooker player stand out is not just trying to pocket the most challenging balls, but rather to best place the white ball for the next shot."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;During the last two years I worked with great teams that introduced me to some terms: Clean Code, Test Driven Development (TDD), Domain-Driven Design (DDD), Behavior Driven Development (BDD), Continuous Integration (CI), (real) Object Oriented Programming (OOP), DevOps, Agile Manifesto, Software Craftsmanship etc.&lt;/p&gt;

&lt;p&gt;I still have a lot to learn about those subjects, but they already changed my professional attitude and today I know I am on the right way to become that respected developer I've always dreamed to.&lt;/p&gt;

&lt;p&gt;Meetups and daily knowledge exchange with team members are all important to discuss different readings about those terms, but they alone will still give you a limited understanding. Therefore, the only way to have a deep knowledge is by searching it by yourself through books, podcasts, events and so on.&lt;/p&gt;

&lt;p&gt;The following books list is the main reason I wrote this post. Of course I haven't read all of them yet, but the ones I did have changed the way I develop every couple of pages, turning me into a &lt;strong&gt;more conscious and mature developer&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Jeff Langr, 2015. &lt;a href="https://www.amazon.com/Pragmatic-Unit-Testing-Java-JUnit-ebook/dp/B00VXT0ZA2" rel="noopener noreferrer"&gt;Pragmatic Unit Testing with JUnit in Java 8&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Nat Pryce; Steve Freeman, 2009. &lt;a href="https://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627" rel="noopener noreferrer"&gt;Growing Object Oriented Software, Guided by Tests&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Erich Gamma; Richard Helm; Ralph Johnson; John Vlissides, 1994. &lt;a href="https://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612" rel="noopener noreferrer"&gt;Design Patterns: Elements of Reusable Object-Oriented Software&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Robert C Martin, 2008. &lt;a href="https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882" rel="noopener noreferrer"&gt;Clean Code: A Handbook of Agile Software Craftsmanship&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Martin Fowler, 2002. &lt;a href="https://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420" rel="noopener noreferrer"&gt;Patterns of Enterprise Application Architecture&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Bertrand Meyer, 2009. &lt;a href="https://www.amazon.com/Touch-Class-Learning-Program-Contracts/dp/3540921443" rel="noopener noreferrer"&gt;Touch of Class: Learning to Program Well with Objects and Contracts&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Vaughn Vernon, 2013. &lt;a href="https://www.amazon.com/Implementing-Domain-Driven-Design-Vaughn-Vernon/dp/0321834577" rel="noopener noreferrer"&gt;Implementing Domain-Driven Design&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Vaughn Vernon, 2016. &lt;a href="https://www.amazon.com/Domain-Driven-Design-Distilled-Vaughn-Vernon/dp/0134434420" rel="noopener noreferrer"&gt;Domain-Driven Design Distilled&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;David Farley; Jezz Humble, 2010. &lt;a href="https://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/0321601912" rel="noopener noreferrer"&gt;Continuous Delivery&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Mark Massé, 2011. &lt;a href="http://shop.oreilly.com/product/0636920021575.do" rel="noopener noreferrer"&gt;Rest API Design Rulebook&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Michael Nygard, 2007. &lt;a href="http://shop.oreilly.com/product/9780978739218.do" rel="noopener noreferrer"&gt;Release It!&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Ken Schwaber; Jeff Sutherland, 2016. &lt;a href="http://www.scrumguides.org/docs/scrumguide/v2016/2016-Scrum-Guide-US.pdf#zoom=100" rel="noopener noreferrer"&gt;The Scrum Guide&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Thomas Björkholm; Jannika Bjorkholm, 2015. &lt;a href="https://www.amazon.com/Kanban-30-days-Tomas-Bj%C3%B6rkholm/dp/1783000902" rel="noopener noreferrer"&gt;Kanban in 30 days&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;James Shore, 2007. &lt;a href="http://shop.oreilly.com/product/9780596527679.do" rel="noopener noreferrer"&gt;The Art of Agile Development&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Sandro Mancuso, 2013. &lt;a href="https://www.amazon.com/dp/B00QXAGIDO/ref=cm_sw_r_cp_dp_T1_T3zrzb5139XRC" rel="noopener noreferrer"&gt;The Software Craftsman: Professionalism, Pragmatism, Pride&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Ash Maurya, 2012. &lt;a href="http://shop.oreilly.com/product/0636920020141.do" rel="noopener noreferrer"&gt;Running Lean&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And you can also follow the authors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/unclebobmartin" rel="noopener noreferrer"&gt;Robert C. Martin (aka Uncle Bob)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/KentBeck" rel="noopener noreferrer"&gt;Kent Beck&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/VaughnVernon" rel="noopener noreferrer"&gt;Vaughn Vernon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/martinfowler" rel="noopener noreferrer"&gt;Martin Fowler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/Grady_Booch" rel="noopener noreferrer"&gt;Grady Booch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/jcoplien" rel="noopener noreferrer"&gt;James Coplien&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/ericevans0" rel="noopener noreferrer"&gt;Eric Evans&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/rebeccawb" rel="noopener noreferrer"&gt;Rebecca Wirfs-Brock&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My recommendation is to start with &lt;em&gt;The Software Craftsman&lt;/em&gt; by &lt;em&gt;Sandro Mancuso&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I hope you can also find a reference to follow on those books. And remember, &lt;strong&gt;simplicity is a keyword&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Is there already any T-shirt with "Don't worry and keep it simple"?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Thank you &lt;a href="https://blog.eriksen.com.br" rel="noopener noreferrer"&gt;Eriksen Costa&lt;/a&gt; for sending both lists when you were my boss and also thank you &lt;a href="https://twitter.com/esdobay" rel="noopener noreferrer"&gt;Eduardo Dobay&lt;/a&gt; for helping me with typo and english mistakes.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>craftsmanship</category>
      <category>cleancode</category>
    </item>
    <item>
      <title>TDD is an ethical matter</title>
      <dc:creator>Felipe Martins</dc:creator>
      <pubDate>Thu, 04 Jan 2018 02:00:00 +0000</pubDate>
      <link>https://dev.to/fefas/tdd-is-an-ethical-matter-19h4</link>
      <guid>https://dev.to/fefas/tdd-is-an-ethical-matter-19h4</guid>
      <description>&lt;h2&gt;
  
  
  My first talk
&lt;/h2&gt;

&lt;p&gt;Some months ago I gave my first talk: “An Introduction to TDD”. I started it telling about my personal motivation of adopting this practice daily. Therefor I cited how the development process is a waste of time when we don’t have something helping us to focus on the requirements or guiding us to the next step. I cited also how developers put too much effort trying to predict all possibles scenarios from inside to outside.&lt;/p&gt;

&lt;p&gt;After that I basically presented the feedback cycle with the three famous steps, explained the concerns behind each of those steps and introduced to the existing levels of tests in order to be able to show a sample code which illustrates how TDD can work on real. At the end I mentioned some good practices like &lt;a href="http://wiki.c2.com/?ArrangeActAssert" rel="noopener noreferrer"&gt;AAA&lt;/a&gt; and &lt;a href="https://pragprog.com/magazines/2012-01/unit-tests-are-first" rel="noopener noreferrer"&gt;FIRST&lt;/a&gt; that are helpful to improve both legibility and quality of the tests.&lt;/p&gt;

&lt;p&gt;The goal of the talk was to give an introduction to the basics elements that a developer needs to write &lt;em&gt;test first&lt;/em&gt; and an overview how the tests should guide the development process. However those who were interested on the subject, would still need to go deeper by theirselves.&lt;/p&gt;

&lt;p&gt;A good summary: no waste, no effort on useless stuff, no “what if this happens? Or what if that happens?”… &lt;strong&gt;TDD gives us the opportunity to focus on the required business behaviors and just solve the problems&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I like to say that &lt;em&gt;TDD is straight to the point&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The reaction
&lt;/h2&gt;

&lt;p&gt;At the end what surprised me weren’t some questions and the positive feedback, rather some developers that started to put on balance time versus results, saying that TDD is an unreachable ideal and just a philosophical subject…&lt;/p&gt;

&lt;p&gt;I was there asking myself: why would they be feeling so attacked if I haven’t even said that TDD is a must?&lt;/p&gt;

&lt;p&gt;Since then I’ve been thinking about what happened and here I answer with almost the same arguments used on &lt;a href="https://dev.to/what-should-a-developer-really-catch"&gt;my last post&lt;/a&gt;: we have to be aware of our professional attitude and of the consequences of our work.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Just complaining is the real waste of time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We have to face the truth and realise that if we aren’t writing tests today, we and others are going to have a lot of problems tomorrow. We also need to study to be able to delivery the better code as possible… I ensure that tests first is a good starting point to learn a lot.&lt;/p&gt;

&lt;p&gt;Anyway, the main concern remains: &lt;em&gt;TDD is really hard to adopt 100%&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Yes, I know that and I don’t believe everybody will start applying it perfectly overnight. Testing in the right way can be really challenging even for the most experienced developers, because you need not just to have a good understanding of Dependency Injection, Clean Code, OOP, Refactoring etc., but also to handle errors decently… the learning curve is relatively long.&lt;/p&gt;

&lt;p&gt;However, I will also mention that &lt;em&gt;TDD is a discipline&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;When you start to use it, to understand it and to experience how TDD helps to develop faster and to improve code quality, writing tests first will be natural. It will be easier after each complete cycle and you will do it in a more consistent way… then suddenly TDD simply composes your development process and you finally agree &lt;strong&gt;TDD is the opposite of a waste of time&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I am sure you will be quickly asking yourself: &lt;em&gt;Why are some developers still complaining about test first?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.net%2F%2Fassets%2Fimages%2Fposts%2F2018-01-02-tdd-is-an-ethical-matter-scream.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fefas.net%2F%2Fassets%2Fimages%2Fposts%2F2018-01-02-tdd-is-an-ethical-matter-scream.jpg" alt="Total Mess" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is TDD an ethical matter?
&lt;/h2&gt;

&lt;p&gt;Uncle Bob starts the Clean Code book with:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Writing clean code is what you must do in order to call yourself a professional. There is no reasonable excuse for doing anything less than your best.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sorry, but there is no excuse to skip the tests just by argumenting that TDD is a waste. At the other side are teams emailing the wrong persons while developing and spending a lot of effort to reproduce and understand bugs already in production. Those are common situations on incidents where companies simply lost millions because they couldn’t predict simple issues…&lt;/p&gt;

&lt;p&gt;Are you still complaining? If your team is slow, you should review your processes and your application design, if it is hard to adopt TDD, you should have a plan to teach your team… &lt;strong&gt;skipping tests will be always the wrong choice&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let’s analyse what Uncle Bob said during a talk at &lt;em&gt;GOTO; Amsterdam&lt;/em&gt; (&lt;a href="https://www.youtube.com/watch?v=Tng6Fox8EfI&amp;amp;t=2500" rel="noopener noreferrer"&gt;video here&lt;/a&gt;):&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I will provide with each release a quick, sure and repeatable proof that every element of the code works as it is supposed to (…) otherwise known as tests (…) When did we decide that it is OK if some of that code doesn’t work? [No,] it is not OK if some of that code doesn’t work. And so, we should provide proof (…) that the code works as you believe.&lt;/p&gt;

&lt;p&gt;We are all humans. We all make mistakes (…). It is not possible to achieve perfection, but it is always an error not to try. And the idea that we will simply accept a certain level of defects is inappropriate. [It] is unethical. We can’t accept that.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;TDD can take a little more time at the beginning, but trust me it has so many benefits.&lt;/p&gt;

&lt;p&gt;Here are great books to read:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Jeff Langr, 2015. &lt;a href="https://www.amazon.com/Pragmatic-Unit-Testing-Java-JUnit-ebook/dp/B00VXT0ZA2" rel="noopener noreferrer"&gt;Pragmatic Unit Testing with JUnit in Java 8&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Nat Pryce; Steve Freeman, 2009. &lt;a href="https://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627" rel="noopener noreferrer"&gt;Growing Object-Oriented Software, Guided by Tests&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Robert C Martin, 2008. &lt;a href="https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882" rel="noopener noreferrer"&gt;Clean Code: A Handbook of Agile Software Craftsmanship&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks and let’s test first!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Originally published at &lt;a href="https://blog.fefas.net/tdd-is-an-ethical-matter" rel="noopener noreferrer"&gt;blog.fefas.net&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>tdd</category>
      <category>cleancode</category>
      <category>craftsmanship</category>
    </item>
    <item>
      <title>Hi, I'm Felipe Martins</title>
      <dc:creator>Felipe Martins</dc:creator>
      <pubDate>Tue, 11 Jul 2017 02:41:43 +0000</pubDate>
      <link>https://dev.to/fefas/hi-im-felipe-martins</link>
      <guid>https://dev.to/fefas/hi-im-felipe-martins</guid>
      <description>&lt;p&gt;I have been coding for 5 years.&lt;/p&gt;

&lt;p&gt;You can find me on Twitter as &lt;a href="https://twitter.com/eufefas" rel="noopener noreferrer"&gt;@eufefas&lt;/a&gt; and on GitHub as &lt;a href="https://github.com/fefas" rel="noopener noreferrer"&gt;@fefas&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I live in SÃ£o Paulo and I work for UPX.&lt;/p&gt;

&lt;p&gt;I mostly program in PHP, but I worked already with C++, Python and Javascript and I've been trying Scala.&lt;/p&gt;

&lt;p&gt;I've been learning a lot about TDD and Clean Code and now I am discovering more about DDD and DevOps.&lt;/p&gt;

&lt;p&gt;Nice to meet you.&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
  </channel>
</rss>
