DEV Community

Discussion on: 8 Ultimate Full Stack Interview Questions and Answers

Collapse
 
zenmumbler profile image
zenmumbler • Edited

Exactly; if you are a candidate in an interview and are presented with questions like these, you are fully in your right to answer "Let me google that for you."

IMO, the Bridge pattern especially (from the C++ "gang of four" patterns book) should only be considered in cases where the existing team has gone full-in on deep inheritance and have dug themselves an accordingly sized hole. Please do not feel bad if you do not know what that pattern is.

Collapse
 
baamenabar profile image
B. Agustín Amenábar Larraín

Is it ok if I use the pattern often, but had no idea how it was called? or it doesn´t count?

Thread Thread
 
zenmumbler profile image
zenmumbler • Edited

I feel that if you already used this naturally, that is before you had to because you've made a 5-level deep, 20+ class wide hierarchy of doom, then all is well, because you're already keeping things nicely separated. The part I'm not fond of is the underlying motivation for inclusion in the patterns book, namely: "now that you've written hundreds of classes using inheritance, let's make it a bit easier" An inversion of code design, if you will.