GitHub full of copy/pasted bad code?
github.com
GitHub full of copy/pasted bad code?
1–2 of 2 posts
Re: GitHub full of copy/pasted bad code?
#2I was looking for a Baby-step giant-step algorithm implementation in python, and came across this tight function. It works, but it's not great because of obvious performance pitfalls (left as an exercise to the reader) & it could be more general. Furthermore, it's an algorithm that is meant to be "a faster version" of the naive implementation to discrete log, so performance is probably at least somewhat important to a user.
Anyway, I looked for a unique string from the code, "you shouldn't use BSGS anyway", and found 23 more instances of this code, copy-pasted with slight modifications. None of them address the performance or generality issues.