<?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: Knock</title>
    <description>The latest articles on DEV Community by Knock (@knock).</description>
    <link>https://dev.to/knock</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%2Forganization%2Fprofile_image%2F4282%2F920f53b0-a56f-4171-b51a-09013fdafe45.jpeg</url>
      <title>DEV Community: Knock</title>
      <link>https://dev.to/knock</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/knock"/>
    <language>en</language>
    <item>
      <title>Kustomer react-native library</title>
      <dc:creator>Daniel Yo</dc:creator>
      <pubDate>Tue, 04 Jan 2022 17:42:15 +0000</pubDate>
      <link>https://dev.to/knock/kustomer-react-native-library-4pbk</link>
      <guid>https://dev.to/knock/kustomer-react-native-library-4pbk</guid>
      <description>&lt;p&gt;Our goal at Knock is to make agents the superheroes to their clients and to do all we can to support them along the way. In early 2021 we struck out to simplify communications between Knockstars and agents by meeting the agents where they’re at. We wanted to provide agents real-time contact with Knockstars as well as access to our knowledge base.&lt;/p&gt;

&lt;p&gt;With this in mind, Knock opted to integrate with &lt;a href="https://www.kustomer.com/product/"&gt;Kustomer&lt;/a&gt; and implement their live chat feature into our web and mobile applications. Kustomer provides native &lt;a href="https://developer.kustomer.com/chat-sdk/v2.0-Web/"&gt;web&lt;/a&gt; and mobile SDKs (&lt;a href="https://developer.kustomer.com/chat-sdk/v2-iOS/"&gt;iOS&lt;/a&gt;/&lt;a href="https://developer.kustomer.com/chat-sdk/v2-Android/"&gt;Android&lt;/a&gt;) out of the box. Our mobile app is built with react-native so it wasn’t easy to consume their mobile SDKs.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Kustomer integrated under our Support section&lt;/em&gt; &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FmcH7Y0r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e70dc8jbwatwontrrqxf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FmcH7Y0r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e70dc8jbwatwontrrqxf.png" alt="Image description" width="418" height="858"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Easy access to our FAQ (Knowledge base)&lt;/em&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iaFjf1bo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1fv3u8jlto836l7pzvu5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iaFjf1bo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1fv3u8jlto836l7pzvu5.png" alt="Image description" width="415" height="883"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For react-native apps to consume native code (Objective-C/Swift, Java/Kotlin) we would have to bridge the native code into Javascript with the help of &lt;a href="https://reactnative.dev/docs/native-modules-intro"&gt;NativeModules&lt;/a&gt;. To that end, we created &lt;a href="https://github.com/knockaway/kustomer-react-native"&gt;kustomer-react-native&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One of the new features in KustomerV2 we were interested in is their support for push notifications. This would allow agents or their customers to start a live chat with Knockstars from our mobile app and stay up to date with new messages without having to keep the app open all the time.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/yEyZWst-1zI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The initial release of this library covers the methods we need for the features described above. As we expand our usage of Kustomer, we expect to expand the coverage of this library.&lt;/p&gt;

&lt;p&gt;Help us improve this library by submitting pull requests on the &lt;a href="https://github.com/knockaway/kustomer-react-native"&gt;GitHub&lt;/a&gt; repository. &lt;/p&gt;

</description>
      <category>opensource</category>
      <category>reactnative</category>
      <category>ios</category>
      <category>android</category>
    </item>
    <item>
      <title>Loan Calculator Library</title>
      <dc:creator>Stephen</dc:creator>
      <pubDate>Tue, 20 Jul 2021 18:15:20 +0000</pubDate>
      <link>https://dev.to/knock/loan-calculator-library-4ogg</link>
      <guid>https://dev.to/knock/loan-calculator-library-4ogg</guid>
      <description>&lt;p&gt;As part of Knock’s mission to make home buying and selling easy, we launched the Knock &lt;a href="https://blog.knock.com/knock-home-swap/"&gt;Home Swap&lt;/a&gt;™ almost exactly one year ago. Offering competitive financial products to our clients brought with it a host of opportunities, challenges, and new features for Knockstars to develop!&lt;/p&gt;

&lt;p&gt;For example, take this Home Swap interest rates card from Knock HomePro (&lt;a href="https://play.google.com/store/apps/details?id=com.knockpoc&amp;amp;hl=en_US&amp;amp;gl=US"&gt;Android&lt;/a&gt; / &lt;a href="https://apps.apple.com/us/app/knock-homepro/id1446291303"&gt;iOS&lt;/a&gt;), our app for Real Estate agents:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Jv_TRKpV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r22g18fdr5khom1obga0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Jv_TRKpV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r22g18fdr5khom1obga0.png" alt="Screen Shot 2021-07-20 at 9.53.25 AM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We brought mortgage rates into the HomePro app to show agents and their customers that we offer competitive interest rates. We are also legally required to show the Annual Percentage Rate (APR) whenever we provide an interest rate. This gives agents and customers a uniform metric to compare interest rates and fees across lenders.&lt;/p&gt;

&lt;p&gt;To our surprise, it was difficult to find a simple &lt;a href="https://www.npmjs.com/"&gt;NPM&lt;/a&gt; module to convert an interest rate to APR the way that innumerable online calculators do (&lt;a href="https://www.calculator.net/apr-calculator.html"&gt;1&lt;/a&gt;, &lt;a href="https://www.calculatorsoup.com/calculators/financial/apr-calculator.php"&gt;2&lt;/a&gt;, &lt;a href="https://www.calculatestuff.com/financial/apr-calculator"&gt;3&lt;/a&gt;, the list goes on!). In particular, we could not find a module that would properly account for the various parameters (payment frequency, loaned fees, upfront fees, etc.) which are readily available in many of the online tools.&lt;/p&gt;

&lt;p&gt;And so, we created this open source module: &lt;a href="https://npm.im/@knockaway/loan-calculator"&gt;@knockaway/loan-calculator&lt;/a&gt;. The goal of this project is to make loan calculations as simple as using any one of the free online loan calculators. Just inputs and outputs! The first release includes methods to calculate APR, APY, periodic payments, and to convert compounding frequencies.&lt;/p&gt;

&lt;p&gt;Have an idea for a new loan calculator function? Visit our &lt;a href="https://github.com/knockaway/loan-calculator"&gt;GitHub&lt;/a&gt; page to make a contribution or feature request. Happy calculating!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>node</category>
    </item>
    <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>
