<?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: Renato</title>
    <description>The latest articles on DEV Community by Renato (@renatosugimoto).</description>
    <link>https://dev.to/renatosugimoto</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%2F519120%2F9af563c5-0b23-4b5e-ae42-f5f75bf3cfae.jpeg</url>
      <title>DEV Community: Renato</title>
      <link>https://dev.to/renatosugimoto</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/renatosugimoto"/>
    <language>en</language>
    <item>
      <title>How I Beat Procrastination on My Side Project</title>
      <dc:creator>Renato</dc:creator>
      <pubDate>Fri, 09 May 2025 15:19:58 +0000</pubDate>
      <link>https://dev.to/renatosugimoto/how-i-beat-procrastination-on-my-side-project-1cmp</link>
      <guid>https://dev.to/renatosugimoto/how-i-beat-procrastination-on-my-side-project-1cmp</guid>
      <description>&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%2Fzrz475n10hcvuoad8i7y.png" 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%2Fzrz475n10hcvuoad8i7y.png" alt="On the left a developer, in a dark room, sitting in front of a computer looking lost. On the right a developer in na bright room, looking happy and productive." width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;It happens to many of us: you start a side project excited, but then progress slows down. Things stall, the next task looks too big, and you start putting it off. I have this app idea (will talk about it on another post) that I've been trying to develop for a while, and I'm happy to say I'm very close to the MVP.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Not getting that project done was something that was making me frustrated for the past couple years. Having delivered multiple and way more complex projects at work, it was really bothering me that I couldn't finish my personal project.&lt;/p&gt;

&lt;p&gt;So this year I decided I had to get this done, and this is the strategy I defined for it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Use Task Management&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Treat your side project like you treat your work tasks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pick a System:&lt;/strong&gt; Use a Project Manager App, a simple to-do list, or even sticky notes. It doesn't matter &lt;em&gt;what&lt;/em&gt; you use, just that you have &lt;em&gt;a&lt;/em&gt; system to track what needs doing. Writing it down makes the plan clearer and less overwhelming.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Define a Clear MVP&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Trying to do too much kills side projects. A clear Minimum Viable Product keeps you on track.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Focus on the Core:&lt;/strong&gt; What's the absolute minimum needed to get a first working version out? Put off &lt;em&gt;all&lt;/em&gt; the extra features until that core is done. Make sure your tasks aim straight for the MVP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Break Tasks Down (A Lot)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you tend to procrastinate, two things definitely contribute: when your next step isn't clear, or when it feels too big.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Make Them Small:&lt;/strong&gt; Break features and fixes into tiny steps, ideally things you can finish in 30-60 minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get Quick Wins:&lt;/strong&gt; Finishing small tasks feels good and gives you momentum. It makes it easier to spend an hour here or there, which adds up to real progress over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Use AI to Speed Things Up&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even experienced developers get stuck. Being a software engineer with over a decade of experience, I'm among the ones that make fun of the vibe coders generation. But don't be afraid of using AI to speed things up.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Get Unstuck Faster:&lt;/strong&gt; If you're blocked, ask an AI for help getting started or figuring out a tricky part. And I'm not just talking about letting copilot predict what your new function does, don't be afraid of simply telling your favorite LLM what you want a screen or component to do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean Up Later:&lt;/strong&gt; You can always review and improve AI-generated code later. The main goal here is to avoid getting stuck and keep making progress.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Build and Test Early (Prototype)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Don't wait for the full MVP to see your ideas in action.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Get Something Running:&lt;/strong&gt; Aim to get a basic, usable prototype working relatively quickly. In my case, applying the steps above got me a working version on my phone after about 10-15 hours of work spread across a few weeks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learn and Adjust:&lt;/strong&gt; Testing even a simple prototype provides valuable feedback. It helps confirm if you're on the right track and might even lead you to adjust your MVP based on seeing how features work in practice.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plan Your Project:&lt;/strong&gt; Use a task list or board, just like at work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make Tasks Smaller:&lt;/strong&gt; Aim for tasks you can finish quickly, fitting them into small bits of free time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI for Speed:&lt;/strong&gt; Don't hesitate to use AI, or even vibe coding, to get unstuck quickly. Review and improve the code later, but prioritize making progress.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prototype Early:&lt;/strong&gt; Build and test basic versions to get feedback and refine your goals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Getting a side project done isn't about finding huge chunks of time. It's about setting up a way to make small bits of progress consistently. Little steps, done often, get the project finished.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>In the Era of AI, Is Human Code Review Still Necessary?</title>
      <dc:creator>Renato</dc:creator>
      <pubDate>Sun, 25 Jun 2023 11:00:00 +0000</pubDate>
      <link>https://dev.to/renatosugimoto/in-the-era-of-ai-is-human-code-review-still-necessary-2ndg</link>
      <guid>https://dev.to/renatosugimoto/in-the-era-of-ai-is-human-code-review-still-necessary-2ndg</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PnFTa6Xs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fiy052z4krtg092fbo80.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PnFTa6Xs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fiy052z4krtg092fbo80.jpg" alt="Laptop screen with code written on a dark background. Text is out of focus so just a few words can be read." width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI is transforming the way we approach problem-solving and decision-making. With the rise of AI-powered tools and automated code analysis, some may wonder if human code review is still necessary. In the next lines I’ll explore 5 reasons why I believe human code review is still important for improving collaboration and code quality.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Complementing AI: The Power of Human Perspective
&lt;/h2&gt;

&lt;p&gt;We can bring to code review what AI still lacks, such as context, experience and domain expertise. So while AI-driven code analysis tools are great recognizing patterns and common errors, we can take into consideration factors they might overlook, such as code readability, maintainability, and scalability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Unleashing Creativity and Design Decisions
&lt;/h2&gt;

&lt;p&gt;Code review isn't just about catching bugs. It involves assessing the overall design and architecture. We can dive into the nuances, evaluate design decisions, and offer valuable insights for improvement. They consider&lt;/p&gt;

&lt;h2&gt;
  
  
  Opportunity for  Collaboration and Knowledge Sharing
&lt;/h2&gt;

&lt;p&gt;Code reviews foster collaboration and knowledge sharing within development teams. It’s an opportunity for developers to engage in discussions, share insights, and mentor junior members. It creates learning opportunities, spreads best practices, and stimulates the exchange of ideas. Human interactions during code reviews can strengthen team unity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Detecting Complex Logic and Edge Cases
&lt;/h2&gt;

&lt;p&gt;AI tools excel at recognizing patterns and spotting common errors. But, they may struggle with intricate logic flaws or anticipating edge cases that need deep understanding of the application's requirements. Developers bring critical thinking to the table, catching potential pitfalls and ensuring the code meets desired business goals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond Technical Aspects
&lt;/h2&gt;

&lt;p&gt;Code reviews is more than just technical aspects. They evaluate code readability, maintainability, and adherence to coding standards. We can assess the clarity of comments, naming conventions, and code organization, ensuring the codebase remains understandable and maintainable by the team in the long run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion:
&lt;/h2&gt;

&lt;p&gt;In the age of AI, human code review is still an important resource to have high-quality code and collaboration within the team.&lt;/p&gt;

&lt;p&gt;While AI-powered tools automate certain aspects, they can't replicate the critical thinking, domain expertise, and contextual understanding that we can bring to it. By combining AI-driven code analysis with human code review, we can maximize the benefits of both approaches, resulting in stronger codebases, improved collaboration, and well-rounded developers.&lt;/p&gt;

&lt;p&gt;Embrace the power of AI tools in code review, but remember that the human touch is irreplaceable.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>codereview</category>
      <category>codequality</category>
    </item>
    <item>
      <title>Are your CICD and DevOps tools really making developers' lives easier?</title>
      <dc:creator>Renato</dc:creator>
      <pubDate>Mon, 13 Feb 2023 11:00:00 +0000</pubDate>
      <link>https://dev.to/renatosugimoto/are-your-cicd-and-devops-tools-really-making-developers-lives-easier-5a5h</link>
      <guid>https://dev.to/renatosugimoto/are-your-cicd-and-devops-tools-really-making-developers-lives-easier-5a5h</guid>
      <description>&lt;p&gt;&lt;em&gt;If you are responsible for your team’s CICD and DevOps tools, have you ever asked yourself if the tools you built are really making developers' lives easier? Or are they there just to reinforce the rules you've set?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's your responsibility to make sure the tools and procedures you've implemented are truly helping software developers do their job.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After setting your CICD tools, how frequently have you asked the developers for feedback? How many times have you changed/updated those based on feedback from the developers? Or are all your changes to support new requirements, infrastructure, and analysis tools?&lt;/p&gt;

&lt;p&gt;You might think: &lt;em&gt;“My tools are running code analysis, and automated tests, so they are helping the developers catch errors early.”&lt;/em&gt;. But are they?&lt;/p&gt;

&lt;p&gt;I've discovered that one of the major reasons for bugs in many of my projects is that developers only test their code locally. My usual response to that was asking my team &lt;strong&gt;“Why aren’t you deploying to the dev environment to test it?”.&lt;/strong&gt; And that would improve things for a while, then the same problem would come back.&lt;/p&gt;

&lt;p&gt;Then, after a while, &lt;strong&gt;I decided to change my approach, and ask the developers what they thought of the DevOps tools we had&lt;/strong&gt;, and some comments I heard were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code analysis and test automation are good, but do we really need those just to deploy to the dev environment?&lt;/li&gt;
&lt;li&gt;The pipeline to deploy to the dev environment sometimes takes 15 minutes to complete.&lt;/li&gt;
&lt;li&gt;I constantly have to wait for other developers to finish their tests before I can deploy my code to the dev environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first it wasn't easy to admit I was not noticing those pain points, but I've decided to accept it, and started tackling those.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First: Make deployment to the dev environment as simple as possible.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I already had all my validations running in pull requests and other environments. So, for the dev environment, let's just keep it simple with just build and deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next: let’s shorten the time, by parallelizing all possible jobs.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Unneeded jobs were already removed, but maybe we can deploy the backend and frontend in parallel as well as any other jobs that also need to be executed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lastly: Why have only 1 dev environment? How about automating environment creation?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For this, you can integrate it with your project management tool. Every time a developer moves a card to “in progress” it can automatically create a new environment. You will, of course, need Infrastructure as Code to do that.&lt;/p&gt;

&lt;p&gt;After those changes, the deploys to dev environment were more frequent, and the quality improved. But the developers didn't change their attitude just because it was faster to deploy, it was the fact that they felt they were being heard, and they could see the actions their feedback triggered, and that motivated them to contribute more to finding solutions for the problems we had.&lt;/p&gt;

&lt;p&gt;And remember the cases presented here are just examples, these were the pain points of some of my developers. It might not be the same case for your team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's important to ask your team what they think. Do they find the tools and processes user-friendly and helpful, or are they a headache?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think about it – CICD tools are supposed to support developers, not control them. That's why it's so important to regularly get the developers' input and make sure your tools and processes are working for them. The ultimate goal is to make the development process as smooth and stress-free as possible.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>The pitfalls of unit test high code coverage and how TDD can mitigate them</title>
      <dc:creator>Renato</dc:creator>
      <pubDate>Tue, 31 Jan 2023 11:00:00 +0000</pubDate>
      <link>https://dev.to/renatosugimoto/the-pitfalls-of-unit-test-high-code-coverage-and-how-tdd-can-mitigate-them-4l0k</link>
      <guid>https://dev.to/renatosugimoto/the-pitfalls-of-unit-test-high-code-coverage-and-how-tdd-can-mitigate-them-4l0k</guid>
      <description>&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%2Ff5ksunniks28f2h40ssc.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%2Ff5ksunniks28f2h40ssc.jpg" alt="Meme: image of Pirate Captain saying " width="656" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;High unit test code coverage is often viewed as a key indicator of code quality, and for good reason. It demonstrates that a significant portion of the codebase has been tested and is less likely to contain bugs. However, if you just see the numbers, how can you be sure that your business logic is covered? Or that your code is easy to maintain?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;More often than it should, when you look at what is under that report, you will find poorly written unit tests, with the sole purpose of getting high code coverage.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 2 most common pitfalls of high code coverage are:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Tests that deliberately leave out complex parts of the business logic, because writing those can take time, and focused on parts easier to test, like utility functions and data access layers.&lt;/li&gt;
&lt;li&gt;Test that, at least in the reports, seem to cover business logic, but when you look at the tests you can’t tell what they are testing, so if they fail, you don’t really know why they failed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those can give you a false sense of security, when in reality, the most important part of the codebase is not being tested at all, leading to issues when a change in the business logic breaks the codebase, and the test suit is not able to detect it.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to avoid those pitfalls?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;To avoid these pitfalls, it's important to focus on the quality of the unit tests, not just the quantity. Here are a few best practices to follow:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Write tests that cover all aspects of the business logic, including complex parts. This will ensure that the most important parts of the codebase are being tested.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use clear and descriptive test names and assertions. This will make it easy to understand what the test is checking for, and why it has failed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow Test-Driven Development (TDD) principles. This approach encourages developers to write tests before writing the code, which can help ensure that the code is well-tested from the beginning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In code reviews, give a special attention to unit tests. Are the tests are easy to understand? Are they really testing business rules? Or are they using meaningless values just to make sure they hit the conditionals?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How can TDD help?
&lt;/h2&gt;

&lt;p&gt;Let’s see an example when building a feature to validate the password creation. The development team would receive a requirement like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The new password must be at least 8 characters long, and have at least 1 lowercase letter, 1 uppercase letter, 1 digit and a special character.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  First without TDD
&lt;/h3&gt;

&lt;p&gt;What is the first thing a dev who doesn't follow TTD will probably do?&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%2Frifa7pvr6pwj6mv8hwi6.png" 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%2Frifa7pvr6pwj6mv8hwi6.png" alt="google search for " width="800" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After finding the regex they want on Google they will write a function like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;passwordRegex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RegExp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sr"&gt;/^&lt;/span&gt;&lt;span class="se"&gt;(?=&lt;/span&gt;&lt;span class="sr"&gt;.*&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;a-z&lt;/span&gt;&lt;span class="se"&gt;])(?=&lt;/span&gt;&lt;span class="sr"&gt;.*&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;A-Z&lt;/span&gt;&lt;span class="se"&gt;])(?=&lt;/span&gt;&lt;span class="sr"&gt;.*&lt;/span&gt;&lt;span class="se"&gt;\d)(?=&lt;/span&gt;&lt;span class="sr"&gt;.*&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;@$!%*?&amp;amp;&lt;/span&gt;&lt;span class="se"&gt;])[&lt;/span&gt;&lt;span class="sr"&gt;A-Za-z&lt;/span&gt;&lt;span class="se"&gt;\d&lt;/span&gt;&lt;span class="sr"&gt;@$!%*?&amp;amp;&lt;/span&gt;&lt;span class="se"&gt;]{8,}&lt;/span&gt;&lt;span class="sr"&gt;$/&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;passwordRegex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, time for the unit tests:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;valid password&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcdefg1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;invalid password&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcdefgh1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running the test, both tests would pass, and we would have 100% code coverage. Great, right?&lt;/p&gt;

&lt;p&gt;Except there are 2 big problems with that approach.&lt;/p&gt;

&lt;p&gt;First, the 100% test coverage was reached by testing only 1 out of at least 5 invalid password scenarios.&lt;/p&gt;

&lt;p&gt;Second, Regex is not easy to understand, especially long expressions. And as the tests are not descriptive enough, if another developer had to change that code later, it would take a while to understand how the validation is done.&lt;/p&gt;

&lt;h3&gt;
  
  
  Now let's see how the code could be written differently by applying TDD.
&lt;/h3&gt;

&lt;p&gt;Our first requirement is minimum length =8.&lt;br&gt;
Let's write a test for that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password minimum length&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;))).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we start the implementation by applying just making that first test pass:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OK, now the second requirement. At least one uppercase letter.&lt;br&gt;
Let's write a test for that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password must contain at least one uppercase letter&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;abcdefgh1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To make this test pass, we can add a check for uppercase letters in our validation function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;A-Z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, lowercase letters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password must contain at least one lowercase letter&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ABCDEFGH1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we add the lowercase validation to our validation function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;A-Z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;a-z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, let's move on to the next requirement: at least one digit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password must contain at least one digit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcdefgh!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To make this test pass, we can add a check for digits in our validation function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;A-Z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;a-z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\d&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, let's test for the last requirement: at least one special symbol.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password must contain at least one special symbol&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcdefgh1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To make this test pass, we can add a check for special symbols in our validation function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;A-Z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;a-z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\d&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;@$!%*?&amp;amp;&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have a validation function that follows the requirements, and is well-tested. Additionally, the tests are now more descriptive, so it's easier for other developers to understand how the validation works.&lt;/p&gt;

&lt;p&gt;But some might say: "look at all those if's, it doesn't look good". Ok, let's rewrite it for readability:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;LOWERCASE_REGEX&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;a-z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;UPPERCASE_REGEX&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;A-Z&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;DIGIT_REGEX&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\d&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SPECIAL_CHAR_REGEX&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;@$!%*?&amp;amp;&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
    &lt;span class="nx"&gt;LOWERCASE_REGEX&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
    &lt;span class="nx"&gt;UPPERCASE_REGEX&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
    &lt;span class="nx"&gt;DIGIT_REGEX&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
    &lt;span class="nx"&gt;SPECIAL_CHAR_REGEX&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newPassword&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And our unit test file would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Password validation&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password minimum length is 8 characters&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// refactored after the first example to make sure the only reason for the test to fail is the length&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcde1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcdef1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;

  &lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password must contain at least 1 uppercase letter&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;abcdefgh1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcdefgh1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;

  &lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password must contain at least 1 lowercase letter&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ABCDEFGH1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AbCdefgh1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;

  &lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password must contain at least 1 digit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcdefgh!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcdefgh1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;

  &lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password must contain at least 1 special symbol&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcdefgh1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;validateNewPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abcdefgh1!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By following these best practices, not only you can ensure that your unit test code coverage is an accurate indicator of code quality, and that your business logic is well-covered. But you can also improve the maintainability and readability of your code.&lt;/p&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Time to give back to the Dev community</title>
      <dc:creator>Renato</dc:creator>
      <pubDate>Mon, 05 Sep 2022 01:07:22 +0000</pubDate>
      <link>https://dev.to/renatosugimoto/time-to-give-back-to-the-dev-community-2f2i</link>
      <guid>https://dev.to/renatosugimoto/time-to-give-back-to-the-dev-community-2f2i</guid>
      <description>&lt;p&gt;&lt;em&gt;After eight years in software development, I decided it was time to contribute more to the developer community. And you know what? It feels good. So in this post, I want to share a few ways I found to contribute.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When I first had this plan, the idea was to write lots of blog posts with many tutorials and "How to" content.&lt;/p&gt;

&lt;p&gt;Well, that didn't actually happen. But I've realized there are many other ways to contribute. And most of those are things that were part of my routine, I just had to do it for a broader audience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack Overflow, there is more to it than just answering questions.
&lt;/h2&gt;

&lt;p&gt;So another one of my first ideas was to start answering questions on Stack Overflow. Which I did, and still do, maybe not on a regular basis.&lt;/p&gt;

&lt;p&gt;My strategy was to go through the list of questions quickly, and answer the questions I had the solution out of the top of my head.&lt;/p&gt;

&lt;p&gt;After doing that a few times, I noticed that I couldn't answer many questions. Not because the problem was too difficult, but because the question was not clear.&lt;/p&gt;

&lt;p&gt;That reminded me of junior developers at work coming to me for support. And how many times I had to ask the junior developer to stop and start again. This time, I would ask the questions to understand the problem better. What are you trying to accomplish?  What have you tried so far?&lt;/p&gt;

&lt;p&gt;With this realization, I could see the real value of the edit and comment features of Stack Overflow. Even if I might not have the answer to the posted problem, I could at least help them make it more clear so other contributors could answer it.&lt;/p&gt;

&lt;h2&gt;
  
  
  1 on 1 coffee chats
&lt;/h2&gt;

&lt;p&gt;On my journey to contribute more, I started to engage more on Twitter. There is where I found out about the #100devs, this great initiative from &lt;a href="https://leonnoel.com/100devs/"&gt;Leon Noel&lt;/a&gt; to teach new developers from zero.&lt;/p&gt;

&lt;p&gt;The people doing the BootCamp formed an impressive big community, and somehow I was in one of their threads. And they were talking about coffee chats. Where they would have quick talks with developers already working in the industry.&lt;/p&gt;

&lt;p&gt;So I started to make myself available for those. Quick 15~30 minutes call. And the topics can vary a lot. From how I started, to technologies and skill I think are worth studying.&lt;/p&gt;

&lt;p&gt;And those talks were really interesting. Talking with these people eager to start a software development career can give you a real boost to your motivation as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion (TL;DR)
&lt;/h2&gt;

&lt;p&gt;I believe many devs like me don't know how to start when they want to contribute more to the community. And i hope that with this post you can see that you don't have to answer really complex questions on Stack Overflow, or write tech tutorials (I haven't given up on that one, though).&lt;/p&gt;

&lt;p&gt;Here I gave just to simple ideas of how you can easily start contributing without having to commit too much of your time to it. By simple being available for a quick call, or making Stack Overflow questions more clear.&lt;/p&gt;

&lt;p&gt;If you have found other ways to do it, please leave your ideas in the comments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.freepik.com/free-vector/social-network-connections_843360.htm"&gt;Image by alvaro_cabrera&lt;/a&gt; on Freepik&lt;/p&gt;

</description>
      <category>career</category>
      <category>community</category>
    </item>
    <item>
      <title>The constant change of technologies may sound bad for your career, but it can actually help you.</title>
      <dc:creator>Renato</dc:creator>
      <pubDate>Tue, 08 Feb 2022 14:44:55 +0000</pubDate>
      <link>https://dev.to/renatosugimoto/the-constant-change-of-technologies-may-sound-bad-for-your-career-but-it-can-actually-help-you-2go4</link>
      <guid>https://dev.to/renatosugimoto/the-constant-change-of-technologies-may-sound-bad-for-your-career-but-it-can-actually-help-you-2go4</guid>
      <description>&lt;p&gt;&lt;em&gt;When starting a developer career, you might think it’s a good idea to focus and master a particular technology or one small set of technologies. I know that at least I did. But it didn’t take long for me to change my mind.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I started my career as a .Net developer. And at first, I was enjoying the technology, and focusing on it seemed a good idea. But one year later came the first opportunity to change technologies.&lt;/p&gt;

&lt;p&gt;The company I worked for had just signed one of their biggest clients, and it was a huge mobile project. With that came an offer to train me in iOS development if I was willing to change technologies.&lt;/p&gt;

&lt;p&gt;If it were any other technology, I would have said no. But Apple products in Brazil are expensive, making iOS developers rare and their salaries quite high. So I went for it. &lt;strong&gt;That was my first career bump due to technology change.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OmB4JXHc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6dyklhp7r84rk8xr2bi.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OmB4JXHc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6dyklhp7r84rk8xr2bi.jpeg" alt="Meme: One does not simply become an iOS developer in Brazil" width="651" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, I changed projects a few more times, jumping back and forth between iOS and .Net. The more I demonstrated handling both technologies well, the more I had managers requesting me in their projects. And I used that to argue for a promotion. &lt;strong&gt;Second career bump, thanks to changing technologies.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not long after that, an opportunity to be transferred to Japan was announced.&lt;/p&gt;

&lt;p&gt;I applied to it, as well as dozens of my colleagues. So I thought my chances were slim.&lt;/p&gt;

&lt;p&gt;But I still managed to be among the selected ones. And when I asked the managers why they picked me, they said “How fast you can navigate between different technologies” was one of the main reasons. &lt;strong&gt;And that is the third career change, now a big international transfer from Brazil to Japan.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--toiHhuBP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ppp9eiffbfb2r6a0zc9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--toiHhuBP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ppp9eiffbfb2r6a0zc9.jpeg" alt="Meme: When your career choices starts paying off" width="612" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Japan, in a smaller office with a reduced development team, developers, more than ever, had to be able to adapt fast to new technologies.&lt;/p&gt;

&lt;p&gt;At this point, my mindset had shifted entirely into the pro-change mode, and I embraced as many technologies as possible. But I’m not going to lie, saying all changes were as exciting as my first migration to mobile development. But I’ve never passed on an opportunity to change.&lt;/p&gt;

&lt;p&gt;That lead me to work with: .Net, iOS, Kotlin, Drupal, PHP, Nodejs, Python, Typescript, Reactjs, Vuejs… Some were really cool, others really boring. But they all helped me get where I am today.&lt;/p&gt;

&lt;p&gt;If a stack change didn’t open doors for me later, it for sure made me a better developer/architect. Being exposed to different ways of solving the same problem will really change how you think and improve your problem-solving skills. And that is what being a developer is all about, solving problems.&lt;/p&gt;

&lt;p&gt;Now, many years have passed. I took the Software Architecture path in my career. Changed jobs. And I’m now able to be the architect for different projects with completely different technology stacks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion (TL;DR)
&lt;/h2&gt;

&lt;p&gt;I don’t know where I would be if I said no when I had the chance to change my career from .Net to iOS. Maybe I would have mastered .Net know all the details of the framework and the language.&lt;/p&gt;

&lt;p&gt;But what I do know is changing technologies opened the door for promotions, international transfer, and even new jobs.&lt;/p&gt;

&lt;p&gt;Just getting exposed to different technologies can open your mind, change how you think when solving problems, and make you a better developer.&lt;/p&gt;

&lt;p&gt;So even if you don’t have the chance to do it at work, I definitely recommend you do it on your side projects.&lt;/p&gt;

</description>
      <category>career</category>
    </item>
    <item>
      <title>Why I chose Jekyll for my personal site</title>
      <dc:creator>Renato</dc:creator>
      <pubDate>Fri, 07 May 2021 02:31:20 +0000</pubDate>
      <link>https://dev.to/renatosugimoto/why-i-chose-jekyll-for-my-personal-site-k3m</link>
      <guid>https://dev.to/renatosugimoto/why-i-chose-jekyll-for-my-personal-site-k3m</guid>
      <description>&lt;p&gt;&lt;em&gt;Why I decided to create my own blog on Github Pages with Jekyll instead of using popular platforms like Medium, Dev.to, or Hackernoon.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When I first came up with the idea of creating a blog, Medium seemed the right choice. Popular platform, no concerns about hosting or configuration. I could just start writing.&lt;/p&gt;

&lt;p&gt;But I stopped for a moment and decided to do a little research on Medium. And I found some concerns about the paywall, user tracking, and other issues. This already made me rethink the idea.&lt;/p&gt;

&lt;p&gt;Then, I also found this article called &lt;a href="https://dev.to/devteam/medium-was-never-meant-to-be-a-part-of-the-developer-ecosystem-25a0"&gt;Medium Was Never Meant to Be a Part of the Developer Ecosystem&lt;/a&gt;, and it made me see how all the Medium restrictions and policies actually make it harder for us developers to find the information we need.&lt;/p&gt;

&lt;p&gt;After that, I gave up on Medium.&lt;/p&gt;

&lt;h1&gt;
  
  
  OK, Medium is not fit for Developers. But what about the other platforms?
&lt;/h1&gt;

&lt;p&gt;The research about Medium made me cautious about the others as well. So I did my research on each of the platforms, but different from Medium, I didn't find anything to be concerned about.&lt;/p&gt;

&lt;p&gt;Actually, reading the "About" section for both &lt;a href="https://dev.to/about"&gt;Dev.to&lt;/a&gt; and &lt;a href="https://www.about.hackernoon.com/"&gt;Hackernoon&lt;/a&gt; I found out they both have good policies and the goal of having an open space for developers to share knowledge. And I was really considering writing directly in one of those.&lt;/p&gt;

&lt;p&gt;That was when I found a post about &lt;a href="https://slashgear.github.io/stop-dev-to/"&gt;Why you should not publish content on Dev.to&lt;/a&gt; and why we should follow the POSSE principle.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Publish (on your) Own Site, Syndicate Elsewhere&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After reading that, I started to like the idea of having my own blog and using Dev.to and Hackernoon to share it.&lt;/p&gt;

&lt;h1&gt;
  
  
  But why not WordPress or any other CMS?
&lt;/h1&gt;

&lt;p&gt;Well, I had my experience with WordPress years ago. Setting up a host for it, plus all the trouble for the configuration didn't seem worth it.&lt;/p&gt;

&lt;p&gt;Then I remembered GitHub Pages and the fact that it supports Jekyll. GitHub would provide free hosting, and Jekyll would allow me to blog by simply committing markdown files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free hosting with custom domain support, plus being able to blog from my IDE?&lt;/strong&gt; That sounded really good.&lt;/p&gt;

&lt;p&gt;So I decided to give it a try. And with only 2 hours I got it up and running. (most of the time was spent deciding on the theme)&lt;/p&gt;

&lt;p&gt;Now, here I am, writing my first post.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion (TL;DR)
&lt;/h1&gt;

&lt;p&gt;If you are writing to help other developers, Medium, with its paywall and other limitations, doesn't seem the right platform for it.&lt;/p&gt;

&lt;p&gt;Dev.to and Hackernoon are good platforms for developers. And I definitely recommend those if you don't want the trouble of hosting your blog, worrying about a theme, and so on.&lt;/p&gt;

&lt;p&gt;But if you want the advantages of actually owning your content, without spending too much time setting up a host and configuring a blogging tool, GitHub Pages and Jekyll might be a good choice for you, and you can still use Dev.to and Hackernoon to share your content.&lt;/p&gt;

</description>
      <category>jekyll</category>
      <category>github</category>
      <category>blog</category>
    </item>
  </channel>
</rss>
