▲ | egeozcan 16 hours ago | ||||||||||||||||||||||
I don't know about anti patterns but what I like to do is putting 1=1 after each WHERE to align ANDs nicely and this is enough to create huge dramas in PR reviews. | |||||||||||||||||||||||
▲ | DrewADesign 16 hours ago | parent | next [-] | ||||||||||||||||||||||
> what I like to do is putting 1=1 after each WHERE to align ANDs nicely Frankly, that sounds like one of those things that totally makes sense in the author’s head, but inconsiderately creates terrible code ergonomics and needless cognitive load for anyone reading it. You know to just ignore those expressions when you’re reading it because you wrote it and know they have no effect, but to a busy code reviewer, it’s annoying functionless clutter making their job more annoying. “Wait, that should do nothing… but does it actually do something hackish and ‘clever’ that they didn’t comment? Let’s think about this for a minute.” Use an editor with proper formatting capability, and don’t use executable expressions for formatting in code that other people look at. | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | ffsm8 16 hours ago | parent | prev [-] | ||||||||||||||||||||||
It's always perfectly aligned for me, because enter prefixes 2 whitespace in my ide in SQL files, ending with
| |||||||||||||||||||||||
|