News for hackers. Stuff that matters.
Re:Code in Database vs. Code in Application by kumarvvr on Monday July 11, 2022 @04:18AM (#32053566)
I agree with all your points, except for SQL.

Getting lost in SQL is easy, due to its syntax and lack of standards.

Compare that to any of the mainstream programming languages, the difference in cognitive load to process is stark.

Re:Code in Database vs. Code in Application by xupybd on Monday July 11, 2022 @04:28AM (#32053611)
It might be Stockholm syndrome but I find SQL to be one of the best DSLs I know. It's only good at querying relational data but it's good at that.

I might have spent too much time in SQL but it one of my favorites.

Re:Code in Database vs. Code in Application by kumarvvr on Monday July 11, 2022 @09:52AM (#32056127)
I always live in the fear of accidentally destroying data or tables with SQL.

Not a rational fear, just an irrational one. A primitive fear of the unknown.

But, to be fair, I have had to work with some of the worst SQL constructs and stored procedures.

shudder

Re:Code in Database vs. Code in Application by whynotmaybe on Monday July 11, 2022 @08:49AM (#32055470)
I want to thank you for saying you don't like SQL. Now in your future, please tell it to everyone involved where you work so that you won't work on it and they'll find someone else to do the SQL.

I've worked at place where people hated SQL and where hiding it. Instead of crafting nice and performing SQL, they wrote "select * from table" and then did foreach loops in the code to filter the results they wanted.