p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Forum and Wrox.com Feedback (http://p2p.wrox.com/forumdisplay.php?f=56)
-   -   Small issue, someone else may have noticed too (http://p2p.wrox.com/showthread.php?t=56228)

mike_remember April 4th, 2007 01:37 AM

Small issue, someone else may have noticed too
 
Hi Jim/ Administrator

Well I have been with this forum for almost 3 yrs now, and these years have been wonderful. I often recommend a lot junior colleauges to this site for discussions. Since some of them are real beginners, they point out mere issues with the design of wrox forums. From these issues, I found an issue being raised quite often, though its a mere issue, I thought to let the administrators know.

The point is whenever we create a new post, or reply to any post, if the matter is too long, sometimes the width of the table exceeds screen width due to which scrolling appears. An e.g. is as below:

http://p2p.wrox.com/topic.asp?TOPIC_ID=58585

This is a small issue that can be very well sorted out using CSS. So lets see what the admins have to say about this.

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.

jminatel April 4th, 2007 07:56 AM

Thanks Mike. Good observation, I'll add it to our list of ideas for "that big p2p.wrox.com" upgrade I'm always hoping to get approved. :)
let me ask, in the example you gave, what would be the ideal behavior in your opinion?
would you have us break and wrap the long lines of code?
would you have us check for line length when posting and give the poster an opportunity to change it then?
Some other fix in mind?

Thanks for your use of the site and referring so many others. It's fun to watch this community grow!

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: No book this week - Donate to the Red Cross!

dparsons April 4th, 2007 08:06 AM

Jim,
   As you no doubt can tell, that behavior is only exibited when someone posts a code sample surrounded by the Forum Code code tag; posting as regular text will cause the code to wrap.

When a code tag is placed in a post it ultimately gets transformed into a <pre> tag and tag that both use a style named 'code'; it might be worth while to instead repleace the code tag with a <div> that has a set width. This will invariably cause wrapping with long lines of code, but IMHO, it will be much easier to read in that incantation then using the HScroll Bar to read the entire line.

My 2 cents anyway.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========

jminatel April 4th, 2007 08:16 AM

That makes sense. Thanks!

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: No book this week - Donate to the Red Cross!

Imar April 4th, 2007 08:43 AM

Sorry, but I don't agree.

For some languages it doesn't matter if you add additional lines.

However, for languages like VB.NET this could cause serious problems. I can already envision posts where people complain that:

Dim myPerson As New
   Person(id)

doesn't work; simply because a line break was introduced where it's not allowed.

I see three ways to fix it:

1. Ask people to format their code. I occasionally do that, with little results usually.

2. Add a <div> with overflow: auto; around the code. That way, the div gets scrollbars when the code is too wide.

3. Leave it like it is, and live with it.

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.

mike_remember April 4th, 2007 08:46 AM

WOW Parsons

That was some real good study of the code, I thought I was the only one who copied the content, pasted the HTML and blah blah blah....

Yes Jim, I too agree with parsons idea of implementing a <div> tag in place of <pre>. But yes again, it comes to us to decide whether a user would like to read the content with scrolling.

Personally I would support the idea of using DIV tag, anyhow we are scrolling the matter, whether it be the IE's default bars or the DIV's.

Well about Imar's suggestion,

1st point would be a bit difficult from the user's point of view, I won't feel comfortable editing a 100 line code manually taking care of area's width.
3rd point, can only be thought off when we have both our hands open with no ray of hope.
2nd point, yes I stongly agreeee.

(Imar I have quoted the above with due respect to your suggestions).

Parsons, lets hear it from Jim.

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.

dparsons April 4th, 2007 08:56 AM

From a troubleshooting standpoint, I can completely agree with Imar because, in the case of VB.NET it would introduce an element of uncertainity for those of us trying to debug someones code.

"Did the OP place that line break there or is it because the div is wrapping it" is a thought I am sure would go through my mind. So the overflow is a good alternative.

In the case of item 1 and 3, 3 ultimately prevails as you won't get 100% of posters to format their code so that it doesn't blow out the right side of the screen.

Good stuff Imar.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========

mike_remember April 4th, 2007 09:24 AM

Parsons, yes, it is a sound point of VB.NET raised by Imar, and let me clarify, I was also talking about overflow with div, not at any point breaking the code somehow, coz that would lead to problem mentioned by Imar.

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.

jminatel April 4th, 2007 09:26 AM

Well, the good news here as most of you long time participants have probably noticed is, nothing changes overnight. ;) I'll still toss the issue into my wishlist of "how can we fix this" ideas and take into account all of the feedback here and issues Imar raised (I never actually change anything without consulting Imar<g>)...

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: No book this week - Donate to the Red Cross!

dparsons April 4th, 2007 09:45 AM

All hail Imar, lord and master of everything web! ;]

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========


All times are GMT -4. The time now is 07:15 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.