-
Notifications
You must be signed in to change notification settings - Fork 276
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
Юдин Павел #217
base: master
Are you sure you want to change the base?
Юдин Павел #217
Conversation
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.
очень много мест где мне прям не понятно откуда взялся именно такой код, давай пообщаемся, расскажешь почему именно так написал
вот это плохая декомпозиция на коммиты
а если мне надо добавить 100 файлов то это будет 100 коммитов?
коммиты должны отображать какое то логическое изменение в коде
например реализовал <фичанейм>
cs/tagsCloud/Spiral.cs
Outdated
x += xOffset; | ||
y += yOffset; | ||
var point = new Point((int)Math.Round(x), (int)Math.Round(y)); | ||
center = point; |
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.
не очень понимаю, зачем тебе центр смещать каждый раз? тебе же достаточно каждый раз вычислять только сдвиг
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.
это нужно для того, чтобы не каждый раз считать с самого начала, а считать с точки, с которой закончили предыдущую вставку прямоугольника. Если центр не смещать, то программа работает примерно в 8 раз медленнее, чем если центр изменять, но плотность облака становиться меньше
cs/tagsCloud/Utils.cs
Outdated
private const int MaxCoordinate = 5000; | ||
|
||
|
||
public static readonly Func<Color> GetRandomColor = |
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.
объясни, зачем тебе тут везде Func?
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.
По-моему, лямбда-выражения лаконичнее и читабельнее, чем просто методы. И когда в теле один только return, очень хочется записать всё под "стрелочную" функцию.
|
||
<ItemGroup> | ||
<PackageReference Include="FluentAssertions" Version="7.0.0-alpha.3" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0"/> |
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.
лишние ссылки стоит убирать, они сильно захламляют артефакты, помимо того что в ide тебе могут предложить использовать не те сущности через intellisense
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.
если я это уберу, то тесты не запускаются
@razor2651