<?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>Forem: Enock Omondi</title>
    <description>The latest articles on Forem by Enock Omondi (@devenock).</description>
    <link>https://forem.com/devenock</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%2F168995%2Ffa05dfd7-fa0e-42be-ba24-6d694ee65765.jpeg</url>
      <title>Forem: Enock Omondi</title>
      <link>https://forem.com/devenock</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/devenock"/>
    <language>en</language>
    <item>
      <title>What is Test-Driven Development.</title>
      <dc:creator>Enock Omondi</dc:creator>
      <pubDate>Mon, 04 Sep 2023 13:17:55 +0000</pubDate>
      <link>https://forem.com/devenock/what-is-test-driven-development-1h35</link>
      <guid>https://forem.com/devenock/what-is-test-driven-development-1h35</guid>
      <description>&lt;p&gt;TDD is a programming paradigm where tests are written to drive the development of the application.&lt;/p&gt;

&lt;p&gt;It is mainly aimed at writing clean code that works.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Red-Green-Refactor Principle&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This principle is a practical approach on how to implement TDD.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7T-ON2Qu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2euu2adwu7kgwnd70hyg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7T-ON2Qu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2euu2adwu7kgwnd70hyg.jpeg" alt="TDD" width="487" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The diagram illustrates the three principles of &lt;strong&gt;TDD&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write a test and see it fail.&lt;/li&gt;
&lt;li&gt;Write just enough code to make the test pass.&lt;/li&gt;
&lt;li&gt;Refactor the code if any code smells are detected.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This principle is easy to follow at first but the downside with it is that it does not help a beginner understand how to get started writing tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Types of TDD&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;TDD is a mixed concept with different variations and approaches.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Unit Test Driven-Development(UTDD)&lt;/li&gt;
&lt;li&gt;Behavior-Driven Development (BDD)&lt;/li&gt;
&lt;li&gt;Acceptance Test-Driven Development(ATDD)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;ATDD&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;ATDD describes the behavior of a software from a user's point of view by focusing on the business value of the application and not the implementation details.&lt;/p&gt;

&lt;p&gt;ATDD and UTDD can always be combined in one diagram as indicated below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AJlY5zhQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3dfxnhjn793du7k3eto6.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AJlY5zhQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3dfxnhjn793du7k3eto6.jpeg" alt="ATDD" width="500" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The diagram above describes the following steps followed during ATDD:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write an acceptance test and see it fail.&lt;/li&gt;
&lt;li&gt;Write a unit test and see it fail.&lt;/li&gt;
&lt;li&gt;Write code to make the unit test pass.&lt;/li&gt;
&lt;li&gt;Refactor the code.&lt;/li&gt;
&lt;li&gt;Repeat steps 2 - 4 unit all the acceptance tests passes.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;BDD&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Behavior-Driven Development is an agile practice that encourages collaboration among different roles, developers, quality engineers, business analysts, or even other interested parties in a software project.&lt;/p&gt;

&lt;p&gt;Although &lt;strong&gt;BDD&lt;/strong&gt; is to some extent a general idea about how software development should be managed by both business interests and technical insight, the practice of &lt;strong&gt;BDD&lt;/strong&gt; involves some specialized tools. &lt;/p&gt;

&lt;p&gt;For example, domain-specific language (&lt;strong&gt;DSL&lt;/strong&gt;) is used to write tests in natural language that can be easily understood by nontechnical people and can be interpreted by code and executed behind the scenes.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Prerequisites of TDD&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;One major prerequisite for a developer who is getting into TDD is the &lt;strong&gt;ability to detect code smells and how to refactor them into a good design&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>testing</category>
      <category>tdd</category>
    </item>
    <item>
      <title>Looking for project ideas.</title>
      <dc:creator>Enock Omondi</dc:creator>
      <pubDate>Fri, 12 Feb 2021 11:14:32 +0000</pubDate>
      <link>https://forem.com/devenock/looking-for-project-ideas-415m</link>
      <guid>https://forem.com/devenock/looking-for-project-ideas-415m</guid>
      <description>&lt;p&gt;Hello folks, I am a beginner web developer and I am looking for project ideas that I can build and get myself a job. Would you please suggest a project that you used to land a tech job or that can be good for a portfolio.&lt;br&gt;
Thank you in advance. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>help</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Nodejs or php?</title>
      <dc:creator>Enock Omondi</dc:creator>
      <pubDate>Sat, 30 May 2020 17:20:10 +0000</pubDate>
      <link>https://forem.com/devenock/nodejs-or-php-1ihn</link>
      <guid>https://forem.com/devenock/nodejs-or-php-1ihn</guid>
      <description>&lt;p&gt;I need to get started on learning a backend language. Any recommendation ? Am already comfortable with JavaScript and reactjs . &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
