Skip to content

1. Васильев Егор Евгеньевич. 613 - #23

Closed
ansend11 wants to merge 2 commits into
python-department:mainfrom
ansend11:main
Closed

ansend11 wants to merge 2 commits into
python-department:mainfrom
ansend11:main

Conversation

@ansend11

Copy link
Copy Markdown

домашняя работа Егора Васильева группа 613

@ansend11 ansend11 changed the title Solve task 1 1. Васильев Егор Евгеньевич 613 Sep 24, 2026
@ansend11 ansend11 changed the title 1. Васильев Егор Евгеньевич 613 2. Васильев Егор Евгеньевич. 613 Oct 2, 2026
@github-actions github-actions Bot added the 613 label Oct 2, 2026
@ansend11 ansend11 changed the title 2. Васильев Егор Евгеньевич. 613 1. Васильев Егор Евгеньевич. 613 Oct 2, 2026
Comment thread src/part1/snowflake.py
return None
snowflake_id = sequence_id
snowflake_id |= node_id << SEQUENCE_ID_BITS
snowflake_id |= time_ms << (NODE_ID_BITS + SEQUENCE_ID_BITS)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Вычисление сдвига дублировано в функции decode_timestamp_ms. Это может быть опасно, так как если логика поменяется, то надо будет исправлять в 2х местах, а это можно забыть, поэтому лучше было вынести вычисление в отдельную константу.
Пункт S1, минус балл.

@ansend11 ansend11 closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants