<?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: Oskar</title>
    <description>The latest articles on Forem by Oskar (@oskarkaminski).</description>
    <link>https://forem.com/oskarkaminski</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%2F141613%2Fe435a9b0-450c-4ede-9414-9bd7fd226307.jpeg</url>
      <title>Forem: Oskar</title>
      <link>https://forem.com/oskarkaminski</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/oskarkaminski"/>
    <language>en</language>
    <item>
      <title>[Unpopular Opinion] React is heading in a wrong direction (old)</title>
      <dc:creator>Oskar</dc:creator>
      <pubDate>Fri, 27 Jan 2023 20:46:46 +0000</pubDate>
      <link>https://forem.com/oskarkaminski/unpopular-opinion-react-is-heading-in-a-wrong-direction-46dp</link>
      <guid>https://forem.com/oskarkaminski/unpopular-opinion-react-is-heading-in-a-wrong-direction-46dp</guid>
      <description>&lt;h1&gt;
  
  
  How did we get here - a short history of frameworks
&lt;/h1&gt;

&lt;p&gt;I've built SPA applications with JavaScript before front-end frameworks (angular.js) came about.&lt;/p&gt;

&lt;p&gt;Those days SPAs were jQuery-heavy piles of software engineering "inventions" glued together by scripts and closure-based namespaces - the early ancestors or modern modules.&lt;/p&gt;

&lt;p&gt;Since everything was custom-made by "the senior dev", there was no documentation and little of the original idea was transmitted to juniors without a serious disturbance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Angular.js
&lt;/h2&gt;

&lt;p&gt;That was the context in which Angular.js came about.&lt;br&gt;
It offered a good documentation, interesting concepts and clear-cut separation of responsibility between them (except the difference between the service and provider which was arguably the most famous angular interview question).&lt;/p&gt;

&lt;p&gt;But Angular.js was built yet in the now-legacy "pages-mindset" following initial ideas around HTML and CSS.&lt;br&gt;
While it was fine for some time, as Web 2.0 started to kick-off with rich experiences where focus shifted even more (from information sharing) towards user indulgence - UX became mission-critical.&lt;/p&gt;
&lt;h2&gt;
  
  
  React.js
&lt;/h2&gt;

&lt;p&gt;And React was the one that offered a new way of keeping websites more consistent by shifting the paradigm from pages mindset to component composition.&lt;/p&gt;

&lt;p&gt;Now websites were not only &lt;del&gt;built&lt;/del&gt; composed from self-contained, reusable blocks like the Lego (CSS needed a while to catch up) but it was also less opinionated than Angular.js when it comes to the front-end architecture and especially state management. &lt;br&gt;
&lt;strong&gt;"React is the 'V(iew)' in the MVC"&lt;/strong&gt; - was the main catch phrase those days.&lt;/p&gt;
&lt;h3&gt;
  
  
  MVC roots of the front-end frameworks and React as "the V"
&lt;/h3&gt;

&lt;p&gt;We must remember that those were times when rich front-ends were primarily built by re-specialized PHP developers coming from Symphony / Cake PHP Frameworks background - therefore MVC was a natural structural design pattern for them (and that for long influenced the front-end frameworks).&lt;/p&gt;

&lt;p&gt;But since React was "the V", then what about the Model and Controller? What about the logic and communication?&lt;/p&gt;

&lt;p&gt;Here we come to the central problem since the dawn of React.&lt;/p&gt;
&lt;h1&gt;
  
  
  The problem - React's attempts to "do more"
&lt;/h1&gt;

&lt;p&gt;The first approach React took towards the State Management sounded awesome (and trivial) - let's just pass the whole state from the root component to its individual leaves &lt;strong&gt;via props&lt;/strong&gt; - propagating it through all components in-the-middle like a waterfall.&lt;br&gt;
And boy... it worked so beautifully. At least for the simple examples in documentation.&lt;/p&gt;

&lt;p&gt;But since real front-end application were much larger, as a developer those days you could witness 10-30 different &lt;code&gt;props&lt;/code&gt; shared from the &lt;code&gt;App&lt;/code&gt; through the whole React tree just to hit their leaf components.&lt;br&gt;
Official solution? Just share them via &lt;code&gt;...props&lt;/code&gt; syntax.&lt;/p&gt;

&lt;p&gt;But typing &lt;code&gt;...props&lt;/code&gt; reduced visibility (of which props actually are passed down) leading to many errors and overall... it was just a hack.&lt;/p&gt;
&lt;h2&gt;
  
  
  Flux Architecture and Redux
&lt;/h2&gt;

&lt;p&gt;So &lt;a href="https://github.com/facebook/flux/tree/main/examples"&gt;Flux architecture&lt;/a&gt; with the concept of Stores, Dispatchers, and Actions came about (from React team), and then Redux (a simplified version of Flux - for juniors by a junior).&lt;/p&gt;

&lt;p&gt;Flux was better than Redux but a great documentation (including first-and-foremost a complete, free video tutorial on egghead.io), simplicity of having a single Store, and some "toys for boys" (Redux DevTools with "time-travelling") won developers over and started Dan Abramov's (inexperienced, yet very charismatic 19-years-old freelancer) career in Facebook's React core team.&lt;/p&gt;

&lt;p&gt;So, with everyone having their hands on Redux, Flux architecture being completely forgotten (or even never discovered) all we needed to do to have a complete, easy, flexible, and universal solution for front-end development was to incrementally move out from Redux back to Flux with some default bootstrap that would enable junior devs start small quickly and a guide on best practices how to scale.&lt;/p&gt;
&lt;h2&gt;
  
  
  Mobx - final solution?
&lt;/h2&gt;

&lt;p&gt;All we needed was something like... Mobx - way less verbose, more flexible and without forcing everyone to write immutable code (regardless what is our opinion about mutations, it's not something that should prevent a library from working).&lt;/p&gt;

&lt;p&gt;And there was the time that developers started to notice it. As their projects were getting bloated by thousands of Redux reducers &lt;a href="https://redux.js.org/api/combinereducers"&gt;glued together into a single Super-Store&lt;/a&gt; and they hit its limitations coming from over-constrained architecture, more people started to switch to Mobx and build some high-quality, highly-maintainable, yet concise and elegant architectures.&lt;br&gt;
It enabled developers to have a clear separation of concerns, stateless, functional components, and organized way of keeping their logic in shape.&lt;/p&gt;
&lt;h2&gt;
  
  
  Context API
&lt;/h2&gt;

&lt;p&gt;React tried to design its own, scalable way of managing state and released the first version of the now-legacy Context API (but it didn't get much traction) and then (in React v16.3) another (current) version.&lt;/p&gt;

&lt;p&gt;Just look at the syntax to reuse state of two objects in the component (which contains a single line of real code and 10 lines of boilerplate to enable state reuse):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ThemeContext&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../../../Context/ThemeContext&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;UserContext&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../../../Context/UserContext&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ThemeContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Consumer&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;theme&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
     &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;UserContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Consumer&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
         &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ProfilePage&lt;/span&gt; &lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
       &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
     &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;UserContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Consumer&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;ThemeContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Consumer&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So React team had a problem now.&lt;br&gt;
For some reason, they didn't wanted to keep React doing what it was designed to do (and what it does very well) - being the "V" in the MVC.&lt;br&gt;
They wanted to take over State Management.&lt;/p&gt;

&lt;p&gt;But they had this ass-ugly Context API loaded with Render-Props boilerplate just to make it work.&lt;br&gt;
And it was so bad, it was so against React's own goal of component reuse, that in the same documentation page describing the Context:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Context provides a way to pass data through the component tree without having to pass props down manually at every level.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;They had to add a disclaimer saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Apply it sparingly because it makes component reuse more difficult. If you only want to avoid passing some props through many levels, component composition is often a simpler solution than context.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Which essentially says - here is the &lt;strong&gt;solution&lt;/strong&gt; for the &lt;strong&gt;problem of passing props&lt;/strong&gt; via &lt;strong&gt;multiple layers&lt;/strong&gt;, yada, yada, yada, &lt;u&gt;but you shouldn't use it&lt;/u&gt; only &lt;strong&gt;if you want to solve the problem&lt;/strong&gt; of &lt;strong&gt;passing props via multiple layers&lt;/strong&gt;. Use it only when you are desperate and on your own risk (you were warned).&lt;/p&gt;

&lt;h2&gt;
  
  
  Hooks
&lt;/h2&gt;

&lt;p&gt;So to fix the syntax problem the React v16.6 came about.&lt;br&gt;
With hooks.&lt;br&gt;
A minor feature with major consequences.&lt;br&gt;
Over-hype that could be beaten only by Cyberpunk2077, Luna and NFTs.&lt;/p&gt;

&lt;p&gt;But it was a game changer when it comes to adoption.&lt;br&gt;
When React team said that Hooks solve the issue with clutter of render props and HOCs around the code - they meant mainly the problems caused by their Context API (the other reason was to get rid of the classes to reduce the effort of maintaining two ways of achieving the same thing - which is totally understandable).&lt;br&gt;
And it does make the syntax cleaner. &lt;/p&gt;

&lt;p&gt;Yet the problem persists:&lt;br&gt;
React team keeps trying to solve problems that are already solved much better by others (Mobx is just one of them) instead of focusing on what was the mission which let React to capture hearts of millions of developers in the first place - the efficient, declarative management of DOM.&lt;/p&gt;

&lt;p&gt;I do not claim that React doesn't do its primary objective right (I think it does), but by pushing its own inferior solutions for State Management instead of collaborating with better solutions available in the open-source to refine them for the whole range of use cases, they are just creating chaos both in juniors' minds and during interviews.&lt;/p&gt;

&lt;p&gt;I'm happy to listen to your opinion and I do care about it so regardless if you agree or not, please share it.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>angular</category>
    </item>
    <item>
      <title>Reviewing popular NPM packages</title>
      <dc:creator>Oskar</dc:creator>
      <pubDate>Fri, 01 Nov 2019 21:41:41 +0000</pubDate>
      <link>https://forem.com/oskarkaminski/reviewing-popular-npm-packages-221d</link>
      <guid>https://forem.com/oskarkaminski/reviewing-popular-npm-packages-221d</guid>
      <description>&lt;h1&gt;
  
  
  Reviewing popular open source packages
&lt;/h1&gt;

&lt;p&gt;Do you know any websites, that review popular open source packages?&lt;/p&gt;

&lt;p&gt;If not, would you like to join me doing it?&lt;/p&gt;

&lt;h2&gt;
  
  
  My proposition of review template:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Informative part
&lt;/h3&gt;

&lt;p&gt;1) The problem, that the npm package solves&lt;br&gt;
2) Abstract description of techniques used to solve the problem&lt;br&gt;
3) Alternative approaches, that could be possibly taken&lt;/p&gt;

&lt;h3&gt;
  
  
  Results part
&lt;/h3&gt;

&lt;p&gt;1) TESTS - Test coverage for the logic.&lt;br&gt;
2) CLEAN - Size of the functions, naming conventions, files structure, separation of concerns.&lt;br&gt;
3) CRAFT - Single responsibility, Open-Closed, YAGNI, DRY.&lt;/p&gt;

&lt;p&gt;I think with the amount of NPM packages we use in daily basis, our power would improve significantly if we could better understand them and incentive authors to keep the highest quality.&lt;/p&gt;

&lt;p&gt;Let me know your thoughts.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>npm</category>
      <category>github</category>
      <category>review</category>
    </item>
    <item>
      <title>Serverless with real-time communication (WebSockets)</title>
      <dc:creator>Oskar</dc:creator>
      <pubDate>Wed, 07 Aug 2019 17:43:26 +0000</pubDate>
      <link>https://forem.com/oskarkaminski/serverless-with-real-time-communication-websockets-2c6j</link>
      <guid>https://forem.com/oskarkaminski/serverless-with-real-time-communication-websockets-2c6j</guid>
      <description>&lt;h2&gt;
  
  
  Disclaimer
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;This article is a deep dive guide to build WebSockets on Serverless architecture.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you are not familiar with WebSockets, please first &lt;a href="https://pusher.com/websockets" rel="noopener noreferrer"&gt;What are WebSockets?&lt;/a&gt;&lt;br&gt;
If you never used Serverless, please read first &lt;a href="https://serverless-stack.com/chapters/what-is-serverless.html" rel="noopener noreferrer"&gt;What is Serverless?&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Last year my team built 100% serverless mobile application which now helps hundreds of developers to maintain happy and healthy teams.&lt;/p&gt;



&lt;p&gt;Check how the Team Health Check help developers&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/oskarkaminski" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F141613%2Fe435a9b0-450c-4ede-9414-9bd7fd226307.jpeg" alt="oskarkaminski"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/oskarkaminski/tools-that-help-me-build-healthy-and-performing-teams-237e" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Tools, that help me build healthy 💕 and performing teams 👩🏾‍💻👨🏼‍💻&lt;/h2&gt;
      &lt;h3&gt;Oskar ・ Jun 1 '19&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#team&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#career&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#performance&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;





&lt;p&gt;After we've built the first version of the app, something felt off. &lt;br&gt;
Imagine the app, where each screen must call the Lambda function to get the data every time, and if someone joins your team, you must navigate out and in again to see the change.&lt;/p&gt;

&lt;p&gt;We've realized, it's time for a real-time connection.&lt;/p&gt;

&lt;p&gt;We've tried easier way (AppSync), and... more flexible way :) (API Gateway v.2). This guide presents the more sophisticated architecture - using API Gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Difference between Serverless REST API and Serverless WebSockets.
&lt;/h2&gt;

&lt;p&gt;Let's first review how typical serverless architecture looks like, and then see how it evolves when we add the sockets layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Serverless using REST API
&lt;/h3&gt;

&lt;p&gt;Handling REST API requests on Serverless is a straightforward process, which in the most common case utilizes 4 layers - each responsible for its own functionality (diagram below). &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User sends a request with &lt;code&gt;Authorization&lt;/code&gt; header to the API Gateway.&lt;/li&gt;
&lt;li&gt;API Gateway authenticates the user with out-of-the-box &lt;code&gt;Cognito User Pool authorizer&lt;/code&gt;. Amazon Cognito grants (or denies) the access, and pass the user attributes as &lt;code&gt;uuid&lt;/code&gt; or &lt;code&gt;email&lt;/code&gt; to the request context.&lt;/li&gt;
&lt;li&gt;API Gateway executes the associated Lambda function together with the user attributes.&lt;/li&gt;
&lt;li&gt;Lambda function makes all necessary requests to a database, data transformations and returns a response to the API Gateway&lt;/li&gt;
&lt;li&gt;API Gateway pass the response back to the user.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The same process, including authentication, happens every single time, for every request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F8p8we1r1qaoldqnykyok.png" 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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F8p8we1r1qaoldqnykyok.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Easy, right?&lt;/p&gt;

&lt;h3&gt;
  
  
  WebSockets on Serverless
&lt;/h3&gt;

&lt;p&gt;WebSocket connection though, is more… sophisticated :) &lt;/p&gt;

&lt;p&gt;The user here is authenticated only once - during their initial &lt;code&gt;UPGRADE&lt;/code&gt; request. If authentication process succeed, then the socket connection is established for as long, as any of the sides doesn’t close it. &lt;/p&gt;

&lt;p&gt;User making subsequent requests to the WebSocket protocol doesn’t provide his claims because connection is stateful, and the server (here API Gateway) keeps the information about the sender.&lt;/p&gt;

&lt;p&gt;The below diagram presents what happen when devices connect to the API Gateway WebSocket API, and later when one of the users invoke the API (in this case the user is voting, and his teammates get notified about it).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F7bhbngf12tk5dyupmwob.png" 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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F7bhbngf12tk5dyupmwob.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are a few interesting facts about this architecture.&lt;/p&gt;

&lt;h4&gt;
  
  
  We are implementing Custom Authorizer.
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;API Gateway WebSocket API&lt;/code&gt; doesn’t offer out-of-the-box integration with &lt;code&gt;Cognito User Pool&lt;/code&gt;. Therefore a &lt;code&gt;Custom Authorizer&lt;/code&gt; must be implemented by ourselves. &lt;/p&gt;

&lt;p&gt;The Custom Authorizer is a Lambda function, that validates JSON token with a public rsa key fetched from an authorization server where the user exist, and later grant the access by a setting a proper &lt;code&gt;IAM policy&lt;/code&gt; in the response.&lt;/p&gt;

&lt;h4&gt;
  
  
  We are storing socket id for later reference.
&lt;/h4&gt;

&lt;p&gt;When the access is granted, it’s our responsibility to save the &lt;code&gt;socket id&lt;/code&gt; to the database such as &lt;code&gt;DynamoDB&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;In the above architecture the socket id is saved both to &lt;code&gt;ConnectionsTable&lt;/code&gt; and &lt;code&gt;ProfilesTable&lt;/code&gt;. &lt;/p&gt;

&lt;h4&gt;
  
  
  Authorizer is executed only once.
&lt;/h4&gt;

&lt;p&gt;Both &lt;code&gt;Authorizer&lt;/code&gt; and &lt;code&gt;onConnect&lt;/code&gt; are the lambda functions executed only once when user connects to the socket API. This makes the subsequent requests to the socket even faster.&lt;/p&gt;

&lt;h4&gt;
  
  
  We can call the socket from anywhere, even outside AWS.
&lt;/h4&gt;

&lt;p&gt;We can notify the socket from another service such as &lt;code&gt;Lambda Function&lt;/code&gt;, &lt;code&gt;EC2&lt;/code&gt; or even outside AWS. &lt;/p&gt;

&lt;p&gt;We do it by sending a &lt;code&gt;POST&lt;/code&gt; request to the API Gateway's &lt;code&gt;@connections&lt;/code&gt; route with id of a socket we want to notify in the path. &lt;br&gt;
If we want to notify 100 sockets, we must send 100 POST requests what can be a bit worrying, but so far it worked well in our production app.&lt;/p&gt;

&lt;h4&gt;
  
  
  We are signing every request.
&lt;/h4&gt;

&lt;p&gt;Each request to the &lt;code&gt;API Gateway WebSocket API&lt;/code&gt; must be signed. This is to ensure API Gateway, that we have a permission to push a data to the user through the socket. &lt;/p&gt;

&lt;p&gt;Not long ago it required a lot of steps, but thanks to our recently released npm package &lt;a href="https://www.npmjs.com/package/aws-request-signer" rel="noopener noreferrer"&gt;aws-request-signer&lt;/a&gt; you can do it with almost no effort.&lt;/p&gt;

&lt;h2&gt;
  
  
  To wrap up
&lt;/h2&gt;

&lt;p&gt;We've covered the typical serverless architecture, then we've shown how it evolves when we add real-time communication and lastly we've covered some of the most interesting highlights about it.&lt;/p&gt;

&lt;p&gt;If you want to go serverless, or need to add real-time communication, feel free to text me, or hire my services so you can enjoy fully automated serverless setup with the best practices within a week.&lt;/p&gt;

&lt;p&gt;If you don't agree with any part, please comment your feedback.&lt;br&gt;
Follow if you don't want to miss more deep dive content from production apps.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>websockets</category>
      <category>aws</category>
      <category>web</category>
    </item>
    <item>
      <title>Tools, that help me build healthy 💕 and performing teams 👩🏾‍💻👨🏼‍💻</title>
      <dc:creator>Oskar</dc:creator>
      <pubDate>Sat, 01 Jun 2019 13:28:41 +0000</pubDate>
      <link>https://forem.com/oskarkaminski/tools-that-help-me-build-healthy-and-performing-teams-237e</link>
      <guid>https://forem.com/oskarkaminski/tools-that-help-me-build-healthy-and-performing-teams-237e</guid>
      <description>&lt;p&gt;If you were assigned to building a company's dream team tomorrow, what techniques and tools would you use to support your strategy? &lt;/p&gt;

&lt;h2&gt;
  
  
  Building a top-performing team
&lt;/h2&gt;

&lt;p&gt;Great teams don't born within a single day. Every team must go through certain stages before it can eventually become a company team no. 1. You know... this kind of team, that you ask for help when things get really serious - Special Forces, Aces, Alpha Dogs... call them whateva.&lt;/p&gt;

&lt;p&gt;But what are those stages, and why not every team reach this top-performing state?&lt;/p&gt;

&lt;h2&gt;
  
  
  Stages of group development
&lt;/h2&gt;

&lt;p&gt;The scientist Bruce Tuckman is proving in his popular theory &lt;a href="https://en.wikipedia.org/wiki/Tuckman%27s_stages_of_group_development"&gt;the Tuckman’s stages of group development&lt;/a&gt;, that &lt;strong&gt;to reach high-performance state&lt;/strong&gt;, every team goes through three preceding phases - forming, storming and norming.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ij_M4Yy6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://s3.eu-west-2.amazonaws.com/team-health-check-marketing/article-1/tuckman-model.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ij_M4Yy6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://s3.eu-west-2.amazonaws.com/team-health-check-marketing/article-1/tuckman-model.png" alt="Tuckman's model"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then is walking through those phases to performing state just a matter of time?&lt;/p&gt;

&lt;p&gt;Yeah... my ass.&lt;/p&gt;

&lt;p&gt;During those phases basically everything can go south. And it often does. &lt;br&gt;
From the power fight during the storming phase (have you ever been in a team built from former technical leaders? You gonna love it), to building dysfunctional norms like finger-pointing or never saying no to your boss (and then leaving your team with it).&lt;/p&gt;

&lt;p&gt;It seems like most of the teams don't spend enough time building the foundations, which would enable them to be something more than just a group of people working together. &lt;/p&gt;

&lt;p&gt;Why is that?&lt;/p&gt;

&lt;h2&gt;
  
  
  Sh## must be delivered
&lt;/h2&gt;

&lt;p&gt;Usually, teams are created with a single purpose. To deliver a particular task. The task becomes their top priority and progress towards it (or lack of it) is the main measure of their success. Therefore it’s not surprising managers create all sorts of incentives pushing teams to the limits regardless of their health.&lt;/p&gt;

&lt;p&gt;Unfortunately, that push for results without a solid understanding of the team health — the same as driving a car without reviews nor repairs — leads (in the best scenario) to the permanent damage.&lt;/p&gt;

&lt;p&gt;How to avoid the damage? &lt;/p&gt;

&lt;p&gt;Let me share some techniques, and tools, that help me build healthy and performing teams in a consistent, and repeatable way. By doing it you will gain the highest value - trust and loyalty of your folks - in return.&lt;/p&gt;

&lt;h3&gt;
  
  
  Team Health Check
&lt;/h3&gt;

&lt;p&gt;If you are a part of a development team, this tool is just for you.&lt;br&gt;
Team Health Check is a mobile app based on &lt;a href="https://labs.spotify.com/2014/09/16/squad-health-check-model/"&gt;retrospectives model designed by Spotify&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;No app can replace honest conversation between the team members, while everyone has a say about their feelings and thoughts. &lt;br&gt;
But how to understand the key pain points of your team without getting bragged into long, negative spirals of complaint with no certainty if the identified issues are addressing a real threat or just demands of the most vocal part of a group?&lt;/p&gt;

&lt;p&gt;Team Health Check addresses this challenge by involving the whole team in anonymous voting for the most important (and urgent) parts of its work.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Learning&lt;/th&gt;
&lt;th&gt;Delivering value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mmmPLbgU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9ey3sqbstrc3fv9ug02d.png" alt=""&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tiKZ79vi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/yv46nhjdi6eetemsbk5v.png" alt=""&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Predefined categories enable your team to start immediately. &lt;br&gt;
Register the free account in the &lt;a href="https://itunes.apple.com/us/app/team-health-check/id1455739040?mt=8"&gt;iOS&lt;/a&gt; or &lt;a href="https://play.google.com/store/apps/details?id=net.teamhealthcheck"&gt;Android&lt;/a&gt; app, and you are ready for your first health check!&lt;/p&gt;

&lt;p&gt;Then just keep an eye (and swiftly improve) on the direction of your team by looking at the trend between multiple health checks/votings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jZH0sb5y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qjvr494dfh9rhqwd6llv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jZH0sb5y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qjvr494dfh9rhqwd6llv.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  How to download?
&lt;/h4&gt;

&lt;p&gt;Since Team Health Check is a mobile app, you can find it in the &lt;a href="https://itunes.apple.com/us/app/team-health-check/id1455739040?mt=8"&gt;App Store&lt;/a&gt; or &lt;a href="https://play.google.com/store/apps/details?id=net.teamhealthcheck"&gt;Google Play&lt;/a&gt; or by scanning the below QR.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;iOS&lt;/th&gt;
&lt;th&gt;Android&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pvwpREoY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/x3xi4sdi5x42ongr4xvz.png" alt=""&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yuqrH6hE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ahql2fcgrjrccs7krxfa.png" alt=""&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Stickies.io
&lt;/h3&gt;

&lt;p&gt;If you already know the health of your team (you can use Team Health Check for that), then quick &lt;a href="https://www.mindtools.com/pages/article/newCT_86.htm"&gt;brainwriting session&lt;/a&gt; is likely what you are looking for next.&lt;/p&gt;

&lt;p&gt;Brainwriting is a technique similar to brainstorming, but the participants fill their ideas on sticky notes.&lt;/p&gt;

&lt;p&gt;What is cool about brainwriting is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s very democratic — All your folks can write in the same time and express their opinion without competing for attention.&lt;/li&gt;
&lt;li&gt;It promotes non-conformism — While during brainstorming people can gravity around previously expressed idea, brainwriting let everyone to focus just on their thoughts.&lt;/li&gt;
&lt;li&gt;No social loafing — Teams have a tendency for a minority of people to do a majority of the team’s work, while some people don’t contribute. Brainwriting addresses that by giving an equal chance to contribute to everyone and making the involvement more transparent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="http://stickies.io/"&gt;Stickies.io&lt;/a&gt; is a free, virtual sticky notes board. The website enables to organize brainwriting session even for distributed teams, while (optional) incognito mode ensures participants can focus on their own ideas (without seeing each other's notes).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rNeJnEwB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/o4sq9r4cpjdef7xyb2kh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rNeJnEwB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/o4sq9r4cpjdef7xyb2kh.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the session, participants can uncover their ideas, group them together, and vote for the best.&lt;/p&gt;

&lt;h2&gt;
  
  
  What next?
&lt;/h2&gt;

&lt;p&gt;Building teams is a time-consuming process that can’t be done once and forgotten.&lt;/p&gt;

&lt;p&gt;I’ve shared with you my favorite tools, that help me build healthier teams.&lt;br&gt;
They can be also your compass and guide your team on a challenging road to find its own, individual culture fitted to its own, unique context.&lt;/p&gt;

</description>
      <category>team</category>
      <category>career</category>
      <category>performance</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
