Imagine you are asked to build a login system.
Requirement:
Validates username and password.
A junior developer creates:
class UserAuthenticationStrategyFactoryProvider
{
public:
static std::unique_ptr<
AuthenticationStrategyFactory
> createFactory(...)
{
...
}
};After several layers:
Factory
-> Factory Factory
-> Strategy
-> Provider
-> ManagerFinally:
bool authenticate(
const std::string& user,
const std::string& password
);is called.
Another developer writes:
class Authenticator
{
public:
bool authenticate(
const std::string& username,
const std::string& password
);
};Both solves the problem.
One creates unnecessary complexity.
The other creates clarity.
This distinction is the foundation of: KISS
Historcial Background
KISS originated in engineering and military design.
The concept is often attributed to: Keylly Johnson
who led development of advanced aircraft at Lockheed Corporation.
The philosophy:
Systems work best when they are kept simple rather than made unnecessarily complicated.
Software engineering later adopted this idea because engineering repeatedly discovered:
Most failures come from complexity.
Not from simplicity.
Official Definition
KISS stands for:
Keep It Simple, Stupid
A more professional interpretation:
Keep It Simple
Meaning:
Prefer the simplest design that correctly solves the problem.
Notice:
It does NOT say:
Use the shortest code.It does NOT say:
Ignore architectureIt does NOT say:
Avoid abstractionsIt says:
Avoid unnecessary complexityThe Core Problem: Complexity
Software complexity grows naturally.
Every new:
Class
Interface
Module
Service
Pattern
Dependencyadds complexity.
Complexity has costs.
Harder to Understand
Harder to Debug
Harder to Extend
Harder to Test
Harder to RefactorA major responsibility of software designers is:
Managing Complexity
Leave a comment
Your email address will not be published. Required fields are marked *


