TODO Comments (1) - Deepstash
TODO Comments (1)

TODO Comments (1)

TODOS are jobs that the programmer thinks should be done, but for some reason can't do at the moment. It might be a reminder to delete a deprecated feature or a plea for someone else to look at a problem. It might be a request for someone else to think of a better name or a reminder to make a change that is dependent on a planned event. Whatever else a TODO might be, it is not an excuse to leave bad code in the system.

10

18 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 TODO Comments (1)

Explain unidiomatic code in comments

It’s a good idea to comment code that someone else might consider unneeded or redundant, such as this code:

final Object value = (new JSONTokener(jsonString)).nextValue();

// Note that JSONTokener.nextValue() may return

// a value equals() to nu...

Use comments to mark incomplete implementations

Sometimes it’s necessary to check in code even though it has known limitations. While it can be tempting not to share known deficiencies in one’s code, it is better to make these explicit, such as with a TODO comment:

// TODO: We are making the decimal separator be a period,

Awkward conversations

At a party or conference where small talk with someone nearby becomes awkward:

  • excuse yourself to get a drink/coffee.
  • say β€œIt’s nice talking to you, but I have to talk to someone before they leave.”
  • if your conversation is on the phone, end it by saying, β€œ...

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