Skip to content

Manual code review

Manual Code Review Findings

During the manual code review of the D21 voting system, two notable observations were made:

  1. Remaining Time Query Before Voting Start:
  2. The function getRemainingTime returns 0 when queried before the voting period has started.
  3. This behavior could be potentially misleading as it might be interpreted as 'no time left for voting' rather than 'voting not started.'

  4. Results Retrieval Before Voting Commences:

  5. When getResults is called before the start of the voting period, it returns a list of subjects with zero votes.
  6. This could be unexpected since the voting hasn't commenced and no votes have been cast yet. Typically, a function like this might be expected to either return an empty list or indicate that voting hasn't started.

These observations are not necessarily bugs, but they highlight areas where the system's response might be counterintuitive or unclear to users.