Nice post!
I'm a big fan of clean code myself.
One small comment: I'd use shorter argument names for lambda expressions.
For instance, instead of "employeAndFunday" I'd write "emp" or something similar.
For the ones who already familiar with lambda expressions, I think that the shorter argument name is more readable.
However, it's just a style thingie :)
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
While I agree with the post, I don't think it's easy to read lines with employee2Funday, employeeAndFunday, employee and funday all thrown in across 200 columns of wrapped text.
So I see where you're going. But a variable called "emp" is harder to parse for someone arriving new to the code and doesn't tell you what it is. You might guess it was an "employee" object of some kind. You'd also be worried that other parts of the code would use other abbreviations and searching for words would become a chore.
I see your point, and I'm a huge fan of proper names!
My point is that when I got used to lambda syntax, I found that long argument names somehow stand in the way of understanding the lambda's body itself.
We can agree to disagree about this specific issue...
Cheers!
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.
Nice post!
I'm a big fan of clean code myself.
One small comment: I'd use shorter argument names for lambda expressions.
For instance, instead of "employeAndFunday" I'd write "emp" or something similar.
For the ones who already familiar with lambda expressions, I think that the shorter argument name is more readable.
However, it's just a style thingie :)
I wouldn't.
While I agree with the post, I don't think it's easy to read lines with
employee2Funday
,employeeAndFunday
,employee
andfunday
all thrown in across 200 columns of wrapped text.So I see where you're going. But a variable called "emp" is harder to parse for someone arriving new to the code and doesn't tell you what it is. You might guess it was an "employee" object of some kind. You'd also be worried that other parts of the code would use other abbreviations and searching for words would become a chore.
Naming things is half the battle!
I see your point, and I'm a huge fan of proper names!
My point is that when I got used to lambda syntax, I found that long argument names somehow stand in the way of understanding the lambda's body itself.
We can agree to disagree about this specific issue...
Cheers!