HACKER Q&A
📣 Bonifasio

Is it normal to not have comments in a company's code?


A month ago I started a SDE internship at a medium company, this is my first time working with code at a company. When I look at existing company code, nothing has any kind of comments, it makes it really hard to understand the code because of all the internal tools and acronyms that are not explained anywhere. And, in my PR reviews I am told to delete my comments to my code before I push it, even for the initial self project that they set me to do and which will only be used by me and my manager. Is it normal to not use comments in a company?


  👤 al2o3cr Accepted Answer ✓

    all the internal tools and acronyms that are not explained anywhere
YMMV, but comments are not usually the best place for this kind of background information as you have to FIND the source file they're in before you can read them. Many teams will keep an external "glossary" of common acronyms and tools in an external data store (wiki / Confluence / etc). If your company doesn't have one, consider _starting_ one as you already need to ask what all those things are anyways and can collect the answers.

Also consider if there's a better alternative to comments within your language's tooling - for instance, many languages now support generating human-readable documentation from metadata in source files (JavaDoc, ex_doc, YARD, etc)


👤 IceMetalPunk
My company explicitly, from day one on the job, forbids comments in code, under the belief that code should be clear enough to understand without comments or else you're doing it wrong.

👤 Juliate
It's not normal.

Now, it would be good for you to understand if there's a rationale behind this (which would still be a major red flag), or if it's only a loose practice no one tried/succeeded to change.


👤 goatcode
It is extremely common.