Hacker News new | ask | show | jobs
by eigenvalue 850 days ago
I generally hate "OOP" style code. I like individual functions that stand on their own. Also, it makes it much harder to use numba to optimize the code if they are methods inside a huge class.

In any case, this project is about making cool looking and educational animations of a pathfinding algorithm and generating interesting and diverse mazes to test it on. Not about making some amazing and modular reusable system.

2 comments

You wanted educational visualizations and you got them, but keeping the code organized to allow students to inspect it seems way more important than optimizing, especially if you are already using a slow language.
I suggested OOP because its a baseline for readability. Also your code has at least 1 class already lol. Defending having everything in one file for a project like this is a bit unbelievable.
It is LLM generated code so I imagine it would be more work to create any semblance of a proper Python package structure.