Software Engineering Flashcards
How does version control, specifically Git, facilitate collaborative software development?
Git allows multiple developers to work on a project simultaneously, managing changes, merging, and maintaining a history of revisions.
What is the difference between a thread and a process?
A process is an independent program; a thread is a lightweight, independent unit of execution within a process.
How does a hash table work, and what is its time complexity for common operations?
A hash table uses a hash function to map keys to indices; time complexity for search, insertion, and deletion is generally O(1) on average.
Explain the concept of polymorphism in object-oriented programming.
Polymorphism allows objects to be treated as instances of their parent class, promoting code reusability and flexibility.
Animal. Make Sound
How does garbage collection work in programming languages like Java or JavaScript?
Garbage collection automatically identifies and removes unreferenced objects to free up memory.
Explain the concept of Dependency Injection in software design.
Dependency Injection facilitates loose coupling by injecting dependencies into a class rather than creating them internally.
const loggerInstance = new Logger(); const productService = new ProductService(loggerInstance);
What is the purpose of CORS (Cross-Origin Resource Sharing) in web development?
CORS allows or restricts web resources requested from a different domain, enhancing security and preventing unauthorized access.
Explain the concept of a closure in JavaScript.
A closure is a function that remembers the variables from its outer scope even after the outer function has finished executing.
How does the event loop work in JavaScript?
The event loop manages the execution of tasks in a non-blocking way
Call Stack: Executes synchronous tasks.
Web APIs & Callback Queue: Handle asynchronous tasks.
Event Loop: Monitors Call Stack and Callback Queue.
Explain the concept of a design pattern in software development
A design pattern is a reusable solution to a common problem in software design, providing a template for solving specific issues.
What is the purpose of the “this” binding in JavaScript arrow functions?
Arrow functions inherit the “this” value from their enclosing scope, eliminating the need for explicit binding.
Arrow functions in JavaScript lexically capture the this
value, maintaining the context from their surrounding scope. This contrasts with regular functions, where this
is dynamically determined, potentially leading to unexpected behavior.
Explain the concept of a NoSQL database, and provide an example.
NoSQL databases store and retrieve data using non-tabular models. Example: MongoDB, which uses a document-oriented model.
Explain the concept of a NoSQL database, and provide an example.
What is monolithic programming
Single Unified codebase
Django, WordPress
.Cons:Scalability challenges.Limited technology flexibility.Pros:Simplicity in development.Easier to manage in smaller projects.
4 advantages of Nodejs in comparison with Java
Asynchronous Nature:Event-driven, non-blocking
Unified Language:JavaScript for frontend and backend.
Fast Execution:V8 engine performance.
Lightweight and Fast Startup:Suitable for microservices and serverless. Less resources
3 advantages of using Java versus node JS
Enterprise-Level Scalability
Native Threads Support
Java Memory Model
what is grpc and its feature
Remote Procedure Call
- it’s open source by Google
- it uses HTTP 2 for transport
- protocol buffers (binary data transfer)
- it’s bio-directional streaming
- efficient for serialization
- it’s language agnostic
- microsevices communication