<?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: Oleksandr</title>
    <description>The latest articles on Forem by Oleksandr (@stefanovskyi).</description>
    <link>https://forem.com/stefanovskyi</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%2F88264%2F11767bd6-51fd-4680-841a-72b20debec68.jpg</url>
      <title>Forem: Oleksandr</title>
      <link>https://forem.com/stefanovskyi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/stefanovskyi"/>
    <language>en</language>
    <item>
      <title>How To Do a Code Review And How To Pass a Code Review</title>
      <dc:creator>Oleksandr</dc:creator>
      <pubDate>Thu, 02 Apr 2020 18:12:46 +0000</pubDate>
      <link>https://forem.com/stefanovskyi/how-to-do-a-code-review-and-how-to-pass-a-code-review-1jg0</link>
      <guid>https://forem.com/stefanovskyi/how-to-do-a-code-review-and-how-to-pass-a-code-review-1jg0</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EMlgL6s8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v3mv0ll8lov72wwvgdkk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EMlgL6s8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v3mv0ll8lov72wwvgdkk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well, ok, so you know what a Code Review is and what is the purpose to do it, right?&lt;/p&gt;

&lt;p&gt;Code Review is the process where developers reviewing each other`s code to detect misconceptions and potential issues before merging it into a stable codebase. The main goal of Code Reviews is to find quality issues in the reviewed code. Other goals which are also reached by performing these reviews are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Improved code quality&lt;/li&gt;
&lt;li&gt;Keep consistency in your projects&lt;/li&gt;
&lt;li&gt;Finding bugs&lt;/li&gt;
&lt;li&gt;Creating a sense of mutual responsibility&lt;/li&gt;
&lt;li&gt;Finding way better solutions to problems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Code Reviews are a great way for teams to keep their software maintainable and also find bugs before they make it into production. First of all, we have to remember that code review is not judging or reviewing a person's ability to code.&lt;/p&gt;

&lt;p&gt;Before creating a merge request do the code review of your own code it will save your time fixing it later and it also will save the time of the person who's supposed to review your code.&lt;br&gt;
A shortlist with questions to ask yourself before sending your code to review:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Did I implement the task correctly?&lt;/li&gt;
&lt;li&gt;Did I cover the code by tests?&lt;/li&gt;
&lt;li&gt;Is the code style standards followed?&lt;/li&gt;
&lt;li&gt;Is logic in the code I wrote could be simplified? &lt;/li&gt;
&lt;li&gt;Is the method/variable/class name is understandable?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Recommendations on writing code that easy to review:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make small iterative changes&lt;/li&gt;
&lt;li&gt;Link to documentation&lt;/li&gt;
&lt;li&gt;Think about the readability of your diff&lt;/li&gt;
&lt;li&gt;Don’t refactor in addition to new changes.&lt;/li&gt;
&lt;li&gt;Check that your PR doesn’t have unnecessary changes or unrelated files.&lt;/li&gt;
&lt;li&gt;each PR should be one logical unit of work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I believe that Code Review Principles and Best Practices should be shared within your team before you start doing code review.&lt;br&gt;
Be friendly and make your comments precise but as short as possible. Make sure that it is about the Code and not about the Author. Avoid possession words like your, mine, my, they are easy to misinterpret and it really should be about the code. Make it clear if your comment is a request for change or an opinion, on which you probably need to discuss.&lt;/p&gt;

&lt;p&gt;A shortlist with questions to ask yourself while reviewing the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Have I read the ticket description? Is the code cover the task?&lt;/li&gt;
&lt;li&gt;Could the logic in the code be simplified?&lt;/li&gt;
&lt;li&gt;Is the code style standard followed?&lt;/li&gt;
&lt;li&gt;Why did this person write this code the way they did?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Recommendations before writing comments on code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Put yourself in the other person’s shoes.&lt;/li&gt;
&lt;li&gt;Listen to hear what’s actually being said.&lt;/li&gt;
&lt;li&gt;Let go of what you think the outcome should be.&lt;/li&gt;
&lt;li&gt;In your comments try to avoid phrases that could hurt the author.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conclusion: &lt;br&gt;
Most importantly of all, the goal of a code review is to have the code pass the review, and make it into production. Code under review is usually code that’s not being used, and code that’s not being used is not adding any value to the application or the users.&lt;br&gt;
Write a good code is hard and review a bad one is even worse. Let`s do our lives easier and spend some time reviewing our own code before sending a merge request.&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>bestpractice</category>
      <category>engineering</category>
      <category>code</category>
    </item>
    <item>
      <title>How to apply The Scientific Method in Software Development</title>
      <dc:creator>Oleksandr</dc:creator>
      <pubDate>Fri, 21 Jun 2019 15:48:26 +0000</pubDate>
      <link>https://forem.com/stefanovskyi/how-to-apply-the-scientific-method-in-software-development-1192</link>
      <guid>https://forem.com/stefanovskyi/how-to-apply-the-scientific-method-in-software-development-1192</guid>
      <description>&lt;p&gt;Day by day we as developers facing hundreds of technical issues that we have to solve. And, as you know, each of them requires its own solution, but the algorithm to solve an abstract issue is already has been determined many years ago in other science in philosophy. I am talking about the Scientific Method.&lt;/p&gt;

&lt;p&gt;The scientific method is a systematic way of learning about the world around us and answering questions. The key difference between the scientific method and other ways of acquiring knowledge are forming a hypothesis and then testing it with an experiment.&lt;/p&gt;

&lt;p&gt;The amount of steps in The Scientific Method is varied, but 6 general steps work for me.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Purpose&lt;/li&gt;
&lt;li&gt;Research&lt;/li&gt;
&lt;li&gt;Hypothesis&lt;/li&gt;
&lt;li&gt;Experiment&lt;/li&gt;
&lt;li&gt;Analysis&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I will explain them step by step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Purpose / Problem / Question
&lt;/h3&gt;

&lt;p&gt;The easiest and most important as well task is to understand what is the issue you working on and what is the purpose to fix it. There was a lot of cases in my practice that if I dig deep enough into the issue I understood the there was no problem or the problem was diametrically different from the initial description.&lt;/p&gt;

&lt;h3&gt;
  
  
  Research
&lt;/h3&gt;

&lt;p&gt;Conduct background research. Scroll to the bottom of articles to check the references. Check the author, check the publish date it is extremely important in the modern era where updates coming monthly. Investigate the code around, check the author and commit dates, check attached task and how the feature should work. If after all that you have questions contact the author if possible. Investigate tests if you have such.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hypothesis
&lt;/h3&gt;

&lt;p&gt;Propose a hypothesis. This is a sort of educated guess about what you expect. It is a statement used to predict the outcome of an experiment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Experiment
&lt;/h3&gt;

&lt;p&gt;Design and perform an experiment to test your hypothesis. The easiest and most appropriate way to do it is to write a test that detects the issue. While writing tests check only one variable, make them as smaller as you can. In such a way, you could be safe and sure what exactly you test.&lt;br&gt;
Build a test project where you can implement a feature from scratch if possible. &lt;/p&gt;

&lt;h3&gt;
  
  
  Analysis
&lt;/h3&gt;

&lt;p&gt;Record observations and analyze what the data means. Try to understand what is the key reason for the issue and how it could be prevented. &lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The result of the analysis should be described in related ticked and discussed with the team to exclude the possibility of appearance such in the feature.&lt;/p&gt;

&lt;p&gt;You probably noticed that The Scientific method is a perfect example of an algorithm and there is no surprise that it was inherited by dozens of other methods. First came to mind is Red-Green-Refactoring method by Robert C. Martin and Observe-Test-Analyze-Repeat method for QA.&lt;/p&gt;

</description>
      <category>development</category>
      <category>engineering</category>
      <category>problemsolving</category>
    </item>
  </channel>
</rss>
