Bad Comments - Deepstash
Bad Comments

Bad Comments

Most comments fall into this category. Usually they are crutches or excuses for poor code or justifications for insufficient decisions, amounting to little more than the programmer talking to himself.

2

5 reads

CURATED FROM

IDEAS CURATED BY

codingharry

Aspiring full stack developer

Learning to write clean and descriptive comments inside your code requires skill, but you should avoid it! Learn how important (or not) are comments within your code through the first part of the clean code book

The idea is part of this collection:

How To Become A Digital Nomad

Learn more about books with this collection

How to build a network while working remotely

How to work remotely

How to manage finances while working remotely

Related collections

Similar ideas to Bad Comments

Writing Comments About the Obvious Things

Most comments can be replaced with Better-Named elements in your code. If you are tempted to write a what comment to clarify the code, please do not point out the obvious. Remove comments like these if you have to deal with them.

Educate programmers who write comments about...

Good comments do not excuse unclear code

A misuse of comments is to provide information that should have been in the code. An example is when someone names variables badly and then tries to add comments describing them:

# A dictionary of families who live in each city

mydict = {

"Midtow...

Cautiously Optimistic

Our predictions usually seem to fall towards extremes, either too optimistic or too pessimistic. We underestimate how bad things can be in the short term, and how much better they can eventually turn out to be in the longer run. This leads to bad decisions, laughably wrong foreca...

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates