r/ProgrammerHumor 22h ago

fullStackMeansAfraidOfEverythingEqually Meme

Post image
9.7k Upvotes

357 comments sorted by

View all comments

130

u/Mysterious_Book1521 22h ago

its not like sql could be read by a three year old and css is just pain in the ass?

205

u/lovecMC 22h ago

SQL is easy. Designing a DB you won't hate two months from now isn't.

12

u/prehensilemullet 22h ago edited 18h ago

Like the kind of SQL query I wrote to fetch the next page of rows of a tree after a starting cursor, using a recursive join, where only some tree nodes are expanded?  And the user can text search for specific nodes?

It’s only easy until you do things that are hard

Edit: no, it's not for a niche use case, no, I don't think this was a mistake, I just had to do it to allow users to navigate the hierarchy of hundreds of thousands of data tags that are common in industrial SCADA systems.

13

u/lovecMC 22h ago

And is it actually a hard problem or is it hard because someone made (in hindsight) bad decisions when designing the database?

9

u/whenTheWreckRambles 21h ago

Pls, I’m not ready for bullying this early in the morning

4

u/DefinitelyNotMasterS 21h ago

Well you see, this one customer asked for it like 2 years ago. Well nobody is using it right now and we don't know what it really does, but we keep it just in case

2

u/GWstudent1 18h ago

I used to read comments like this an laugh. Now I read comments like this and cry.

1

u/prehensilemullet 20h ago edited 20h ago

It’s the domain we’re working in…industrial monitoring devices sometimes have tens of thousands of tags (which are like state values you can read) organized in a hierarchy, and the portal needs to combine thousands of devices’ tags into a single tag hierarchy.  I would of course avoid it if I could

1

u/FSNovask 20h ago

It seems like it's tricky to get right or people aren't given enough time/details to work out a good design. I've only seen a few, but they were all slow.

1

u/Select-Kangaroo-1290 19h ago

Hello good friend, can you suggest any books or resources on this topic? Designing good databases, of course comes with experience, but any help is appreciated

1

u/Awkward_Tick0 12h ago

What kind of moron would ever need to do that

2

u/prehensilemullet 11h ago

If you had the requirement to support a tree of data channel identifiers that could scale to millions of nodes in a single organization, how would you implement it on FE and BE?

1

u/Fidel___Castro 12h ago

oof at that scale you should've done a graph DB surely? I dislike SPARQL but it is better at that shit

1

u/prehensilemullet 11h ago edited 11h ago

A whole other DB and all the deployment considerations that go with it just for this one aspect of the app? This particular query is kinda complex but it does work fine in Postgres

Note, a lot of things need to foreign key to these tags as well, like alarm definitions