7 kyu
Factory Functions #1 - Creating profile for people
587 of 596donaldsebleung
Loading description...
Fundamentals
Tutorials
Object-oriented Programming
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
I don't understand why we have to put methods directly on the object that the function returns, isn't that a bad practice?
The first link in the description leads to a Error 404 page ~~ should be removed? / replaced with a new link (better)
Hi dsl,
I've had some troubles with the random tests:
This should be in the sample tests too. I had to poke around in the dark to find what was the problem (that's the first assertion of each random test)
It's using
Test.assertSimilar
to compare two objects with functions directly, which is really just a completely wrong test. The properties should be compared one by one.CoffeeScript translation :coffee:
Approved
Please don't stringify objects, it's impossible to complete this Kata using
sayName
orintroduce
as anonymous or bound functions as these stringify differently, and I'm not really sure what implementation you want otherwise that appropriately uses the created object's context.This is not happening anymore, closing. :D
remove the double spaces in between the sentences... that's one of the most annoying issues that I see in these katas is when we can't tell what it is in the answer that looks different when really it all seems to be the exact same.
Please read the description. The description makes this very clear:
IMPORTANT: For the
introduce()
method of the person, each sentence is separated from the next by exactly TWO whitespace characters.description: 'Hello, my name is FULL_NAME.\sI am AGE years old.\sI am a GENDER.' but test case matches aganst 'Hello, my name is FULL_NAME.\s\sI am AGE years old.\s\sI am a GENDER.'
Please read the description. The description makes this very clear:
IMPORTANT: For the
introduce()
method of the person, each sentence is separated from the next by exactly TWO whitespace characters.Too much text!!
A lot of text I know but that is the essence of this Kata :)
If you find the "Overview" too long and boring you can always skip straight to the "Task" section and ignore the rest :)
I'm sorry, I forgot to say I found some information in the intro useful and I actually learned something reading it, thank you for that. But the first glance I had at this kata I thought "NEXTT", but I suppose you are right, I could have just skipped to the Task section :-)
Haha no worries :D