1. Have you worked with design patterns? Which design pattern you have used in your work? How does it work?
There are 3 broad types of design patterns:
a. Creational Patterns -
These patterns provide different strategies to create an object.
b. Structural Patterns -
These patterns define object structure and its relationship with other objects.
c. Behevorioal Patterns -
These patterns deal with how objects should interact with each other in a optimum
and efficient manner.
d. Concurrency Patterns -
d. Concurrency Patterns -
These design patterns deal with multi threaded programming paradigm.
These design patterns are also called as gang of four (GOF) design patterns.
Following are sub-types of creational design patterns
a. Factory
b. Abstract Factory
c. Singleton
d. Prototype
e. Builder
f. Object Pool
Following are sub-types of Structural design patterns
a. Adapter
b. Bridge
c.Composite
d. Decoreator
e. Facade
f. Flyweight
g. Proxy
Following are sub-types of behavioral design patterns
a. Chain of responsibility
b. Command Pattern
c. Interpreter pattern
d. Iterator Pattern
e. Mediator Pattern
f. Memento Pattern
g. Observer Pattern
h. State Pattern
i. Strategy Pattern
j. Template Pattern
2. What is difference between inheritance and Association?
A. Inheritance is IS-A relationship. Association is HAS-A relationship. Association can be one-to-one, one-to-many, many-to-one, many-to-many.
3. What are types of association?
A. Composition and Aggregation. Composition is strong association, ie. the associated object cannot exist independent of its owner (House has a room) while aggregation is weak association, where entities can exist independent of each other (school has teachers).
A. Composition and Aggregation. Composition is strong association, ie. the associated object cannot exist independent of its owner (House has a room) while aggregation is weak association, where entities can exist independent of each other (school has teachers).
4. What is important consideration while designing any software?
A. Most important considerations during designing a software are how the system will tackle worst case scenarios.
A. Most important considerations during designing a software are how the system will tackle worst case scenarios.
5. Security short comings of jwt?
A. JWT can spoofed. Solution to this is to append the hash of JWT at the tail of JWT. This way if the JWT is tampered its hash will no longer verify and masquerading attacks can be checked
A. JWT can spoofed. Solution to this is to append the hash of JWT at the tail of JWT. This way if the JWT is tampered its hash will no longer verify and masquerading attacks can be checked
6. What is SOLID programming principle, with example.
A.
7. Overview of architecture/flow of request of current project?
A. Answer will vary according to your project. Make sure you prepare your answer well and practice it before the interview. Also, learn to draw the correct architecture diagram for senior positions.
A.
- S - Single-responsibility Principle. - Each class must be accountable for single responsibility
- O - Open-closed Principle. - A class must be open to extention but closed for modification
- L - Liskov Substitution Principle. - A child class must be substitutable in place of a parent class
- I
- Interface Segregation Principle. - Interface must address only
specific functionality so that user is not forced to implement methods
not used by them.
- D - Dependency Inversion
Principle. - High level classes and low level classes must not depend on
each other, instead the both must depend on abstractions.
A. Answer will vary according to your project. Make sure you prepare your answer well and practice it before the interview. Also, learn to draw the correct architecture diagram for senior positions.
8. How is security handled in your current project?
A. This is very frequently asked question especially in L2 round. Make sure you prepare the answer for this question well as per your project.
A. This is very frequently asked question especially in L2 round. Make sure you prepare the answer for this question well as per your project.
9. How is caching implemented in your current project?
A. There are various ways caches are implemented in production code. It varies from project to project. In-memory caches such as hashmaps are sufficient in some scenarios while other applications might use elaborate caching libraries like Redis and Memcached. It really depends on your caching needs and caching strategy you choose.
10. How is multithreading implemented in your application?
A. This question aims to understand how well aware you are with multi-threaded programming. You must be aware of runnable and callable interfaces and executors.
A. There are various ways caches are implemented in production code. It varies from project to project. In-memory caches such as hashmaps are sufficient in some scenarios while other applications might use elaborate caching libraries like Redis and Memcached. It really depends on your caching needs and caching strategy you choose.
10. How is multithreading implemented in your application?
A. This question aims to understand how well aware you are with multi-threaded programming. You must be aware of runnable and callable interfaces and executors.
Comments
Post a Comment