Complexity Analysis
You wrote a feature that works perfectly on your local machine with 500 records. Then it gets deployed and runs against 50,000 records in production. Response time goes from 200 milliseconds to ove...
You wrote a feature that works perfectly on your local machine with 500 records. Then it gets deployed and runs against 50,000 records in production. Response time goes from 200 milliseconds to ove...
Consider a program that manages songs: you can search them, read details, and discover interesting facts about each. There would probably be a class that searches for those songs by asking some ext...
Object-oriented programming is a paradigm that organizes code around objects, each combining state (fields) and behavior (methods). Objects interact through well-defined interfaces, and the paradig...
Concurrency and parallelism are often confused, but they describe fundamentally different things. Parallelism is about doing multiple things at the same time. Concurrency is about structuring a pro...
In the object-oriented paradigm, coupling refers to the degree of direct knowledge that one element has of another. We generally divide coupling into tight and loose. We can refer to monolith arch...
Business rules rarely stay fixed. The conditions under which a shipment can be rerouted, an order approved, or a discount applied often vary by vendor, market, or regulatory environment. When those...
Depth First Search [DFS] Imagine you are searching for a file buried somewhere deep in a nested folder structure. You would not check every folder at the top level first. Instead, you would pick a...
Introduction Nowadays most people perceive monoliths as something bad and microservices as something that must be adopted. The truth is that both have their pros and cons, and the right choice dep...
The Problem Some resources should exist exactly once in an application. A database connection pool, a thread-safe cache, or a logging configuration are examples where creating a second instance wo...
Constructors in Java have a fundamental limitation: they must be named after the class. If a class needs to be created in different ways, you end up with multiple constructors that differ only in t...