Skip to content

code base issues #1

@randomidiot2887

Description

@randomidiot2887
  1. Typos / Naming

agregate → should be aggregate.

tknter in your README should be tkinter.

More sutable variable names → “suitable.”

  1. Code Structure

Everything is in a single file with procedural style; could benefit from functions/classes for modularity.

entries and labels classes only contain class-level dictionaries — could use instance variables or proper object-oriented design.

Mixing GUI creation and calculation logic; ideally process() shouldn’t know about widget placement.

  1. Variable Initialization / Types

output list initialized as ['' for _ in range(10)] but then assigned floats. Could start with zeros: [0.0]*10.

Hardcoding list size 10 — won’t scale if more subjects are added.

  1. Input Handling

No handling of invalid input — empty fields or non-numeric input will crash.

-1 is used as a placeholder for “no input,” but it’s a magic number with no explanation.

  1. Calculation / Logic

(total_mark / (100 * num_subjects)) * 100 is unnecessarily complicated; can just be total_mark / num_subjects.

Only counts subjects with != -1.0, but this could be clearer with a named constant or comment.

  1. GUI Issues

All entries prefilled with -1, which may confuse users.

Aggregate entry is editable; could use state='readonly'.

Grid layout works but could be cleaned up using loops or helper functions.

  1. Hardcoding

Subject names, row numbers, column numbers are hardcoded.

Output list size is fixed at 10 — adding/removing subjects requires changing multiple lines.

  1. Miscellaneous

No exception handling — program will crash if any entry is invalid.

No separation of concerns (GUI vs. logic vs. data).

Print statements (print(output), print(agregate)) are left in — fine for debugging but not for production.

No comments explaining why -1 is used.

Inconsistent formatting (spacing, capitalization).

README mentions compiled binaries, but none are provided.

Metadata

Metadata

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions