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.
don't know. just wanted to do it with the least amount of code i could, mainly time's sake
i feel like thats the best way to learn lol, at least imo.
This comment is hidden because it contains spoiler information about the solution
I believe best practice is a combination for shorter lines of code as well as readability. I've seen some solutions here that are extremely short but also extremely unreadable. I mean, it's Python we're doing here not Java or something😅
(This is a joke!!)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
this is clever. it is more also obtuse. a more senior dev might look at this and immediately know what's going on, but a junior dev might not. it is not a best practice
Speaking about best practice. I think in this case it's not about one-liner or readability, but more about code duplication.
I suppose that best practice is keeping in mind maintainability and requirements changing during writing the code.
So here when someone would ask to change greeting from 'Hello' to 'Good gay' or add '!' to the end of the sentence - you will need to change it twice.
It's not a big deal here, but with more lines of code it would matter more. But good habits stem from the very beginning:)
I personally agree with you. And I think that's exactly why Codewars differed 'clever' from 'best practices'. But sadly mostly people just ignore the 'Clever' button. Or they just simply has a different view of what is best.
This comment is hidden because it contains spoiler information about the solution
Honestly I dont think there is a universal answer.
However, in my mind, a good software engineer writes cohesive and linear code- length is not a factor.
This comment is hidden because it contains spoiler information about the solution
Just for showing off superiority, we as noobs need to bow. :^)
it usually doens't matter , people usually do it for fun , doing one liners however is not a good practice always but the satisfaction is real
This comment is hidden because it contains spoiler information about the solution
Loading more items...