1. What is Code Density?

<Excuse my impatience; 23 minutes and not yet showing...>

At least three of us have been marked down on this (minor point), but 
what, precisely, is it? I simply don't know.

Do you mean

	i+=1
vs
	i += 1

Or do you mean

procedure myproc()
	for i=1 to 10 do
		something()
	end for
end procedure

vs

procedure myproc()

	for i=1 to 10 do

		something()

	end for

end procedure

or something else???

Regards,
Pete
PS I hope it is not the latter since I hate that: you simply can't fit
as much code on screen with needless blank lines blink)

new topic     » topic index » view message » categorize

2. What is Code Density?

At least three of us have been marked down on this (minor point), but
what, precisely, is it? I simply don't know.

Do you mean

	i+=1
vs
	i += 1

Or do you mean

procedure myproc()
	for i=1 to 10 do
		something()
	end for
end procedure

vs

procedure myproc()

	for i=1 to 10 do

		something()

	end for

end procedure

or something else???

Regards,
Pete
PS I hope it is not the latter since I hate that: you simply can't fit
as much code on screen with needless blank lines blink)

new topic     » goto parent     » topic index » view message » categorize

3. Re: What is Code Density?

Pete Lomax wrote:
> 
> <Excuse my impatience; 23 minutes and not yet showing...>
> 
> At least three of us have been marked down on this (minor point), but 
> what, precisely, is it? I simply don't know.
> 
> Do you mean
> 
> 	i+=1
> vs
> 	i += 1
> 
> Or do you mean
> 
> procedure myproc()
> 	for i=1 to 10 do
> 		something()
> 	end for
> end procedure
> 
> vs
> 
> procedure myproc()
> 
> 	for i=1 to 10 do
> 
> 		something()
> 
> 	end for
> 
> end procedure
> 
> or something else???
> 
> Regards,
> Pete
> PS I hope it is not the latter since I hate that: you simply can't fit
> as much code on screen with needless blank lines blink)

Generally speaking its the first example. The lack of whitespace around
operators and identifiers makes it harder for people to read. Its the same
reason why in most languages we put spaces around words. I read Thai and
it does not have any spaces between words, and that was the hardest thing
about learn to read Thai. 

-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view message » categorize

4. Re: What is Code Density?

On Sat, 06 Nov 2004 19:15:53 -0800, Derek Parnell
<guest at RapidEuphoria.com> wrote:

>Generally speaking its the first example. The lack of whitespace around
>operators and identifiers makes it harder for people to read.
Thanks. I use a syntax-highlighted editor to /write/ code, but you are
quite right, I often find such code much harder to read in my email
client, to the point where I cut and paste before reading.

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

5. Re: What is Code Density?

Derek Parnell wrote:
> I read Thai and
> it does not have any spaces between words, and that was the hardest thing
> about learn to read Thai. 

So to insert such spaces for readability would be to pad Thai?

-- 
Craig

new topic     » goto parent     » topic index » view message » categorize

6. Re: What is Code Density?

Craig Welch wrote:
> 
> Derek Parnell wrote:
> > I read Thai and
> > it does not have any spaces between words, and that was the hardest thing
> > about learn to read Thai. 
> 
> So to insert such spaces for readability would be to pad Thai?
> 
> -- 
> Craig
> 
> 

*GROAN*

new topic     » goto parent     » topic index » view message » categorize

7. Re: What is Code Density?

Craig Welch wrote:
> 
> Derek Parnell wrote:
> > I read Thai and
> > it does not have any spaces between words, and that was the hardest thing
> > about learn to read Thai. 
> 
> So to insert such spaces for readability would be to pad Thai?

Ouch!

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu