Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Depends on who's reading. If I am used to grasping the 4th line as a whole, it makes sense to me to write it as a unit.
There is always more than one possible solution.
I think in programing there are a lot of possible solutions and you can evaluate each of them looking at various aspects.
This isn't about who has the "best" solution overall. This is about learning that there is always more than one possible solution.
For me it is essential to always write maintainable code. If you are used to do that in any case, then you will always write maintainable code, especially when it is for production environments.
Thus, I do not agree, that in terms of clean code the shorter version is better as clean code is a lot about maintainable code.
Better than my proposal, nice!
Well... nice question... in my opinion, in terms of code maintenance I prefer a few more code lines because is easier for me, but in terms of clean code, less lines are better. What is the better solution? I think that there isn't a better solution, it depends on the programmer.
This was not written for maximum maintainability.
Reading less is easier than reading more though. :P
I agree that this is shorter in terms of line-count, but what about readablity and maintainablity? My personal experience is that more explicit code is easier to read and to understand (in terms of code-maintenance).
Wrong code. See fork.