Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

OOP JS-World #515

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

OOP JS-World #515

wants to merge 4 commits into from

Conversation

IhorOzerov
Copy link
Contributor

OOP exercise

Demo |
Code base

The code is submitted in a dedicated feature branch.

Only code files are submitted.

Please, review.

@github-actions
Copy link

Hey!

Congratulations on your PR! 😎😎😎

Let's do some self-checks to fix most common issues and to make some improvements to the code before reviewers put their hands on the code.

Go through the requirements/most common mistakes linked below and fix the code as appropriate.

If you have any questions to requirements/common mistakes feel free asking them here or in Students' chat.

When you genuinely believe you are done put a comment stating that you have completed self-checks and fixed code accordingly.

Also, be aware, that if you would silently ignore this recommendation, a mentor can think that you are still working on fixes. And your PR will not be reviewed. 😒

Please, make sure that your code follows the requirements based on the most common mistakes as well as both basic and advanced requirements from the original task.

Universal recommendations:

  • Make sure your code follows General Requirements
  • Use common sense or seek for an advice whenever requirements look ambiguous or unclear.

By the way, you may proceed to the next task before this one is reviewed and merged.

Sincerely yours,
Submissions Kottachecker 😺

@IhorOzerov
Copy link
Contributor Author

I have completed self-checks and fixed code accordingly.

@OleksiyRudenko OleksiyRudenko added the self-check-done Student confirmed that self-checks against requirements/common-mistakes are done label Sep 20, 2022
Copy link
Member

@OleksiyRudenko OleksiyRudenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IhorOzerov quite a decent job.
What confuses is drastically different approach to treating hands compared to other properties.
Leverage OOP and make code more obvious. Code is written for other people.

Comment on lines 66 to 74
this.creature = "Cat-Woman"
}
}

//,
let Gangster = new Cat("Gangster", "male", "Yohanna and Vanessa");
let Nancy = new Cat("Nancy", "female", "Gangster and Vanessa")
let Gregory = new Man("Gregory", "Vanessa and Bandit");
let Andy = new Man("Andy", "Rosemary and Charlotte");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make code style consistent. Looks like a composition of code fragments from various sources.

Copy link
Contributor Author

@IhorOzerov IhorOzerov Oct 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you say about "comment lines", that was my try to change Cat saying by click on button. Forget to delete all unnecessary lines.
Already deleted

this.hands = 2
}
inhabitantSpeech() {
return super.inhabitantSpeech(`Hi, i am a `, `, my name is `, `, i am nice `, `. With my ` + this.hands + ` hands, `,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a peer developer tasked to work on this project I am quite confused with how hands are treated.
Looks like a limp insertion...
I am also designing a child class for birds and trying to re-use what's already done here.
So I put super.inhabitantSpeech( and IDE Intellisence tells me that the method expects to receive creatureText, nameText, genderText, legsText, friendsText, sayText, i.e. no place for hands or wings...
Should I follow the same coding pattern?

OOP can help you writing a better reading and consistent code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. In the case of a bird, I think that hands or wings will be added in the same way because I can't give property "wings" to all inhabitants
  2. Please give some advice on what exactly I need to improve on that situation. In my previous version I had another way to make method, and this method looks better, but it doesn't contain properties in father class. If it's ok i will remove my code to previous version.

@stale
Copy link

stale bot commented Apr 7, 2023

This issue has been automatically marked as stale because there were no activity during last 14 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

А. Чому так?
Найбільш розповсюджена причина: Студент не реагує на коментарі змінами коду і не задає запитань через брак часу або зміну життєвих пріоритетів. Покинуті піари відволікають менторів. Коли у студента з'явиться час, він/вона зможе перевідкрити той самий піар і продовжити роботу.

Б. Що робити, якщо в піарі нема оновлень, оскільки не зрозуміло, що треба зробити?
Варіант 1. Задати питання в самому PR.
Варіант 2. Задати питання в студентському чаті.

В. А якщо я все зробив(ла) і це ментор не рев'юває мої зміни?

  1. Переконайся, що ти відреагував(ла) на всі коментарі або кодом, або запитаннями, або відповідями. Напиши в PR і в чаті, що чесно вважаєш, що все зроблено і попроси повторне рев'ю. Якщо щось не зрозуміло, задай запитання.
  2. Реагуй на коментарі як менторів, так і інших учасників, включаючи ботів.
  3. Не ігноруй прохання типу * "Let's do some self-checks ..." * "Go through the checklist below..." * "mark fulfilled requirements..." * "if you would silently ignore this recommendation, a mentor may think that you are still working on fixes"
    навіть якщо вони написані ботом. Боти помічники і ментори покладаються на те, що прохання і пропозиції бота дотримуються.
    Не лінись піти по лінках в коментарях, погуглити термінологію та скористатись Google Translate.
  4. Можливо, у менторів склалися інші пріоритети через роботу, сімейні обставини і т.п. В такому разі, якщо ти зробив(ла) рекомендоване вище, то волай в чаті, що PR позначений stale, наче, все зроблено, а ментори чомусь не реагують - рятуйте!

Г. Хіба недостатньо того, що я додав(ла) коміт із змінами?
Часто буває так, що бачиш новий коміт, ідеш перевіряти, змін багато, доводиться перечитувати весь код. А потім з'ясовується, що одна невеличка зміна "відкладена на потім" чи з'являється ще один коміт і знов треба перечитувати все. Любіть нас, спілкуйтеся з нами - і ми відповімо повною взаємністю.

Традиційна пропозиція: задай питання по вищенаписаному в студентському чаті.

@stale stale bot added the 💤 Stale label Apr 7, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
self-check-done Student confirmed that self-checks against requirements/common-mistakes are done Stage0.1 💤 Stale task-TJSW-OOP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants