Wednesday, October 12, 2022

Interview Preparation: Senior Developer, Full Stack Developer

Core Java Basic

  1.  JDK, JRE , JVM and architecture ( link)
  2.  Classloader and its types (link)
  3.  Java Args -X, -XX, -D link
  4.  Local variable, instance variable, static variable difference?
  5.  Why java is not pure object oriented language
  6.  Object Oriented vs Object Based language
  7.  Memory memory [thread memory
  8.  Java Heap memory types[young, old]  [link] [metaspace instead of permgen]
  9. Garbage Collection link1
  10. Strategy and Types [ Types:{Serial, parallel, CMS, G1}, Strategy: oldGen, young gen, permgen[link]
  11.  Constructor (super, this) [link1]
  12.  Characteristics of OOP (Encapsulation, Abstraction , inheritance, polymorphism) [link]
  13.  Types of Polymorphism(static vs dynamic or overloading vs overrriding vs operator overloading) [link]
  14.  Covariant Type and contravarient type [link]
  15. Interface vs Abstract
  16. Interface: default method, static methods, private method, marker[link]
  17. Exception Handling(checked and unchecked link[link2]
  18. String concept : [link]
  19. String Constant pool
  20. StringBuilder and StringBuffer
  21. Equals vs == [link]
  22. Equals and Hashcode [link]
  23. Inner Class and types [link]
  24. Serialisation and Deserialisation[Serial&Deserial]
  25. Reflection [link]
  26. final, finally, finalize[final-java]
  27. transient,volatile[link]
  28. native, strictfp[link]
  29. Java: passby value[passbyvalue]
  30. fail-fast, fail-safe [fail fast safe]
  31. Comparable, comparator[link]
  32. Functional Programming: Supplier, Consumer, Predicate, Function[functional program]
  33. Aggregation vs composition vs Association[link]
  34. Thread [Introductionwait notify
  35. Runnable, Callable, Future, Executor
  36. Synchronisation
  37. 1LserialversionUID link
  38. Concurrency
  39. Collection framework
  40. Create singleton class while preventing reflection api link
  41. Java 8, 11, 17, 21 and latest java  link
  42. Parallelstream vs stream link
  43. java8 Collectors.groupingBy, distinct(), parrallelStream()





Collection Framework

  • Basic Into link
  • HashTable [link] thread safe, method lock
  • HashMap link1, link2  {uses linkedlist, then RB tree, not threadsafe hashtable}
  • HashSet [link ]
  • LinkedHashMap [link ] work as double linkedlist [array of doublinkedlist], maintain order
  • LinkedHashSet [link]
  • ConcurrentHashmap [link] is an extension of hashtable with better synchronised version than hashtable[segment lock instead of methd or block lock]
  • TreeMap: internally uses RB Tree [link]
  • TreeSet: The data structure for the TreeSet is TreeMap; it contains SortedSet & NavigableSet interface to keep the elements sorted in ascending order and navigated through the tree.
  • Sort hashmap with custom key object. hashmap has customer object as key then immutable object because of this reason string is preferred as key
  • Sort hashmap by values. link
  • Hashtable{method level locl} vs synchronisedhashMap{block level lock also supported} vs concurrenthashmap{segment lock} vs linkedhashmap vs treemap link

 

Thread and synchronization
  • Basic Intro link with detail
  • Concurrency vs Parallelism [link
  • Types of synchronisation: static sync, sync block, sync method
  • Object: wait, notify, notifyAll.  [Inter Thread communication link]
  • Thread: yield, join link.  
  • Threadpool example link
  • Two thread accessing synchronise method
  • Cyclic Barrier vs CountDownLatch link

Concurrency
    • Basic link
    • Executors framework link
    • Executors vs executor
    • Concurrentmodification exception
    • Unsupported operation exception
    • Future vs CompletableFuture link


********************************************************************************

Spring Boot Framework


  • Sync, Async, Reactive programming
  • Spring IOC container(ApplicationContext interface) link
  • Dependency Injection  types: constructor, setter, field based DI
  • Bean scopes link1  link2
  • Bean lifecyle link
  • Dispatcher servlet link
  • @Controller, @RestController, @Service,@Repository link
  • Lazy loading link
  • Spring multiple datasource link link2 link3
  • Load time invoking functionality link2 link1 
  • Spring webflux link link2 
  • Spring JPA link link2 [used for JDBC]
  • Spring R2dbc link link [prefered ]
  • Spring Webclient link
  • Spring transaction mgmt link
  • Spring batch processing link link2
  • Spring logging framework(logback is default) link
  • Spring exception handling link
  • Spring testing framework link
  • @Springbootapplication annotation  
     @EnableAutoConfiguration,@ComponentScan,@Configuration
  • Spring swagger [openapi documentation- latest] link
  • Spring redis link1  lettuce link 2
  • Spring kafka link
  • Spring AOP link
  • Spring boot security with JWT link
  • Spring security  intro basic  weblfux oauth2 jwt 
  • Put vs post vs patch link
  • Commandline runner vs Applicationrunner link
  • Spring elastic searchlink


*********************************************************************************


Authentication Framework




Authentication Framework

 Authentication vs Authorisation

 Application in Microservice : 

https://medium.com/geekculture/securing-your-microservices-architecture-with-spring-boot-an-in-depth-guide-to-authentication-and-d4acd8cf7efb

https://medium.com/javarevisited/spring-boot-authorization-creating-an-authorization-server-for-your-microservices-50a3aefd6ce8


******************************************************************************

React and Redux


  • Hello world Concept example webpack example
  • React VirtualDom link
  • Virtual DOM vs Shadow DOM link
  • Reconciliation: diffy algo in fibre node
  • Higher order components link
  • hoisting link
  • let vs var link
  • API call (axios) link
  • Webpack link link2
  • Babel link  
  • useMemo, useCallback, useContext link
  • Redux::: action , store, dispatcher, reducer [useReducer] Explaination
  • CORs for protection
  • Testing framework for FE testinglib link enzyme
  • React vs Angular vs vue link
  • Typescript link
  • Microfrontend design link Eg:Module federation, single-spa
  • Def between useRef and useState link
  • useMemo vs useCallback
  • type vs interface in typescript
  • interface vs class
    Testing framework FE
    • Jest: Best for unit testing and snapshot testing with easy configuration
    • Mocha: Best for flexible, customizable test setups with asynchronous support
    • Enzyme: Best for testing React component internals with shallow and full rendering
    • TestCafe: Best for cross-browser testing and end-to-end testing with simple setup
    • Jasmine: Best for behavior-driven development (BDD), focusing on simplicity
    • Chai: Best for expressive assertions in tests using BDD/TDD style
    • Cypress: Best for fast, reliable end-to-end testing with real-time browser interaction
    • Puppeteer: Best for headless browser automation and UI testing
    • React Testing Library: Best for testing React components through user interactions
    • Sinon: Best for mocking, spying, and stubbing external dependencies in tests
    • Nightwatch.js: Best for simple end-to-end testing with WebDriver integration
    • QUnit: Best for straightforward unit testing, especially in legacy projects
    • Storybook: Best for visually testing and documenting UI components in isolation
    • Ava: Best for fast, concurrent testing with minimal configuration
    • Detox: Best for end-to-end testing of mobile apps, particularly React Native, with fast test execution.
Note- The algorithm React uses to diff one tree with another to determine which parts need to be changed also k/a reconciliation. .JavaScript is a dynamically typed language. In a dynamically typed language, the type of a variable is checked during run-time in contrast to a statically typed language, where the type of a variable is checked during compile-time.In JavaScript, primitive data types are passed by value and non-primitive data types are passed by reference.Functions that operate on other functions, either by taking them as arguments or by returning them, are called higher-order functions.Memoization is a form of caching where the return value of a function is cached based on its parameters. If the parameter of that function is not changed, the cached version of the function is returned.
 
   React virtual DOM uses Fibre node as internal data structure. Its a tree of single linkedlist node
 npx webpack --env prod

 

-----------------------------------------------------

SQL link

  • Explain the differences between SQL and NoSQL databases.
  • Types of join link
  • SQL vs PSQL vs TSQL link
  • Unique key vs Primary key
  • Where vs Having in sql
  • Delete, truncate, drop
  • SQL INTO
  • Nth highest salarylink
  • On delete cascade
  • How do you optimize SQL queries? link1 link2
  • How do u handle transaction in distributed system [SAGA, 2PC]
  • How do you prevent SQL injection link
  • Condept of sharding link
  • Condept of partitioning link
  • SQL concept quesn link
  • SQL query query interview

SELECT
FROM
WHERE
GROUP BY
HAVING
ORDER BY

Note:
Managing large-scale databases for performance involves various strategies, including proper indexing, partitioning, query optimization, hardware optimization, and caching. Monitoring and fine-tuning the database is crucial to ensure optimal performance as data volumes grow.

Ensuring data availability and disaster recovery relies on the implementation of vital backup and recovery strategies. These strategies encompass various methods, such as full backups, differential backups, transaction log backups, and regular testing of restoration procedures.

NoSQL databases are non-relational databases designed for handling large volumes of unstructured or semi-structured data. They interact with SQL databases through various integration methods, such as data pipelines, ETL processes, and API-based data transfers

Advanced optimization techniques for SQL queries include using query hints, indexing strategies, query rewriting, and understanding the query execution plan. Profiling tools and performance monitoring are essential for identifying and resolving performance bottlenecks

 

*******************************************************************************

Security in Web Application



*************************************************

SOLID principle


Explain with Eg: Vechile, Bank link
                                          

*************************************************


Design Pattern in Java(GOF pattern)

  1. Creational Design pattern:  are concerned with the way of creating objects.
    Singleton, Builder, Factory pattern, Abstract Fcatory link

    [ singletion, factory, abstractfactory, builder]

  2. Structural Design patternThese patterns explain how to assemble objects and classes into larger structures while keeping these structures flexible and efficient.
    Adopter, Decorator, Facade, Composite, Bridge link

  3. Behavioural Design patternare concerned with the interaction and responsibility of objects.
    Observer, Iterator, ChainOfResponsibility, Strategy,Command link

*************************************************

Microservice Design Pattern

Microservices is an architectural style for building applications as a collection of independent services. Each service is built and deployed independently, and can be scaled independently



use chatgpt directly to study about all

     

*************************************************
12 factor Apps





*************************************************

System Design round

************************************************


Additional Topic Note:






























































No comments:

Post a Comment

Data Engineering and Best practices

Data and types Data at rest (e.g. batch data pipelines / data stored in warehouses or object stores) Data in motion (e.g. streaming pipeline...