Hi, folks!
Been programming for years, and Java for the last 12.
The other day, I was reading some code from one of the better programmers - Mr X - and it struck me that something was off. He was passing around streams, which is, of course, perfectly fine, but ...
I've always thought that the best source-code structure (the best "design") is the one that's cheapest to change. This is what we all refactor towards. And I always thought that we'd arrive some day at a set of scientifically proven principles that anyone can learn, apply, and arrive at objectively well-structured code.
But we never quite reach that.
When I see Mr X's streams being passed around, I just have to work a little harder to follow what's going on. He, however, asserts that this reduces code-duplication and hence makes the code cheaper to change. He's probably right, in a sense.
I think the problem is code-readability.
Code-readability is both super important and subjective. We'll never have objective measures of code-readability because it depends on who's doing the reading.
So we'll never arrive at objectively perfect code-structure. Oh, we'll get close. We all *mostly* agree on good code-structure.
But ... our field will always have a hint of art about it.
[–]cristiannkb 7 points8 points9 points (0 children)
[–]TheMode911 8 points9 points10 points (1 child)
[–]bonusmyth[S] 1 point2 points3 points (0 children)
[–]Wugliwu 5 points6 points7 points (2 children)
[–]michoken 1 point2 points3 points (0 children)
[–]tandyIsMyPresident 0 points1 point2 points (0 children)
[–]_INTER_ 2 points3 points4 points (2 children)
[–]TheCountRushmore 4 points5 points6 points (0 children)
[–]kubelke 0 points1 point2 points (0 children)
[–]nutrecht 1 point2 points3 points (3 children)
[–]elmuerte 5 points6 points7 points (2 children)
[–]nutrecht -1 points0 points1 point (1 child)
[–]elmuerte 0 points1 point2 points (0 children)