---
# System prepended metadata

title: Interview questions

---

 # Interview questions
 
 ## Experience questions

* Could you please tell us about your last project, about your team, about processes on this project?
* What SDLC on your project, how do you deal with customers?

## Agile

* Which agile methodologies do you know?
* What is the difference between KANBAN and SCRUM?
* When is it better to use SCRUM and when KANBAN?

## DevOps CI / CD

* What is the need for DevOps?
 
    >  Nowadays instead of releasing big sets of features, companies are trying to see if small features can be transported to their customers through a series of release trains. This has many advantages like quick feedback from customers, better quality of software etc. which in turn leads to high customer satisfaction. To achieve this, companies are required to:
    >   - Increase deployment frequency
    >   - Lower failure rate of new releases
    >   - Shortened lead time between fixes
    >   - Faster mean time to recovery in the event of new release crashing
    >  
    >  DevOps fulfills all these requirements and helps in achieving seamless software delivery.
    
* Which are the top DevOps tools? Which tools have you worked on?

  >   The most popular DevOps tools are:
  > 
  > *   Git: Version Control System tool
  > *   Jenkins: Continuous Integration tool
  > *   Selenium: Continuous Testing tool
  > *   Puppet, Chef, Ansible: Configuration Management and Deployment tools
  > *   Nagios: Continuous Monitoring tool
  > *   Docker: Containerization tool
 
* What is Vagrant and what is it used for?

* Why Continuous Integration is important for Agile?

* What is CI/CD?

* What CI/CD tools do you know?

* Could you tell me about CI/CD on your last project?

 
## Software Testing

* What is Unit test, Integration Test, Smoke Test, Regression Test and what are the differences between them?

  >   Unit test: Specify and test one point of the contract of a single method of a class. This should have a very narrow and well defined scope. Complex dependencies and interactions to the outside world are stubbed or mocked.
  > 
  >   Integration test: Test the correct inter-operation of multiple subsystems. There is a whole spectrum there, from testing integration between two classes, to testing integration with the production environment.
  > 
  >   Smoke test (aka sanity check): A simple integration test where we just check that when the system under test is invoked it returns normally and does not blow up.
  >     Smoke testing is both an analogy with electronics, where the first test occurs when powering up a circuit (if it smokes, it's bad!)...
  >     ... and, apparently, with plumbing, where a system of pipes is literally filled by smoke and then checked visually. If anything smokes, the system is leaky.
  > 
  >   Regression test: A test that was written when a bug was fixed. It ensures that this specific bug will not occur again. The full name is "non-regression test". It can also be a test made prior to changing an application to make sure the application provides the same outcome.
    
* What is a reasonable code coverage % for unit tests (and why)?

## Code quality

* What is your understanding of code quality?
* Can you give an example of how bad quality code can negatively affect the product quality?
* Can you measure code quality? Do you know what code smell is?
* Can you give a couple of examples?
* What is the worst code that you worked with and what did you do about it?

## Database

* What is the cost of having a database index?

  > More indexes tend to slow down inserts and speed up queries. So it's always a balancing act. That's why you only add indexes in specific response to a problem. Anything else is premature optimization and should be avoided.
  > 
  > In addition, revisit the indexes you already have periodically to see if they're still needed. It may be that the queries that caused you to add those indexes are no longer run often enough to warrant it.
    
* Coding

**movie**

| id | title        |
| -- | ------------ |
| 1  | Home Alone 1 |
| 2  | Some film 2  |
| 3  | Some film 3  |
| 4  | Some film 4  |
| 5  | Some film 5  |

**movie_metadata**

| id | year_of_production |  author            | length | movie_id |
| -- | ------------       | ------------------ | ------ | -------- |
| 1  |   1990             |    John Hughes     | 103    |  1       |
| 2  |   2005             |    Kelly Smith     | 129    |  3       |
| 3  |   2020             |    John Winston    | 345    |  2       |
| 4  |   1998             |    Mellonea Bussie | 110    |  4       |
| 5  |   1970             |    Antanas Dainelis| 290    |  5       |


1. Write an SQL to select all data of an oldest film.
  
    ```sql
    select top 1 *  from movie_metadata mm 
    inner join movie m on mm.movie_id = m.id
    order by mm.year_of_production desc;
    ```

2. Write an SQL to select all films data and order them by production date.

    ```sql
    select * from movie_metadata mm 
    inner join movie m on mm.movie_id = m.id 
    order by mm.year_of_production desc;
    ```

## Messaging systems

--


## Java

* What are pass by reference and pass by value?
* HashCode & Equals contract
* HashMap implementation
  * SynchronizedMap?
  * What the difference between **SynchronizedMap** and **ConcurrentHashMap**?
    * When **ConcurrentHashMap** will have same performance as **SynchronizedMap**?
* Set vs List
* What is the difference between ArrayList and LinkedList?
* Immutability
  * How can we create own immutable class?
* Could you please tell us about Java 8 features.
  * (lambda, stream, optional, default method in interface, functional interfaces)
  * intermediate and terminal operations.
  * how parallel stream works
* Could you please tell me what was introduced in java 9-11?
  * Module system
  * Interface private methods
  * var
* Could you please tell us what is garbage collector and how it works
* What is structure of Heap
* InstanceOf
  * Is null check needed before calling instanceof?
* What is marshaling and unmarshalling? How does it differ from serialization?
  * How can we skip it for some fields?

## Multithreading

* Happens before a relationship?
* What is deadlock
  * How it could be avoided? 

## Spring

* What are the main advantages of the Spring framework?
* IOC container.
* AOP, Spring Data, IOC/DI,
* Annotations: Repository, Service, Component, RestController Controller
