If it can't be "clean", being verbose, more lines than you might prefer but readable is the answer! Readability should always be the default position.
Readable means "intention revealing". We spend most of our time reading code, not writing it. So code that is named well, easy to follow and reason about is "readable". It doesn't have to be "clean" with the most slick interfaces, or latest language syntax and "cool" helpers. It just needs to be readable.
An example might be a couple of substr uses in a single line instead of a regex. Sure the regex is more terse - but it's not as easy to grok for most folks. There's a greater cognitive load with things like regex, lambda expressions and other syntactic sugar.
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.
If it can't be "clean", being verbose, more lines than you might prefer but readable is the answer! Readability should always be the default position.
Readable means "intention revealing". We spend most of our time reading code, not writing it. So code that is named well, easy to follow and reason about is "readable". It doesn't have to be "clean" with the most slick interfaces, or latest language syntax and "cool" helpers. It just needs to be readable.
An example might be a couple of substr uses in a single line instead of a regex. Sure the regex is more terse - but it's not as easy to grok for most folks. There's a greater cognitive load with things like regex, lambda expressions and other syntactic sugar.