Open/closed principle
medium 55 minCode should be open for extension and closed for modification: a new kind of thing arrives as new code, and the code that already works stays as it is.
Code should be open for extension and closed for modification: a new kind of thing arrives as new code, and the code that already works stays as it is.