-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling easier debug #22
Comments
I agree, it's rarely a trivial decision. My thinking is:
Generally, the longer I've needed to maintain the same code (sometimes: years), and the more code I inherited from others (especially if they're no longer around), the more I've wanted copious comments and/or debug output to help me "remember" things about the code I've forgotten since the last time I worked on it. |
BTW, as a special case - and potentially one worth treating separately from the general question, although it's related - consider a new NPP user.
Today, NPP gives that user no feedback of any kind in either case above (at least, none that I can find). Note that in case 1, atom-package-generator's default output is (now, at least ... not sure if this has changed over time) to log each call to toggle(); NPP never logs it. So even if they look at the dev tools, the user is unsure if NPP is just broken or is working but generating no output. Case 2 is trickier, because the correct output depends on the user's intent. Taking the more likely case where the user intended the newly embedded rule to match at least one line, it doesn't and they have no idea why. "step 1" for them to resolve that is to read and understand "all" the NPP code... at least enough to know where to insert their own logging. It doesn't help that NPP itself silently runs certain transformations (like trim()) on the buffer lines, so even a completely valid regex that depends on leading whitespace will never match in NPP, even though the same regex run against the raw file would match. Project-level rules is just another variant on case 2. Both cases, in addition to the more general bullet list above, led me to wonder out loud if NPP didn't need some form of output. Since the "right" output varies considerably between case 1 and case 2, I started to think about a command (flag, setting perhaps) for each "fairly distinct" case. And that led me to "how do I do that without creating a confusing user experience" especially for other users that do get immediate feedback (because they opened "the right" file, i.e. one that led to >0 marks being populated). The answers are not obvious, which is why I put out a feeler on things in the original issue. |
I agree that NPP should give a better feedback for users, and now I see that more logs will help people that are writing their own marker-rules. |
Breaking this question off from issue #19 into a separate discussion, since the initial response was not immediate consensus. Prior discussion from that issue copied here for the reader's convenience:
johnarwe:
otho:
The text was updated successfully, but these errors were encountered: