Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the author should probably use some C++ <algorithm>'s in lines 241 and later, avoiding raw loops and making the code clearer.

Also, yeah, it's not 284 lines of C++ by any stretch of the imagination, but the main file is pretty readable, which is nice.



I just used the Linux CLOC on the C++ files that I wrote.

Yes, I didn't count my 3 dependencies KenLM, Wave, or TensorFlow, because those are used by pretty much all speech recognition projects. For comparing the complexity of my code to Mozilla's DeepSpeech, it makes sense to ignore the LOCs for shared dependencies.


It was a cute gimmick for the title, nm. But you should try to avoid raw loops in favor of established iteration patterns / standard library algorithms. I found this talk on the subject by Sean Parent to be educational:

https://www.youtube.com/watch?v=qH6sSOr-yk8


Thanks for sharing the talk :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: