DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Dynatrace Perform: Day Two
  • Moving From Full-Stack Developer To Web3 Pioneer
  • Microservices: Good for Developers' Mental Health
  • History of SRE: Why Google Invented the SRE Role

Trending

  • Event-Driven Architectures: Designing Scalable and Resilient Cloud Solutions
  • Non-Project Backlog Management for Software Engineering Teams
  • Role of Cloud Architecture in Conversational AI
  • Build Your First AI Model in Python: A Beginner's Guide (1 of 3)
  1. DZone
  2. Coding
  3. Languages
  4. 5 Ways You Can Organize Your TODOs as a Software Engineer

5 Ways You Can Organize Your TODOs as a Software Engineer

TODOs is a simple method to manage your work and remind us of unfinished tasks. In this article, here are the 4 best ways to organize your list of TODOs.

By 
Alex Omeyer user avatar
Alex Omeyer
·
Jul. 28, 21 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
13.5K Views

Join the DZone community and get the full member experience.

Join For Free

TODOs are a tricky subject for developers. Many codebases are guilty of having TODOs linger around while nobody knows who’s responsible for a TODO or even has the required context to tackle it. Yet, should we feel ashamed for our lingering TODOs?

Many developers have adopted the approach of adding TODOs to their project’s code. However, it’s not necessarily the best approach to manage them. It makes more sense to extract TODOs to a centralized interface that allows you to actively manage them and add metadata such as context, feature descriptions, requirements, or even relevant code snippets.

This article discusses the following questions related to TODOs:

  • What are the different reasons software engineers use TODOs?
  • What are the problems with adding TODOs to your codebase?
  • What are the best practices for managing TODOs?
  • What’s the best way to manage TODOs?

Why Developers Use TODOs

There are different reasons why software engineers use TODOs in projects:

  • Reminder: Imagine you are developing a new feature, and you come across a snippet of code that needs refactoring. However, the refactoring doesn’t affect the new feature directly so you note it to remind yourself. It’s a great example of quickly noting down a small action as a TODO that needs to be performed at a later point in time. On the other hand, the developer thinks it’s too much overhead to create a new issue or task in a project management tool like JIRA or Asana.
  • TODOs replace a project management tool: I’ve been guilty of this myself. I want to avoid setting up a project board for small projects because it feels like a waste of time. For that reason, many developers add dozens of TODOs to their project’s code to replace the need for a project management tool.
  • Keep pull requests small: Some developers prefer small pull requests because they are easier to review. Therefore, they create multiple smaller PRs to tackle a single task. To keep track of the work that needs to be done as part of this task, they include TODOs to their PRs to remind themselves of unfinished work.
  • Tips: Developers often abuse TODOs as tips for the next developer working on the same code. A TODO might describe how to proceed with the code or possible extensions for the code when you’ve just started a new project.
  • IDE support: Many IDEs have adopted functionality to highlight and search TODOs in your codebase. For that reason, more and more developers assume it’s a best practice to add TODOs to their code regularly. For instance, the most popular TODO management extension for Visual Studio Code is “Todo Tree” with more than 1.1 million installs.

What Are the Problems With Adding TODOs To Your Codebase?

The most important problem with TODOs is their lack of context. Developers often write short TODOs that don’t give a lot of contexts to solve them. Therefore, TODOs are often only resolvable by a few people who have a lot of knowledge about the codebase. It’s even possible that only the engineer who wrote the TODO knows what needs to happen.

Moreover, TODOs don’t have a clear owner except for the creator of the TODO. When you encounter a TODO when working on somebody else’s code, do you remove the TODO or try to resolve it? It’s a tricky question to answer. I remember experiencing TODOs as a college’s personal note that I wasn’t allowed to touch.

Now let’s think about what happens with TODOs. How often do TODOs end up in the master/main branch without being addressed? Even months after merging the TODO into the project’s code, it remains unaddressed. It mainly occurs because of their lack of ownership and context.

Lastly, TODOs expire quickly. Code changes rapidly, especially within a large development team. This means that TODOs aren’t valid anymore or don’t make sense in the current codebase. Again, nobody dares to remove them because of their lack of context. To solve this problem, some companies use different project management and technical debt tools that let you set deadlines and add context.

How To Manage TODOs Correctly

These guidelines are not an exact rulebook for managing TODOs because it depends on your team’s preferences, size, and management style. Hence, here’s a list of four tips that help you to better manage your team’s TODOs.

1. Use TODOs for Minor Issues

Software engineers should only use TODOs for defining microtasks that any team member can quickly tackle. For instance, you could add a TODO to remind developers about changing the name of a module to a more descriptive name. It’s not a task that requires a separate ticket in a project management tool.

Bigger issues or tasks require the use of a project management tool. It allows you to define specifications for the issue and plan it as part of a development sprint.

2. Add Sufficient Context

Solely adding TODOs in the codebase is not the best way to raise issues with code. If you’re looking for ways to organize your issues and add context, try outsourcing to other companies. It allows engineers to import their TODOs into the platform, to organise them and add context such as linking code, dependencies and add metrics such as hours lost.

3. Use a Consistent Format for TODOs 

A consistent format for your TODOs allows you to better manage them. For instance, you could opt for a format that defines a due date and an owner.

Alternatively, you could define more properties like references to code snippets or relevant files.

When you have a consistent format, it’s much easier to accept TODOs during code reviews that fit the defined format. It prevents your team from ambiguous TODOs ending up in your project. On top of that, a fixed format allows you to search TODOs in your codebase quickly.

4. Define Rules for TODOs

Sit together with your team to set rules for TODOs. For instance, define for which kind of tasks you allow the usage of TODOs. By clarifying this, it’s much easier to identify a microtask versus a task that requires the assistance of a project management tool.

5. Add Context To Your Code

Try to use a free Stepsize VSCode extension to add code context for tech debt, refactoring, or TODOs. The extension also helps you collaborate with the team, and organize your technical work better.

What’s Best?

To add my opinion, I’m not a big fan of managing TODOs within the codebase. However, this strategy can work for smaller teams with the right set of rules. Don’t forget to provide context and identify a clear owner.

Software engineer Project management dev IT Visual Studio Code teams

Published at DZone with permission of Alex Omeyer. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Dynatrace Perform: Day Two
  • Moving From Full-Stack Developer To Web3 Pioneer
  • Microservices: Good for Developers' Mental Health
  • History of SRE: Why Google Invented the SRE Role

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: