KISS
This design principle favors the easiest solution to understand and maintain that still meets the requirements. The shortest solution is not necessarily the simplest.
Also known as: Keep It Simple, Stupid
What KISS means
KISS stands for “Keep It Simple, Stupid.” In software development, it means choosing a solution that does the required job without making the next person work harder than necessary to understand or change it. A design may look simple in one file while pushing the hard parts into configuration, callers, or deployment.
How to apply it
Start by writing down what the solution must handle: normal inputs, edge cases, and any constraints on speed or reliability. Then trace a realistic change through each design. Where would you edit a business rule? How many places would need to agree? Could you verify the new behavior with a focused test? These questions reveal more than counting classes or lines of code.
Abstraction is not the enemy. A well-named function can let callers use a rule without relearning its details. An interface with a single implementation can make sense if it isolates an external system, but an interface that only forwards a call can force readers to jump between files without clarifying anything.
Example: choosing a data structure
Suppose a function returns the IDs from a request that aren't in a collection of known IDs. It must preserve request order and keep repeated unknown IDs. If the known IDs arrive as a list of strings and there are many membership checks, a set makes the lookup straightforward:
def unknown_ids(requested, known):
known_ids = set(known)
return [item_id for item_id in requested if item_id not in known_ids]
The set is used only for lookup, so the result still follows the request order and preserves duplicates. Building it costs extra memory, but each lookup is typically constant time rather than a scan through the known IDs. Returning a set difference might look shorter, but it would discard duplicates and would not preserve the required order.
Where it helps and what it doesn't mean
Use KISS in code review, API design, and architecture discussions. Before adding a queue to a synchronous operation, name the requirement that justifies it. Handling work after the request ends can be a good reason, but the queue also adds another component to operate and raises questions about retries and duplicate jobs.
KISS is not a reason to skip necessary checks or ignore performance constraints. It also answers a different question from YAGNI: YAGNI asks whether you need a capability now; KISS asks how to implement the capabilities you need. Likewise, blindly applying DRY can make code harder to follow if it combines two similar-looking rules that change independently.
How it comes up in interviews
When asked why you chose a direct implementation over a pattern, tie your answer to the requirements rather than saying that patterns are bad. Describe what the direct version makes easy today and give a concrete example of a change that would justify a different design.