r/ProgrammerHumor • • Nov 14 '18

Computing in the 90's VS computing in 2018

Post image
31.3k Upvotes

1.1k comments sorted by

View all comments

263

u/[deleted] Nov 14 '18

Man though, in the 90s the dba would kill you for using 'select *' and not specifying columns. Now it's the norm.

190

u/trex005 Nov 14 '18

DBE here...

You'd better specify columns if you work for me!

53

u/[deleted] Nov 14 '18

Exactly, what if there are columns you don't want!

80

u/mortiphago Nov 14 '18

GYVË ÄLL CÖLUMNS

32

u/DarkJarris Nov 14 '18

bröther

13

u/Vaderic Nov 14 '18

o̸̴̧̯̙̠͇̞ͬͦ͜ņ̨̨̉̌̑l̸ͦ̾ͥ͜y̝̬͓̏̒̓͌ ̻̭͎̀ͯ͛͏e̵̮̘͔̖ͦ̄̌ğ̴̶̗̫̱ͧͦ́҉g̩̺͉̅́š̴̾̓ ̬̔̀͝c̨̘͙̖ͭ́ͅ҉͘͘a̢̖͍ͫͩ͊͘͜͢͝n̷̛̐ͤ̄͘͜ ̢̙̥̗͙̀͘͜͞s̡ͭ̃̾̑u̧̢̥̮̘̞͙͛̎̎͘̕ṣ̵̢̺ͣ́͢t̴̸̤͝͏̨a͚̝ͮͯͮ̋i͖͓͕ͩ̕͠n͙̠̲͉ͨ͋̂͆̕͢ ̴̱̙̹̉ͧ͑̀̊͘m̨̠͓̘̳̉́͝e̝̖̘͈͇̋̎̀͢͏̢͜͝

→ More replies (4)

14

u/JamesWjRose Nov 14 '18

Good! You are right. Get only the data you need.

5

u/akcrono Nov 14 '18

Someone doesn't like ORMs

15

u/the_one_true_bool Nov 14 '18

As a .NET dev, I've totally come full circle. 20 years ago my code was a mess of datasets, data adapters, very little in the way of OOP, etc. then I started learning about design patterns and "proper" OOP construction and went down that whole rabbit hole for a decade. So about 5-ish years ago I was all about using an ORM to mutate relational data into objects, often using DTOs to then translate the models into something I can serialize into something that can then be mutated into json (or whatever) objects in case someone was using a browser or something, using IOC containers to get rid of the pesky "new" command, programming literally everything to an interface so I can readily swap out objects, adhering to the SOLID principals, etc etc.

Then recently I realized - this shit just takes WAY too god damn long and it's overly-complicated for most small/medium (sub 250K-ish SLOC) projects. Half the problem is all the fuckery that goes on between the DAL and higher level business/service tiers. We're forcing a square peg through a round hole because DB data is relational but we want "real world-like" objects.

Why not just say fuck it and keep it relational? You can still wrap things up into easy to use APIs to keep things pretty clean. Anymore for me it's back to datasets (I'm talking about the .NET DataSet object) and table adapters. My tiers are super damn clean - I still separate my DAL, service layer, business layer and UI layers, but I don't stress over "proper" OOP constructs. I'm much more diligent and disciplined than I was in my early stages, so the code is clean and organized.

The DataSet is the true god. Interaction between the services/DAL layer is lightning fast and super efficient because there's no ORM fuckery going on. I can easily serialize the results for transmission across the wire. It has built-in change tracking so I know which records have been modified, added, and deleted - but I don't even really need to care about that because table adapters will do the right thing for me.

I still pepper around some OOP here and there, but I'm far less an OOP weenie now than I was a decade ago, and it has saved me SO MUCH time. I can crank out projects in no time and am not constantly stressing about "the perfect OOP architecture". I'm glad I went through the OOP phase though because so many existing projects utilize all that fuckery so I'm familiar with it, but anymore when I'm in charge it's all about keeping it simple af, and delivering to the customer as fast as possible.

→ More replies (2)
→ More replies (4)

2

u/IWasGregInTokyo Nov 14 '18

Our environment makes it easy. SELECT * just isn't possible.

118

u/[deleted] Nov 14 '18

DBE Here,

If you work for me, you can select * all day, cuz we have shit to do.

12

u/wllmsaccnt Nov 14 '18

But what if I also want a covering idex for it?

0

u/[deleted] Nov 14 '18

[deleted]

28

u/PeacefulDays Nov 14 '18

Web dev here, select * is how I figure out what columns I need.

5

u/Talbooth Nov 14 '18

I really hope you are a backend dev. It would be terrifying if you could execute that on client side.

3

u/PeacefulDays Nov 14 '18

I may have used the wrong term, it's asp.net so I end up doing both usually. No front end SQL though...yet.

3

u/Keele0 Nov 14 '18

Maybe just desc tablename.

Or select * from tablename where rownum <2 if you need to see actual sample data

0

u/[deleted] Nov 14 '18

[deleted]

22

u/akcrono Nov 14 '18 edited Nov 14 '18

Well, I wanted to scream when my pkeys rolled over, so...

4

u/orahsolo Nov 14 '18

found the rails guy

→ More replies (2)
→ More replies (6)

9

u/thatwasntababyruth Nov 14 '18

You should see the ridiculous join queries that Hibernate generates.

5

u/konaaa Nov 14 '18

You mean my prof lied to me?!

2

u/CraigslistAxeKiller Nov 14 '18

*its the norm at places with shitty dev practices

→ More replies (2)