Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

if your novice dev cant understand the second example, he should be fired on the spot


They shouldn't be fired, they should be taught. And it depends on what languages they already know and which version of C/C++ they were taught. C++'s lambdas looked very strange to me even though I'd worked with C++ code for 15 years, but nothing newer than C++03 (both what I learned in school and due to code I worked on professionally just being that old). It took me a while and finally sitting down with a couple books on "Modern C++" to grok what was going on with that syntax.


Oh, wow, what an attitude.

Did you consider that it is possible that everybody can read the second example but may need to spend more time reading it to comprehend if they haven't seen it before and may make mistake interpreting the code?

Did you consider not every company is Intel or Google and there is a lot of companies that can't get "top 1% talent"?

Readability is about making it easy to understand the code, without putting effort into reading.

Readability is important because code is written once and red many times by people who may need to read a lot of code and don't want to spend much time trying to understand every line of it.


“Novice”




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: