Hi everybody.
I'd like to make a request for a forum feature called "code blocks" (or "code snippets"). It is widely used throughout the internet, mostly on programming related sites such as StackOverflow or CodeProject. I'm pretty sure that most users are familiar with this feature, but still give a brief explanation of how it works.
How does it work?
Basically, code snippets allow user to create a block of text with numbered lines (optional) and text appearance formatted according to selected programming language.
For instance, placing a following VB code:
Dim isGoingToVisitCOE2013 As Boolean
isGoingToVisitCOE2013 = true
If (isGoingToVisitCOE2013) Then
MsgBox "Waiting for you!"
End If
into a code block will turn into the following block when posted:
1| Dim isGoingToVisitCOE2013 As Boolean
2| isGoingToVisitCOE2013 = true
3| If (isGoingToVisitCOE2013) Then
4| MsgBox "Waiting for you!"
5| End If
Why do we need it?
The problem that we have now is inreadability of code posted as normal text. As for me (and I believe that for almost everyone) the very basics of code formatting are key words tab spacing. It allow to easily distinct user code from standard operators and evaluate overall code structure.
Current formatting features (styles for example) doesn't allow us to quickly format code blocks. As for now reading any reasonable amount of code (more than 10 lines and 2 levels "deep" in fact) is a real challenge. Sure, a code can be copy-pasted to a favourite IDE that will line and highlight everything up, but this is definitely now how you want to read a forum.
To sum up, I am sure that code blocks will make sharing code easier, thus giving us (all users interested in automation and KW-engineering) a boost to share ideas in a more effective way.
Thank you for your attention,
LC.