View Full Version : Suggestion Template in Programming & Comp Sci forum
jhae2.718
Apr7-11, 08:31 PM
I was thinking that it might not be a bad idea to have a template for the programming and comp. sci. forum not unlike Homework Help.
Basically, something like:
[code]
If you have example code, please place it inside code tags...
[/code]
That way there might actually be readable code posted, as no one seems to know about code tags.
JaredJames
Apr8-11, 05:11 AM
I do like this idea. Particularly after one of the last ones with a huge block of unindented code. What a lovely read that was.
(Big thanks to Mark44 who re-wrote it with tags and indents.)
MATLABdude
Apr21-11, 04:34 AM
Tangential to this: is there any way to allow for tab characters? White space, and proper indenting make code readable. I have to open up Notepad, type a tab character, and then copy and paste it in code here.
I do like this idea. Particularly after one of the last ones with a huge block of unindented code. What a lovely read that was.
(Big thanks to Mark44 who re-wrote it with tags and indents.)
I have a hard time trying to discern the logic (or lack thereof) when code is poorly or not indented. Sometimes I'll go in and indent it to help me understand what the OP is trying to do, and to help other readers.
JaredJames
Apr21-11, 02:08 PM
I have a hard time trying to discern the logic (or lack thereof) when code is poorly or not indented. Sometimes I'll go in and indent it to help me understand what the OP is trying to do, and to help other readers.
The majority of stuff I do now is with Python, so when not indented it's impossible to see what goes where (as I'm sure you're aware).
So when a thread pops up without proper formatting, I usually just give up on the code if I can't see it clearly with a quick skim through.
jhae2.718
Apr21-11, 04:50 PM
The majority of stuff I do now is with Python, so when not indented it's impossible to see what goes where (as I'm sure you're aware).
So when a thread pops up without proper formatting, I usually just give up on the code if I can't see it clearly with a quick skim through.
For Python cases, if I'm in a good mood I'll quote the post with the code, and then throw it in code tags, which can usually recover the indentation.
There's certainly no lack of unclear posts, though. Sometimes I get the feeling that the posters don't even indent their source code. :eek:
There's certainly no lack of unclear posts, though. Sometimes I get the feeling that the posters don't even indent their source code. :eek:
Some of the worst, IMO, is Awful Fortran Code, with no indenting, and lots of incomprehensible variable names such as rtlxgn and the like.
jhae2.718
Apr26-11, 01:07 PM
Would anyone be interested in a tool that you could paste source code into and have it formatted for BBCode (e.g. syntax highlighting)? I was thinking that might be a fun summer project.
JaredJames
Apr26-11, 01:09 PM
Would anyone be interested in a tool that you could paste source code into and have it formatted for BBCode (e.g. syntax highlighting)? I was thinking that might be a fun summer project.
As long as the words "open source" are there somewhere, it sounds great!
jhae2.718
Apr26-11, 01:24 PM
But of course! (Right now I'm thinking of Python/wx and using XML to define syntax files.)
Note that this will be a spare time thing, and right now I have very little spare time.
JaredJames
Apr26-11, 01:25 PM
But of course! (Right now I'm thinking of Python/wx and using XML to define syntax files.)
Note that this will be a spare time thing, and right now I have very little spare time.
Join the club.
Tangential to this: is there any way to allow for tab characters? White space, and proper indenting make code readable. I have to open up Notepad, type a tab character, and then copy and paste it in code here.The problem is the browser(s). Rather than allowing you to type a tab, they use tab to cycle through inputs sources on the page. (A "feature" I never use.) To get the above tab, I hit tab in a text editor, and copied and pasted it here.
As for encouraging code tag usage, try something like what C Programming.com (http://cboard.cprogramming.com/cplusplus-programming/) does; see the first announcement?
Maybe a sticky with a title like "USE CODE TAGS, OR I'LL COME TO YO' HOUSE AND KICK YOU IN YO' TEETH!!!" would attract attention.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.