Click here to Skip to main content
16,004,505 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: Did I dodge a bullet? Pin
Daniel Pfeffer16-Sep-24 0:48
professionalDaniel Pfeffer16-Sep-24 0:48 
AnswerRe: Did I dodge a bullet? Pin
RickZeeland16-Sep-24 0:52
mveRickZeeland16-Sep-24 0:52 
AnswerRe: Did I dodge a bullet? Pin
pkfox16-Sep-24 1:06
professionalpkfox16-Sep-24 1:06 
AnswerRe: Did I dodge a bullet? Pin
GKP199216-Sep-24 1:50
professionalGKP199216-Sep-24 1:50 
AnswerRe: Did I dodge a bullet? Pin
Dave Kreskowiak16-Sep-24 2:55
mveDave Kreskowiak16-Sep-24 2:55 
GeneralRe: Did I dodge a bullet? Pin
den2k8816-Sep-24 22:29
professionalden2k8816-Sep-24 22:29 
AnswerRe: Did I dodge a bullet? Pin
PIEBALDconsult16-Sep-24 2:57
mvePIEBALDconsult16-Sep-24 2:57 
AnswerRe: Did I dodge a bullet? Pin
Jeremy Falcon16-Sep-24 3:39
professionalJeremy Falcon16-Sep-24 3:39 
There was one thing you said that would've made me worry too, but I suspect you dodged a bullet. Here's the proper answer to that question... To give you context, I've been in this game since the 90s... 94 is when I started coding and 97 I was working as a coder. Anyway, this being the Internet expect less experienced people to disagree with what I'm about to say... ignore them. But, the proper answer to that question is:

It depends. Smile | :)

To start with, no expert DBA will accept a code first answer even if you're using an ORM, etc. Only coders that refuse to learn DBs buy into that. Don't ever buy into code first UNLESS they talk about migrations. Then they're smart. But, you can (and should) do migrations in raw SQL. So, that's not an excuse to not learn DBs or DB design. Otherwise, they're mentally lazy, but I digress. So, it would be nice to know "why" they believe their buzzword nonsense.

When to use a sproc (stored procedure)
  • When you need custom logic to run that's too big for a db function. Say maybe in response to a trigger or you want to scaffold out something, etc. Never put this logic in code. Yes it's slower than code, but now you tightly coupled your DB to your code. Good luck reusing that DB. Not to mention, you may potentially have to transfer large amounts of data over the wire, which I can promise will be slower if you have a decent server not under heavy load. That's it. That's the only reason. People will talk about security, but a view or function will do the same thing.
When not to use a sproc (stored procedure)
  • Don't use a sproc when a DB function would do the job. DB functions are meant to be concise and point driven.
  • Not for encapsulation/security. That's what a view is for.
  • Not for complex reporting. I suspect this is what made them potentially not like your answer. Sprocs are slow. Reporting is slow. A performant DB should have separate, flattened, read-only reporting DB for complex operations.
Now, all of this is invalidated if we're talking about distributed computing, using NoSQL, etc. Maybe that's their case, but it sounds like they're just following the hype train. This may also be invalidated if we're working with complex graphs in GraphQL. So, this assumes we're speaking of the traditional client/server paradigm.

Edit: Take away point!!!!

Here's the important thing though, if they were smart enough to know the good reasons to break the mold... they would've mentioned in the interview. If they didn't, they're just probably clowns or cannot communicate very well. A good interview with two educated people is awesome. It's a chance for two pros to chat. I've learned things in interviews where peeps liked me. I've taught things in interviews where I still liked peeps. If it feels like they were being zealots... trust your instinct. Two real pros can chat and learn or at least explain their reasoning. It's only the kiddies who think they're talented that can't.
Jeremy Falcon


modified 4 days ago.

GeneralRe: Did I dodge a bullet? Pin
Cezar Lamann16-Sep-24 4:02
professionalCezar Lamann16-Sep-24 4:02 
GeneralRe: Did I dodge a bullet? Pin
Jeremy Falcon16-Sep-24 4:16
professionalJeremy Falcon16-Sep-24 4:16 
GeneralRe: Did I dodge a bullet? Pin
den2k8816-Sep-24 22:30
professionalden2k8816-Sep-24 22:30 
AnswerRe: Did I dodge a bullet? Pin
obermd16-Sep-24 4:05
obermd16-Sep-24 4:05 
AnswerRe: Did I dodge a bullet? Pin
kmoorevs16-Sep-24 5:57
kmoorevs16-Sep-24 5:57 
AnswerRe: Did I dodge a bullet? Pin
jschell17-Sep-24 12:45
jschell17-Sep-24 12:45 
GeneralDamnit, did I miss the leaving-do? PinPopular
Richard Deeming15-Sep-24 21:51
mveRichard Deeming15-Sep-24 21:51 
GeneralRe: Damnit, did I miss the leaving-do? Pin
den2k8815-Sep-24 21:55
professionalden2k8815-Sep-24 21:55 
GeneralRe: Damnit, did I miss the leaving-do? Pin
RickZeeland15-Sep-24 22:47
mveRickZeeland15-Sep-24 22:47 
GeneralRe: Damnit, did I miss the leaving-do? Pin
Nelek16-Sep-24 4:21
protectorNelek16-Sep-24 4:21 
GeneralRe: Damnit, did I miss the leaving-do? Pin
Sander Rossel15-Sep-24 22:55
professionalSander Rossel15-Sep-24 22:55 
GeneralRe: Damnit, did I miss the leaving-do? Pin
Richard Deeming15-Sep-24 23:11
mveRichard Deeming15-Sep-24 23:11 
GeneralRe: Damnit, did I miss the leaving-do? Pin
Sander Rossel15-Sep-24 23:46
professionalSander Rossel15-Sep-24 23:46 
GeneralRe: Damnit, did I miss the leaving-do? Pin
Jörgen Andersson16-Sep-24 1:46
professionalJörgen Andersson16-Sep-24 1:46 
GeneralRe: Damnit, did I miss the leaving-do? Pin
Nelek16-Sep-24 4:23
protectorNelek16-Sep-24 4:23 
GeneralRe: Damnit, did I miss the leaving-do? Pin
OriginalGriff15-Sep-24 22:58
mveOriginalGriff15-Sep-24 22:58 
GeneralRe: Damnit, did I miss the leaving-do? Pin
pkfox15-Sep-24 23:02
professionalpkfox15-Sep-24 23:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.