DEV Community

Discussion on: What's the Worst Code You've Ever Seen or Written?

Collapse
 
pbouillon profile image
Pierre Bouillon • Edited

I once heard about a project where the business logic would depend of the front.
Something like:

if (tile.style.backgroundColor == 'red') {
    // do stuff as 'warning' or else
}

I don't know if this is considered as bad code, but it sure is awful.

Collapse
 
renegadecoder94 profile image
Jeremy Grifski

This looks like the kind of code I'd write when I'm working with D3. haha I struggle so much with web dev stuff.