5 ms·
That's why it's worth having short methods that do one thing and are meaningfully named. And from a personal point of view I'd prefer several lines containing s
by barking 13y ago
That's why it's worth having short methods that do one thing and are meaningfully named.
And from a personal point of view I'd prefer several lines containing short expressions that are then assigned to meaningfully named variables etc, rather than 1 really long hard to parse line of code.
- NKCSS 13y agoYeah, nothing wrong with that, and if you do have a longer/more complex equation (like a C# LinqToSql where statement), you can always make it formatted multi-lined instead of in-line to improve readability. My point was mostly about not using comments that describe the code.
- reginaldjcooper 13y agoThis is how I originally felt a few years ago doing Ruby, and I have tried to make all my code human-readable since.