Skip to content

Instantly share code, notes, and snippets.

@kaimingguo
Last active February 28, 2026 06:10
Show Gist options
  • Select an option

  • Save kaimingguo/43957cbc295ed977887566bd7f9532a8 to your computer and use it in GitHub Desktop.

Select an option

Save kaimingguo/43957cbc295ed977887566bd7f9532a8 to your computer and use it in GitHub Desktop.
TODO comments
Object type Creation date Created by id
Note
2025-02-05T06:03:44Z
Kaiming
bafyreihlh4qi4aoabb2mqs5j7xqvzenkcmpkmxeh3od5jilevvjj26a3aa

TODO comments

Common Comment Types

TODO

Used for planned improvements or feature additions.

// TODO: Add input validation for email field
// TODO(username): Implement OAuth authentication

FIXME

Indicates known broken or buggy code that needs repair.

// FIXME: Memory leak in image processing loop
// FIXME(urgent): Fix race condition in concurrent operations

XXX

Marks code that needs attention due to questionable workarounds or complexity.

// XXX: Temporary workaround for API version mismatch
// XXX: Complex algorithm needs optimization

HACK

Denotes code that uses a questionable coding practice to solve a problem.

// HACK: Using global variable to mismatch state
// HACK: Bypassing type checking for legacy compatibility

BUG

Identifies confirmed bugs that need to fixed.

// BUG: From submission fails on Safari
// BUG(#123): Incorrect calculation for leap years

Style Guidelines

Format

  1. Always use consistent capitalization (uppercase preferred)
  2. Include a colon after the tag
  3. Leave one space after the colon
  4. Write clear, concise description
  5. Use present tense for actions

Additional Information

  • Include relevant ticket/issue numbers
  • Add usernames for accountability
  • Include dates for time-sensitive items
  • Specify priority levels when applicable

Organization Tips

// TODO(p1)(security): Add password encryption
// NOTE: Must use becrypt with minimum 12 rounds

// FIXME(#456): Session timeout not working on Firefox

/*
 * TODO(p1)(#123)(john): Implement OAuth 2.0 authentication
 * Deadline: 2025-03-15
 */

I've created an example showing how to use multiple TODO comments effectively in a real-world scenario. Let me explain the key patterns demonstrated:

  1. Priority Levels:
    • p1: Critical/High priority (security, major bugs)
    • p2: Medium priority (improvements, refactoring)
    • p3: Low priority (enhancements, optimizations)
  2. Categories:
    • security: Security-related tasks
    • performance: Performance improvements
    • feature: New features
    • cleanup: Code cleanup tasks
    • refactor: Code restructuring
  3. Additional Information:
    • Issue number (#123)
    • Assignee (john)
    • Deadlines
    • Related requirements
    • Links or other issues
Object type Creation date Created by Emoji id
Page
2024-02-14T13:30:43Z
Kaiming
🏷️
bafyreignima5cfsl6kugl4eyi3cjnag4wpq5brqvjrpjbgrte34nasgksa

Tags

Work

Use tags like Meetings, Projects, Deadline, TBA (to be announced or arranged) or Clients to categorize reminders related to your work tasks or projects.

Sample

  • Prepare presentation for the upcoming meeting with the client.
  • Follow up on pending tasks with team members.
  • Review and submit the quarterly report to the manager.
  • Attend the departmental brainstorming session.

Personal

Use tags like Errands, Shopping, Health, or Finances to categorize reminders related to your personal tasks or responsibilities.
Use tags like Goals, Habits, Self-Core, or Productivity to categorize reminders related to your personal development and self-improvement.

Sample

  • Buy groceries for the week.
  • Schedule a dental appointment.
  • Pay monthly bills.
  • Organize and declutter the garage.
  • Set goals for the week/month/year.
  • Establish a morning or evening routine
  • Practice a new hobby or skill.
  • Declutter and organize a specific area of your home.

Home

Use tags like Cleaning, Maintenance, Gardening, or Home Improvement to categorize reminders related to tasks and projects around your home.

Sample

  • Clean the kitchen.
  • Fix the leaky faucet in the bathroom.
  • Plant flowers in the front yard.
  • Paint the living room walls.

Family

Use tags like Kids, Spouse, Parents, or Family Events to categorize reminders related to your family members or family-related activities.

Sample

  • Plan a family outing for the weekend.
  • Call parents to check in.
  • Help kids with their homework.
  • Prepare dinner for a family gathering.

Travel

Use tags like Flights, Hotels, Destinations or Activities to categorize reminders related to your trave plans or upcoming trips.

Sample

  • Book flights for the upcoming vacation.
  • Reserve a hotel for the business trip.
  • Research local attractions for the upcoming trip.
  • Pack essentials for the weekend gataway.

Social

Use tags like Friends, Events, Parties, or Social Activities to categorize reminders related to social events or gatherings.

Sample

  • RSVP for a friend's birthday party.
  • Plan a get-together with old friends.
  • Attend a networking event.
  • Send thank you notes to guests after a party.

Health

Use tags like Exercies, Meditation, Doctor Appointments, Hiking, Outdoor, Finess or Medications to categorize reminders related to your health and wellness routine.

Sample

  • Go for a 30-minute walk.
  • Run for 48-minutes.
  • Schedule a check-up with the doctor.
  • Take vitamins and medication as prescribed
  • Practices mindfulness meditation for 10 minutes

Entertainment

Use tags like Books, Movies, Music or TV-Shows, Books-to-Read to categorize reminders related to enterainment activities or hobbies.

Sample

  • Read a book for 30 minutes.
  • Watch a movie or TV show episode.
  • Listen to a new album or podcast.
  • Attend a concert or live performance.

Education

Use tags like Courses, Learning, Research or Study to categorize reminders related to your educational goals or pursuits.

Sample

  • Complete an online course module.
  • Research for a term paper or project.
  • Study for an upcoming exam.
  • Attend a workshop or seminar.

All

Use tags like Agendas, Anywhere,** Calls**, Shopping to categorize reminders related to all tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment