Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Well... he is not wrong. When recruiters asks me to implement something, I always ask what can I use. up to, and including github.
-
aritzh7527yWait, inheriting from std::stack!? Like is that even sane? Most probably its implementation will be platform dependant, and that is just ignoring all the template hell in the usual std containers.
-
@irene I think this is also a test for communication.
Last time the recruiter asked me to do a reverse. I asked them "can I just call the built-in func?" They laughed about it, and said "No".
If someone is doing lots of extra work without knowing the goal, he/she clearly doesn't fit the job. -
@irene not really.
Lodash implemented some buildin js array functions just a wrapper of origin built-in methods.
Microsoft also has open source project on flux which is a wrapper of MobX.
The point is if there's no true benefit of implement some low level stuff by yourself, you should never do it, unless in school exam.
Btw that's paraphrasing, I forget what I asked. It's long times ago. -
@irene eg. A class has a "clone" method which is a wrapper of "slice" a private array. Does this make sense to you? Or I'm off topic again?
-
@irene true.
In many cases, the private scope is purely used to expose a subset of buildin methods. -
PAKA8887y@magicMirror True but when I'm asked to implement something that is part of std then I operate under assumption that it's alternative reality where std doesn't exist or for some reason it can't be used. If he wanted to check if I know how stack works he could just ask that.
-
This is dumb of the recruiter.
And to anyone arguing that inheriting from STD::stack is not possible you are just wrong. Use Private inheritance to forward the public methods if stack. Unless you are extending it though you should just use STD::stack itself.
This entire rant AND the comments deserves to be a rant itself. -
People said it wasn't possible or was difficult, I'm pointing out it is not. In this case it is a bad choice but private inheritance is not bad in and of itself
Related Rants
-
xjose97x19Just saw a variable in C named like this: long time_ago; //in a galaxy far away I laughed no stop.
-
linuxxx32*client calls in* Me: good morning, how can I help you? Client: my ip is blocked, could you unblock it for m...
-
DRSDavidSoft28Found this in our codebase, apparently one of my co-workers had written this
Job interview for junior dev position:
Recruiter: Implement stack
Me: Here you go *typical C++ stack implementation, struct node, push, pop*
Recruiter: This is classical over engineering, you should just inherit from std::stack
Me: wtf?
rant
c++
job interview
wtf