<?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: Roman Kraiovsky 🇺🇦🇸🇪</title>
    <description>The latest articles on DEV Community by Roman Kraiovsky 🇺🇦🇸🇪 (@kraiovsky).</description>
    <link>https://dev.to/kraiovsky</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%2F362549%2Fc0834c87-d881-4ad5-b1a8-a08a3973465a.jpg</url>
      <title>DEV Community: Roman Kraiovsky 🇺🇦🇸🇪</title>
      <link>https://dev.to/kraiovsky</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kraiovsky"/>
    <language>en</language>
    <item>
      <title>Exacta - lightweight JS benchmarking 🏆</title>
      <dc:creator>Roman Kraiovsky 🇺🇦🇸🇪</dc:creator>
      <pubDate>Tue, 19 May 2020 14:40:24 +0000</pubDate>
      <link>https://dev.to/kraiovsky/exacta-lightweight-js-benchmarking-52p7</link>
      <guid>https://dev.to/kraiovsky/exacta-lightweight-js-benchmarking-52p7</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;tldr; Introducing &lt;a href="https://github.com/kraiovsky/exacta"&gt;Exacta&lt;/a&gt; 🏆 - lightweight, zero-dependencies benchmarking utility you can run as part of your test suite.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;p&gt;Whether you are playing with challenges on &lt;a href="https://www.codewars.com/"&gt;Codewars&lt;/a&gt; or &lt;a href="https://leetcode.com/"&gt;LeetCode&lt;/a&gt;, or just need to compare which method of finding duplicates in array for your project is faster, eventually you need to benchmark performance of your code.&lt;/p&gt;

&lt;p&gt;Libraries like &lt;a href="https://benchmarkjs.com/"&gt;Benchmark.js&lt;/a&gt; do really good job and I do not mean to compete with full-blown benchmarking suite. I was, however, looking for something simpler and lighter where I'd have more control and be able to run it as part of unit tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;Here comes &lt;strong&gt;Exacta&lt;/strong&gt; - lightweight, zero-dependencies benchmarking utility you can run as part of your test suite.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/kraiovsky/exacta"&gt;https://github.com/kraiovsky/exacta&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Race = require('exacta')

const fn1 = require('./fn1')
const fn2 = require('./fn2')

const param1 = [1, 2, 3]
const param2 = 'your string'

test(`benchmark`, () =&amp;gt; {
  new Race()
    .setRuns(100000) // optional, defaults to 1000
    .addFn(fn1) // add functions to run...
    .addFn(fn2) // ...as many as you have, one at a time
    .setParams(param1, param2) // add parameters that functions take
    .run() // and finally let them run
})
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;it will output something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--= Race results =--

# of runs: 100000
Parameters: [[1,2,3],"your string"]

Function                Run time [↓]
====================================
🏆 fn1()                10 ms
------------------------------------
   fn2()                20 ms
------------------------------------
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Why Exacta?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Exacta&lt;/em&gt; stands for a method of betting, as on a horserace, in which the bettor must correctly pick those finishing in the first and second places in precisely that sequence. &lt;a href="https://www.thefreedictionary.com/exacta"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/kraiovsky/exacta"&gt;https://github.com/kraiovsky/exacta&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>testing</category>
      <category>webdev</category>
      <category>node</category>
    </item>
    <item>
      <title>Get Things Done with Shufl</title>
      <dc:creator>Roman Kraiovsky 🇺🇦🇸🇪</dc:creator>
      <pubDate>Thu, 14 May 2020 10:09:43 +0000</pubDate>
      <link>https://dev.to/kraiovsky/get-things-done-with-shufl-4i75</link>
      <guid>https://dev.to/kraiovsky/get-things-done-with-shufl-4i75</guid>
      <description>&lt;p&gt;&lt;em&gt;It is an introduction of a project I've built for my own use; I am an engineering manager and will be speaking to other "managers" out there, but it can and should be used (and has been since we introduced it in our team) by engineers to manage their own load.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  tldr;
&lt;/h2&gt;

&lt;p&gt;Shuffle and assign tasks among your team members: &lt;a href="https://shufl.now.sh/" rel="noopener noreferrer"&gt;https://shufl.now.sh/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;p&gt;We maintain an open team culture, where we trust everyone is a professional and does their job responsibly and to their best abilities, improving personal contribution and team's performance as the whole. &lt;/p&gt;

&lt;p&gt;Enough has been said about the importance of maintaining such leadership culture in modern &lt;a href="https://svpg.com/product-vs-feature-teams/" rel="noopener noreferrer"&gt;product teams&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One of practical examples is reviewing pull requests. &lt;br&gt;
Ideally, you would review PRs as they come up. &lt;br&gt;
On practice, it is not always happening and every day at a stand-up we would compile a list of of PRs from past day ready for review, send it in slack and let engineers pick them up and review, ideally before lunch.&lt;/p&gt;

&lt;p&gt;It works well until the number of PRs exceeds your team bandwidth. Add a couple of urgent tickets that need to be merged "now" and you have a challenge to address.&lt;/p&gt;

&lt;p&gt;Just putting a list of PRs and let the team pick them up may lead to everyone jumping on the first PR on the list and leaving less time for others. That's when you need to intervene and manage priorities.&lt;/p&gt;

&lt;p&gt;You can do it manually by asking certain people to pick certain PRs. It can be time consuming and, worse, introduce bias and favouritism.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;Instead, we ask technology for help.&lt;br&gt;
First, I used &lt;a href="https://random.org" rel="noopener noreferrer"&gt;random.org&lt;/a&gt; to randomise assignments, but it is not that handy: you have to keep list of people somewhere aside to copy-paste quickly, and you cannot easily assign 2+ reviewers per PR.&lt;/p&gt;

&lt;p&gt;That's when we introduced my little project to shuffle and assign tasks randomly with custom number of assignees per task.&lt;/p&gt;

&lt;p&gt;It comes in two versions:&lt;br&gt;
Web: &lt;a href="https://shufl.now.sh/" rel="noopener noreferrer"&gt;https://shufl.now.sh/&lt;/a&gt;&lt;br&gt;
and CLI: &lt;a href="https://github.com/kraiovsky/get-it-done/tree/master/packages/cli" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
Example of using CLI version:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fkraiovsky%2Fget-it-done%2Fraw%2Fmaster%2Fpackages%2Fcli%2Fstatic%2Fdemo-1st-run.gif" 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%2Fgithub.com%2Fkraiovsky%2Fget-it-done%2Fraw%2Fmaster%2Fpackages%2Fcli%2Fstatic%2Fdemo-1st-run.gif" alt="shuffle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We successfully use it for other assignments, like occasional manual QA rounds, or buying &lt;a href="https://www.youtube.com/watch?v=oRIeytEXGhQ" rel="noopener noreferrer"&gt;fika&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Contributions and suggestions are welcome.&lt;/p&gt;

</description>
      <category>management</category>
      <category>javascript</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
