3 ms·
> Is there value in code that's readable by non-experts? Sometimes yes, more often no. Often for me yes, I've been programming a long time and these days I do
by noir_lord 12y ago
> Is there value in code that's readable by non-experts? Sometimes yes, more often no.
Often for me yes, I've been programming a long time and these days I do mostly back end development so I write all front end code to be readable by a non-expert (me) so that in 6 months when I come back to it I will understand what the hell is going on.
I'm not confident in the language (javascript) to be sure I will understand my own code so I deliberately lean towards explicitness.
- couchand 12y agoI disagree that explicitly listing every variable involved in a comprehension makes the code more readable by non-experts. I'd argue quite the opposite: it's easy enough to explain `map` to a non-programmer ("we're doing this thing to every item in the list") but it's much harder to explain variables, iterators, comprehensions, etc. And if the non-expert is yourself in 6 months, the argument remains: `map` is the same in every language. Comprehensions, loops, conditionals - those are the things that you need a language reference to properly use.