How should we have an efficient communication between a product team and its associates.

Disclaimer: In this post I am not claiming that, this as an one fit solution to all but the crux of this can be applicable to large domain. This post is based on my experience and is solely my own opinion.

Content:

  1. Hierarchy in the project
  2. Communication matrix
  3. How to communicate between different entity
  4. How not to communicate
  5. Role and responsibilities

1: Hierarchy:

For any project, we have two main entity which keeps on fighting to get the best results and also to blame each other for their in-competencies. In some world we call functional & software OR Project Manager & Developers OR….

Screen Shot 2017-05-27 at 2.10.44 PM

Product Owner (PO): He/She is the ultimate head of the Product who owns it and under him falls two entities Functional Owner(FO) & Software Owner(SO). They are responsible for entire chain below them and they need to report on progress of project, to PO on regular basis.

Functional Owner (FO): He/She is the owner of the functional part of the product, and under him can be many more Functional Managers or Product Managers(PM) who reports to FO on regular basis regarding the progress of the product in their portfolio. Similarly kind of division is on the Software Owner side also.

2: Communication Matrix:

Communication matrix can play a key role in having effective communication and which could in itself lead to a proactive approach to solve any un-wanted circumstances. Work flow can be in two direction:

  1. From top to bottom. In this category we are mainly considering the product requirement are being conveyed by PO, and then broken into independent/semi-independent task which are delegated to PM which further assign budget to software team.
  2. Second come when we have semi-independent project and one or more software teams are involved. In this case communication between them should go through product manager of the involving teams.

3: How to communicate between different entity

Communication should be limited to one level up and one level down. Example Software owner should report to Product Owner for the performance of the software team & he should talk to all his/her team leads to get updates on there work projection rather each individual in the team (Basically micro managing should be avoided).

Having said that always providing a long term vision to the about the project is the responsibility of all head of the hierarchy person in project flow diagram. The main benefit of this is the alignment it creates to achieve the goal.

4: How not to communicate

Cross communication should be avoided as lack of ownership may lead to loss in communication. (read communication as commitment) For example a software team lead should not talk to functional owner or product manager(other) without involving his/her software owner or product owner respectively as then they will take active lead in ensuring that commitment is fulfilled.

5: Role & Responsibilities

Role and responsibility should not be rigid but more flexible as it provides person with a room to improve and grow. A software developer in a software team has role to build excellent software given the requirements from the product manager in consultation with the team lead and software owner, so that the team and product is aligned with respect to final delivery or minimum viable product.

Similarly, different linking entity should effective communicate so that any issue can be contained at the earliest without loosing too much energy in wild goose chase. By linking entity we means Software Team and Product Manager should solve some disagreements without involving Software Owner or Function Owner, let alone call Product Owner.

Advertisements

Pagination On Multiple Table In MYSQL

How to perform pagination on multiple tables.

Disclaimer: This is my first ever blog/post so in case someone has some feedback I am happy to take them, if someone has some correction I am happy to incorporate them, if some has comment I am happy to choose/ignore them & finally if someone has some question I am happy to reply them.

Introduction: Content of this blog/post are closely associated with technical domain. To some extent it explain a problem I faced in my work and a very simple solution to it. And I felt it could be a better starting point for me to start writing blog’s, and what the heck I will give it a try, nothing is better then trying it yourself.

Problem: Pagination (moving to next or previous or first or last page) in web-site is a simple problem when it comes to show data from a single table, but how would you perform pagination when data is coming from multiple tables?

Multiple tables add extra dimension to the problem, and in discussion below I am going to try to explain this issue in very generic terms.

Setup: Suppose you have a two tables, lets call the table_1 and table_2, and these table has a column created in following format YYYY-MM-DD HH:mm:ss (this is crucial for sorting).

Solution: Before we start lets understand what all variables we need to tackle this problem, (P will denote on which page we are)

  • pageSize : Number of rows we are showing in each page
  • countTable_1: Number of rows we have shown from table_1 till current page (P)
  • countTable_2: Number of rows we have shown from table_2 till current page (P)
  • previousCountTable_1: Number of rows we have shown from table_1 in last page (P-1)
  • previousCountTable_2: Number of rows we have shown from table_2 in last page (P-1)
  • isNext : if next page is called  i.e. (P+1)
  • isPrevious: if previous page is called i.e. (P-1)
  • isLast: if last page is called
  • isFirst: if first page is called

Algorithm:

Every time when pagination will be called will get above mentioned variables and out of (isNext, isPrevious, isLast, isFirst) variables only one of them will be true which will denote which operation is called.

Example could be: We are page 2 and moving to page 3. Page one has 6 entries from table_1 and 4 entries from table_2. Page two has 5 entries each from table_1 and table_2.

pagination(pageSize=10, countTable_1=11, countTable_2=9, previousCountTable_1=6, previousCountTable_2=4, isNext=true, isPrevious=false, isFirst=false, isLast=false)

Next:

SqlQueries would be:

table_1 -> SELECT * from table_1 where <conditions> LIMIT countTable_1, countTable_1 + pageSize;

table_2 -> SELECT * from table_2 where <conditions> LIMIT countTable_2, countTable_2 + pageSize

From above 2 queries we will get next 10 rows from table_1 and table_2 which we can merge, then sort them based on created, finally pick first 10 rows from them.

Then we compute number of rows we got from table_1 and table_2 as #rows_1 and #rows_2, respectively.

previousCountTable_1 = countTable_1;

previousCountTable_2 = countTable_2;

countTable_1 = countTable_1 + #rows_1;

countTable_2 = countTable_2 + #rows_2;

 Previous:

SqlQueries would be:

table_1 -> SELECT * from table_1 where <conditions> LIMIT previousCountTable_1 – pageSize, previousCountTable_1;

table_2 -> SELECT * from table_2 where <conditions> LIMIT previousCountTable_2 – pageSize,, previousCountTable_2;

From above 2 queries we will get previous (from P -1) 10 rows from table_1 and table_2 which we can merge, then sort them based on created, finally pick last 10 rows from them.

Then we compute number of rows we got from table_1 and table_2 as #rows_1 and #rows_2, respectively.

countTable_1 = previousCountTable_1

countTable_2 = previousCountTable_2

previousCountTable_1 = previousCountTable_1 – #rows_1

previousCountTable_2 = previousCountTable_2 – #rows_2

Last:

  1. SELECT * from table_1 where <conditions> ORDER BY id DESC LIMIT pageSize;
  2. total_rows_table_1 = SELECT count(*) from table_1 where <condition>
  3. SELECT * from table_2 where <conditions> ORDER BY id DESC LIMIT pageSize;
  4. total_rows_table_2 = SELECT count(*) from table_2 where <condition>

From above queries 1 and 3 you will get last 10 rows from each tables, which can be merged and sort. Now question is which all rows to show in last page for that we need to perform a little computation.

remainder = (total_rows_table_1 + total_rows_table_2)%pageSize

if remainder = 0 then show last 10 rows from the sorted list else show last remainder number of rows from the sorted list.

countTable_1 = total_rows_table_1

countTable_2 = total_rows_table_2

previousCountTable_1 = total_rows_table_1 – #rows_1

previousCountTable_2 = total_rows_table_2 – #rows_2

First

SqlQueries would be:

table_1 -> SELECT * from table_1 where <conditions> LIMIT countTable_1, countTable_1 + pageSize;

table_2 -> SELECT * from table_2 where <conditions> LIMIT countTable_2, countTable_2 + pageSize

From above 2 queries we will get first 10 rows from table_1 and table_2 which we can merge, then sort them based on created, finally pick first 10 rows from them.

Then we compute number of rows we got from table_1 and table_2 as #rows_1 and #rows_2, respectively.

previousCountTable_1 = 0;

previousCountTable_2 = 0;

countTable_1 = #rows_1;

countTable_2 = #rows_2;

NOTE: In previous case we have subtracted pageSize from previousCountTable_#, we need to make sure that our count should not fall below zero in those cases.