<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.7">Jekyll</generator><link href="https://cema-sp.github.io/til/feed.xml" rel="self" type="application/atom+xml" /><link href="https://cema-sp.github.io/til/" rel="alternate" type="text/html" /><updated>2020-07-10T01:34:21+00:00</updated><id>https://cema-sp.github.io/til/feed.xml</id><title type="html">TIL Blog</title><subtitle>Personal TIL Blog by Semyon Pisarev.</subtitle><author><name>Semyon Pisarev</name></author><entry><title type="html">Node.js Callback Queues</title><link href="https://cema-sp.github.io/til/node/2020/07/09/nodejs-callback-queues.html" rel="alternate" type="text/html" title="Node.js Callback Queues" /><published>2020-07-09T00:00:00+00:00</published><updated>2020-07-09T00:00:00+00:00</updated><id>https://cema-sp.github.io/til/node/2020/07/09/nodejs-callback-queues</id><content type="html" xml:base="https://cema-sp.github.io/til/node/2020/07/09/nodejs-callback-queues.html">&lt;p&gt;Learned some about Node.js internals and Callback Queues in particular.
It appeared Node.js maintains multiple prioritized queues to handle callbacks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Call Stack&lt;/strong&gt; - keeps track of the function currently being executed and of its origin.
&lt;strong&gt;Event Loop&lt;/strong&gt; - responsible for code execution.
&lt;strong&gt;Callback Queues&lt;/strong&gt; - hold callback functions of completed asynchronous operations.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/til/assets/2020-07-09-nodejs-callback-queues-01.png&quot; alt=&quot;Node.js Callback Queues&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In order of priority&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Microtask&lt;/strong&gt; queue - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;process.nextTick&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Promise&lt;/code&gt; &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Timer&lt;/strong&gt; queue - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setTimeout&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setInterval&lt;/code&gt; &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;IO&lt;/strong&gt; queue - file system, network &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Check&lt;/strong&gt; queue - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setImmediate&lt;/code&gt; &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Close&lt;/strong&gt; queue - closing HTTP connection, stream, etc&lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://blog.logrocket.com/a-deep-dive-into-queues-in-node-js/&quot;&gt;A deep dive into queues in Node.js&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Semyon Pisarev</name></author><summary type="html">Learned some about Node.js internals and Callback Queues in particular. It appeared Node.js maintains multiple prioritized queues to handle callbacks.</summary></entry><entry><title type="html">Coaching vs Mentorship</title><link href="https://cema-sp.github.io/til/career/2020/07/06/coaching-vs-mentorship.html" rel="alternate" type="text/html" title="Coaching vs Mentorship" /><published>2020-07-06T00:00:00+00:00</published><updated>2020-07-06T00:00:00+00:00</updated><id>https://cema-sp.github.io/til/career/2020/07/06/coaching-vs-mentorship</id><content type="html" xml:base="https://cema-sp.github.io/til/career/2020/07/06/coaching-vs-mentorship.html">&lt;p&gt;Clarified the two terms for myself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mentorship&lt;/strong&gt; - a relationship between an experienced person and someone who 
wants to grow. Mentee is defining measurable goals and execute on the plan. 
Mentor is helping with advice, guidance, suggestions, support.
Both review and measure the progress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coaching&lt;/strong&gt; - is helping people to help themselves. No guidance, “ask, don’t tell”.
Coach helps coachee to recognize areas of development, to reflect, to 
challenge themselves, and to be accountable.&lt;/p&gt;

&lt;p&gt;Both relationships have common grounds such as identifying strengths and 
weaknesses, visualizing the desired future, and identifying goals.&lt;/p&gt;

&lt;p&gt;Coaching is more abstract and less guided. Coach doesn’t have to be more 
experienced in the target area than the coachee.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://about.gitlab.com/handbook/people-group/learning-and-development/career-development/coaching/&quot;&gt;Coaching by GitLab&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://blog.pragmaticengineer.com/developers-mentoring-other-developers/&quot;&gt;Developers mentoring other developers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Semyon Pisarev</name></author><summary type="html">Clarified the two terms for myself.</summary></entry><entry><title type="html">Tech Lead vs EM</title><link href="https://cema-sp.github.io/til/career/2020/06/23/tech-lead.html" rel="alternate" type="text/html" title="Tech Lead vs EM" /><published>2020-06-23T00:00:00+00:00</published><updated>2020-06-23T00:00:00+00:00</updated><id>https://cema-sp.github.io/til/career/2020/06/23/tech-lead</id><content type="html" xml:base="https://cema-sp.github.io/til/career/2020/06/23/tech-lead.html">&lt;p&gt;I had some sense of those terms, and today
&lt;a href=&quot;https://www.patkua.com/blog/the-definition-of-a-tech-lead/&quot;&gt;one article&lt;/a&gt;
made it clear&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tech Lead&lt;/strong&gt; - leading a team and aligning technical direction.
Architecture, code quality, tools, coaching, influencing, delegation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Team Lead&lt;/strong&gt; - focuses on team issues, provides personal feedback, 1-1s,
career development, cross-teams communication, team processes,
managing stakeholders, and risks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Engineering Manager&lt;/strong&gt; - a high level Team Lead,
maintaining productive environment, budgeting, communicating on management level,
recruiting, org processes.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.patkua.com/blog/the-definition-of-a-tech-lead/&quot;&gt;The Definition of a Tech Lead&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.patkua.com/blog/5-engineering-manager-archetypes/&quot;&gt;5 Engineering Manager Archetypes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Semyon Pisarev</name></author><summary type="html">I had some sense of those terms, and today one article made it clear</summary></entry><entry><title type="html">Career Planning</title><link href="https://cema-sp.github.io/til/team,/career/2020/06/15/career-planning.html" rel="alternate" type="text/html" title="Career Planning" /><published>2020-06-15T00:00:00+00:00</published><updated>2020-06-15T00:00:00+00:00</updated><id>https://cema-sp.github.io/til/team,/career/2020/06/15/career-planning</id><content type="html" xml:base="https://cema-sp.github.io/til/team,/career/2020/06/15/career-planning.html">&lt;p&gt;Career planning is an extremely important process that should be formalized and documented.&lt;/p&gt;

&lt;p&gt;With a clear career path within the organization, it is a way easier to talk with people about growth and skills development.&lt;/p&gt;

&lt;p&gt;But even with no grades and levels defined, it is still valuable to base upon generic terms like jr, middle, senior, etc.&lt;/p&gt;</content><author><name>Semyon Pisarev</name></author><summary type="html">Career planning is an extremely important process that should be formalized and documented.</summary></entry><entry><title type="html">Clear Expectations</title><link href="https://cema-sp.github.io/til/team/2020/06/11/clear-expectations.html" rel="alternate" type="text/html" title="Clear Expectations" /><published>2020-06-11T00:00:00+00:00</published><updated>2020-06-11T00:00:00+00:00</updated><id>https://cema-sp.github.io/til/team/2020/06/11/clear-expectations</id><content type="html" xml:base="https://cema-sp.github.io/til/team/2020/06/11/clear-expectations.html">&lt;p&gt;Once again I convinced myself in the importance of clear expectations.
Any inaccuracy in task description could lead to a bunch of time spent on clarifications.
Nevertheless, it is fulfilling when you finally managed to convey the truth.&lt;/p&gt;</content><author><name>Semyon Pisarev</name></author><summary type="html">Once again I convinced myself in the importance of clear expectations. Any inaccuracy in task description could lead to a bunch of time spent on clarifications. Nevertheless, it is fulfilling when you finally managed to convey the truth.</summary></entry><entry><title type="html">Single Table Design</title><link href="https://cema-sp.github.io/til/architecture,/aws,/dynamodb/2020/05/29/single-table-design.html" rel="alternate" type="text/html" title="Single Table Design" /><published>2020-05-29T00:00:00+00:00</published><updated>2020-05-29T00:00:00+00:00</updated><id>https://cema-sp.github.io/til/architecture,/aws,/dynamodb/2020/05/29/single-table-design</id><content type="html" xml:base="https://cema-sp.github.io/til/architecture,/aws,/dynamodb/2020/05/29/single-table-design.html">&lt;p&gt;Working mostly with relational databases it is fascinating and eyes-opening to 
learn about DynamoDB &lt;strong&gt;Single Table Design&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;DynamoDB tables consist of keys and attributes. What is interesting is that
keys and attributes do not have to be homogenous, means it is possible to
store absolutely different records in the same DB and sucessfully operate that
structure.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/til/assets/2020-05-29-single-table-01.png&quot; alt=&quot;DynamoDB tables&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Primary key&lt;/strong&gt; - is a partition key &lt;em&gt;OR&lt;/em&gt; partition + sort keys&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Partition key&lt;/strong&gt; - a top-level primary identifier. The data would be split by that key&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sort key&lt;/strong&gt; - used for sorting and querying.
Could be composed from multiple values and queried by prefixes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secondary index&lt;/strong&gt; (local, global) - allows additional querying scenarios.
Local - with the same partition key as the original table.&lt;/p&gt;

&lt;h3 id=&quot;single-table-design&quot;&gt;Single Table Design&lt;/h3&gt;

&lt;p&gt;The main reason for using a single table in DynamoDB is to retrieve multiple,
heterogenous item types using a single request.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/til/assets/2020-05-29-single-table-02.png&quot; alt=&quot;Single Table&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-general-nosql-design.html&quot;&gt;one&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.jeremydaly.com/how-to-switch-from-rdbms-to-dynamodb-in-20-easy-steps/&quot;&gt;two&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.alexdebrie.com/posts/dynamodb-single-table/&quot;&gt;three&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.trek10.com/blog/dynamodb-single-table-relational-modeling/&quot;&gt;four&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Semyon Pisarev</name></author><summary type="html">Working mostly with relational databases it is fascinating and eyes-opening to learn about DynamoDB Single Table Design.</summary></entry><entry><title type="html">Clean Architecture Terms</title><link href="https://cema-sp.github.io/til/architecture/2020/05/22/clean-arch-terms.html" rel="alternate" type="text/html" title="Clean Architecture Terms" /><published>2020-05-22T00:00:00+00:00</published><updated>2020-05-22T00:00:00+00:00</updated><id>https://cema-sp.github.io/til/architecture/2020/05/22/clean-arch-terms</id><content type="html" xml:base="https://cema-sp.github.io/til/architecture/2020/05/22/clean-arch-terms.html">&lt;p&gt;I’ve heard those terms multiple times but never actually thought about their 
origin or proper use.&lt;/p&gt;

&lt;p&gt;Researching class naming conventions and concerns separation I found 
references to &lt;a href=&quot;https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164&quot;&gt;Clean Architecture&lt;/a&gt; book by Robert C. Martin.&lt;/p&gt;

&lt;p&gt;Listing the terms I’ve selected to introduce for the Team&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Model&lt;/strong&gt; (Entity, Aggregate) - a representation of a business entity.
Encapsulates associated business logic. Typically responsible for persistence.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Domain Service&lt;/strong&gt; (Interactor) - domain logic that relies on two or more entities.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Use Case&lt;/strong&gt; (Application Service) - a list of actions or event steps
typically defining the interactions between a User and a system to achieve a goal.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Gateway&lt;/strong&gt; - an adapter between the application and a 3rd party API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/til/assets/2020-05-22-clean-arch-01.jpg&quot; alt=&quot;Clean Architecture&quot; /&gt;
&lt;img src=&quot;/til/assets/2020-05-22-clean-arch-02.png&quot; alt=&quot;Clean Architecture&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164&quot;&gt;Clean Architecture paperback&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html&quot;&gt;Clean Architecture&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.plainionist.net/Implementing-Clean-Architecture-UseCases/&quot;&gt;Implementing Clean Architecture - What is a use case?&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://webuild.envato.com/blog/a-case-for-use-cases/&quot;&gt;A Case For Use Cases&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Semyon Pisarev</name></author><summary type="html">I’ve heard those terms multiple times but never actually thought about their origin or proper use.</summary></entry><entry><title type="html">Node.js streams</title><link href="https://cema-sp.github.io/til/node/2020/05/21/nodejs-streams.html" rel="alternate" type="text/html" title="Node.js streams" /><published>2020-05-21T00:00:00+00:00</published><updated>2020-05-21T00:00:00+00:00</updated><id>https://cema-sp.github.io/til/node/2020/05/21/nodejs-streams</id><content type="html" xml:base="https://cema-sp.github.io/til/node/2020/05/21/nodejs-streams.html">&lt;p&gt;TIL that Node.js &lt;a href=&quot;https://nodejs.org/api/stream.html&quot;&gt;streams&lt;/a&gt; could be extremely useful when you need to process 
a paginated API and batch or just consume it in a functional fashion.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pipeline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;fetchRecords&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;JSONParser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;changeDateFormat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;queueBatch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;queueUrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://nodejs.org/api/stream.html&quot;&gt;Node.js streams documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Semyon Pisarev</name></author><summary type="html">TIL that Node.js streams could be extremely useful when you need to process a paginated API and batch or just consume it in a functional fashion.</summary></entry><entry><title type="html">Thinking about your thoughts</title><link href="https://cema-sp.github.io/til/mindfulness/2020/05/19/think-about-thoughts.html" rel="alternate" type="text/html" title="Thinking about your thoughts" /><published>2020-05-19T00:00:00+00:00</published><updated>2020-05-19T00:00:00+00:00</updated><id>https://cema-sp.github.io/til/mindfulness/2020/05/19/think-about-thoughts</id><content type="html" xml:base="https://cema-sp.github.io/til/mindfulness/2020/05/19/think-about-thoughts.html">&lt;p&gt;TIL that meditations allow you to be aware of and to think about your thoughts
while those whirl in your mind. That’s a phenomenal notion and something I never wondered about.&lt;/p&gt;</content><author><name>Semyon Pisarev</name></author><summary type="html">TIL that meditations allow you to be aware of and to think about your thoughts while those whirl in your mind. That’s a phenomenal notion and something I never wondered about.</summary></entry><entry><title type="html">Product Teams</title><link href="https://cema-sp.github.io/til/team,/product/management/2020/05/15/product-teams.html" rel="alternate" type="text/html" title="Product Teams" /><published>2020-05-15T00:00:00+00:00</published><updated>2020-05-15T00:00:00+00:00</updated><id>https://cema-sp.github.io/til/team,/product/management/2020/05/15/product-teams</id><content type="html" xml:base="https://cema-sp.github.io/til/team,/product/management/2020/05/15/product-teams.html">&lt;p&gt;I stumbled upon an interesting opinion about an engineering team’s organization.
I’ve never looked from that perspective and never worked
in an “empowered product team” 😄&lt;/p&gt;

&lt;h2 id=&quot;product-teams&quot;&gt;Product Teams&lt;/h2&gt;

&lt;p&gt;Characteristics&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Cross-functional&lt;/li&gt;
  &lt;li&gt;Measured by outcomes&lt;/li&gt;
  &lt;li&gt;Empowered to solve the problems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Team &lt;strong&gt;purpose&lt;/strong&gt;: to solve problems in ways our customers love, yet work for our business.&lt;/p&gt;

&lt;h2 id=&quot;feature-teams&quot;&gt;Feature Teams&lt;/h2&gt;

&lt;p&gt;The Team &lt;strong&gt;purpose&lt;/strong&gt;: to implement items of a prioritized list (roadmap, backlog, etc).&lt;/p&gt;

&lt;p&gt;Key differences&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;in PT, the product manager is responsible for the value and viability risks&lt;/li&gt;
  &lt;li&gt;in FT, the stakeholders are responsible for the value and viability risks&lt;/li&gt;
  &lt;li&gt;in FT, the product manager is a facilitator (a project manager)&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://svpg.com/product-vs-feature-teams/&quot;&gt;Product vs. Feature Teams&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://svpg.com/empowered-product-teams/&quot;&gt;Empowered Product Teams&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Semyon Pisarev</name></author><summary type="html">I stumbled upon an interesting opinion about an engineering team’s organization. I’ve never looked from that perspective and never worked in an “empowered product team” 😄</summary></entry></feed>