4 ms·
This is a good counter argument to the article. I know instantly what a switch statement does, but if I have big bold markers for where a switch and it’s cases
by SlowRobotAhead 7y ago
This is a good counter argument to the article. I know instantly what a switch statement does, but if I have big bold markers for where a switch and it’s cases are, that helps me jump to the block I’m looking for.
In the case of faint comments, I may need to slow down and actually read them if they’re a little less visible. I also know instantly that comments aren’t code and I don’t want all my code faint so just them being different from each other is enough for me.
Article makes good points but doesn’t seem like it’s for me.
- dr_zoidberg 7y agoI've seen a few editors[0] highlight certain words in comments like "TODO", "BUG", "FIXME", etc. It depends on the parser that the higlighter uses (some regex based may have limitations here), but it does exist. [0] pycharm and vscode come to mind because I use them the most, but other that I don't recall also do it edit: a couple of typos
- SPBS 7y agoVim highlights those by default too. I had no idea that was a default in vscode as well
- noir_lord 7y agoYep and you can create custom ones and color them however you like. I have BENFIXME and a git hook to prevent ever commiting it, handy for when I want to not forget to come back to something.
- spockz 7y agoCould 3D work here by having comments on a different focal plane than the actual code and then by switching the focus plane? This way one either looks at the comments sharply or at the code itself.
- Mirioron 7y agoSo, essentially layers in image editing? One layer for code and another for comments?
- jobigoud 7y agoWe could think of each collapsible region as going down one dimension.
- SlowRobotAhead 7y agoScrolling “into” a function by depth should take you to its code then, I mean, I’m sure someone has tried this already but that seems like the next logical step.