Make experienced users help: two ways to quickly post code as a code-section

Hi newcomer,

This thread wants to show you how you can speed-up getting helpful answers with small effort.
If you manage at least to post this way. You have the sympathy of the experienced users.

If you are willing to invest another 20 minutes these 20 minutes extra-time will save you a minimum of 200 minutes to finish your project.

always

post your full sketch. As a

code-section

from the very first to the very last line

A code-section has a small height => keeps your posting "short" but enables copy & paste your code by a single mouse-click for analysing or compiling in the arduino-IDE.

If you are using Arduino-IDE 2.X click edit - Copy for forum like shown in this picture 1

or use the keyboard-shortcut Ctrl-Shift-C

If you do it this way with Ctrl-Shift-C the IDE adds

```

to the code to make the code appear as a code-section

then change to browser with forum and simply press
Ctrl-V for pasting the clipboard-content into your posting

with Arduino IDE 1.8.19 (the older one) it works this way
fastest method is just three steps
Inside your sketch picture 2

Then just paste the clipboard-content into the posting. By pressing Ctrl-V.
All formatting details are added automatically.

The second way is to use the code-section button:

If you started writing a new posting
Copy your code into the clipboard picture 3

You will see this inserted picture 4

Simply paste the clipboard-content (your code) by pressing Ctrl-V

After pasting your code and clicking "Reply" your code is in a Code-Section

If you move the mouse to the upper- left right corner of the code-section
a Copy-symbol appears

A single cklick on this copy-icon and the full code is copied to the clipboard. Ready to paste it into arduino-IDE or whereever.

If you missed creating a code-section you can

re-edit a posting.

below your own postings you can see a pencil-icon

What is the 20-minute investment?
Well taking 10 minutes time to read this

and taking another 10 minutes to write down a detailed description like described in the link above.

If you prefer to post a short question in a hurry - all that will happen is that you will receive delaying asking-back-questions just for the details you thought you leave them away for faster posting.
Fast and short postings just will slow you down.
Well it is your choice to whirl in circles without moving forward or to take time to speed up finishing your project by taking time.

4 Likes

Good explanation.

Isn't it the upper right corner !?

sure you are right! Thank you very much for pointing me on this typo.
corrected it in a way your posting still makes sense. ( crossed out the word "left")
best regards Stefan

Not everyone is stuck with a PC :slight_smile:

Indenting is done by pressing ctrlT on a PC indeed but it's commandT or T on a Mac (if you want to provide guidance for other platforms)

1 Like

But much too long, much too complicated and won't be read by many new users.

Before you ask, no, I can't think of a way to make it shorter and/or less complicated and nor can I think of a way to ensure that new users read it any other advice, much less follow it

The best option that we have at the moment is the pop up warning when a user tries to post code without code tags and that is far from perfect too

Well there is one option left but it is a radical option:

in the italian or spanish forum - I don't remember it exactly -
the moderator did this

"Your thread is locked until you have read the forumguidelines and have edited your initial posting according to the guidelines"

The difference to the "standard"-link is

Titel names the advantage for the user
Make experienced users help: two ways to quickly post code as a code-section

So what do you suggest to improve it?

best regards Stefan

Now who is guilty of not reading posts on here :grinning:

As I said

locking their thread combined with an appeal to read the guidelines is a tough treatement but would be very effective. Either making them read the guidelines and re-edit their initial posting or to go back instagramming / snap-chatting three-word sentences.

best regards Stefan

this prevents them from fixing it... not the right solution.

what the Italian mod threatens to do (but rarely does - at least not to me when I make mistakes and answer anyway without checking if the OP did provide an intro) is to remove any answer made by other members until OP has introduced her/himself and fixed the post.

Now if they'd just add a single button that users can press that will automatically generate a reply with the links on how to properly post code.

Do you mean something similar to the "liked", the "share link" the "bookmark" button?

A button you click on it and a reply pointing to a short manual on how to properly post code?

If they do I would be very happy with it.

If they (the arduino-team) does not
which "work-around" would you prefer?

  • Autohotkey-script with a hotstring
  • a sketch for each USB-HID-capable board that stays connected and by pressing a button the microcontroller types the message?

should it be a link to click on or directly inserted pictures?

best regards Stefan

I've a keyboard shortcut and if I type "rules!" it's expanded to


Hello, do yourself a favour and please read How to get the best out of this forum and modify your post accordingly (including code tags and necessary documentation for your ask).


I have another one "codetags!" that expands to this


please edit your post, select the code part and press the </> icon in the tool bar to mark it as code. It's barely readable as it stands. (also make sure you indented the code in the IDE before copying, that's done by pressing ctrlT on a PC or cmdT on a Mac)


I've a few more to make this quick. I know some moderators have an arduino with buttons that type for them canned responses too (neat !)

truth to be told, unfortunately few are those who comply, esp. if other posters start providing answers. (and I do too sometimes, hoping they will fix it later...)

1 Like

I agree. I have seen this too. So me personal I will try something new and write the users that start answering right away a PM suggesting to first giving hints how to start a thread.
It could be seen as:

I have prepared a modified code for you. But before I post it please edit your first post to fullfill the main recommendations given in the guidelines.

I asked for an easy button once before, Standard Answer "button" - Community / Website and Forum - Arduino Forum. It isn't happening.

Now the trick is getting the munchkins to read it !

I tried to use the "copy to forum" initially but I must have done something wrong. I hope my edited post worked using the tags

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.