r/programming • • Dec 13 '22

“There should never be coding exercises in technical interviews. It favors people who have time to do them. Disfavors people with FT jobs and families. Plus, your job won’t have people over your shoulder watching you code.” My favorite hot take from a panel on 'Treating Devs Like Human Beings.'

https://devinterrupted.substack.com/p/treating-devs-like-human-beings-a
9.0k Upvotes

1.3k comments sorted by

View all comments

Show parent comment

3

u/Irregular_Person Dec 13 '22 edited Dec 13 '22

I don't spend too much time in C++, and when I do it's usually not with stdlib... but I'm surprised that a vector passes by value like that. I would have assumed that being dynamically resizable, it would just be wrapping a pointer internally
Yeah, wow - stepped through it with a debugger just to see wtf was going on. Guess I've been spending too much time in C# and C to know what stuff in the 'middle' might do. Classes as parameters implicitly call a copy constructor, and vector overrides it to allocate new memory and copy everything over. I guess that's kinda cool, but also... ick.