Code length test

hippy

Ex-Staff (retired)
25 lines of code -
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Done
 
Last edited:

Dippy

Moderator
Shows up fine on my browser etc.
XP+IE7+1280x1024
Fits on screen nice with no horiz scroll bars.

Is it smaller res that is suffering?
But I see what you mean about the width changing.

Or is this a test for something completely different?
 

hippy

Ex-Staff (retired)
I think it is just the smaller resolution width. I expect the code box is fixed width and doesn't adjust to display resolution.

This was really a test to see how many lines of code were allowed before the vertical scroll bar kicks in. I find it frustrating, often near impossible, to understand code in a small vertical window, and likewise anything longer than a screen page, and expect 'noobs' to have even greater problems. The code can be cut and pasted to notepad but that's just unwanted faffing about.

I've gone back to indenting code with leading minuses so the entire code is visible in one glance. It loses the benefits of being mono-spaced, especially with comments, and adds the need to delete that crud after cut and paste, but think the advantages outweigh the downsides.

Added : On the matter of vertical resolution, I can see 11 lines in the scroll box, how many do you see ?

Added : Yes it's a fixed width/height scroll box, form View Source ...

Code:
<pre class="alt2" dir="ltr" style="
		margin: 0px;
		padding: 6px;
		border: 1px inset;
		width: 640px;                 <=== HERE
		height: 178px;                <=== HERE
		text-align: left;
		overflow: auto">1
 
Last edited:

Dippy

Moderator
Fair enough.
Personally, and I'm not just being awkward (honestly), I prefer the method used here.
Some peoples 'snippets' go on for miles and it ends up with a 20 feet page length.
In other Forums I visit some are non-scrolled and I fume slightly.
It's just a personal preference as it was the first method I experienced.

What would be nice would be able to use 'select all' with cursor in the scroll window and it would just select all within the scroll window, rather than the whole thread.

I see 11 and a bit lines in the scroll window.
 

hippy

Ex-Staff (retired)
I agree, long code listings can be a royal pain. Preference is what it boils down to, so a 'show code inline' ( <pre>...</pre> rather than boxing ) option which could be toggled would be the ideal solution, then everyone could choose what they want.
 
Top