>>13354166>If the code works, then it's good enough.Good enough for what? There are many stories of programmers that hack together something that is "good enough" and roll with it to build a business or expanding its usage in some way. Soon they find the program is bogging down as N gets bigger and discover the computational complexity of some buried algorithm is 2^N which does not scale thus requiring a rewrite.
There is an adage in CS to not knock yourself out with premature optimization because it is a trade off, writing super efficient code takes time, makes the code more complicated and sometimes efficiency doesn't matter. Get it to work then worry about optimization later because bottlenecks will be revealed soon enough and not all potential bottlenecks will become real bottlenecks.