New blog post: Depth-first development
I have found many benefits in applying the depth-first search algorithm to how I write code. Just as depth-first search is an algorithm that explores a path fully before backtracking to explore others, I try to follow the original task for as long as it takes to complete it. I keep a list of everything else to follow up later.
https://henko.net/blog/depth-first-development/
[#]programming #softwaredevelopment #tdd #focus
=> More informations about this toot | More toots from henrikjernevad@mastodon.social
@henrikjernevad I do similar thing. The thing that works the best for me is the TODO comments in the code. That way, you can make the notes to yourself shorter because they're closer to context (so you don't need to write "do this here-and-here" since the note is already where you see the change to be done) and it is easier to recall what you meant when you see it in the context where it came to your mind. I use Todo Tree extension in VS Code, so I can easily find them. https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree
=> More informations about this toot | More toots from tymwol@hachyderm.io
@tymwol Yes, I used TODO comments as well sometimes. I even mix. I find TODO comments work well for ideas that are directly linked to a particular line of code. For other ideas it is not obvious where to put that TODO comment, so I started putting them in a TODO.md instead. But I guess that would work with your TODO-based workflow too. 😊
That extension linked nice, by the way! 🤓
=> More informations about this toot | More toots from henrikjernevad@mastodon.social
@henrikjernevad @tymwol A team I worked in used TODO comments in code, but we also raised an issue or task for each one and referenced that in the TODO comment. Without that TODOs tended not to get prioritised.
OTOH some TODOs need addressing before the current task is really complete. These don't need an issue/task. They are more suitable for a post-it note on your screen or similar.
=> More informations about this toot | More toots from underlap@fosstodon.org
@underlap @henrikjernevad Yeah, when I write a TODO comment, I write it to myself and don't assume it would be tackled by anyone else in any foreseeable future. If I assumed this is something that somebody else needs to do, or me but in the future, I'd create a task for it. Otherwise, I don't create TODOs I won't resolve, or I remove all of them before the merge.
=> More informations about this toot | More toots from tymwol@hachyderm.io
@tymwol @underlap If the TODO lives longer than the task(s) I'm currently working on, I would probably create an issue. But then I would consider the TODO "done" and remove it. For personal projects, I may just let them stay in the code.
=> More informations about this toot | More toots from henrikjernevad@mastodon.social
@henrikjernevad @tymwol Fair enough. I prefer to keep the TODO in place if it's useful to anyone reading the code (who may not have seen the issue).
=> More informations about this toot | More toots from underlap@fosstodon.org This content has been proxied by September (3851b).Proxy Information
text/gemini