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

I really appreciate the SE page model, but sometimes — especially with Stack Overflow — when adding source code, I would appreciate it if I could hide the right panel with the list of tags, help section, &. to save space.

Source code sections are often lines that come from source files that contain around 100 characters per line.

The idea is to save about 200 pixels that are currently used to display the right panel to show relevant information about the current question.

share|improve this question
4  
Can you show a code sample that HAS to be 100 lines and NEEDS a horizontal scrollbar? –  Aaron Bertrand Jul 24 '12 at 13:29
    
stackoverflow.com/questions/11601085/… or any post containg log trace –  ZNK - M Jul 24 '12 at 13:34
    
I don't think that's a very good example. You can't add two carriage returns to those tags to eliminate the horizontal scrollbar? I think this is a much more obscure problem than some people are going to want to admit. –  Aaron Bertrand Jul 24 '12 at 13:44
    
ok guys, then we will keep formatting source code to make the questions readable... you should create a tag for that then... –  ZNK - M Jul 24 '12 at 13:49

1 Answer 1

That's great for you while you're editing. But your code is still going to display with horizontal scrollbars for other users who don't hide the right panel (which can actually be quite useful). Even worse, you should see the effect this has on an iPad - you have to scroll to see all the code but there is no visual cue that you have to do so (no scrollbars).

What I would like to see much better is an effort to make code presentable without horizontal scrolling. Every language I know of has the ability to break up a line of code, a string, an expression, what have you and continue it on the next line. While it's a little more work, it's a solution that helps everyone, not just the author of the code.

If I go through my edit history, I bet I will find at least a few hundred edits that, among other things, eliminated horizontal scrollbars from a code sample by removing unnecessary white space and introducing line continuations. If I can do that for other users' questions, surely the author of the question can make some effort as well, especially when they are fully aware of the problem.

share|improve this answer
3  
+1 Down with horizontal scroll bars! –  Lix Jul 24 '12 at 13:21
    
ok, but practically, I'd like spending my time answering the questions instead of formatting the code. My request was just to allow the user to hide (if he want) the panel and use a bit more space on a computer screen (which are not using any more 640*480...). –  ZNK - M Jul 24 '12 at 13:33
    
@ZNK-M the alternative is you expect other readers to spend time scrolling to read your code, or folks like me to spend time formatting it for you. I don't think there's any real problem with expecting a little bit of effort put into code formatting. Making your palette larger doesn't solve the problem you're creating for every other reader. –  Aaron Bertrand Jul 24 '12 at 14:24
    
@AaronBertrand this is not for me to insert long lines but to avoid formatting the code of other people... –  ZNK - M Jul 24 '12 at 14:31
    
@ZNK-M but doesn't your suggestion actually encourage more users to write long lines in their code samples and have less concern about the white space (that all readers will have to deal with)? –  Aaron Bertrand Jul 24 '12 at 14:44
    
Ok, let's all limit to 30 characters then ;-) –  Arjan Jul 24 '12 at 14:50
    
this is not the actual subject but I have the impression we will continue to have screen wider and wider and keep having 80 characters in our software code... –  ZNK - M Jul 24 '12 at 14:53
    
@ZNK-M what is wrong with that? A lot of people like to scroll vertically instead of horizontally. This is why web pages still use a vertical layout instead of utilizing my 2560x1600 display to its full horizontal potential. I don't recall the last time I saw a horizontal scrollbar on a web page (even when my browser window is small), but I see it on code samples all the time, and it's really annoying. Do you honestly think that number of lines is more important than readability? –  Aaron Bertrand Jul 24 '12 at 14:56
    
@AaronBertrand do you use the recommended resolution of 1024*768 to browse the website? we all have screens that can displays more than 80 characters on a line... (apart of course for the mobile devices) –  ZNK - M Jul 24 '12 at 15:03
1  
@ZNK-M I do at least half of my browsing here from an iPad, iPhone or laptop. So don't assume that everyone can view 100-character lines without horizontal scrollbars and other hardships. Just because you've moved forward or don't face these limitations does not make it your duty to impose those on others. –  Aaron Bertrand Jul 24 '12 at 15:05

You must log in to answer this question.

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