3 ms·
seems this was LLM generated? I dont mind people using LLMs to generate boilerplate, but at least apply some basic oop fundamentals to make it readable. the bar
by szykbi 2y ago
seems this was LLM generated? I dont mind people using LLMs to generate boilerplate, but at least apply some basic oop fundamentals to make it readable. the bar is on the floor
- eigenvalue 2y agoI 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.
- szykbi 2y agoI 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.
- uncivilized 2y agoIt is LLM generated code so I imagine it would be more work to create any semblance of a proper Python package structure.
- dietr1ch 2y agoYou 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.
- diggan 2y ago> but at least apply some basic oop fundamentals to make it readable Heh, and here I sit, usually complaining about the opposite! "Don't make it so OOP gratuitous so it gets a bit easier to read and understand" is probably something I've said more than twice. Guess what's readable or not is subjective :)
- eigenvalue 2y ago100% agree with you on this-- I find a functional approach, where there is no state to deal with, just input arguments and return values, to be much much easier because you can reason about each function separately.