DEV Community

Discussion on: Bad, Bad Code!

Collapse
 
stereobooster profile image
stereobooster

you will say ”this code is bad”

I don't say this is a "bad code". I say it is hard to work with this code (for me). And the next thing I try to figure out why is it hard, is it bad abstraction, is it due to changed requirements, is it misleading naming (maybe I interpret code differently than author), maybe I don't know something, maybe I have poor understanding of business model, maybe there are some business constraints, etc.

Think from this side: "bad code" is possibly a false claim (there is always a chance, that this isn't bad code, but you don't know something). Where is "I have troubles working with this code" is always true claim.

That thought experiment demonstrates that even if it is relative, hard to define, and hard to distinguish, bad code exists.

To me this is not bad code, this is malicious code.