July 2023
Intermediate to advanced
276 pages
6h 55m
English
In the projects that you’ve worked on, have you ever seen code written like the following?
| | //Please don't do this |
| | names.stream().filter(name -> name.length() == 4).map(String::toUpperCase)... |
I ask that question in the classes I teach for professional software developers and sadly I get a rather high percentage of "yes" answers.
Encourage your developers to change that practice. If you place multiple functions (like filter and map) on the same line, it increases the cognitive load. It makes the code hard to read and hard to understand. And, if we have to make changes, it takes more effort as well.
Ask your fellow developers to line up dots vertically, like so:
| | names.stream() |
| | .filter(name -> ... |
Read now
Unlock full access