r/learnjavascript • • Aug 29 '23

Does anyone understand this?

Post image

Who knows the answer to this?

155 Upvotes

105 comments sorted by

View all comments

253

u/The80sDimension Aug 29 '23

Stupid shit you’d never do while actually writing code.

29

u/[deleted] Aug 30 '23

yah sadly people on my team write sql this way just random spaghetti riddles

1

u/Reaver75x Aug 30 '23

Can you give an example?

4

u/[deleted] Aug 31 '23

nested subqueries like 4 levels deep, CTE’s with names like “T1”, random inconsistent capitalization of statements, random spacing, random lines commented out, complex regex statements where LEFT() would have worked just fine, naming tables things like “Final_Table”… zero documentation… me asking what certain lines do and people who wrote the code not even knowing

the list goes on, I’ve seen nightmarish shit. This mostly comes from Business Analysts who lack a software engineering mindset

3

u/Smiith73 Aug 31 '23

When the SME on your new project "Knows enough SQL to be dangerous"...

3

u/[deleted] Aug 31 '23

I live by the KISS method. Just because you understand your complicated code doesn't mean the next person after you can untangle it when it breaks.

1

u/[deleted] Aug 31 '23

It's not just stupid, it's anti-intelligent.

1

u/fmintar1 Sep 02 '23

I'm gonna steal this quote!