I'm not allowed to comment my code, so what are other ways to make my code descriptive but...

Quora Feeds

Active Member
Matt Pickering


Tell whoever said “comments take up memory” to seek other employment because clearly they do not know or understand how to effectively program or know anything about modern technology costs. Storage is dirt cheap especially hard drive space, the only space you’re taking up with comments.

They generate no code.

They aren’t a speed bump to the compiler as its performance is already optimized with comments in code in mind.

They cost little to store. Literally fractions of a cent for all comments given they are text.

But they cost a metric ton in developer time when comments are not present and they need to be!

Self-documenting variable names are one thing. Using meaningful names is a good practice. But we aren’t usually commenting variables! We’re usually commenting code that needs clarification or explanation on what it is doing to ease our maintenance burden later.

I’d find out what the aversion to comments is. That’s a bad team dynamic and usually indicative of deeper issues. The same as a team that insists on comments on every statement. Also equally problematic in the other direction.



See Questions On Quora

Continue reading...
 

missscreen

Active Member
Using variable names that document themselves is one thing. It's important to choose meaningful names for your children. But, we rarely comment on the factors themselves! The majority of the time, we add comments to code that needs to be clarified or explained in terms of what it is doing in order to reduce our load of maintenance in the future.
 

situationball

New Member
Programming is really a job that requires understanding the principles to complete the code. It is built into chains of characters. There are many different languages. The topic is really suitable because knowledge of programming languages is growing and tends to advance more and more.
 
Top