What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

Currently StackOverflow (and maybe all other portals) cannot clearly differ between "good" and "bad" code. So, when quoting a users code it's not really visible what's wrong and what's not. Giving users the possibility to color text red would make some thing much more clear.

share|improve this question
3  
There are better ways to identify wrong code than adding in ugly color effects that will only get abused. Related: Having font color option in SO question Editor –  animuson Jul 29 '13 at 21:52
    
@animuson But this is downvoted 15 times... I don't think people want this. –  Panique Jul 29 '13 at 21:53
    
This doesn't work if a ==== b: print 1; this does work: if a == b: print 1. What's the difference between the codez? –  ben is uǝq backwards Jul 29 '13 at 21:55
    
@benisuǝqbackwards Edge case! But usually this might be useful. Currently the mysql vs. mysqli issue is a big thing in php on SO, so it might be interesting to mark such fine differences. –  Panique Jul 29 '13 at 21:57
3  
It's not an edge case @Panique; it's words :-)... if you write that something doesn't work then it indicates that it doesn't work... without the need for colouring everything. –  ben is uǝq backwards Jul 29 '13 at 21:58
2  
People will just terribly misuse it. As it stands, too many users already abuse the inline code option to highlight random stuff you really want to give them colors?? –  Shadow Wizard Jul 29 '13 at 22:30
    
It's your job to make this not ugly and not-misuseable! All IDEs and coding tools use decent colors to clarify critical errors. –  Panique Jul 29 '13 at 23:03
1  
Actually, no, it's not our job. It's your job, because you're the one making the feature request! –  Doorknob Jul 29 '13 at 23:22
    
@Panique Stack Overflow is not an IDE or a coding tool. It's a Q&A site. –  Cody Gray Jul 30 '13 at 4:20

1 Answer 1

1. LET'S MAKE IT RED

Don't you hate it when users think that CAPITALIZED BOLD QUESTIONS WILL GET MORE ATTENTION?? Well... I do. And I don't want it to be possible for users to color the whole post or even some parts of the post with an annoying color such as red.

2. This is not an IDE

All IDEs and coding tools use decent colors to clarify critical errors.
– Panique

Stack Exchange is not an IDE. It simply offers formatting tools to make the code clearer. Trust me; it's already clear enough. Also, when I see colored code, I don't see mistakes or wrong things. I see classes, methods, data types. Mixing errors with the whole thing would be just messed up.

image

3. Aim for the right solution

Like stated in a comment above, text will always be the best solution here.

This is good:

int x = 2 / 2;

This is wrong:

int x = 2 / 0;

Why ? It's more clear (you don't have to think about "hey what is this color's meaning again?") and also, we are not forgetting our color blind friends.


I see too many problems here for this to even be considered.

share|improve this answer
    
The other thing I will do, if I'm really worried that people won't read the text, is to add a comment like // WRONG CODE or // this code is broken to the end of the line. (Obviously using the correct syntax for the language.) –  Cody Gray Jul 30 '13 at 4:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .