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:

 

The 12 Factor App

12 factor app is a methodology for building software as a service apps. This methodology can be applied to any app, written in any programming languages. Below are my understanding about 12-app factors:

1. Code base: Code is always tracked in a version control system (like git). Some key points:

  • If there are multiple code bases, it\’s not an app, it\’s a distributed system.
  • Multiple apps should not share the same code. Instead, they should create shareable libraries.

2. Dependencies: All dependencies must be declared in a dependency manifest. It simplifies the set-up process for developers. 12 factor app also does not rely on implicit system tools. It\’s to avoid any risk of getting a tool or a feature decommissioned in the future.

3. Config: Configuration files must be separate from code. Store these into environment files. Config files must not be checked into repository.

4. Backing services: Backing services are the services that app consumes over the network as part of its normal operation. For example, an app uses a MySQL Database, or Amazon S3, or messaging services. Each backing service is a resource.

5. Build, release, run: Strictly separate build and run stages. Build is a stage that bundles the needed files into an executable package. Release is a stage to take build and combine it with the deploy\’s current config. Run runs the app in the executable environment.

6. Processes: The app is executed in one or more processes. Twelve-step processes are stateless and share-nothing. Any data that needs to be persists, must be stored in a backing service, like a database. Sticky sessions are violations of 12-step process.

7. Port binding: Export services via port binding. One app can also become a backing service to another app.

8. Concurrency: Scale out via the process model. Processes are a first class citizen.

9. Disposability: This means, 12-step processes can be started and stopped at any time. Processes should thrive to minimize the startup time.

10. Dev/prod parity: Keep development, staging, and production as similar as possible.

11. Logs: Treat logs as event streams.

12. Admin processes: Run Admin processes as one-off processes. For example, in my Laravel code, I ran process to create database tables as a one time setup.

Reference: https://12factor.net/

Technology Compatibility Kit (TCK)

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 the Technology Compatibility Kit (TCK): It is a suite of tests to check the compliance with Java Specification Request (JSR). It\’s also known as Java Compatibility Kit (JCK). This requires that all tests are implementation-independent. For a given platform to be considered \’conformant\’, all the TCK tests must pass and meet the testing requirements. 

Why TCK is important: TCK testing is important for below reasons:

  • It ensures that the Java technology does not become fragmented.
  • It helps developers to write code in a way that the solution is deployed to any platform, without any modifications.
  • It allows developers to write the code compliant to Java technology rather than to a particular vendor\’s implementation.
  • It allows application users to integrate their application to other applications with any environment.

Reference: 

Test Pyramid

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.

What is Test Pyramid: Test Pyramid is a way to plan the testing efforts on an application. As per this concept, efforts are:

  • Highest in unit Testing
  • Middle level in Service testing
  • Lowest in UI testing

These are key points:

  • Write tests with different granularity.
  • The more high level we go, we should have less test cases.

Different types of tests:

Unit Tests: Stick to one test class per production class. Test the public interface of the class.We can ignore private methods.

Integration Tests: Testing the applications end-to-end.

Contract Tests: It means testing different services via certain interfaces. Contract testing is a way to ensure different services can communicate with each other. Some examples of contract testing tools are OpenAPI, Pact, Postman collections, RAML, and API Blueprint.

UI Tests:  Typically, it means a web interface in the context of web applications.

End-to-End Tests: User interface end-to-end tests. REST API end-to-end tests.

 

Reference: https://martinfowler.com/articles/practical-test-pyramid.html

OOP Concepts

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.

In Java, below are OOP concepts:

1. Abstraction:  means hiding the details from the implementation. For example, we do not know details behind the gears of the car.

2. Encapsulation: Encapsulation is the concept to wrap the data under a single unit.

3. Inheritance: Inheritance is the concept to allow an object to inherit properties or behaviors of the parent class into a child class. It creates a parent-child relationship between classes. This concept provides code re-usability and maintainability. Below are types of inheritances:

  1. Single Inheritance: A child class is derived from a single parent class.
  2. Multiple Inheritance: A child class is derived from multiple parent classes. Note: In Java, multiple inheritance was not possible till JDK 1.7. It\’s possible from JDK 1.8 onwards, via the default methods in interfaces. Multiple inheritance via use of interfaces is possible in Java.
  3. Hybrid Inheritance: It is a combination of multiple inheritances. For example, a class A extends another class B and it also implements an interface.

4. Polymorphism: Polymorphism simply means many forms. It is a concept to declare multiple functions with the same name. It is also referred as one name with many forms. For example, ‘+’ operator sums two numbers or concatenates two strings.

There are two types of polymorphism in Java:

  1. Overloading: Overriding is related to compile-time polymorphism. It is also referred as a static binding or early binding. For example, a Java class can have multiple sum() functions with varied number of parameters.
  2. Overriding: Overloading is related to run-time polymorphism. It is also referred as a dynamic binding or method overloading. Dynamic method dispatch is the mechanism by which a call to an overridden method is resolved at runtime. Overriding is the feature that allows a subclass to provide a specific implementation of a method which is already into the super class. It is the type of object being referred to, not the type of reference variable.
Here are some rules for polymorphism in Java:
  1. Final methods can not be overridden.
  2. Status method can not be overridden.
  3. Provide methods can not be overridden.
  4. The overriding method must have same return type as in the base class’s method.
Some key points:
  • Constructors are not members of the class. So, they are not inherited. Constructor of a class can be invoked from another sub-class’s constructor.
References:
Book: Java, The Complete Reference
Other sources on the web

SOLID Design Principles

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. As I learn more, I will update this article.

What are SOLID Design Principles:

SOLID Design Principles stand for:

  • Single Responsibility Principle
  • Open/Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion
Single-responsibility Principle:
It states that a class should have one and only one reason to change, meaning that a class should have only one job. For example, if a class has a function to calculate the area of the shape ( like circle, square, or a circle), it should focus only on it. If we want to output the result into a JSON or a TEXT format, it is advisable to use another class that forms the output in the desired format. Do just one thing in a class.
Open-Closed Principle:
It states that Objects or entities should be open for extension but closed for modification.
 
Liskov Substitution Principle:
It states that let q(x) be a property provable about objects of x of type T. Then q(y) should be provable for objects y of type S where S is a subtype of T. Means, every subclass or derived class should be substitutable for their parent or base class.
Interface Segregation Principle:
It states that a client should never be forced to implement an interface that it doesn’t use, or clients shouldn’t be forced to depend on methods they do not use.
Dependency Inversion Principle:
It states that the entities must depend on abstractions, not on concretions. It states that the high-level module must not depend on the low-level module, but they should depend on abstractions. This principle allows decoupling.
 

My list of knowledge sources: Books, Courses, and Other

I am sharing my list of knowledge sources that I liked. If I like a new material, I will add to the list.

Technical books:

  • Design: Art of Scalability, The: Scalable Web Architecture, Processes, and Organizations for the Modern Enterprise
  • Java The Complete Reference
  • What is Serverless, by Mike Amundsen
  • The Complete Software Product Manager by Anna P Murray
  • Programming PHP, by Kevin Tatroe, Peter Maclntyre
  • Python Data Science Handbook, by Jake VanderPlas
  • NoSQL Distilled: A Brief Guide to the Emerging World of Polygot Databases, by Pramod J. Sadalage, Martin Fowler
  • Python Crash Course, by Eric Matthes

Non-technical books:

  • Elements of Style
  • The Exceptional Presenter
  • Time management: Getting Things Done by David Allen
  • Seven Habits of Highly Effective People by Stephen Covey
  • Influence, by Robert B. Cialdini
  • Sell with a story, by Paul Smith, Mike Weinbeg

Databases basics

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.

Why we need distributed databases: 

  • Difficult to store entire data set into a single database
  • Single point of failure
  • Slow in performance
  • If we make a big computer, it will be more expensive

For the distributed database architectures, we have a master database and can have multiple secondary databases. Single node databases are classic databases like PostgreSQL, MySQL, etc. Distributed databases are made of multiple nodes. These are fault tolerant. Database clusters means multiple database instances. In general, we have leader nodes and follower nodes. Leader node is in charge of returning the final data results. Followers receive the data. If the leader node fails, a follower node can become the leader node.

Types of distributed databases:

  • Big compute databases: Split data across multiple nodes. These are suitable for analytical workloads.
  • High availability databases: are extremely fault tolerant. Each node has a full copy of the data.

Some key points about distributed databases:

  • Imbalance node: the problem when a node has more data load. Moving the data between nodes is slow.
  • Asking data from hard disk is slow. Asking data from RAM is fast.
  • Leader node examines the query. Leader node distributes the jobs to different nodes.
  • Sharding: It is a model in that all database instances acts as the primary databases. We segment data into multiple instances. Problem is that if we have more load on one segmented database, it will cause problems. Also, if we have to join data with two databases, we will have network connections.

CAP theorem:

  • C stands for Consistency. If we write information, we want to get same data. That is the consistency. To maintain consistency, data in the primary and secondary databases should replicate asap.
  • A stands for Availability. If we have two databases, if one machine goes down, as a whole system, users should be able to read or write.
  • P stands for Partitions. Partition tells us that even if connections to two machines not working, we should still be able to read/write the data.
  • RBDMS databases provide strong consistency. NoSQL databases generally prioritize availability, partition tolerance, and provide eventual consistency.

As per CAP theorem, generally, databases can achieve up to two features out of three. For distributed databases, assume network failures will be inevitable. So, for distributed databases, we need to choose between C and A.

PACELC theorem:

As per CAPLEC theorem, if partition happens, choose Availability and Consistency. Else, choose Latency and Consistency.

Other theorems:

BASE: BASE stands for Basically Available Soft state Eventually Consistent. NoSQL is an example of a BASE.

  • Basically Available: The system is guaranteed to be available in event of failure.
  • Soft State: The state of the data could change without application interactions due to eventual consistency.
  • Eventual Consistency: The system will be eventually consistent after the application input. The data will be replicated to different nodes and will eventually reach a consistent state. But the consistency is not guaranteed at a transaction level.

Indexes:

Database index is a data structure that helps to retrieve data faster from a table. Indexes are like library catalog that helps to know the location of a book. For more about index, refer here.

Relational databases:

Relational databases store data in rows and columns. Some famous relational databases are MySQL, Oracle, and Postgres.

Advantages of relational databases:

  1. Well defined relationships and structured: data in relational databases is structured, with foreign and primary key constraints. It helps in organizing the data. Defined relationships and structure also helps in retrieving the data effectively.
  2. ACID (Atomicity, Consistency, Isolation, Durability): As relational databases support ACID properties, it’s helpful in ensuring the data changes for a transaction.

Disadvantages of relational databases:

  1. Rigidity due to structured data: As the data is well defined and structured, it’s not easy to store a new data set for that a structure is unknown. For example, to add a new column into a table, the table has to be changed, to support it.
  2. Difficult to scale: scaling means supporting more volume of data. For relational databases, scaling is difficult. For read-only operations, it’s easier to replicate the data. For write operations, a general approach is to add more capacity (vertical scaling) to the primary database server, which is costlier than replacing read-only databases.

NoSQL Databases:

There are multiple types of NoSQL databases like:

  • Key-Value storage type: Data is stored in key-value pairs in arrays. Some examples of such databases are Redis and Dynamo databases.
  • Document databases: In these databases, data is stored in the documents. A collection is a group of documents. Each document can have a different structure. An example of such a database is MongoDB.
  • Wide-column databases: In these databases, the number of columns can vary per row in the same table. We can consider it as a two dimensional key-value storage. Some examples of wide-column databases are Cassandra and HBase. For more, refer here.
  • Graph databases: These represent data in a form of a graph. Examples of such databases are Neo4J and Infinite graph.
  • Some NoSQL databases:
    • Couchbase: It is a NoSQL database that stores the data either in key/value pair or in JSON document format. In a traditional database model, we begin with a schema. We add tables and the columns in the tables.
    • MongoDB: MongoDB is an open source document database. It works on concept of collections and documents. A collection is a document which is equivalent to an RDBMS table. A document is a set of key-value pairs. It is a schema-less database. It is easy to scale. It is a good choice for a Big Data need.

Advantages of NoSQL databases:

  • Flexibility with unstructured data: As the data in NoSQL databases is unstructured, these databases provide more flexibility to store the data.
  • Horizontal scaling: Horizontal scaling means distributing data into multiple server instances. Data in NoSQL databases are distributed, by using sharding. These databases support horizontal scaling for both, read and write operations.

SQL versus NoSQL databases:

  • Storage: Data in SQL databases is stored in rows. NoSQL databases have different data storage models like key-value or graph
  • Schema: SQL databases have a fixed schema. noSQL databases can have different schemas.
  • Querying: SQL databases use Structural Query Language (SQL), to retrieve the data. NoSQL databases uses UnQL (Unstructured Query Language). NoSQL are focused as a collection of documents.
  • Scalability: Horizontal scaling in SQL databases is difficult as compared to NoSQL databases.
  • Reliability: Most SQL databases are reliable and ACID compliant. Whereas, NoSQL databases may compromise reliability and ACID compliance.
  • Language: SQL databases use transactional SQL. They support core ANSI/ISO language elements. Whereas, NoSQL databases are not limited to one particular language. For example, MongoDb uses Javascript based query language.

 How to choose between SQL and NoSQL databases:

  • Consider SQL databases when:
    • Data is structured and structure is not changed frequently.
    • Supporting transaction-oriented use cases.
    • No need to scale the database.
  • Consider NoSQL databases when:
    • Data is not structured and the structure can change frequently.
    • A flexibility of dynamic schema is needed.
    • We anticipate the scaling of the database in the future.
    • Level of data integrity is not needed.

Other databases terms:

  • Purpose built databases: There are many options like relational database, key-value database, document database, graph database, in-memory database, time series database, and ledger database. Depending on the situation, today’s application developers need to pick a right database for the use case, by analyzing pros and cons of the situation.

Partitioning and Sharding: it is the process of splitting the data into columns or features. Vertical partitioning splits the data into the same database by columns or features within the same tables. Horizontal partitioning splits the table data to multiple shards ( e.g. multiple database locations). In case of sharding, a table may have a customer ID 1 on one server and customer ID 2 on another server. In case of partitioning, other customer Ids 1 and 2 are on the same database servers and in the same table.

Distributed transaction types:

  • Two-phase commit (2PC): In case of 2 Phase commit, there is a coordinator that prepares multiple transactions. Then, the coordinator either commits or rolls back all transactions together. While preparing each transactions, the database table rows (that to be updated in DB) are locked using local transactions. This prevents any updates during the 2-phase transaction. We also need to plan for a time limit for each transaction so that the coordinator is waiting to commit or rollback within a defined time period.
  • 3 phase commit: First phase is that the coordinator asks if it’s ok to commit. Second phase is to pre-commit the transaction. Third step is to commit a transaction. I’m yet to learn more and add more notes about it.
  • Try-Confirm/Cancel (TC/C): In the first phase, the coordinator asks all databases to reserve resources. In the second phase, the coordinator captures the replies from all databases. If the response is yes, the coordinator asks all databases to confirm the transaction. If any of the databases respond as no, the coordinator asks all databases to cancel the transaction.
  • Saga: It’s an asynchronous way to achieve the transaction. It’s an event driven process. Micro-services generally use Saga as their default choice. In Saga, all operations are executed in a sequence. When one operation finishes, then the next operation is executed. For the rollback purpose, we need to prepare double operations: one for execution and the another one for the rollback. To coordinate operations in Saga, there are two ways:
    • Choreography: All services do their jobs by subscribing to other services’ events. This is a decentralized coordination.
    • Orchestration: In this way, there is a single coordinator to instruct all services in a defined order.

References: