Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "overkill"? [closed]

Tags:

terminology

Programmers often wonder if the use of a certain library or programming style is overkill. They also often claim that this is the case (and they are often believed).

What does "overkill" mean in the context of programming?

like image 712
Jean-Paul Calderone Avatar asked Mar 27 '26 17:03

Jean-Paul Calderone


2 Answers

"overkill" is typically used to mean deploying overly flexible and/or over-engineered solutions to solve what is ostensibly a simple and highly localized problem. The canonical example is FizzBuzz Enterprise Edition.

like image 96
Williham Totland Avatar answered Apr 02 '26 21:04

Williham Totland


The term "Overkill" literarilly (if there was ever a literal use of it) refers to the action of killing something or someone, with more resources than necessary. Something like shooting a deer 50 times to make sure it dies.

In programming it applies for the same principle: making use of more resources than necessary or to find an overly complex solution to a simple problem.

Some simple examples are

for i=1 to 100
   x[i]=2^z[i];
   y=x;    
end

Where copying the entire array x in every iteration step achieves the desired result but you could also copy it elementwise y[i]=x[i] saving you some 900 operations and is thus an overkill.

Using the OpenCV library to threshold an image is definetley possible but uses many more resources than strictly necessary and is an exagerated example of an overkill.

like image 27
McMa Avatar answered Apr 02 '26 22:04

McMa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!