Re:Show HN: Visual a* Pathfinding and Maze Generation in Python
by szykbi on Monday August 05, 2024 @02:07PM
(#41163767)
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
[ Parent
| on HN ]
Re:Show HN: Visual a* Pathfinding and Maze Generation in Python
by diggan on Monday August 05, 2024 @03:13PM
(#41164425)
> 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 :)
Re:Show HN: Visual a* Pathfinding and Maze Generation in Python
by eigenvalue on Monday August 05, 2024 @03:17PM
(#41164467)
100% 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.
Re:Show HN: Visual a* Pathfinding and Maze Generation in Python
by eigenvalue on Monday August 05, 2024 @02:23PM
(#41163906)
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.
Re:Show HN: Visual a* Pathfinding and Maze Generation in Python
by szykbi on Monday August 05, 2024 @02:45PM
(#41164112)
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.
Re:Show HN: Visual a* Pathfinding and Maze Generation in Python
by uncivilized on Monday August 05, 2024 @06:18PM
(#41166138)
It is LLM generated code so I imagine it would be more work to create any semblance of a proper Python package structure.
Re:Show HN: Visual a* Pathfinding and Maze Generation in Python
by dietr1ch on Tuesday August 06, 2024 @02:05AM
(#41168203)
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.