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.
As many top 'coding craftsman' already said, when your variable needs an explaining comment you did something wrong
In this case, I would say that descriptive comments would be preferable to well-named auxiliary variables.
What do you expect to do for such a simple function then? Writing a dozen lines for no reasons?
One liner for trivial tasks like this is best practice because code should be concise. If it's extended to lots of lines there is something wrong with the coder. (Just imagine what they're going to write for more complex tasks, 1k lines? How are you going to read that?) Kneejack response to short code by yelling "it's short hence it can't be readable/maintainable!" without even looking at the code is TRWTF and even an original sin, so please don't do that. I can also not read a long solution and instantly say it's "bloated, tl;dr" too.
Yes. They added it in Ecma Script 6. But it can not always be used...
Fixed.
My friend, I suppose you are thinking to complicated for this small kata. You are thinking at a higher level. ;-)
For null-objects you do not have to set anything.
Only if a object is NOT null, you have to set a new tuple with the object and the type of the object in the list.
From the description: "The default fuel level of a car is 20 liters."
So your code have to start with 20 liters of fuel.
Exactly, that class is there just as an extra test, to check if it would conflict with your runtime class and to make sure you create them in a separate context.
multi-inheritance works in interface level for c#. I think it is the same for Java. No idea about other languages.
Tell me, if you have any questions or if I can help you to solve this kata.
I expanded the sentence to "If an object is null, so there is no type! So you do not have to set anything for null-Objects."
I think it should be clearer now.
What do you say?
There is the sentence "If an object is null, so there is no type..." in the description.
If you have a suggestion to make it clearer and better to understand, then please tell me. :-)
An example test would not make sense. Then the solution would be so clear, it would be an 9kyu or 10kyu....
:-))
Loading more items...