TL;DR: Write code for humans more so than computers.
There is a legitimate concern there though. Code that can be done in one line is neat, but in the long run, the more cognitive load your code requires to grok, the more expensive it is to the project and the team. I don't remember the exact figure, but something like at least 75% of a dev's time is spent reading code. Therefore, every developer should endeavor to make that large portion of time more productive.
I can understand all the need for writing descriptive code, but these days fluent code writing is so ubiquitous that every library provides it. Even test case writing is being redesigned to be written in Fluent style. So when someone asks me to sum all odd numbers, why would I write a long, lengthy loop instead of a single line that is elegant, readable and fluent?
Stephen Grider mentioned "avoid fancy methods in interviews because the questions are intended to be an interactive thought process exercise." Write the long answer and then ask to refactor.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
TL;DR: Write code for humans more so than computers.
There is a legitimate concern there though. Code that can be done in one line is neat, but in the long run, the more cognitive load your code requires to grok, the more expensive it is to the project and the team. I don't remember the exact figure, but something like at least 75% of a dev's time is spent reading code. Therefore, every developer should endeavor to make that large portion of time more productive.
I can understand all the need for writing descriptive code, but these days fluent code writing is so ubiquitous that every library provides it. Even test case writing is being redesigned to be written in Fluent style. So when someone asks me to sum all odd numbers, why would I write a long, lengthy loop instead of a single line that is elegant, readable and fluent?
Stephen Grider mentioned "avoid fancy methods in interviews because the questions are intended to be an interactive thought process exercise." Write the long answer and then ask to refactor.