|
|
|
|
|
by BDFL_Xenu
5434 days ago
|
|
> And if you can't read code well, go practice some more. Actually, let's not. To paraphrase a minor celebrity of programming, life is too long to be good at reading every variation of boilerplate. Java is essentially hostile to small functions and parametrization, as having any semblance of inner or anonymous functions will require you to define a class at least, or an interface somewhere else, scattering your code unnecessarily, and you'll probably just end up repeating the code because it's just not worth the effort to do it. Don't believe me? Why do you always have to .open() and .close() your any port-like thing manually? That's a solved problem, you know? |
|
Learning to read code is just like learning to read English. You can guess most of the words meaning once you know some of them. Personally, I think being able to read code is the best skill you can have as a programmer. Just as a good musician is able to listen to music properly. (I mean 'listen' as in analyze, understand, notate and copy).
The other point IMHO is that scattering your code with anonymous functions points to bad design and is as bad as scattering "GOTO" everywhere in BASIC code. It leads to spaghetti code which is an unmaintainable mess.