-
-
Notifications
You must be signed in to change notification settings - Fork 240
Glasgow | 25-ITP-SEP | Alaa Tagi | Sprint 1 | coursework/sprint-1 #723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
LonMcGregor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start on this sprint's tasks, I have spotted a few areas where you could improve answers further
| declaring a new variable priceAfterOneYear: | ||
| let priceAfterOneYear = "8,543"; | ||
| */ | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are correct - are they any other variables being declared?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LonMcGregor , priceDifference and precentageChange are also variables.
| /* | ||
| The variable result display the total length of the movie in these form (Hours:Minutes:seconds) in string format. | ||
| I can think of "MovieDuration" as a better name because it gives more description to the output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it clear what the difference is between movieDuration and movieLength? Could I understand the difference by quickly reading these two variable names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LonMcGregor
I think movieDuration it emphasizes the meaning of time span than movieLength.(I guess)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LonMcGregor what about (totalscreentime) ? is this more obvious ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Alaa-Tagi They both show the total screen time. Think of what the difference is between the movie length variable and this new variable at the end of the code (what type of data is used, what content the data holds). What different type of data is stored there? How could you make it obvious what the difference is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I got what you meant now. Are you saying that the difference in datatype and representation for movie length is numeric data, while screen time is considered structured data? Is that correct? What about total_runtime_minutes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's what I was thinking. Because your final argument is formatted to show hours, minutes, seconds, rather than total seconds as an integer, picking a name that makes that clear is better. It shows the runtime with more details than just minutes, so is there an even better name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it can be ( runtime_hms) Is it still not better name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runtime_hms sounds good to me - this makes it clear that it contains all of hours, minutes and seconds.
|
If I was looking at that variable name, would it be obvious which one is the original input and which one had the formatted output? Is there a name you could use that would make that more obvious? |
Learners, PR Template
Self checklist
Changelist
I have made all the changes required and run the tests needed
Questions
No questions.