0

Which form do you prefer?

  1. Old Default:
    #include <stdio.h>
    
    int main(void)
    {
       printf("Hello world\n");
       return 0;
    }
  2. Default:
    #include <stdio.h>
    
    int main(void)
    {
       printf("Hello world\n");
       return 0;
    }
  3. Language Syntax:
    #include <stdio.h>
    
    int main(void)
    {
       printf("Hello world\n");
       return 0;
    }

Also, enclosed in a box or no?

10
Contributors
26
Replies
28
Views
10 Years
Discussion Span
Last Post by Dani
0

The default because I type code tags manually and I'm too lazy to add the language. And yes, I'd prefer a box as it clearly separates two different code blocks without having to add text between them. Why do you ask?

0

I think Dave means that for code that isn't syntax highlighted, would you prefer the font in black or green. I like the green better because I think it easily distinguishes code from the rest of the text (eliminating the need for a box around it IMO, as the primary purpose for a box around code is to separate it out). And not having lots of boxes all over the dev forums makes the pages look a lot cleaner.

0

The default because I type code tags manually and I'm too lazy to add the language. And yes, I'd prefer a box as it clearly separates two different code blocks without having to add text between them. Why do you ask?

I personally find green text difficult to read. It sinks into the background; some default comment colors are green; overall, to me it says, "ignore this".

I prefer the box and black text. Easier for copy and paste, and easier to read as-is.

But the question is not about my preference, it is in search of others' opinions.

0

>I personally find green text difficult to read. It sinks into the background;
>some default comment colors are green; overall, to me it says, "ignore this".
Boohoo. Highlight it. ;) Personally I prefer a black background and teal text, but I doubt Dani would cater to my text editor whims. ;)

0

>I personally find green text difficult to read. It sinks into the background;
>some default comment colors are green; overall, to me it says, "ignore this".
Boohoo. Highlight it. ;) Personally I prefer a black background and teal text, but I doubt Dani would cater to my text editor whims. ;)

Gimme the box.

0

I don't vote on my own polls so as not to tip my hat. At least early on. Generally speaking. I don't care to influence the results.

0

I like the keyword highlighting, but I'm also too lazy to type the language so that doesn't work too well... unless each forum had the code blocks default to the appropriate language for that forum? That said, I prefer the green text because it's easier to distinguish than black. And a surrounding box is nice too.

Edited by happygeek: fixed formatting

0

I like it the way it is now -- especially the line numbers. The only language syntax I've used is C, such as [ code=c ], which isn't very difficult to type. As for the box, yes I miss that too but I can live without it.

0

The poll is biased, there is no option for 'none of them'. Really speaking, with the kind of font size currently used, it doesn't make a difference which of the options is selected -- all the three look the same.

The coloring scheme which I personally like the most is the one used by Devshed. Reading code could never have been simpler, not to mention linking to Javadocs in case of Java code.

0

The poll is biased, there is no option for 'none of them'.

I did consider that. It's more, "if you use code tags, what is your preferred rendering?" If you don't use them, [edit]or have a preference,[/edit] this isn't your poll.

0

'None of them' doesn't mean no code tags, it just means some other type of code tags. I guess my reply wasn't the kind you were looking for.

> this isn't your poll.
Of course it isn't, its yours.

0

I prefer the color syntax, but without line numbers. And I do like the yellow box to differentiate code from post.

I also use exclusively.[code=c] exclusively.

0

I didn't like line numbers at first either but I have grown to like them because they make it very easy to dicsuss specific lines in the posted code. Its a lot easier and safer to reference a line number then it is to quote the line and hope the OP can find it in his code.

0

I like the language syntax. Although I would like if you changed the preprocessor directive colors ( #include ... )
What I don't get is, why does the line numbers get copied when I copy the code?

0

> why does the line numbers get copied when I copy the code?
Click the toggle plain text link at the bottom of code and it will remove the line numbers for easy copying.

0

> why does the line numbers get copied when I copy the code?
Click the toggle plain text link at the bottom of code and it will remove the line numbers for easy copying.

My question was, why are the line numbers copied by default? When you select the code, the line numbers are not selected. So naturally you would expect only the selected text to be copied without the line numbers. I noticed that toggling the code worked, but I am lazy, and tend to forget to toggle the code before copying the first time, resulting in having to copy and paste the code twice.

0

It's an OS/browser issue. The line numbers are created with regular HTML list mark-up. Different platforms copy/paste lists differently. For example, for me, it works fine in IE but requires me to not use the line number version to copy from FF.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.