4 ms·
In these cases did you write it from scratch or were you able to copy paste a working solution? Because most pragmatic to me would be to google for a solution
by mewpmewp2 5y ago
In these cases did you write it from scratch or were you able to copy paste a working solution?
Because most pragmatic to me would be to google for a solution on Stack overflow, see what is upvoted and seems reasonably vetted, then potentially go over the code yourself to see if there's any issues and maybe write few tests to be extra sure.
Maybe your use case is too niche though to be able to copy paste though, I'm not sure.
- sgtnoodle 5y agoSure, I'll find some example code on Wikipedia or whatever as a reference. It's faster than deriving it all again from scratch. I don't really copy paste algorithms like that, though. Instead, I review the reference material until I understand the algorithm and any potential edge cases and optimizations that may apply, and then code it up and unit test it.