Skip to content
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

[Idea] Write "good" before "bad" examples #915

Open
rfc2822 opened this issue Feb 16, 2023 · 2 comments
Open

[Idea] Write "good" before "bad" examples #915

rfc2822 opened this issue Feb 16, 2023 · 2 comments

Comments

@rfc2822
Copy link

rfc2822 commented Feb 16, 2023

I have found the Ruby Style Guide while I was trying to find out which case conventions the Ruby community uses for methods.

Fortunately there's a Ruby Style Guide (thanks!) and I quickly found the Snake Case for Symbols, Methods and Variables section. I didn't know by heart what "snake case" is (I always confuse the case style names and "snake" doesn't say anything to me) so I had a look at the examples.

Here a screenshot how my gaze went:

Bildschirmfoto vom 2023-02-16 14-09-11

After 1, 2, 3 was a bit of uncertainness. So after a short pause (color now turquouise instead of red) I discovered 4 (grey and discreet), had to look for 5 and finally found 6, which was the answer for my question.

My suggestions are to

  • write the "Good" examples before the "Bad" examples and
  • maybe disable syntax highlighting for "Bad" examples (or mark them as bad somehow else which is more intuitive than the comment, which may also be above the current view).

I hope my suggestion is placed correctly here.

@gagalago
Copy link

I like the idea of having meta style guide (a style guide for the style guide) as we all agree that we should strive for consistency.

and I agree that we should more easily see the good example. so maybe, we can highlight these parts https://docs.asciidoctor.org/asciidoc/latest/verbatim/highlight-lines/#rouge

@pirj
Copy link
Member

pirj commented Feb 16, 2023

There is an attempt at writing such a guide, but it wasn't accepted as one.
This comment hints that there was an idea of moving good examples above bad ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants