DEV Community

Discussion on: You're not worth hiring unless...

Collapse
 
zenithone profile image
Craig Burton

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.

Collapse
 
eswarpr profile image
Eswar Prakash

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?

Thread Thread
 
brobbiethao profile image
Bob T Greene

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.