<?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: James Sumners</title>
    <description>The latest articles on DEV Community by James Sumners (@jsumners).</description>
    <link>https://dev.to/jsumners</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%2F384866%2Fd5709a0c-6c91-4f92-8f6b-1a243a91b71f.png</url>
      <title>DEV Community: James Sumners</title>
      <link>https://dev.to/jsumners</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jsumners"/>
    <language>en</language>
    <item>
      <title>Testing Patterns And Strategies</title>
      <dc:creator>James Sumners</dc:creator>
      <pubDate>Wed, 30 Jun 2021 16:33:11 +0000</pubDate>
      <link>https://dev.to/knock/testing-patterns-and-strategies-1d7k</link>
      <guid>https://dev.to/knock/testing-patterns-and-strategies-1d7k</guid>
      <description>&lt;p&gt;Our goal at &lt;a href="https://knock.com"&gt;Knock&lt;/a&gt; is to empower people to move freely. A large part of achieving that goal is to make real estate transactions as easy and seamless as possible for our customers. Real estate transactions are very complicated. Calling them a &lt;a href="https://en.wikipedia.org/wiki/Big_ball_of_mud"&gt;"big ball of mud"&lt;/a&gt; is being gracious. If we could sum up such transactions up in one image, it would be the image of Charlie Day explaining how a person named &lt;a href="https://www.youtube.com/watch?v=_nTpsv9PNqo"&gt;Pepe Silvia doesn't exist&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fsMANq91--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lkuc7tna9qsshthwh2dl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fsMANq91--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lkuc7tna9qsshthwh2dl.png" alt="Pepe Silvia does not exist"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For us as an engineering team, this translates into a lot of complex business logic. And we want to do our best to make sure that logic is sound. If our logic is faulty it can lead to thousands of dollars of disappointment. We do not want that. Thus, we thoroughly test our code via &lt;a href="https://en.wikipedia.org/wiki/Unit_testing"&gt;unit testing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are in a growth stage at Knock so we are regularly bringing on new engineers. During this process we have learned that it can be difficult for new engineers to come to grips with our testing code base while at the same time recognizing the patterns and strategies used in our unit tests. As a result, we have started a new open repository that provides lessons for any engineer to learn from and reference. We think this repository fills a gap in the community and are thus making it available for anyone to reference and contribute to: &lt;a href="https://github.com/knockaway/unit-test-patterns-and-strategies"&gt;https://github.com/knockaway/unit-test-patterns-and-strategies&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Have we missed any patterns or strategies? We welcome pull requests to add more. And if you're looking to join a team that cares about the quality of their code, &lt;a href="https://grnh.se/a8c6cec74us"&gt;we're hiring&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>node</category>
      <category>testing</category>
    </item>
    <item>
      <title>Knock and Open Source</title>
      <dc:creator>James Sumners</dc:creator>
      <pubDate>Thu, 10 Jun 2021 13:55:26 +0000</pubDate>
      <link>https://dev.to/knock/knock-and-open-source-3pg3</link>
      <guid>https://dev.to/knock/knock-and-open-source-3pg3</guid>
      <description>&lt;p&gt;&lt;a href="https://knock.com"&gt;Knock.com&lt;/a&gt; is built with Open Source Software (OSS). It permeates our technology stack from the interactive website all the way through to the services and systems that power our infrastructure. We depend on OSS, and we are excited to start contributing back to our community. Doing so aligns well with a couple of our &lt;a href="https://www.knock.com/careers"&gt;core values&lt;/a&gt;, which we call POPSICLE, "people first" and “open”:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;P - passionate&lt;/li&gt;
&lt;li&gt;O - open&lt;/li&gt;
&lt;li&gt;P - people first&lt;/li&gt;
&lt;li&gt;S - simplicity&lt;/li&gt;
&lt;li&gt;I - impact&lt;/li&gt;
&lt;li&gt;C - courage&lt;/li&gt;
&lt;li&gt;L - learning&lt;/li&gt;
&lt;li&gt;E - enjoying life&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We believe in being &lt;strong&gt;Open&lt;/strong&gt; with our community, to &lt;strong&gt;Learn&lt;/strong&gt; from each other, and to make an &lt;strong&gt;Impact&lt;/strong&gt; if we can. We deeply believe that companies relying on OSS should be contributing back to the community in any way they can. For us, that means releasing code as an organization that others may find useful, and contributing back to the projects we use. Over time, that may evolve into other sorts of contributions, but these core principles will remain the same.&lt;/p&gt;

&lt;p&gt;In that spirit, we are pleased to announce our first open source project...&lt;/p&gt;

&lt;h2&gt;
  
  
  sqsiphon
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/knockaway/sqsiphon"&gt;&lt;code&gt;sqsiphon&lt;/code&gt;&lt;/a&gt;, installable via &lt;code&gt;npm install @knockaway/sqsiphon&lt;/code&gt;, is a library we wrote to help us improve our webhook event ingestion. Initially, we were relying on the scalable nature of AWS Lambda to handle our incoming webhooks. This worked for a fair amount of time, but as we grew, so did the number of incoming webhook events we needed to process. This resulted in Lambda overloading our data stores. To solve the problem, we built out a system that receives the webhook events and puts them into an AWS SQS FIFO queue.&lt;/p&gt;

&lt;p&gt;As we built out this new system, we looked at the current module ecosystem to determine if anything would fit our needs to keep this queue cleared. Unfortunately, the best module we could find, &lt;a href="https://github.com/BBC/sqs-consumer"&gt;&lt;code&gt;sqs-consumer&lt;/code&gt;&lt;/a&gt;, did not support FIFO queues and the issues indicated they did not have any intention to do so. Therefore, we wrote &lt;code&gt;sqsiphon&lt;/code&gt;. Our library heavily borrows from the public interface of &lt;code&gt;sqs-consumer&lt;/code&gt;, but is implemented in a much different way. In particular, &lt;code&gt;sqsiphon&lt;/code&gt; leverages the &lt;a href="https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/"&gt;Node.js event loop&lt;/a&gt; through &lt;a href="https://nodejs.org/dist/latest-v14.x/docs/api/timers.html#timers_setimmediate_callback_args"&gt;&lt;code&gt;setImmediate&lt;/code&gt;&lt;/a&gt; to build the polling mechanism instead of relying on SQS's "long polling" feature. Additionally, &lt;code&gt;sqsiphon&lt;/code&gt; utilizes the JavaScript prototype to reduce reliance on expensive closures. As a bonus, &lt;a href="https://opentracing.io"&gt;OpenTracing&lt;/a&gt; support is built-in to &lt;code&gt;sqsiphon&lt;/code&gt; so that applications built with it can be monitored effectively. The result is a library that can poll SQS extremely quickly while requiring very little overhead.&lt;/p&gt;

&lt;p&gt;We hope you find this library as useful as we do.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>node</category>
    </item>
  </channel>
</rss>
