0% found this document useful (0 votes)
5 views10 pages

Technical Questions

The document contains a comprehensive list of intermediate-level technical interview questions across various topics including TypeScript, JavaScript, React.js, Next.js, Node.js, PostgreSQL, MongoDB, Docker, CI/CD with GitHub Actions, Kubernetes, RabbitMQ, and Test-Driven Development (TDD). Each section features specific questions aimed at assessing knowledge and understanding of key concepts and practices within these technologies. The questions cover fundamental differences, functionalities, best practices, and advanced features relevant to each technology.

Uploaded by

fasihaarshad579
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views10 pages

Technical Questions

The document contains a comprehensive list of intermediate-level technical interview questions across various topics including TypeScript, JavaScript, React.js, Next.js, Node.js, PostgreSQL, MongoDB, Docker, CI/CD with GitHub Actions, Kubernetes, RabbitMQ, and Test-Driven Development (TDD). Each section features specific questions aimed at assessing knowledge and understanding of key concepts and practices within these technologies. The questions cover fundamental differences, functionalities, best practices, and advanced features relevant to each technology.

Uploaded by

fasihaarshad579
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Intermediate-level technical interview questions

TypeScript

1. What are the differences between interface and type in TypeScript, and when
would you use one over the other?
2. How does TypeScript’s structural typing work?
3. What is the purpose of generics, and can you give an example of a generic function?
4. How do unknown and any differ?
5. What are union and intersection types, and how are they used?
6. How does TypeScript handle optional properties and optional parameters?
7. What are type guards, and what are some ways to implement them?
8. What is the difference between readonly and const?
9. How do you use enums in TypeScript, and what are the trade-offs compared to union
types?
10. What is the never type, and when does TypeScript infer it?
11. How does TypeScript infer types, and when should you explicitly define them?
12. What are mapped types, and can you name some built-in mapped types?
13. What are utility types like Partial, Pick, Omit, and Record used for?
14. What is declaration merging, and where does it apply?
15. How does TypeScript handle null and undefined with strictNullChecks enabled?
16. What is the difference between extends in generics and extends in classes?
17. What are discriminated unions, and how do they help with type safety?
18. How do you type asynchronous functions and Promises in TypeScript?
19. What are ambient declarations (.[Link] files), and when are they needed?
20. How does TypeScript integrate with JavaScript libraries that don’t have type
definitions?
21. What is the difference between as type assertions and angle-bracket assertions?
22. How do you type a function that can accept different argument shapes?
23. What are index signatures, and when would you use them?
24. How does TypeScript support immutability patterns?
25. What are conditional types, and where are they useful?

JavaScript

1. What is the difference between var, let, and const?


2. How does JavaScript’s execution context work?
3. What is hoisting, and how does it affect variables and functions?
4. Explain closures and give a practical use case.
5. What is the difference between synchronous and asynchronous JavaScript?
6. How does the event loop work in JavaScript?
7. What are microtasks and macrotasks?
8. What is the difference between == and ===?
9. How does this behave in different contexts?
10. What are arrow functions, and how do they differ from regular functions?
11. Explain prototypal inheritance.
12. What is the prototype chain?
13. How does call, apply, and bind work?
14. What is event delegation, and why is it useful?
15. What are higher-order functions?
16. Explain map, filter, and reduce.
17. What is the difference between shallow copy and deep copy?
18. How can you clone an object in JavaScript?
19. What is debouncing and throttling?
20. How do promises work, and what problems do they solve?
21. What is async/await, and how does it improve readability?
22. How does error handling work in asynchronous code?
23. What are JavaScript modules, and how do import and export work?
24. What is the difference between CommonJS and ES modules?
25. What is memory leak in JavaScript, and how can it be prevented?
26. What is the Temporal Dead Zone (TDZ)?
27. How does JavaScript handle garbage collection?
28. What is currying, and when would you use it?
29. Explain immutability and why it matters in JavaScript.
30. What are Web Workers, and when should they be used?

[Link] (Intermediate)

1. What is the difference between functional components and class components?


2. How does React’s reconciliation process work?
3. What is the Virtual DOM, and why is it important?
4. What are hooks, and why were they introduced?
5. Explain the difference between useState and useReducer.
6. How does useEffect work, and what are common pitfalls?
7. What are dependency arrays in useEffect, and how do they affect re-renders?
8. What is memoization in React?
9. How do [Link], useMemo, and useCallback differ?
10. What causes unnecessary re-renders, and how do you prevent them?
11. What are controlled vs uncontrolled components?
12. How does lifting state up work?
13. What are keys in React lists, and why are they important?
14. How does context API work, and when should you use it?
15. What is the difference between props drilling and context?
16. How do refs work, and when would you use useRef?
17. What are error boundaries, and how are they implemented?
18. How do you handle forms and validation in React?
19. What is the difference between client-side rendering and server-side rendering in
React?
20. How do you manage side effects and cleanup in React?

[Link] (Intermediate)

21. What problems does [Link] solve compared to plain React?


22. Explain file-based routing in [Link].
23. What is the difference between pages router and app router?
24. What are Server Components, and how are they different from Client Components?
25. How does data fetching work in [Link]?
26. What is the difference between getStaticProps, getServerSideProps, and ISR?
27. How does [Link] handle SEO better than CSR apps?
28. What are API routes in [Link], and when would you use them?
29. What is middleware in [Link], and what are common use cases?
30. How does image optimization work in [Link]?
31. What is dynamic routing in [Link]?
32. How do environment variables work in [Link]?
33. How does authentication typically work in a [Link] app?
34. What is hydration, and why is it important in [Link]?
35. How do you handle redirects and rewrites in [Link]?
36. What are edge functions, and when should they be used?
37. How does [Link] handle code splitting and lazy loading?
38. What are layouts in [Link], and how do they improve structure?
39. How do you manage global state in a [Link] application?
40. What are common performance optimization techniques in React and [Link]?

[Link]

1. What is [Link], and how is it different from traditional server-side runtimes?


2. How does the [Link] event loop work?
3. What is the difference between blocking and non-blocking I/O?
4. How does [Link] handle concurrency with a single thread?
5. What are callbacks, and what problems do they introduce?
6. What are promises, and how do they improve asynchronous code?
7. How does async/await work internally?
8. What are streams in [Link], and what types of streams exist?
9. When would you use streams instead of buffers?
10. What is the difference between [Link]() and setImmediate()?
11. What are microtasks and macrotasks in [Link]?
12. How does error handling work in asynchronous [Link] code?
13. What is the purpose of the cluster module?
14. How does [Link] manage child processes?
15. What is middleware in [Link]?
16. How does Express handle request and response objects?
17. What is the difference between [Link]() and [Link]()?
18. How does routing work in Express?
19. How do you secure a [Link] application?
20. What is CORS, and how do you handle it in [Link]?
21. How do you manage environment variables in [Link]?
22. What is the difference between CommonJS and ES modules in [Link]?
23. How does [Link] handle memory management and garbage collection?
24. What are memory leaks in [Link], and how can you detect them?
25. What is the purpose of [Link] and [Link]?
26. What are semantic versioning rules in npm?
27. How does npm caching work?
28. What is a RESTful API, and how do you design one in [Link]?
29. How do you handle file uploads in [Link]?
30. What is rate limiting, and how would you implement it?
31. How do you log and monitor a [Link] application?
32. What is graceful shutdown, and why is it important?
33. How do you handle authentication and authorization in [Link]?
34. What is the difference between stateless and stateful APIs?
35. How do you scale a [Link] application?

PostgreSQL (Intermediate)

1. What are the main differences between PostgreSQL and other relational databases?
2. What is the difference between WHERE and HAVING?
3. How do indexes work in PostgreSQL?
4. What types of indexes does PostgreSQL support?
5. When should you avoid using indexes?
6. What is the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL
JOIN?
7. How does PostgreSQL handle transactions?
8. What is ACID, and how does PostgreSQL ensure it?
9. What are isolation levels, and how do they affect concurrency?
10. What is MVCC, and why is it important in PostgreSQL?
11. What is the difference between DELETE, TRUNCATE, and DROP?
12. What are CTEs (WITH queries), and when should you use them?
13. What is the difference between a subquery and a CTE?
14. How do constraints like PRIMARY KEY, UNIQUE, and FOREIGN KEY work?
15. What are database migrations, and how do you manage them?
16. How does PostgreSQL handle JSON and JSONB data?
17. What is the difference between JSON and JSONB in PostgreSQL?
18. How do you optimize slow queries in PostgreSQL?
19. What is EXPLAIN and EXPLAIN ANALYZE?
20. How do you handle pagination efficiently in PostgreSQL?
21. What are views and materialized views?
22. When would you use a materialized view?
23. How does PostgreSQL handle full-text search?
24. What is table partitioning, and when is it useful?
25. How do you handle backups and restores in PostgreSQL?

MongoDB (Intermediate)

26. What is MongoDB, and how is it different from relational databases?


27. What is a document in MongoDB?
28. What is the difference between a document and a collection?
29. How does MongoDB handle schema design?
30. What are embedded documents vs referenced documents?
31. When should you embed data, and when should you reference it?
32. What is an index in MongoDB, and how does it work?
33. What types of indexes does MongoDB support?
34. How do compound indexes work?
35. What is the aggregation pipeline?
36. What are common aggregation stages like $match, $group, and $project?
37. What is the difference between find() and aggregate()?
38. How does MongoDB handle transactions?
39. What is write concern and read concern?
40. What is replication in MongoDB?
41. What is a replica set?
42. How does sharding work in MongoDB?
43. What is the role of the primary and secondary nodes?
44. How do you handle data consistency in MongoDB?
45. How do you optimize query performance in MongoDB?
46. What is the difference between updateOne, updateMany, and replaceOne?
47. What are MongoDB change streams?
48. How do you handle pagination in MongoDB?
49. How do you secure a MongoDB database?
50. When would you choose PostgreSQL over MongoDB, and vice versa?

Docker (Intermediate)

1. What problem does Docker solve?


2. What is the difference between an image and a container?
3. How does a Dockerfile work?
4. What are Docker layers, and why are they important?
5. What is the difference between CMD and ENTRYPOINT?
6. What is a multi-stage Docker build, and why would you use it?
7. How do you reduce Docker image size?
8. What is Docker Compose, and when would you use it?
9. What is the difference between Docker volumes and bind mounts?
10. How does networking work in Docker?
11. What is the difference between COPY and ADD?
12. How do you manage environment variables in Docker?
13. What are common Docker security best practices?
14. How do you debug a failing Docker container?
15. How does Docker handle logging?

CI/CD – GitHub Actions (Intermediate)

16. What is CI/CD, and why is it important?


17. How does GitHub Actions work?
18. What are workflows, jobs, and steps in GitHub Actions?
19. What are runners in GitHub Actions?
20. How do you trigger workflows in GitHub Actions?
21. How do you manage secrets in GitHub Actions?
22. What is a matrix build, and when would you use it?
23. How do you cache dependencies in GitHub Actions?
24. How do you deploy an application using GitHub Actions?
25. How do you handle environment-specific deployments?
26. What is the difference between CI and CD pipelines?
27. How do you roll back a failed deployment?
28. How do you integrate testing into a CI/CD pipeline?
29. What are common CI/CD pipeline failures?
30. How do you version artifacts in a CI/CD workflow?

Kubernetes (Intermediate)

31. What is Kubernetes, and what problems does it solve?


32. What is the difference between a Pod and a Container?
33. What is a Node in Kubernetes?
34. What is a Deployment, and how does it work?
35. What is a Service, and what types of services exist?
36. What is the difference between ClusterIP, NodePort, and LoadBalancer?
37. What are ConfigMaps and Secrets?
38. How does Kubernetes handle scaling?
39. What is Horizontal Pod Autoscaling (HPA)?
40. What are liveness and readiness probes?
41. What is rolling update vs recreate strategy?
42. How does Kubernetes handle self-healing?
43. What are namespaces, and why are they useful?
44. What is an Ingress, and how does it work?
45. How does Kubernetes manage networking between pods?
46. What is Helm, and why is it used?
47. How do you debug issues in a Kubernetes cluster?
48. What is the difference between stateful and stateless applications in Kubernetes?

RabbitMQ / Queuing Systems (Intermediate)

49. What is RabbitMQ, and what problem does it solve?


50. What is message queuing?
51. What is the difference between a queue and an exchange in RabbitMQ?
52. What types of exchanges does RabbitMQ support?
53. What is a routing key?
54. What is the difference between point-to-point and pub/sub messaging?
55. What is message acknowledgment, and why is it important?
56. What happens when a consumer crashes before acknowledging a message?
57. What is a dead-letter queue (DLQ)?
58. How do you handle message retries and failures?
59. What is message durability and persistence?
60. How does RabbitMQ handle ordering of messages?
61. What is prefetch count, and how does it affect performance?
62. How do you scale consumers in RabbitMQ?
63. What are common RabbitMQ use cases?
64. How do you monitor and debug RabbitMQ issues?
Test-Driven Development (TDD)

1. What is Test-Driven Development (TDD)?


2. What are the main steps in the TDD cycle?
3. What are the benefits and drawbacks of using TDD?
4. How is TDD different from traditional testing approaches?
5. What types of tests are commonly written in TDD?
6. How do you decide what to test first in TDD?
7. What is the difference between unit tests and integration tests?
8. How do you handle refactoring in TDD?
9. What is test coverage, and how much coverage is enough?
10. What are common mistakes teams make when practicing TDD?

Testing Frameworks – Jest (Intermediate)

11. What is Jest, and why is it commonly used?


12. How does Jest differ from other testing frameworks like Mocha or Jasmine?
13. What is the difference between describe, it, and test in Jest?
14. How do mocks and spies work in Jest?
15. What is the difference between mock, spyOn, and manual mocks?
16. How do you test asynchronous code in Jest?
17. What are snapshot tests, and when should you use them?
18. How do you test API calls or external services in Jest?
19. What is code coverage in Jest, and how do you generate it?
20. How do you handle setup and teardown in Jest?
21. How do you test error scenarios in Jest?
22. What are fake timers in Jest, and when would you use them?
23. How do you structure tests in a large codebase?

Microservices Architecture (Intermediate)

24. What is microservices architecture?


25. How is microservices architecture different from a monolithic architecture?
26. What are the advantages and challenges of microservices?
27. How do microservices communicate with each other?
28. What is service discovery?
29. What is API Gateway, and why is it used?
30. How do you handle data consistency in microservices?
31. What is eventual consistency?
32. How do you manage transactions across multiple services?
33. What is the Saga pattern?
34. How do you handle versioning in microservices APIs?
35. How do you secure communication between microservices?
36. How do you monitor and log microservices?
37. What are common failure scenarios in microservices?
38. How do you test microservices?
Serverless Technologies (Intermediate)

39. What is serverless architecture?


40. How does serverless differ from traditional server-based architecture?
41. What are the benefits and limitations of serverless?
42. What are cold starts, and how do they affect performance?
43. How does scaling work in serverless platforms?
44. How do you manage environment variables and secrets in serverless applications?
45. How does logging and monitoring work in serverless systems?
46. How do you handle state in serverless applications?
47. What are common use cases for serverless?
48. How do you deploy serverless applications?

Event-Driven Architectures (Intermediate)

49. What is event-driven architecture?


50. What is the difference between events and messages?
51. What are producers and consumers?
52. What is the difference between event streaming and message queues?
53. How does event-driven architecture improve scalability?
54. What is eventual consistency in event-driven systems?
55. What are idempotent consumers, and why are they important?
56. How do you handle event versioning?
57. What is event ordering, and why is it challenging?
58. What are common failure handling strategies in event-driven systems?
59. How do you test event-driven applications?
60. When would you choose event-driven architecture over request-response?

Identifying & Resolving Technical Challenges

1. How do you approach debugging a production issue?


2. What steps do you take when an application suddenly starts failing under load?
3. How do you identify the root cause of a performance issue?
4. How do you handle incidents when logs are insufficient?
5. What tools do you use for monitoring and troubleshooting?
6. How do you prioritize multiple critical bugs?
7. How do you handle intermittent or non-reproducible bugs?
8. How do you ensure fixes don’t introduce regressions?
9. How do you debug memory leaks in a web application?
10. How do you collaborate with other teams during a major incident?

Web Security Practices (Intermediate)


11. What are common web application security vulnerabilities?
12. What is XSS, and how do you prevent it?
13. What is CSRF, and how does it work?
14. What is SQL injection, and how do you prevent it?
15. What is authentication vs authorization?
16. How do you securely store passwords?
17. What is HTTPS, and why is it important?
18. What are security headers, and which ones are commonly used?
19. How do you handle sensitive data in logs?
20. What is rate limiting, and how does it improve security?
21. How do you protect APIs from abuse?
22. What is CORS, and what security risks does it address?
23. How do you manage secrets and API keys securely?
24. How do you handle security updates and vulnerabilities in dependencies?
25. What is the principle of least privilege?

Performance Tuning (Intermediate)

26. How do you identify performance bottlenecks in a web application?


27. What metrics do you monitor for performance?
28. How does caching improve performance?
29. What types of caching strategies exist?
30. What is CDN, and how does it improve performance?
31. How do you optimize database queries?
32. What is N+1 query problem?
33. How do you improve frontend performance?
34. What is lazy loading, and when should you use it?
35. How do you reduce API response times?
36. How does connection pooling help performance?
37. What is load testing, and why is it important?

Scaling Web Applications (Intermediate)

38. What is horizontal vs vertical scaling?


39. How do you design an application to scale?
40. What challenges arise when scaling a web application?
41. How does load balancing work?
42. What is stateless architecture, and why is it important for scaling?
43. How do you handle session management at scale?
44. What role does caching play in scaling?
45. How do databases scale?
46. What is database sharding?
47. What is eventual consistency, and why is it relevant to scaling?
48. How do you handle background jobs at scale?
49. How do you ensure high availability?
50. How do you handle traffic spikes?

You might also like