What does CLI stand for, and what is its purpose in server-side development?
Command Line Interface. It allows developers to interact with a program directly through commands, often used for running scripts or managing backend tasks.
Name two basic data structures used to organize data in an application.
List/Array and Dictionary/Map (or Set).
What does REST stand for?
Representational State Transfer.
What does responsive design mean?
Designing web pages to adapt to different screen sizes and devices for usability and readability.
What is unit testing, and why is it used?
Testing individual functions or components to ensure they work as expected.
What does ERD stand for, and why is it used in database design?
Entity Relationship Diagram. It visually represents entities, their attributes, and relationships, helping to plan database structure.
What is Big-O notation used for in algorithm design?
It measures algorithm efficiency, describing how runtime or space usage scales with input size.
Name four main HTTP verbs and their typical use cases.
GET (retrieve data),
POST (create data),
PUT (update entire record),
DELETE (remove record).
What is the difference between Flexbox and CSS Grid in layout design?
Flexbox handles one-dimensional layouts (row or column). Grid handles two-dimensional layouts (rows and columns).
What's the difference between unit testing and integration testing?
Unit tests check single functions in isolation. Integration tests verify how multiple components interact and work together.
What’s the difference between a primary key and a foreign key in MySQL?
Primary key: uniquely identifies a record in a table. Foreign key: links a record in one table to a primary key in another table.
How does binary search improve on linear search in terms of efficiency?
Binary search cuts the search space in half each step (O(log n)), while linear search checks each element (O(n)).
What does it mean when we say a REST API is stateless?
Each request is independent and contains all the necessary information; the server doesn't remember previous requests.
What's the difference between localStorage and sessionStorage?
Both store key-value data in the browser.
localStorage persists after closing the browser.
sessionStorage is cleared when the tab is closed.
What does TDD stand for, and how does it guide development?
Test-Driven Development. Developers write tests before writing code, ensuring functionality is validated early.
Describe one key advantage of relational databases over file-based JSON storage.
Relational databases support structured queries (SQL), relationships, and data integrity constraints, while JSON storage is simpler but lacks relational enforcement.
What's the time complexity of bubble sort, and why is it inefficient?
O(n²) because it repeatedly compares and swaps elements in nested loops.
What is JWT, and why is it important for API security?
JSON Web Token. It’s a compact token used for authentication and authorization, eliminating the need to store user sessions on the server.
Write a short JavaScript snippet to store and retrieve a JSON object from localStorage.
localStorage.setItem("user", JSON.stringify({name: "EWD"})); const user = JSON.parse(localStorage.getItem("user"));
Name one testing framework used for JavaScript or Python.
JavaScript: Jest or Mocha. Python: Pytest or Unittest.
Explain how a server receives a client request, processes it, and stores the data in a MySQL database.
The client sends an HTTP request to the server → server parses the request → executes SQL queries to store data in MySQL → returns a response (e.g., success message or data).
Describe a real example of using an algorithm to optimize how an API retrieves or sorts data.
Using merge sort to order results before returning them via API,
binary search to locate specific records quickly in a large dataset.
Explain what idempotency means, and give an example of an idempotent API request.
Performing the same operation multiple times gives the same result. Example: PUT /users/1 updates a user; repeating it doesn't change the outcome.
List two techniques to make a webpage more accessible and load faster.
Use semantic HTML and alt text for accessibility.
Use image compression and minified CSS/JS for speed.
Describe the main steps in deploying a full-stack web application to production.
Build and test the app → package it (e.g., Docker) → configure environment variables → push to a server or cloud → run deployment scripts → monitor live app