What is the name of this bad practice / anti-pattern?

前端 未结 14 2138
独厮守ぢ
独厮守ぢ 2021-02-03 18:02

I\'m trying to explain to my team why this is bad practice, and am looking for an anti-pattern reference to help in my explanation. This is a very large enterprise app, so here

14条回答
  •  时光说笑
    2021-02-03 18:28

    Don't know about a name (doubt such exists) but think of each "Thing" as a car - some cars have Cruise Control system and others do not have.

    Now you have fleet of cars you manage and want to know which have cruise control.

    Using the first approach is like finding list of all car models which have cruise control, then go car by car and search for each in that list - if there it means the car has cruise control, otherwise it doesn't have. Cumbersome, right?

    Using the second approach means that each car that has cruise control come with a sticker saying "I has cruise control" and you just have to look for that sticker, without relying on external source to bring you information.

    Not very technical explanation, but simple and to the point.

提交回复
热议问题