Tech Jargon - Decoded
الذهاب إلى القناة على Telegram
Confused by tech terms? Don’t worry, we’ve got you 🤝 We make things simple, one concept at a time. Learn daily Easy & clear Turn Confusion into clarity. #tech #it #softwareengineer #cs #development
إظهار المزيد1 916
المشتركون
لا توجد بيانات24 ساعات
-167 أيام
-4430 أيام
أرشيف المشاركات
What is a Pod?
A Pod is the smallest unit you can create and manage in Kubernetes. It represents a single instance of a running process in your cluster and acts as a wrapper for one or more containers.
How it works:
• It groups containers together on the same host (Node).
• All containers inside a Pod share the same IP address and port space.
• They can communicate with each other using
localhost.
• They share the same storage volumes and network namespace.
Problem it solves:
Managing tightly coupled containers separately is difficult. A Pod ensures that related containers are always scheduled, started, and stopped together as a single atomic unit, handling the networking between them automatically.
Use Case:
A main application container runs alongside a helper container that pulls updated configuration files. Because they are in the same Pod, they share a volume where the helper saves files and the app reads them instantly.What is Kubernetes (K8s)?
It is an orchestration platform that automates the deployment, scaling, and management of containerized applications.
How it works:
• You define a Desired State (e.g., "run 5 instances of this app").
• The Control Plane monitors the cluster.
• Nodes (worker machines) run the actual containers.
• K8s constantly checks if the actual state matches your config. If a container crashes, it restarts it automatically.
Problems it solves:
• Manual Monitoring: Replaces humans in checking if apps are running.
• Downtime: Handles rollouts and rollbacks without stopping the service.
• Resource Waste: Packs containers efficiently into hardware to save costs.
Simple Scenario:
If you need 4 copies of a service and one server fails, K8s automatically moves those containers to a healthy server to keep the count at 4.
What is a Container?
A container is a lightweight, standalone package that bundles an application's code together with all the specific libraries, configurations, and dependencies required to run it.
How does it work?
• It shares the host operating system's kernel instead of creating a full virtual OS.
• It uses "isolation" to run the app in a private space where it cannot see or interfere with other apps.
• Since it doesn't boot an entire OS, it starts instantly and uses very little memory.
Problem solved:
It solves the "it works on my machine" issue. It ensures the software runs exactly the same way, regardless of whether it is on a developer's laptop or a production server.
Use Case:
If your app needs
Python 3.10 but the server only has Python 2.7, the container carries its own 3.10 version inside. The app runs perfectly without needing any changes to the server's settings.What is Docker?
Docker is a tool that packages code, libraries, and all dependencies into a single unit called a Container.
Problem it solves:
It eliminates the "It works on my machine" issue. It ensures that an application runs exactly the same way in development, testing, and production environments without dependency conflicts.
How it works:
• Dockerfile: A script containing commands to assemble an image.
• Image: A read-only blueprint of the application environment.
• Container: A live, isolated process where the image runs.
Unlike Virtual Machines, Docker shares the host OS kernel instead of bundling a full OS, making it lightweight and fast.
Scenario:
If your app needs Node.js v18 and specific libraries, you define them in a Dockerfile. When you move this to a server, Docker sets up that exact environment automatically, so you don't have to install anything manually.
What is Throttling?
Throttling is a technique used to limit the execution of a function to once every fixed time interval.
How it works:
• When an event is triggered, the code runs immediately.
• A timer or "lock" is set for a specific duration (e.g., 1000ms).
• While this timer is active, any new incoming triggers are ignored.
• Once the timer expires, the function becomes available to run again.
Problem it solves:
It prevents performance lag and system crashes by stopping high-frequency events from firing too many times in a short period.
Simple Scenario:
If a user clicks a "Submit" button 10 times in one second, throttling ensures the server receives only 1 request, ignoring the other 9 until the cooldown period ends.
What is Debouncing?
It is a programming technique used to ensure that a function is not called too frequently. It forces the function to wait for a specific period of inactivity before executing.
Working:
• An event (like a keypress) triggers a timer.
• If the same event occurs again before the timer finishes, the old timer is cleared.
• A new timer starts from scratch.
• The actual function only runs once the timer finally hits zero without being interrupted.
Problem Solved:
It prevents performance lag and "server spam" by stopping a function from running hundreds of times per second during rapid actions.
Use Case:
In a search input field, debouncing waits for the user to stop typing for 300ms before making an API call, rather than searching for every single letter.
What is a Closure?
A closure is a function that "remembers" the variables of its outer scope even after that outer scope has finished executing.
How it works:
- You define a function inside another function.
- The inner function uses a variable from the outer function.
- Even when the outer function is done, the inner function keeps a reference to those variables in memory.
Problem Solved:
It solves the issue of Global Scope Pollution. It allows you to create "private" variables that can't be accessed or modified from the outside, keeping your data secure and isolated.
Use Case:
If you need a
counter that only one specific function can increase, you wrap the variable and the function inside a closure. This prevents other parts of the code from accidentally changing the count.What is Hoisting in JavaScript?
Hoisting is a behavior where the JS engine moves variable and function declarations to the top of their containing scope before the code actually runs.
How it works:
• During the creation phase, JS scans the code and allocates memory for declarations.
• var: The declaration is moved up and initialized as undefined.
• let & const: These are hoisted but stay uninitialized in a "Temporal Dead Zone." Accessing them before declaration causes an error.
• Functions: Full function declarations are moved to the top, including their entire body.
Problem it solves:
It removes the strict need to define functions before calling them. This allows you to place main logic at the top of a file and helper functions at the bottom, making the code easier to read.
What is a Call Stack?
The Call Stack is a mechanism used by programming engines to keep track of function execution. It works on the LIFO (Last In, First Out) principle, meaning the last function added is the first one to be completed.
How it works:
• When a function is invoked, it is pushed onto the stack.
• The engine starts executing the code of that function.
• If that function calls another one, the new one is pushed on top.
• When a function finishes, it is popped off, and the engine moves back to the function below it.
Problem it solves:
It solves the issue of execution context. It ensures the program "remembers" exactly where to return after a nested function finishes, preventing the code from getting lost.
Simple Scenario:
If
First() calls Second():
1. First() is pushed to the stack.
2. Second() is pushed on top of First().
3. Second() completes and is removed.
4. The engine returns to First() to finish its remaining code.
5. First() is removed once done.What is the Event Loop?
It is a mechanism that allows JavaScript to perform non-blocking operations despite being single-threaded. It manages the execution of multiple chunks of your script over time.
How it works:
• Call Stack: Executes your synchronous code line by line.
• Web APIs: Handles async tasks (like timers or fetches) in the background.
• Task Queue: Holds the callbacks of finished async tasks.
• The Loop: It constantly checks if the Call Stack is empty. If empty, it picks the first task from the Queue and pushes it to the Stack to run.
Problem solved:
It prevents "blocking." Without it, a slow task would freeze the entire program, making it unresponsive until that task finishes.
Use case:
When calling
setTimeout(), the timer runs in the background. The Event Loop ensures your main code keeps running and only executes the timer's callback once the stack is clear.What is Tree Shaking?
Tree shaking is a optimization technique used to remove "dead code" from your JavaScript bundle. It ensures that only the code you actually use gets sent to the user's browser.
How it works:
• It relies on Static Analysis of ES6
import and export statements.
• The bundler (like Webpack or Vite) tracks which functions or variables are being called.
• During the build process, it identifies exported code that has no references.
• These unused pieces are "shaken off" and excluded from the final production file.
Problem it solves:
It prevents bundle bloat. Without it, even if you use one line from a massive library, the whole library would be included, making your website slow to load.
Use case:
If you have a file math.js with 20 different utility functions, but your app only imports add(), tree shaking will automatically delete the other 19 functions from your final build.What is Bundling?
Bundling is the process of merging multiple source code files (like JavaScript or CSS) into a single file (or a small group of files) to be delivered to the browser.
How it works:
• Dependency Mapping: The bundler starts at an entry file and follows every
import or require statement to find all related files.
• Code Merging: It pulls the code from all these separate modules and places them into one file in the correct execution order.
• Compression: It removes unnecessary whitespace, comments, and unused code to make the final file as small as possible.
Problem it solves:
It prevents the browser from making dozens of separate HTTP requests for every small script. Loading one large file is much faster than loading 50 tiny ones.
Simple Scenario:
If your project has auth.js, api.js, and index.js, the bundler combines them into one bundle.js file so the browser only has to download that single file to run the entire app.What is Code Splitting?
It is a technique used to break a single large JavaScript bundle into smaller, manageable chunks. Instead of making users wait for the entire app to download at once, the browser only fetches the code needed for the current screen.
How it works:
- Bundlers (like Webpack or Vite) identify dynamic
import() statements.
- The app is split into multiple separate .js files.
- When a user navigates to a specific route, the app triggers a network request to fetch that specific chunk.
- The browser then executes the new code on-the-fly.
Problems Solved:
- Prevents slow "Time to Interactive" on heavy websites.
- Reduces the initial download size significantly.
- Stops the browser from processing unused JavaScript.
Scenario:
A user lands on your Landing Page. Instead of downloading the 500KB code for the "User Dashboard," they only download 50KB for the landing page. The Dashboard code stays on the server until they actually log in.What is Lazy Loading?
It is a optimization strategy that delays the loading of resources until they are actually needed or visible to the user.
How it works:
• The application loads only the essential "critical" parts first.
• Non-essential assets (like images or script chunks) are replaced with tiny placeholders.
• The system monitors user actions, such as scrolling.
• When a resource enters the viewport, the browser triggers a network request to fetch the actual data and swaps the placeholder.
Problems it solves:
• Slow Initial Load: Prevents the page from freezing while waiting for heavy files.
• Data Waste: Saves bandwidth by not downloading content the user never reaches.
• High Memory Usage: Keeps the device RAM free by only processing active elements.
Simple Scenario:
In a gallery app, the browser only fetches the first 5 images you see. The remaining 100 images are only downloaded as you scroll down to them.
What is Static Site Generation (SSG)?
SSG is a web development method where your website pages are pre-built into static HTML files at "build time" before any user actually visits the site.
How it works:
- You write your code and content.
- During the build process, the generator combines your data and templates.
- It produces a finished HTML file for every single route/page.
- These files are stored on a server or CDN.
- When a user requests a page, the server instantly sends the pre-made file.
Problems it solves:
- Slow Performance: No waiting for a database to respond or a server to process code on every click.
- Security: Since there is no live database connection or backend running, the attack surface is tiny.
- SEO: Search engines get fully rendered content immediately.
Use Case:
For a documentation site, 50 pages are generated as 50 separate HTML files during deployment. When a developer clicks a link, the server just hands over the existing file.
What is Server-Side Rendering (SSR)?
SSR is a technique where the server handles the logic of generating a fully-formed HTML page and sends it to the browser ready to be displayed.
The Process:
• Browser requests a specific page.
• Server fetches data from the database.
• Server converts the code and data into a complete HTML file.
• Browser receives the finished file and renders it instantly.
• JavaScript then loads to make the page interactive.
Problems it solves:
• SEO: Since the content is in the HTML, search engine bots can index the site easily.
• Slow Devices: The user's device doesn't have to work hard to build the page, preventing "blank screen" delays.
Simple Scenario:
Necessary for high-traffic landing pages where immediate content visibility is required for search engine ranking.
What is Client Side Rendering (CSR)?
CSR is a method where your browser (the client) creates the final webpage on your screen using JavaScript.
How it works:
• The server sends an almost empty HTML file and a script bundle.
• The browser downloads the script and executes it.
• This script fetches data and builds the UI directly in the browser.
• The content appears only once the script finishes running.
Problem it solves:
It reduces server pressure and removes the need for full page refreshes when navigating between different sections of a site.
Simple Scenario:
In a data dashboard, clicking a "Filter" button updates the charts instantly via JS without the browser having to reload the whole page from the server.
What is Hydration in Web Development?
It is the process where client-side JavaScript attaches event listeners and state to a static HTML page that was previously rendered on the server.
How it works:
• The server sends a pre-rendered HTML file to the browser.
• The browser displays this HTML immediately (users see content fast).
• The JavaScript bundle loads and "walks" through the existing DOM.
• It matches the HTML elements with the component logic.
• It binds event listeners (like clicks or scrolls) to those elements.
Problem it solves:
• Slow First Paint: Prevents users from staring at a blank screen while JS loads.
• SEO: Ensures search engines can read the content without executing JavaScript.
Use Case:
A "Like" button is visible on page load from the server HTML. Hydration connects the
onClick function to that button so it actually increments the count when clicked.What is Reconciliation?
It is the process of comparing two separate sets of records to ensure they are consistent, accurate, and in agreement.
How it works:
• You take data from two different sources (Source A and Source B).
• Match entries line-by-line based on a common identifier.
• Flag any "orphans" (entries that exist in one list but not the other).
• Check if the specific values for matching entries are identical.
• Resolve differences until the final balances match.
Problem it solves:
It prevents data "drift" where systems show conflicting information. It catches missing entries, duplicate records, and human or system errors that lead to incorrect totals.
Use case:
If System X logs 10 completed tasks but System Y only shows 8, reconciliation identifies the 2 missing logs so they can be added to keep both systems synced.
What is Virtual DOM?
It is a lightweight, JavaScript representation of the actual DOM. It lives in the memory and acts as a middle layer between the code and the browser's UI.
The Problem it Solves:
Manipulating the Real DOM is slow and expensive. Whenever a small change occurs, the browser often re-calculates the layout and styles for the entire page, which kills performance.
How it works:
• Step 1: When data changes, a new Virtual DOM tree is created.
• Step 2 (Diffing): This new tree is compared with the previous version to find exactly what changed.
• Step 3 (Reconciliation): Only the specific changes are pushed to the Real DOM, instead of re-rendering everything.
Scenario:
Updating a single "Like" count on a post. Instead of refreshing the whole post and its comments, the Virtual DOM identifies only the number changed and updates just that specific node.
