I absolutely loathe seeing TODO in any comments in code. If you know you need to do something, just do it. IMO, these can be tracked with source control. If I see a TODO comment in the PR, it's not getting merged in. Open an issue if you're not going to do it now so others can track it, or tackle it.
Sorry, I know this probably isn't the kind of feedback you're looking for, but it's how I feel about it.
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
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 😉
I can see that use case. I know some people have pointed to IDE extensions to track these. I think a clearer way to do this while in development is just to write a failing test. Example in php:
publicfunctiontest_can_upload_file(){$this->fail('Upload file functionality needs to be implemented.');}
This way it's clear something is not done when running your test suite and you don't have to change your development practices to go hunting for them. Run the test suite -> see tests are failing -> there are things to do.
As with anything in programming though, that's just my opinion 😄
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 + / 😂😂
We're a place where coders share, stay up-to-date and grow their careers.
I absolutely loathe seeing TODO in any comments in code. If you know you need to do something, just do it. IMO, these can be tracked with source control. If I see a TODO comment in the PR, it's not getting merged in. Open an issue if you're not going to do it now so others can track it, or tackle it.
Sorry, I know this probably isn't the kind of feedback you're looking for, but it's how I feel about it.
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
That's an interesting idea. I'd be curious to see what that looks like if you're able to share.
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
Yeah, totally agree.
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 😉
I can see that use case. I know some people have pointed to IDE extensions to track these. I think a clearer way to do this while in development is just to write a failing test. Example in php:
This way it's clear something is not done when running your test suite and you don't have to change your development practices to go hunting for them. Run the test suite -> see tests are failing -> there are things to do.
As with anything in programming though, that's just my opinion 😄
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 + / 😂😂