I think my calculator works pretty well, it also seems to pass most of the tests in functionality ie ie you cannot enter a number like 5.5.5 or start a number with multiple 00s but it does not pass many of the tests. I had a similar problem with the drum machine, it works but did not pass the final test. https://codepen.io/Egglearn/pen/OJVEwEy?editors=1111
I am starting to wonder whether it is worth putting time in to get it to pass a test or should I be happy that it functions as intended as therefore passed the âtestâ and move on? Let me know your thoughts
Right, but in the real world, the vast majority of the time you will be judged by how well you meet someone elseâs standards. This can be very frustrating sometime.
I am starting to wonder whether it is worth putting time in to get it to pass a test âŚ
I think it would be very useful. And itâs something you would have to do over and over and over in the real world. These skills are important.
To imagine it another way, imagine if you were a tech lead and a junior developer came to you and said, âYeah, I met most of the user stories ⌠Is that good enough?â
Thanks for the responses, I will keep working on it and try and find out what is wrong with how I have written the code. I guess where it feels unproductive for me is when I can view that it does what the test asked for, eg in in the calculator above you canât enter 5.5.5 but it still does not pass the test or you canât start a number with 00 but it does not pass the test. Totally agree that âYeah, I met most of the user stories ⌠Is that good enough?â would not going down well at work!
But again, most of the time irl you wonât get to decide what criteria you need to meet, but it will be decided by others. Sometimes they will be subtle things and difficult to track down. There are very specific instructions in the user stories. If a test is failing, then it means one of two things: 1) The test is incorrect. 2) Your code doesnât meet the requirements.
These tests have been used of a while, so Iâm inclined to assume that itâs the second one. Part of being a developer is learning to pay very close attention to very minute details. This is good training. Giving up because it is hard to find the problem is not.
Is there a specific test where you are having trouble?
Hi Kevin, I agree it is number 2) so I am going to relook at the code, try and clean it up and see if I can find a way forward then I will repost with a specific problem if I still have trouble, I appreciate the feedback.
In all fairness, it is possible that the test doesnât quite match up perfectly with what the requirements are saying. Let us know which tests you are stuck on and we can help figure out what the problem is.
@kevinSmith@JeremyLT@JanShah thanks for the advice last week, I have been working on it since then and it now passes all the tests. I learnt alot about regular expressions in particular and had to make some other small but important changes,