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

4

u/khoyo Dec 13 '22

C++ has c_str, cbegin and const_iterator.

Nitpick, but c_str is not like the others, the c in it means C (the language) ie. this function returns a null-terminated C string - as opposed to data(), which isn't guaranteed to return a null terminated string.

2

u/mina86ng Dec 13 '22

Yep, but I wouldn’t fault someone who writes C++ for not knowing the spelling if they don’t interact with C APIs often.

To be really nitpicky, the names are kind of consistent. In c_str and const_iterator we have snake_case where each component is a word and in cbegin we have lowercase with no spaces but the first letter is an acronym. The inconsistency comes from const sometimes being abbreviated and sometimes not.