DEV Community

Cover image for How do you keep track of notes in code?

How do you keep track of notes in code?

Madza on November 23, 2020

Keeping track of notes while coding is essential, so you have all the ideas for development once you re-visit. Thanks to code commenting and variou...
Collapse
 
yoursunny profile image
Junxiao Shi

I have a stack of recycled paper (i.e. one side already used) on my desk. I write my ideas on the blank side, with date and project name and module topic on the top line.
When I finish a feature, it feels satisfying to feed the page into the shredding machine (nothing confidential but the sound of the shredding machine celebrates my achievement).

Collapse
 
madza profile image
Madza

Hats off for this approach, I've always believed that resources should be used efficiently too 👍

 
madza profile image
Madza

from the programming view, this is absolutely correct and should be considered as a best practice 😉 i know it's just me, usually being too lazy to write failing tests, when you could do just Ctrl + / 😂😂

Collapse
 
1e4_ profile image
Ian

If your working on something else or it's end of day on your own branch it makes sense to use @todo with a comment. I agree however there should not be any @todo in any branch in production

Collapse
 
madza profile image
Madza

I see where you are coming from 😉 For collaboration oriented projects I prefer using the issues panel too, for personal projects I like to make notes directly in code. Nothing will be deployed to production, while there are still to-dos left, I just find this approach more productive as I don't have to switch between any notes app 😉

Collapse
 
programmerbyday profile image
Arman @programmerByDay

I would create a story in the backlog for that. Code should be as clean as possible.
The only time I’d suggest to put a todo is when there is a piece of code that may not make sense to other devs (eg throwing an exception instead of the actual code), in this case you can put a small todo comment and write the story number that is related to here. (Eg throwing exception until story 114 is implemented)

Collapse
 
yaser profile image
Yaser Al-Najjar

I tried TODOs and they're not the best approach, just use GitHub issues... it will save you from distraction, headache, and ugly code.

Collapse
 
dansilcox profile image
Dan Silcox

I even have a pre-commit git hook for this - well, to be fair, I allow the TODO to exist as long as there's an issue reference to go with it :D

Collapse
 
quantalabs profile image
QLabs

To be honest, I don't use TODOs. When I find a bug, I go ahead and fix it, instead of just waiting for tomorrow and procrastinating.

Collapse
 
dailydevtips1 profile image
Chris Bongers

I mainly log issues in our work board (Trello based)
Then will make the comments in the code with Better Comments VS plugin.
And will do some Todo's, but still looking for a good way there.

Collapse
 
madza profile image
Madza

I love Trello too, I use it for more general stuff, like project ideas and so on 😉

Collapse
 
baptistecrouzet profile image
Baptiste Crouzet

Better comments <3

VS Code bookmark extension is good too !