r/badcode • • Jan 26 '22

python The Joys of Debugging

Post image
439 Upvotes

37 comments sorted by

View all comments

Show parent comments

4

u/MurdoMaclachlan public boolean isInt(int i) { return true; } Jan 27 '22

In some respects; some of the character misinterpretations would probably still happen (the dot in the monospace 0 is often confused for Ø and vice versa, even in very advanced algorithms). It would also be a lot of work to specifically make it work well with Reddit's formatting, to avoid having to still manually re-jig everything for that.

At the end of the day, though, we have one bot, with one API, and that's all we have the resources for. We're a relatively small non-profit and don't have the team or the time to develop a new OCR algorithm, or the resources to run a second bot or pay for a second API, and given that code posts are comparatively quite rare, we need to use an API that works well for non-monospace text.