NW4-Haliema Adiem-Javascript-core1-coursework-week1 - #178
Conversation
|
Great to see this Haliema. All the exercises seem fine and work apart from L-functions-nested. Well actually your L-function-nested does give the expected output. But take care to follow the instructions. So we are asked to include a function that spells the name in uppercase Lets do this - and call it shoutyName
We are also asked to make a shouty greeting which will be "HELLO", So we get
Then run the functions
Can you think of an advantage of doing this compared to your way? Both give the same result so your customer will be happy with the software you provided. What if the customer said can you change the greeting to "HELLO, HOW NICE TO SEE YOU ". How many lines of code will you have to change compared to the above nested function approach. Perhaps your customer wont mind but if there are thousands of lines of code and a change needs to be made it can make a huge difference to how long the customer will get the new software who may no longer be happy to hear that. But the key take away is to follow the instructions. Oh and to ask if the instructions don't make sense. Now - on to the mandatory work. Now I know you said you found these hard but great that you had a go. Did you manage to run the tests using jest? Be careful when concatenating strings
The test fails as follows Expected: "Hello, my name is Sonjide and I am 27 years old" Its only a minor thing but just to say be careful when joining strings. The other thing which is important - TTD. Test Driven Development. The idea is that a test tells you what the function should do. Its like the instructions and so important to look at the tests then write a function to pass the test.
So getTotal returns a string describing the total - this is very important. So lets make the function to do just that.
So if you look at the tests - they are telling you what to do Note there are similar space problems with concat function in 3-function-output. So yes care with space between concatenated strings. See what the expected result is "code_space_your_space_future".
Hopefully looking at the tests will help to make the tasks more straight forward. But this is a good effort and I think the most important thing is to take care with the instructions, study the tests for TTD and make a function to pass those tests (for the mandatory exercises). Keep it going Haliema. Steve |
|
Thanks🙂, @SteveLeicester, I can see more broadly now. I have to put on my account the simplicity, and it is implemented in the fewer lines of coding. similarly, I have to consider getting back to my code later either for debugging or adding new features and then this is the job of the developer. |
|
Your coursework submission has been closed because nobody has interacted with it in six weeks. You are welcome to re-open it to get more feedback. |
Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in
HOW_TO_MARK.mdin the root of this repositoryYour Details
Homework Details
Notes
What did you find easy?
some parts of the exercise task
What did you find hard?
The Mandatory task
What do you still not understand?
still confused about the different styles of writing functions.
find it hard sometimes to draw a plan for my answer before starting answering the questions directly.
Any other notes?