Skip to content

first commit#1

Open
TonyGO21 wants to merge 3 commits intomainfrom
first-iteration
Open

first commit#1
TonyGO21 wants to merge 3 commits intomainfrom
first-iteration

Conversation

@TonyGO21
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@just-musha just-musha left a comment

Choose a reason for hiding this comment

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

Привет! Код корректный, форматирвоаноие гуд, тесты зеленые - супер. Давай ещё в формулах константы применим, а то сейчас не очень читаемо получается, не понятно что за числа. И работа будет принята!

Comment thread .idea/.gitignore
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Файлы с настройками IDE не нужно добавлять в коммит. Они мб у каждого свои

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Можешь удалить .idea из коммита, и после этого прописать ее в .gitignore файле, в корне проекта

Comment thread ftracker.go Outdated
// Преобразуем скорость из км/ч в м/с
speedMS := meanSpeed(action, duration) * kmhInMsec
// Преобразуем рост в метры
heightM := height / 100
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Вместо 100 лучше использовать специальную константу, так более читаемо получается, нет вопросов что это за число и что оно значит

Comment thread ftracker.go Outdated
heightM := height / 100

// Формула для расчета калорий
calories := (0.035*weight + math.Pow(speedMS, 2)/heightM*0.029*weight) * duration * 60
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Аналогично здесь - вместо чисел тебе нужно использовать специальные константы, они уже заведены в файле

Comment thread ftracker.go
// ваш код здесь
...
speed := swimmingMeanSpeed(lengthPool, countPool, duration)
return (speed + swimmingCaloriesMeanSpeedShift) * swimmingCaloriesWeightMultiplier * weight * duration
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

О, вот тут исиользуешь константы - это хорошо

Copy link
Copy Markdown

@just-musha just-musha left a comment

Choose a reason for hiding this comment

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

Верно! Принято!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants