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

The comments in this code are very sparse. It's easy to think "this code is obvious and needs no explanation" when it's your own code. But even if I can tell what the code is doing, a comment explaining why is a big help in understanding context.

I'm guilty of this in my projects, and one of the things that helps me understand better what and how to comment things is to run the code through something like Pycco or related side by side doc generator.

I use Pycco on my systemverilog code and it works nicely and has greatly improved my comments too.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: