Tuesday, December 13, 2022

 

Summary of the book “Project management for the unofficial project manager” by Kory Kogon, Suzette Blakemore, James Wood.

More than ever, employees wear different hats at work. They are routinely expected to coordinate and manage projects even though they might not have a formal training. This is what the authors refer to as the role of the unofficial project manager.

The authors make it clear that this book emphasizes leadership in project completion and explain that the people are crucial in the formula for success. This book offers practical, real-world insights for effective project management and guides us through the essentials of people and the project management process. This includes the steps to initiate, plan, execute, monitor/control and close. If we are struggling to keep the projects organized, this book certainly helps us.

A project is a temporary endeavor with a start and finish undertaken to create a unique product, service or result. Project failures are evidenced by the following facts: Only 8 percent of organizations are “high performers” in managing projects. 45 percent of the projects are either overdue or canceled altogether. Only 45 percent of projects actually meet the goals they are supposed to meet. For every US$100 invested in projects worldwide, there’s a net loss of US $13.50 – “lost forever – unrecoverable”.

This book provides hope against such a failure in two ways: First, it says that everyone is a project manager. And second, project management is no longer just about managing a process. It’s also about leading people which taps into the potential of the people on the team, then engaging with and inspiring them to offer their best to the project.

Most common reasons for failure are cited as one or more of the following: lack of commitment/support, unrealistic timelines, too many competing priorities, unclear outcomes/expectations, unrealistic resources, people pulled away from the project, politics/legislation, lack of a “big picture” for the team, poor planning, lack of leadership, changing standards, and lack of or mismanaged budget. Failure is expensive and there are even greater costs than just the budget when measured by lost opportunities, dissatisfied customers, loss of innovation, and employee morale. A successful project meets or exceeds expectations, optimizes resources, and builds team confidence and morale for future projects. In fact, this definition goes beyond the popular notion of project success as one that meets deadlines or budget. Doing more with less and maximizing the human, technical and budgetary resources are only some of these. The true formula for winning at projects is therefore expressed in the equation PEOPLE + PROCESS = SUCCESS.

A good project manager is often known as one who valued the project members. While some are nervous about leading people, others may be the opposite – great with people but anxious about the process part. In such a case, simple is good. It might even be better to do without the vast machinery that the project management profession uses.

Founded in 1969, the Project Management Institute sets standards for the project management profession. It has 454,000 members in 180 countries and defines five process groups. These are: 1. Initiate, 2. Plan. 3. Execute, 4. Monitor and control and 5. Close.

Some people thrive on the operations side and others thrive on the people side. The modern thinking is that managing the process with excellence is important but being a good leader is essential. Informal authority inspires people to want to play on your team and win. The flip side is also clear. Formal authority comes from a title or a position. Giving people titles doesn’t necessarily make them good leaders.

The authors have worked with hundreds of clients and come up with four foundational behaviors to focus on. 1. Demonstrate respect, 2. Listen first, 3. Clarify expectations and 4. Practice accountability.

The first one values respect as its own reward. The more respected team members feel, even when having a tough conversation, the more engaged they will be. Listening first allows the other to talk first. It also avoids impatience or immaturity in decision-making. The key principle here is empathy. Clarifying expectations brings focus to a cacophony of voices. The cause of almost all relationship difficulties is rooted in conflicting or ambiguous expectations around roles and goals. Accountability on the other hand is about walking your talk. It also means transparency because covering up the truth is what hurts in the long run.

Among the five process groups, the initiate, monitor and control and close are progressive. The plan and execution are cyclical. None of these steps should be skipped. Every successfully completed project runs through all five process groups. Initiating processes authorizing the project, planning processes defining and refining objectives, executing processes coordinating people and resources to carry out the plan, monitoring/controlling processes ensuring that objectives are met, and closing processes formalizing acceptance of the project.

When there is pressure, it takes work, discipline and practice to keep one’s head and inspire others to keep theirs.

Each of the intermediary chapters in the book focuses on one of these five process groups.

The 'initiate' process group is about skillset and toolset.

For the skill to identify all stakeholders, the tool of group brainstorming helps.

For a skill to identify key stakeholders, the tool to perform key stakeholder D.A.N.C.E is relevant. The acronym stands for Decisions, Authority, Need, Connections and Energy where the risks against each of them are called out. For example, make the decisions that control or influence the project budget, have the authority to grant permission to proceed with the project, directly benefit from or are impacted by the project and consequently need to know all about it, are connected to the people, money or resources required to remove roadblocks or exert influence to ensure project success and have positive or negative energy that could affect project success.

For a skill to interview key stakeholders, the tool could be the key stakeholder interview or the question funnel.

For a skill to document project scope statements, the tool could be the project scope statement.

In short, frontloading is the basic principle of project success.

The next set of iterative process groups are planning and executing.  A similar breakup for skills and tools for planning can be drawn as follows:

For a skill to perform effective planning, a risk matrix could be helpful.

For a skill to plan a risk management strategy, the tools to tame the risks and the risk management plan helps.

For a skill to create a project schedule, the tools for 1. Mind Map. 2. Linear lists, 3. Post-it Note method and 4. Gantt chart help.

For a skill to develop a communication plan, the choice among tools is hands down the project communication plan.

Similarly, the breakup of skills and tools for execute process group are listed as:

For a skill to create a cadence of accountability, a team accountability session could be a tool.

For a skill to hold performance conversations, a conversation planner could be helpful.

Above all, the four foundational behaviors must be kept in mind during the execution phase.

Monitoring and control require skills and tools as follows:

For a skill to keep stakeholders informed about the project status, the tool is to create a project status report.

For a skill to manage scope change effectively, the tool is to create a process change request.

Lastly, the closure demands the following skills and tools:

The skills include evaluating task list, confirming fulfillment of project scope, completing procurement closure, documenting lessons learned, submitting final status report to stakeholders and obtaining required signatures, archiving project documents, publishing success and celebrating project close with rewards and recognitions and the corresponding tool is closing checklist.

The authors conclude by saying that developing the skills in this book will be worth the effort, and not just for managing the projects. It has positive side-effects. It complements and augments the critical time and life-management skills. Those skills applied correctly will have far-reaching effects in all areas of our life.

 #codingexercise

get count of strings with same prefix

static int getCountOfStringsWithPrefix(String[] strs, String prefix)

    {

        return (int)Arrays.asList(strs).stream().filter(x -> x.startsWith(prefix)).count();

    }


 

 

Monday, December 12, 2022

 # old dog, old tricks 

Write a function to find the longest common prefix string amongst an array of strings.

If there is no common prefix, return an empty string "".

 

Example 1:

Input: strs = ["flower","flow","flight"]

Output: "fl"

Example 2:

Input: strs = ["dog","racecar","car"]

Output: ""

Explanation: There is no common prefix among the input strings.

 

Constraints:

1 <= strs.length <= 200

0 <= strs[i].length <= 200

strs[i] consists of only lowercase English letters.

class Solution {

    public String longestCommonPrefix(String[] strs) {

        String prefix = "";

        if (strs == null || strs.length == 0)

        {

            return prefix;

        }

        if (strs.length == 1)

        {

            return strs[0];

        }

        prefix = getPrefixByTrie(strs);

        return prefix;

    }



    private static final int MAX_CHARACTERS = 26;

    private static class TrieNode

    {

        TrieNode[] children = new TrieNode[MAX_CHARACTERS];

        boolean isLeaf;

        public TrieNode()

        {

            isLeaf = false;

            for (int i = 0; i < MAX_CHARACTERS; i++)

                children[i] = null;

        }

    }

   

    private static TrieNode root;

    private static int indexes;

    private static void insert(String key)

    {

        int index;

        TrieNode current = root;

        for (int level = 0; level < key.length(); level++)

        {

            index = key.charAt(level) - 'a';

            if (current.children[index] == null)

            {

                current.children[index] = new TrieNode();

            }



            current = current.children[index];

        }

       

        current.isLeaf = true;

    }

    private static int countChildren(TrieNode current)

    {

        int count = 0;

        for (int i = 0; i < MAX_CHARACTERS; i++)

        {

            if (current.children[i] != null)

            {

                count++;

                indexes = i;

            }

        }

        return count;

    }

    private static String walkTrie()

    {

        TrieNode current = root;

        indexes = 0;

        String prefix = "";

        while (countChildren(current) == 1 && current.isLeaf == false)

        {

            current = current.children[indexes];

            prefix += (char)('a' + indexes);

        }

        return prefix;

    }



    private static void constructTrie(String[] strs)

    {

        for (int i = 0; i < strs.length; i++)

        {

            insert(strs[i]);

        }

        return;

    }



    private static String getPrefixByTrie(String[] strs)

    {

        root = new TrieNode();

        constructTrie(strs);

        return walkTrie();

    }

}


Sunday, December 11, 2022

 

This is a survey of modernizing applications with the Azure public cloud. Previous articles focused on trade and tools but this dives into one of the major public cloud usages for the purposes of application modernization.

The pandemic has increased the demand for the application modernization efforts across the board. That said, the approaches have varied among clients.  Many companies have withdrawn from using a single end-to-end platform and focused on specific business cases and dedicated technologies. This shift comes amid the rise of public cloud service portfolio. Application modernization is a critical component of digital transformation and companies are expanding its traditional significance to include rehosting on-premises applications to the cloud with almost no changes, “replatforming” them so they can leverage basic cloud platform service such as autoscaling, refactoring their architecture to gain many more cloud-related benefits; the use of cloud development tools, from code editors to full DevOps toolchains and finally a complete cloud-native rewrite of an application, both to provide new functionality and help retire legacy assets.

Enterprises have many choices when it comes to application modernization tools, services and platforms. Azure can be credited to making some of the specialties to be the best in the industry. One of the things that Azure has not helped clients overcome is their often-significant challenge concerning IT culture change, upskilling and costs. If there were more literature, education, and evangelism of how these staff can embrace modernization along with case studies, best practices and modernization models this would become at par with any of its existing service portfolio.

Application and data modernization journey can be a long journey with a predetermined start but not necessarily a well-known finish state. Inertia and complexity involved in legacy applications have caused a drag on the otherwise well-perceived benefits of a thriving culture. On the other hand, security and reliability and cost optimization have become the two top drivers, with improved customer experience and time to market.

There are several approaches to application modernization, but each comes with trade-offs.

1.       Rehosting, also called “lift-and-shift” is fast and aimed at lowering reliance on private datacenters.

2.       Replatforming an application so it can take advantage of cloud platforming capabilities such as autoscaling

3.       Refactoring applications written with aging and rigid architectural patterns such as three-tier to take advantage of new approaches including microservices and serverless.

4.       A full application rewrite: This gives an enterprise the most flexibility in terms of application functionality. But like refactoring, it is costly and complex.

5.       Replacing an application completely, such as with a new SaaS application from an ISV.

All these approaches also include deployment considerations. For example, should a project leverage virtual machines, given the technologies broad familiarity, stability, and security or use containers for greater agility.

In terms of public cloud services used for this purpose, analytics, data integration, databases and PaaS show a healthy adoption followed by Networking, Storage, AI, mobile, security, DevOps, Hybrid, and Identity.

.Net Core 3.1 has increasingly been deprecated in favor of .Net 5.0. Developers are also increasing the use of low code platform services to accelerate development of new applications. Similarly, MySQL and Oracle are databases that were left behind in favor of cloud databases.  One of the motivating factors for application modernization is that the decision is usually made by the C-suite executives who welcome this.

The urgency to meet customer demands and competitive landscapes propels application modernization efforts. Clients also repeatedly stressed the importance of skills and internal cultural change.

Saturday, December 10, 2022

 

Developing an authorizer for a serverless application

Problem statement: Many applications struggle with integrating third-party OIDC and OAuth2 providers. It’s relatively easy for development teams to come up with a solution to serve the business functionality but when it comes to writing the authentication systems they feel like a fish out-of-water. This is primarily because writing an authentication system that reads or writes passwords is difficult to build. Most cloud providers have their own well-established IAM systems that work well with identity providers. This document describes adding a user pool authorizer to an API gateway that sits in front of a serverless application and fetches both the JWT token as well as temporary IAM credentials for the serverless application to admit the request.

Solution: This solution assumes that AWS public cloud was used to create a user pool with users and groups by completing the form displayed on the management console. Then, the user pool identifier and the client are specified to the web application as follows:

In the webapp.ts, add the following line:

import * as cognito from '@aws-cdk/aws-cognito';

In the interface properties, add the following lines:

interface WebAppProps {

:

  userPool: cognito.IUserPool;

  userPoolClient: cognito.IUserPoolClient;

}

In the web app config, specify the following:

export class WebApp extends cdk.Construct {

:

 

    new cwt.WebAppConfig(this, 'WebAppConfig', {

      bucket: props.hostingBucket,

      key: 'config.js',

      configData: {

        apiEndpoint: props.httpApi.apiEndpoint,

        userPoolId: props.userPool.userPoolId,

        userPoolWebClientId: props.userPoolClient.userPoolClientId,

      },

      globalVariableName: 'appConfig'

    }).node.addDependency(deployment);

}

The config data is exactly the same as what Amplify would expect which enables it to integrate with the backend. The userPool and the userPool client are instantiated using the corresponding Cognito classes in an auth.ts typescript and passed as parameters to the webapp at startup.

Friday, December 9, 2022

Sample Deployment Template for AWS Lambda with S3 access:

 Problem Statement: Deploy a serverless application for uploading files to S3 storage. Additionally, create a template to help with CI/CD of such an application.

Solution: One of the ways this problem can be solved is by leveraging AWS cloud resources such as AWS Lambda, AWS API gateway, and S3 storage. The CloudFormationTemplate for this would appear as shown below. The bucket name would be a parameter. The lambda is charged in the increments of 100ms usage. It’s size is determined by its memory. The Lambda Integrations are indicated by the keyword proxy. The code is uploaded to a bucket indicated by the codeUri. The invocation handler is also indicated by the properties.

AWSTemplateFormatVersion: '2010-09-09'

Transform: AWS::Serverless-2016-10-31

Description: Serverless web application for uploading files to S3

Globals:

  Api:

    BinaryMediaTypes:

    - '*~1*'

Resources:

  uploader:

    Type: AWS::Serverless::Function

    Properties:

      Description: Serverless web application for uploading files to S3

      Handler: src/index.handler

      Runtime: nodejs12.x

      CodeUri:

        Bucket: awsserverlessrepo-changesets-1f9ifp952i9h0

        Key: 536706842180/arn:aws:serverlessrepo:us-east-1:233054207705:applications-uploader-versions-1.1.0/5176d06e-2d79-4e66-8f0c-a3bccf9084e5

      MemorySize: 1536

      Policies:

      - S3CrudPolicy:

          BucketName:

            Ref: destBucket

      Timeout: 60

      Events:

        root:

          Type: Api

          Properties:

            Path: /

            Method: get

        getProxy:

          Type: Api

          Properties:

            Path: /{proxy+}

            Method: get

        postProxy:

          Type: Api

          Properties:

            Path: /{proxy+}

            Method: post

      Environment:

        Variables:

          DEST_BUCKET:

            Ref: destBucket

Parameters:

  destBucket:

    Type: String

    Description: Name of the S3 Bucket to put uploaded files into (must exist prior to deployment)