Live a Break-Free Life: 3 Steps to Personal Fulfillment

Are you living a break-free life? Are you living your dreams? Are you doing the things that you want to do? Are you in a job or in a situation you wanted to be in? Are you doing the things that are natural to you? In such a busy life, do you have time to pause? Can you relax and think about life? Or, are you like a robot? Do you have a fixed mindset to achieve some predetermined goals? You think not doing so will make you look odd to yourself, your family, friends, and so-called-society. If you are already living the life you always wanted to be, this article is not for you. If you are not, read ahead.

How can you truly live a life free from breaks? You shouldn’t HAVE to do certain things just because everyone says it’s the right way. Let’s look at just three basic steps to live a break-free life:

Step 1: Do you know who you want to be?

  1. Your childhood dreams: what you wanted to be as a child?
  2. Your wishful future image of yourself: Do you carry a bag of strong desires? Does it include an image of you, being you one day? What does that image look like? You have words to describe it. Or, you do not. Let’s introspect deeper. How would your life be if you were the person who you always wanted to be?
  3. What are things you don’t want to do: Have you noticed any tasks that are energy drainer to you? Have you noticed what makes you think to let the moment just pass somehow? For example, waiting for 5 PM and I am out of this <#adfdkfjdkfj#> place.

Step 2: Do you know what is stopping you?

What is stopping you today, to live the life you want to live? Is it one or all of below:

  1. Fear of rejections by yourself and others around you?
  2. Fear of failure to achieve what you want to achieve?
  3. Fear of losing what you have?
  4. Not confident in your ability to start becoming you?
  5. Not knowing from where to start becoming you?

Step 3: How can you navigate to next steps?

Do you want to offer advice for others? Would you do so with great sorrow in your eyes, on your deathbed? Or, do you want to look at the sky with open arms? Say it loudly to yourself, “yes, I can dare to live the life I imagined.” To be a person you wanted to be, what if we look at a step-by-step journey:

  1. As-is and to-be image: What if you write how you are living now and how you wish to live?
  2. One step at a time: What if you take just one step to live how you want to really live? Not two, just one step. And, it is a lot. It is a big deal to be a more courageous person. It means pushing yourself out of your fear zone. Just one step. What is stopping you to move one step towards the life you always wanted to live? Is it your list of fears from Step 2 ? I do agree it will. As it is just one step challenge of a change, can you dare just for one step? The good news is that you are planning just one step towards becoming you. You can move back anytime. Your existing life situation takes up 100% of your time. What if you decide to change just 1% of it? What if this change lets you become what you always wanted to be? 1% is roughly 15 minutes a day (to be precise, it is 14.4 minutes a day). That is 105 minutes a week and 7.5 hours a month. For example, if you are interested in writing, what if you write just 15 minutes a day?
  3. What’s next: Review your life after a week and after a month. Did the sky fall as you changed 1% to being you? Did you notice a change in you? Did you enjoy your challenge? If yes, what if you increase it to 2% from next month? And, one day, what if it becomes 100% the way you want your life to be?

As George Reeves said, “you can if you think you can.”

MongoDB notes

Who should read it: It is for you if you are looking for an overview of this topic for a project, to conduct/appear in an interview, or in general. As I learn more, we will update this article.

MongoDB is a document based, schema-less, and a highly available NOSQL database. Let’s look at some high level details about it.

Basic Terms:

  • document: is a basic unit of data equivalent of a row in an RDBMS table.
  • collection: is equivalent to a table in an RDBMS database.
  • database: A single MongoDB instance can have multiple instances of databases.
  • mongo shell: it’s a shell that helps in administrative tasks.

Basic Operations:

CREATE:

  • Use insertOne() operation.
  • If we need to insert many documents into a collection, use insertMany().
  • MongoDB also provide a Bulk Write API, that affects a single collection. It has db.collection.bulkWrite() method which by default performs ordered operations. It also has an option to turn off ordering.

READ:

  • Use find() or findOne() operation.

DELETE:

  • Use deleteOne() to delete a single document.
  • Use deleteMany() to delete all eligible matching documents.

UPDATE:

  • For update, we can use updateOne(), updateMany(), or replaceOne().
  • updateOne() and updateMany() takes a filter document and a modifier document, as the second parameter.
  • replaceOne() expects a document with which it will replace the document with the first input document.

DROP:

  • It is possible to use deleteMany() to drop all matching documents in a collection. It can also be used to delete all documents in a collection.
  • To clear an entire collection, use of drop() is faster.

UPSERT:

  • It is equivalent to update-else-insert. Means, update a matching document. If no matching document found, insert a new document.

Supported Data types: Null, Boolean, Number, String, Date, Regular expression, Array, Embedded document, Object ID, Binary Data, Code

ACID operations: ACID (Atomicity, Consistency, Isolation, Durability) operations in MongoDB are at a document level. Below are some basics of ACID operations:

  • Atomicity: zero or none operations.
  • Consistency: ensure data is persisted in all nodes.
  • Isolation: Any reads or writes are not impacted with other reads or writes.
  • Durability: Commits are performed successfully.

References:

AWS infrastructure notes

  • Performance efficiency: focuses on running services efficiently and scalably. AWS focuses on two categories:
    • Selection: For the selection, there are three things you need to consider:
      • Type of service: it could be VM based, container based, or serverless based.
      • Degree of Management
      • Configuration
    • Scaling: Is is easy to scale in AWS
  • Cost optimization: this pillar helps achieve business outcomes while minimizing costs. Think of cloud spend in terms of Opex, instead of Capex. Opex is a pay as you go model. Capex is a one time cost.
References:
  • Performance efficiency: focuses on running services efficiently and scalably. AWS focuses on two categories:
    • Selection: For the selection, there are three things you need to consider:
      • Type of service: it could be VM based, container based, or serverless based.
      • Degree of Management
      • Configuration
    • Scaling: Is is easy to scale in AWS
  • Cost optimization: this pillar helps achieve business outcomes while minimizing costs. Think of cloud spend in terms of Opex, instead of Capex. Opex is a pay as you go model. Capex is a one time cost.
References:
  • Performance efficiency: focuses on running services efficiently and scalably. AWS focuses on two categories:
    • Selection: For the selection, there are three things you need to consider:
      • Type of service: it could be VM based, container based, or serverless based.
      • Degree of Management
      • Configuration
    • Scaling: Is is easy to scale in AWS
  • Cost optimization: this pillar helps achieve business outcomes while minimizing costs. Think of cloud spend in terms of Opex, instead of Capex. Opex is a pay as you go model. Capex is a one time cost.
References: Who should read it: It is for you if you are looking for a quick overview of this topic for a project, to conduct/appear in an interview, or in general. As we learn more, we will update this article. What is Cloud computing: Cloud computing is an on-demand IT resources and applications via the internet with the pay-as-you-go solution. In a simpler way, cloud computing provides ways to access servers, databases, storage, and many application services over the internet. Why cloud infrastructure matters:  As of today, AWS has 81 availability zones within 25 geographic regions. On a high level, AWS cloud infrastructure these main benefits:
  • Security
  • Availability
  • Performance
  • Global Footprint
  • Scalability
  • Flexibility
Advantages of cloud computing:  Six major advantages are below:
  • Variable versus Capital Expense: Instead of setting up servers and paying the cost of it, we can pay for the infrastructure per the usage.
  • Economies of Scale: Using cloud resources like AWS can reduce the cost.
  • Stop guessing capacity: Companies can gain as little or as much per the requirement, within a short notice.
  • Increase speed and agility: new IT resources can be made available very quickly.
  • Focus on business differentiators: Businesses can stop focusing on maintaining the infrastructure and focus on main business items.
  • Go global in minutes: it’s easy to expand the applications globally, in few minutes.
Cloud computing models:
  • All-in cloud based applications:  everything on cloud.
  • Hybrid deployment: A hybrid solution with some parts on cloud and some on on-premises.
AWS compute and networking services:
  • Amazon Elastic Compute Cloud (EC2): it’s a service that provides resizable compute capacity in the cloud. Organization can select memory, CPU, etc. per their need.
  • AWS Lambda: It’s a platform that allows developers to have zero maintenance of infrastructure. AWS deploys the code on Amazon EC2 instances.
  • Auto-scaling: Auto scaling allows companies to scale up or down the resources as needed.
  • Elastic load balancing: Elastic load balancing allows automatic distribution of traffic across Amazon load balancers.
  • AWS elastic Beanstalk: To deploy a web application faster, this service handles resource provisioning, monitoring, etc. automatically.
  • Amazon Virtual private Cloud (Amazon VPC): Amazon VPC allows organizations to control the AWS infrastructure, by allowing them to choose IP address, etc.
  • AWS Direct Connect: This provides direct network connections between a company\’s owned data centers and AWS.
  • Amazon Route 53: It’s a highly scalable DNS service. For example, using Route 53, I configured my own domain name with AWS.
 Storage and Content delivery:
  • Simple Storage Service (Amazon S3): Amazon S3 provide the storage for various usages like storing files, code backups, etc.
  • Amazon Glacier: It’s a low cost service that allows data storage for the long term backups.
  • Amazon Elastic Block Store (Amazon EBS): Amazon EBS provide block-level storage volume for use within Amazon EC2 instances.
  • AWS Storage Gateway: AWS Storage Gateway service connects on-premises software appliances with AWS infrastructure.
  • Amazon CloudFront: It’s a content delivery web service.
Databases:
  • Amazon Relational Database Service (Amazon RDS): It’s a fully managed relational database service.
  • Amazon DynamoDB: It’s a NOSQL database service.
  • Amazon RedShift: It’s a petabyte-scale data warehouse service.
  • Amazon ElastiCache: It’s a service that provides in-memory cache in the cloud. It supports Memcached and Redis cache engines.
Management Tools:
  • Amazon CloudWatch: It’s a monitoring service for cloud resources and cloud hosted applications.
  • AWS CloudFormation: It provides a way to effective manage a collection of AWS resources.
  • AWS CloudTrail: It records logs for the audit and review.
  • AWS Config: This service provides configuration history and configuration change notifications.
Security and Identity services:
  • AWS Identity and Access Management (IAM): It allows organization users to securely access AWS cloud services.
  • AWS Key Management Service (KMS): It allows users to create encryption keys to encrypt the data. It uses Hardware Security Modules (HMS) to protect the security of the keys.
  • AWS Directory Service: AWS Directory Service uses Microsoft Active Directory. Using AWS Directory Service, organization users and user groups can manage single sign-on, group user accounts, etc.
  • AWS Certificate Manager: It’s a service that manages SSL/TLS certificates for use with AWS cloud services.
  • AWS Web Application Firewall (WAF): WAF allows to manage security and allow/deny access of web applications, for the security attacks prevention.
Application Services:
  • Amazon API Gateway: It is a managed service that helps developers to create, publish, maintain, and secure APIs.
  • Amazon Elastic Transcoder: It’s a media transcoding in the cloud. Transcoding is a process to convert an audio or a video file from one format to another.
  • Amazon Simple Notification Service (SNS): Amazon SMS is a service to delivery messages to recipients.
  • Amazon Simple Email Service (SES): It is an email service, to send any kind of emails to their customers.
  • Amazon Simple Workflow Service (SWS): SWS is a workflow service that can run jobs in parallel or in a sequential steps. It has retry features.
  • Amazon Simple Queue Service (SQS): SQS is a messaging queueing service.
Five pillars of Amazon Web Services (AWS):
  • Operational excellence:
    • Infrastructure as a Code (IaC): There are two main services: CloudFormation and Cloud Development Kit (CDK)
    • Observability: it’s a process of monitoring infrastructure metrics at three levels: ◦ Infrastructure level ◦ Application level ◦ Account level
    • Three things:
      • PRINCIPAL(S) for WHO has permissions to
      • ACTION(S) for WHAT to perform
      • RESOURCE(S) specifies which properties to access
  • Network Security: A zero trust on Network Security involves a defense in search approach. It involves Network Level Security and Resource Level Security. Data Encryption is about a plan to encrypt the data in the transit and at rest.
  • Reliability: this pillar focuses on building services resilient to both service and infrastructure disruptions
  • Performance efficiency: focuses on running services efficiently and scalably. AWS focuses on two categories:
    • Selection: For the selection, there are three things you need to consider:
      • Type of service: it could be VM based, container based, or serverless based.
      • Degree of Management
      • Configuration
    • Scaling: Is is easy to scale in AWS
  • Cost optimization: this pillar helps achieve business outcomes while minimizing costs. Think of cloud spend in terms of Opex, instead of Capex. Opex is a pay as you go model. Capex is a one time cost.
References:
  • Performance efficiency: focuses on running services efficiently and scalably. AWS focuses on two categories:
    • Selection: For the selection, there are three things you need to consider:
      • Type of service: it could be VM based, container based, or serverless based.
      • Degree of Management
      • Configuration
    • Scaling: Is is easy to scale in AWS
  • Cost optimization: this pillar helps achieve business outcomes while minimizing costs. Think of cloud spend in terms of Opex, instead of Capex. Opex is a pay as you go model. Capex is a one time cost.
References:
  • Performance efficiency: focuses on running services efficiently and scalably. AWS focuses on two categories:
    • Selection: For the selection, there are three things you need to consider:
      • Type of service: it could be VM based, container based, or serverless based.
      • Degree of Management
      • Configuration
    • Scaling: Is is easy to scale in AWS
  • Cost optimization: this pillar helps achieve business outcomes while minimizing costs. Think of cloud spend in terms of Opex, instead of Capex. Opex is a pay as you go model. Capex is a one time cost.
References:

RESTful APIs

Who should read it: It is for you if you are looking for a quick overview of this topic for a project, to conduct/appear in an interview, or in general. As we learn more, we will update this article.

REST definition: REST is an architecture style based on web standards and the HTTP protocol. This was initially described by Roy Fielding in 2000. In REST, everything is a resource.

Resource: Any information that can be named is a resource.

Six Guiding principles of REST: To make a web service a true RESTful API, below are six guiding principles:

  • Uniform Interface: A RESTful API MUST have an interface that is consistent to access all resources. A resource should have only one logical URI. Any single resource should not be too large.
  • Client Server: A client and a server must be independent of each other.
  • Stateless: All client-server interactions must be stateless. No session. No history.

Cacheable: When applicable, make the resources of REST cacheable. It improves the performance. Caching helps to reduce bandwidth, latency, and load on servers. It also helps in hiding network failures. There are two HTTP response headers to control caching behavior: Expires and Cache-Control. There are two validator options: E-Tag or Last-Modified. One of these two validators should be used.

  • Layered system: REST allows to use a layered system architecture. For example, an API may be deployed on system 1, get database data from system 2, and authenticate the user from system 3.
  • Code on demand (optional): This is an optional constraint. For example, my API may return the code to hide/show UI logic of a UI element. 

HTTP methods: REST architecture uses these methods below:

  • HTTP GET: Use GET requests to retrieve the information.
  • HTTP POST: Use POST to create new resources.
  • HTTP PUT: Use PUT to update an existing resource. If a resource does not exist, API may decide to create a new resource. Consider it as an update-else-create operation.
    • POST versus PUT: POST requests are made on resource collections whereas PUT requests are made on a single resource.
  • HTTP PATCH: Use PATCH to partially update a resource.
    • PUT versus PATCH: Use PUT to update a resource completely (like replacing a resource). Use PATCH to update a record partially.
  • HTTP DELETE: Use DELETE to delete a resource.

HATEOAS driven APIs: HATEOAS (Hypermedia As The Engine Of Application State) is a constraint of REST API.  It keeps the REST API unique from most other network application architectures. As per HATEOAS constraint, a client needs to know only a single URL. All other resources should be dynamically discoverable via the URL.

Other REST terms:

  • Safe methods: GET and HEAD are considered safe methods because these are used to retrieve information, not to update or delete.
  • Idempotent methods: Idempotent term means that the repeated execution should not impact anything negatively. In other words, making one request or multiple requests should have same impact. If we follow REST API design, GET, PUT, DELETE, HEAD, OPTIONS, and TRACE HTTP methods are automatically idempotent. Only POST methods are not idempotent.

REST’s eight security essentials:

  • Least Privilege: follow the minimum privilege model.
  • Fail-Safe Defaults: Users should not have a default access. Accesses should be explicitly given.
  • Economy of Mechanism: The design should be as simple as possible.
  • Complete Mediation: A system should validate all access rights as a fresh validation. Access rights should not be cached.
  • Open Design: Design should not have any secrets or confidential algorithms.
  • Separation of Privilege: For the privileges, use of multiple conditions is a better idea, rather than providing a single condition access.
  • Least Common Mechanism: Mechanism used to access resources should not be shared.
  • Psychological Acceptability: Security should not make the experience worse.
Best practices to secure REST APIs:
  • Keep it simple.
  • Always use HTTPS.
  • Use password hash.
  • Never expose information on URLs.
  • Consider OAuth: OAuth 2.0 authorization framework enables a third-party application to limited access to an HTTP service. Read more here.
  • Consider adding timestamp in Request.
  • Input Parameter Validation.

Content Negotiation: Asking for a suitable presentation by a client is called the content negotiation.

Versioning: It helps to manage the iterations of the APIs. Versioning allows clients to use existing API version while new version can be made available. Below are ways to manage versioning:

Compression: REST APIs can returnresource representations in several formats like XML, JSON, HTML, or plain text. All these formats can be compressed to save bandwidth on the network.

REST API’s N+1 problem and solution: It is a problem when loading a request needs N more requests, to load associated items. To solve this problem, include more information in individual resource inside collection resource.

‘q’ parameter: In HTTP accept header, ‘q’ parameter helps in setting the MIME type preference and the degree of it.For example:

  • Accept: audio/*; q=0.2, audio/basic
    • should be interpreted as “I prefer audio/basic, but send me any audio type if it is the best available after an 80% mark-down in quality.”

For more details about ‘q’ parameter, read here.

REST Maturity Model: After the detailed analysis, Leonard Richardson used three factors to decide the maturity model of a web service: URI, HTTP, and HATEOAS (Hypermedia)being URI at the bottom and Hypermedia at the top.

  • Level zero: Level zero does not use any of three: URI, HTTP, or HATEOAS (Hypermedia). These web services are a single HTTP based typically POST.  For example, a SOAP web service may use HTTP POST, to transfer SOAP based payloads. An XML-RPC based service can send data using Plain Old XML (POX).
  • Level one: Level one maturity model makes use of URI and does not make use of HTTP and HATEOAS. These APIs may implement multiple URIs and with the implementation of a single verb, maybe just POST.
  • Level two: Level two maturity model makes use of URI and HTTP but does not use HATEOAS. These services may support CRUD operations.
  • Level three: this level uses all three: URI, HTTP, and HATEOAS.

 API Management: It is about the processes and technologies that maintain the APIs in the cloud. There are many tools options. Some of these are below:

  • AWS API Gateway
  • Azure API Management
  • Mulesoft Anypoint Platform
  • IBM API Connect
  • Postman
  • Apigee API Management
  • RapidAPI
  • Tyk
  • Software AG
  • Boomi

API Rate limiting: It is the number of times an API can be called in a given time period.

OpenAPI Specification (OAS): OAS defines the standards for RESTful APIs.

Documenting public APIs: Documentation of public APIs is as important as developing these APIs. It is needed to document public APIs well so that users of these APIs can understand these in a systematic way. For details of how to document public APIs, refer here.

Technology/Framework terms

Who should read it: It is for you if you are looking for a quick overview of this topic for a project, to conduct/appear in an interview, or in general. As we learn more, we will update this article.

Below are some technology/framework terms and basic definitions:

Customer Data Platform: As per CDP institute, Customer Data Platform is a  packaged software that creates a persistent,  unified customer database that is accessible to other systems. CDP is usually controlled by business users. It makes it different from data ware houses or data lakes, that are set-up by corporate IT teams. CDP creates a comprehensive view of each customer by capturing data from multiple sources. It tracks customer behavior over time. Data stored in CDP can be used for analysis and to manage customer interactions. There are different types of CDPs like Data CDPs, Analytics CDPs, Campaign CDPs, and Delivery CDPs.

Difference between CDP and CRM (Customer Relationship Management):

  • CRMs maintain the customer interactions. CDP maintains the 360 degree view of the customer behavior for the used products. 
  • CRM data is gathered manually via the service/support/other customer specific interactions. CDP data is usually collected automatically using integrations and code snippets. 
  • CRMs are to improve interactions with the customers. CDPs are for understanding customers and their behavior.

Segment IO: Segment is a CDP service that looks after data governance, data integration, and audience management at once place.

Optimizely: Optimizely is a technology company that provides multiple options to support A/B testing experiments. 

Split IO: It allows the feature delivery for the apps. By using split IO, a feature can be enabled or disabled. It can also use A/B testing.

Elasticsearch: It is an open source, search and analytics engine. It is accessible using RESTful web services and stores data in JSON format. It is developed in Java, which makes it compatible with other platforms.

Splunk: Splunk is a software platform widely used for monitoring, searching, analyzing, visualizing machine generated data. It offers real-time visibility of data into a dashboard. It is best suited to understand the root-causes.

Distributed tracing: It is also known as distributed request tracing. This is a method that is used to monitor applications, especially built around micro services architecture. IT and DevOps teams use it to monitor applications.

Open Tracing: Open tracing is a vendor agnostic API to achieve distributed tracing. These APIs are build to support many languages.

API Gateways: Just like servers support web applications, API gateways support APIs. There are many proxy servers in front of the API to support various features like authentication, rate limiting, routing, load balancing, etc. API gateways are integral parts of microservices, nanoservices, and serveless components. 

Benefits of API gateways:

  • Decoupling: API gateway allows you to decouple the public facing endpoint APIs from the underlying implementation.
  • Reduce round trips: If some APIs need to join data across other services, an API gateway can save round trips.
  • Security: API gateways provide centralized services like authentication, CORS, rate limiting, bot detection, etc.
  • Cross cutting concerns: API gateways can provide a way to centrally plan the logging, caching, and other cross cutting concerns.

Distributed caching: There are two common technologies for distributed caching: redis and memcached.

  • Redis: It is an open source in-memory remote database that uses disk space for the data storage.
  • Memcached: It is also an open source in-memory database.
  • Redis versus Memchached:
    • Both are no-SQL storage types that store key-vaue pairs.
    • Both are open-source databases.
    • Redis supports more data types. Memchached support string types.

MuleSoft:  Mule ESB (Enterprise Service Bus) is a highly scalable Java-based enterprise service bus and integration platform provided by MuleSoft. It has two concepts: Bus and Adapter. The concept of Bus is achieved through a messaging server like JMS or AMQP. By using Bus, applications decouple from one another. The concept of Adapter is responsible to convert application specific backend data into the Bus format. Data from one application to another is exchanged using the bus format, which is a consistent message format.

Micro services: Micro service architecture is the strategy to implement independent services for a larger application. It is becoming a way to build APIs.

Solr: Solr is a search server which is an open source, Java-based information retrieval library.

Serverless: It is a cloud based code execution model in that cloud providers deal with the servers. A developer is not needed to work on server infrastructure. Cloud providers provide a way to pay per use model, to execute the serverless components. That way, there is no idle cost. Using serverless components features no hassle of maintaining an psychical machines, easy to scale, cost efficient, easy to maintain, and easy to deploy. Testing a serverless component is challenging because it is not easy to replicate the environment for the testing needs. There are two types of serverless components: BaaS (Backend as a Service) and FaaS (Frontend as a Service).

In 1990s, if a developer had to deploy an application into production, he/she had to plan to servers,  networking, databases, and all related end to end solutions, to deploy a solution. In 2000s, we had virtual machines, to build the infrastructure. In 2008, Amazon released EC2 instances that made things more easier. But with EC2, we had to maintain servers. We still had to take care of OS and other elements. S3 and SQS also helped further. But now, we can use cloud infrastructure without worrying anything about server infrastructures. AWS lambda providers a great way. A serverless application involves multiple microservices. With serverless, scaling down is also easy.

URL Shortner: URL shortner is a service to create short links from very long URLs. Converting URLs to a short URL makes it easy to share, tweet, and for other purposes. Clicking on a short URL redirects the user browser to the original URL. Below are some ways to convert a URL to a short URL:

  • Hash original URLs with a hash function (like MD5 or SHA-2).
  • Generate short links using UUID.
  • Convert numbers from base 10 to base 62.

gRPC: gRPC is a newer approach for RPC (Remote Procedure Protocol). It is an open source technology. It is a method to execute a procedure on a remote server. gRPC added a concept of protocol buffers (also known as protbufs). It can run on any platform and supported by many programming languages.

GraphQL: With GraphQL, client determines which data, in which format, and how the client wants it. By default, it typically sends the smallest possible request.

Webhooks: It’s an HTTP POST request that is triggered when an event occurs. It updates the client when there is an update. Webhooks provide instant, real-time notifications.

Common Java Libraries:

  • Lombok API: Lombok API helps minimize boilerplate code. It reduces the line of code. To minimize the lines of code, it provides annotations. Below are some of the annotations:
    • Getter & Setter
    • No Arg Constructor
    • All Arg Constructor
    • Data
    • ToString
    • EqualsAndHashCode
  • Resilience4j: It is an API designed for functional programming. It provides options to pick and choose what’s needed. For more details, read here. It was inspired by Hystrix. Hystrix helps in distributed services by adding latency tolerance and fault tolerance logic.
  • AspectJ: AspectJ is a programming paradigm that increases the modularity by allowing the separation of concerns. For more, read here.
  • Swagger: Swagger is a set of open source tools built around Open source API specification. Open API specification ( also known as Swagger specification) is an API specification for REST APIs.
  • javatuples: javatuples is a Java API that allows Java programs to work with tuples. A tuple is a sequence of elements that are not related to each other. For example, it can contain an integer, string, and an object. Tuples can only contain specific number of elements. All elements are type safe.
  • JDK, ASM, Javassist, and CGlib: These four are APIs to generate Java proxy classes. JDK dynamic proxy is easiest to use. CGLib and javassist are advanced libraries to generate byte codes.
  • p6spy: p6spy is a dynamic monitoring framework for database operations.
  • Spring Cloud: It provides options to manage Spring applications on the cloud infrastructure.

Reference: 

Introduction of Web Protocols

Who should read it: It is for you if you are looking for an overview of this topic for a project, to conduct/appear in an interview, or in general. As we learn more, we will update this article.

HTTP: It stands for Hyper Text Transfer Protocol. An HTTP response is a response on web client, received via internet, in answer to an HTTP request. It is an application layer protocol for transferring hypermedia documents like HTML. HTTP is a stateless protocol. Means, the server does not keep any data between two requests.

HTTP response status codes: response codes are categorized in five classes below:

Informational responses (100–199)
Successful responses (200–299)
Redirects (300–399)
Client errors (400–499)
Server errors (500–599)

Cross-Origin Resource Sharing (CORS): It is a mechanism to allow the requests for browsers from cross-origin sources.

HTTP cookies: HTTP cookie is a small information that a server sends to a browser. This is used to identify if two requests are coming from the same browser. HTTP is a stateless protocol. HTTP cookie helps to remember the states. Cookies are used for session management, personalization, and tracking.

HTTP rate limiting: HTTP 429 Too Many Requests response code indicates that the user has sent so many requests in a given amount of time. This is called rate limiting.

HTTP2: HTTP/2 makes applications more faster, robust, and simpler.

SPDY: It was an experimental protocol introduced by Google. It targeted for 50% reduction in page load time.

HTTPS: It is a secured HTTP protocol. This involves public and private key cryptography.

HTTP caching: Caching in general helps to get the data faster, without hitting the server every time. Browser has cache option. Proxy server also keeps a cache. We also have a reverse proxy server.  HTTP header plays the key role in cache mechanism. There are three types of headers: expires, pragma, and content-control. The content-protocol is a preferred caching header. There are properties to configure the duration of cache.

Related terms to learn:  HTTP tunneling, HTTP content negotiation, HTTP caching, and Certificates

Reference:

Functional Programming

Overview: Java 8 introduced functional programming. Let’s understand what it is. Basics of functional programming: it’s a paradigm that enables concurrent usage of code. Lambda expressions are pillars of functional programming. 

Pure Function: Pure functions should follow these rules:

  • No state: it means a function should not refer any member of a class or an object.
  • No side effects: a function can not change the state outside of the function.
  • Immutable variables: use immutable variables.
  • Prefer recursion over looping. Another option is to use stream API.

First class function: A first class function can be passed as a parameter to a function. It’s like a one-time use function with a function. In Java, it’s achieved using a lambda expression.

High order function: It takes a function as a parameter or returns a function. In Java, it’s achieved using a lambda expression.

Functional interface: An interface is a functional interface if it has a single abstract (unimplemented) method. This interface could also have a default method and a static method.

Functional composition: it is a technique to combine multiple functions into a single function.

Imperative versus Recursive function: Imperative is a simple way of writing logic. Recursion is a way to call function in a nested way. Recursion is of two types: Tail and Head Recursion. Tail recursion has a recursive method call at the end of the logic in a method. Head recursion has a recursive method at the beginning of the logic in a method.

Parallelism: In this concept, we split the task into multiple sub tasks. At the end, we combine the results of subtasks for the final result.

Monads: A monad is a design pattern that helps to represent a missing value.

Java Stream API: Java Stream API is a way that makes operations on data sources easier and convenient. It does not modify underlying data sources. Some examples of common stream operations are forEach, map, collect, filter, findFirst, flapMap, etc.

Lambdas: A Java lambda expression is a short code which takes input parameters and returns a value. These are like methods but without a name. Java Lambda expression provides the way to implement a functional interface.

References:

Engineering Manager Interview questions

Who should read it: It is for you if you are looking for a quick overview of this topic for an interview or in general.

How will you prioritize tasks for the team members?

I will answer this questions as below. I prioritize tasks as per business priority and  level of efforts.

Source: MindTools

Per the matrix above, I prefer High impact tasks. If the impact is high and efforts are low, these are first tasks to be picked up. Then next comes high impact and high efforts.

You are leading a team of three developers. How would you divide the tasks among them?

I will prefer to pair two developers for each task and will assign one as a primary and the another one, as a secondary. If a developer is primary for a task, I will assign him/her as a secondary to another task. This helps in following ways:

  •  If a developer with primary task responsibility goes on a vacation, the secondary developer can pick up the task with the minimum ramp up time.
  • It provide the opportunity for the secondary developer, to learn the tasks. That way, it helps to continue building the knowledge base.

In what ways you have upgraded your skills set of your team?

Answer: I prefer to train my developers on new tasks as per their interest level. For example, if a data analyst is interested in learning Python, I prefer to prepare the developer in advance on Python skills with less urgent tasks to practice This allows the developer to learn and practice the skills without an urgency to deliver.

Your project is running behind the schedule. How would you communicate this to other teams? How would you communicate this to executive team?

I will get the opinions from the team about the options for the communication. In the communication plan, I will plan to have the postmortem details as well.

While communicating to executive team, I will clarify if I am looking for any help from them or is it just an update. In the communication, I will ensure to have the impact clarified clearly. If I am looking for their feedback, I will first prepare some options. While preparing details and presenting details to executive team, I will ensure writing and speaking details in the order of high priority first and lower priority later. This prioritization will allow me to skip lower priority items, if there is no enough time or a time cut, to go over all the details.

When working with product or project managers, have you disagreed with task prioritization? How did you resolve this? 

When working with project and product managers, I have disagreed many times. Sometimes their perspective and my perspectives differ. In my experience, the best way to come to a common ground is by looking at the common goal itself. Both project/product manager and engineering manager want to deliver the best possible results within the given constraints. I prefer to discuss various options and then, collaboratively decide the best.

In what ways do you support your team as they work on projects?

I prefer to set-up time with each member to:

  • Understand the progress, problems, and next steps on their projects.
  • Encourage members to come to me for any prioritization exercise, as needed.
  • Discuss their goals periodically, to understand their tasks alignment with their goals and the company goals. If I see the gap, I prefer to reset tasks/projects as needed. Challenge them within a possible limit for their career growth.

What do you believe you will achieve as an engineering manager that you could not achieve as an engineer?

My role as an engineering manager will help me manager an area of expertise by my team. I can manage the customers’ and engineers’ expectations. I can attract right talent for my team and help them in their career growth and align it with company’s career growth.

What are the specifics of managing small teams versus large engineering teams?

With the smaller team, communication and tasks management is easier. If the team size is larger, it is helpful to assign leads or create subgroups within the same team.

How would you describe the difference between leadership and management?

Management is about controlling tasks and resources towards a goal. Leadership means ability to influence and enable others towards organizational success.

How would you describe the role of an engineering manager?

To me, this means, managing many things. An engineering manager is responsible for team’s vision, talent growth, project management of deliverables, cross-functional relationships & tasks expectations, funding discussions, customers expectations management, and many more.

How would you approach coaching?

It depends on the situation. If an engineer prefers periodic meetings, I meet with him/her using periodic meetings. I provide feedback in private and as soon as possible and as often as needed. I also ensure praising for the improvements.

How would you manage engineers with performance issues?

I meet with the individual and  try to understand his/her perspective on the performance and the reasons behind it. I also prefer to understand if the individual is still driven with the same goal or if he/she is looking for a changed role. Depending on the situation, I make a plan and period check-ins.

How would you structure your 1:1s?

I prefer to keep 1:1s possible at the consistent time every week. In these 1:1s, I prefer to let direct reports drive the content.  In 1:1s, I prefer to discuss immediate, long term, and other needs.

What do you look for when hiring new engineers?

I look for their experience in technical expertise, communication skills, and teamwork skills. I also look for their flexibility.

How do tech leads and engineering managers work together?

This depends on the team size. Generally, tech leads are knowledgeable and responsible for the technical deliverables. Engineering manager ensures that tech leads have all the resources needed, to be successful in their goals.

How would you develop tech leads if there aren’t any on your team?

I will develop them as per their strengths. Depending on role needs, I will ensure the training and exposure for their success.

How do you resolve conflicts within teams?

Conflicts are inevitable and must be resolved as soon as possible. Some conflicts are easier to resolve whereas some are difficult to resolve. Conflicts could be turned into healthy conversations.

First, in 1:1 meetings, I will prefer to discuss the conflict and individual’s perspectives on the conflict.I would encourage them to think of different options of the situation and their reactions to each outcome. I will also guide them towards company’s best interest. I will also prefer engineers to learn resolving conflicts via the available trainings.

How do you manage multiple high-priority projects?

I will suggest a prioritization exercises periodically. I will suggest team members to break projects into manageable tasks. Then, I will suggest to sequence the tasks of multiple projects as per the situation.

How do you manage the triple constraint of budget, scope, and time?

For the budget, I prefer to be as flexible as possible. There could be different ways to manage the budget for the projects.

For the scope, I will prefer to stick to the defined project scope. If there is addition to the scope, I will suggest to plan for a separate release. This can be done with a prioritization exercise.

For the time, it is important to stick to the project schedule. if a project is behind the schedule, I will prefer my team to call it out as soon as they know. As risk matrix can be very helpful in it.

How do you approach tech debt?

Tech debt refers to the work that adds up later, due to a short term, quick fix solution. It is not always a bad thing depending on the situation. Maybe a product needs a quick launch, with the minimum viable product. It can also arise when developers have the unrealistic deadlines. In the reality, sometimes, a quick fix is needed. In such situation, I prefer to plan for a short term, mid term, and a long term solution.

How would you assist an engineer who is struggling with their work?

I will  set-up a time with him/her to understand the reasons behind it. It may be a personal issue, a lack of a skill, an interpersonal issue, a lack of interest in the particular task, or something else. Depending on the situation, I will discuss options with the individual. After the discussion, together, we will decide a plan to move forward.

How do you help engineers understand the “big picture” of their work?

I prefer to help the team understand the company’s overall goal. Then, step by step, I drill down to the department and then, to the business unit using the particular software. For example, if there is a business goal for the work, how an engineer’s work contribute to the business, to the department, and finally to the company. This helps in setting up the big picture to the engineers.

How do you prioritize work outside of SCRUM and agile methodology?

I will understand the business needs and business roadmap. Depending on the business need and roadmap, I will plan the process to support the business. This will help to prioritize and define the speed of the tasks.

How do you manage career growth for your team?

I discuss the career plan for the team periodically. I always aim to align current tasks with company’s goals and individuals’ career aspirations. I prefer to support the training and exposure to individuals as per their career goals.

How do you handle promoting someone as a manager?

At first, I’d like to understand why an individual wants to move to a management path. This evaluation will help individuals to assess their career choices. After the individual finalizes the goal and decides to move into a management role, I’d coach and mentor the individual towards his/her career goal and provide him/her the opportunity to experience people skills within the current role.

How do you communicate about technical project needs with non-technical teams?

I prefer to keep it as generic and less-technical jargon as possible.

Talk about high level system design of a specific project.
What things were done to scale the system.
Using load balancer for memcache servers.
What type of testing strategies can be used to test features.
Looking back what would you have done differently in the project.

 

 

References:

Aspect Oriented Programming (AOP)

Who should read it: It is for you if you are looking for a quick overview of this topic for a project, an interview, or in general.

What is an aspect: WAn aspect is a common feature that is scattered across methods, classes, or object models. This gives a way to encapsulate some qualified behaviors. An example of such behavior is logging or exception handling. AOP compliments OOP (Object Oriented programming). Aspects enable modularization of concerns such as logging that cut across multiple types and objects.

What are common implementations: Some common implementations of AOP are Spring framework, Jboss, and Aspect J. AspectJ uses Java like syntax. It has its own compiler. Jboss is an open source Java application server.  It has its own AOP framework. Spring uses XML based configuration for implementing AOP. It uses annotations which are interpreted by AspectJ library, for the purpose of parsing and matching.

Reference: 

Reactive programming

I’m curious to learn reactive programming. So far, below is my understanding:

Two APIs in Java for reactive programming:

What is reactive Programming:  It’s a paradigm to focus on developing asynchronous and non-block components.

Using reactive programming, we can present data as soon as it’s ready.

Resources for more learning: