It's not a secret anymore!*
The moose likes Ranch Office and the fly likes I hate the way [CODE] tags get layed out. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Ranch Office
Bookmark "I hate the way [CODE] tags get layed out." Watch "I hate the way [CODE] tags get layed out." New topic
Author

I hate the way [CODE] tags get layed out.

Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
I'd like to think my posting style is more code less talk. But here is what happens:

if I try

to intersperse small code sections

within a paragraph. I hate the little word "code" that appears (what did
you think it was, poetry?), I hate the horizontal rules (doesn't the font
set it off, or at least suppress the rules when the code snippet is less
than 6 lines), I hate all that space that gets padded in, and I hate
the overly small font size for code that gets dialed in (yeah, I changed
my browser's (Firefox) monospace font settings, but now that font is too big
for every other web site, for example for Sun's javadoc pages).

Take a look at how the code tags layout code in Sun's forums: http://forum.java.sun.com/index.jspa
Which do you prefer?


There is no emoticon for what I am feeling!
Stephen Boston
Ranch Hand

Joined: Jul 14, 2005
Posts: 165
Man, that's a lot of hate.

I like it as is. Although I try to stay away from Sun's forums. I like people being helpful instead of hurtful.

As you are using FireFox, why don't you use the CTRL + to bump the font size up for the active browser window/tab?


Steve<br /> <br />No matter where you go, there you are.<br /> <br />"My evil self is at the door, and I have no power to stop it."
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
Sun's server is apparently malfunctioning preventing me from seeing your illustration. However, the code tags are pretty much beyond our control. They are the way they are because we are using UBB software pretty much out of the box. It is very, very difficult to change for reasons I won't go into here.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Actually it would probably be possible to modify some of these things without too much headache, if people agree it's desireable. The word "code" could be removed I think. And the horizontal lines too. Personally I like the horizontal lines, but think the "code:" is unnecessary. What do others think?

The fonts are much harder to make changes to - the code that handles that is a horrible mess that gives me a headache when I look at it. Changes in this area are unlikely.


"I'm not back." - Bill Harding, Twister
Stephen Boston
Ranch Hand

Joined: Jul 14, 2005
Posts: 165
If it made Jeff hate it less I'd go for it.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
I like the horizontal lines but think we could lose the blank line between the upper line and the beginning of the code. I also think we could lose the word "code". That would decrease the vertical space a little while still setting the code off for people with various browswers.
Dave Lenton
Ranch Hand

Joined: Jan 20, 2005
Posts: 1241
Originally posted by Marilyn de Queiroz:
Sun's server is apparently malfunctioning

Now there's a shocker. I can't believe their forum isn't working properly.


There will be glitches in my transition from being a saloon bar sage to a world statesman. - Tony Banks
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
Originally posted by Stephen Boston:
Man, that's a lot of hate.

[...]
As you are using FireFox, why don't you use the CTRL + to bump the font size up for the active browser window/tab?


Thanks for the responses, everybody. I'm feeling less hate today. I guess
I was letting off some steam; my job and my pointed-headed managers are what
I really hate.

Anyhowdy, peering at the rendering of code tags in the html source, I see the
font is has attribute size=2, and that seems to be the culprit.
Could that be easily changed to 3 or 4?

Here is a test of <pre>size 1, used to render the word code:</pre>
<pre>size 2, used to render code</pre>
<pre>size 3, would code look better in this?</pre>
<pre>size 4, or would code look better in this?</pre>

Thanks for the CTRL-+ tip, that makes code more readable, but then the regular text gets too big. I think code is as important as English, so why
should its font be relatively smaller.
[ November 04, 2005: Message edited by: Jeff Albrechtsen ]
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
That's given me an idea... What if I wrap moe code in font tags, hehe:
[ November 04, 2005: Message edited by: Jeff Albrechtsen ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
The problem I see with a bigger font for code is that code doesn't get wrapped and long lines of code horribly mess up the layout of a page. If we increase the font size of code, that will happen much more frequently...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

The word "code" could definitely go away. I'd actually can the HR's too, if'n it were up to me.


[Jess in Action][AskingGoodQuestions]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
Even those short lines of code make me scroll horizontally in the large font you just used. Besides, html has been disabled in most of the forums that you probably would want to post code in, so font tags won't work there.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Ernest Friedman-Hill:
The word "code" could definitely go away.

Could we replace it with:
HEY! THIS IS WHAT CODE LOOKS LIKE WHEN YOU USE UBB CODE TAGS!!!
IT'S INDENTED!!

?
[ November 04, 2005: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11503
    
  95

Originally posted by Ben Souther:

Could we replace it with:
HEY! THIS IS WHAT CODE LOOKS LIKE WHEN YOU USE UBB CODE TAGS!!!
IT'S INDENTED!!

?




The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I hate the way [CODE] tags get layed out.