POV-Ray : Newsgroups : povray.off-topic : code readability Server Time
14 Oct 2026 17:53:59 EDT (-0400)
  code readability (Message 24 to 73 of 73)  
<<< Previous 23 Messages Goto Initial 50 Messages
From: Jim Charter
Subject: Re: code readability
Date: 26 Jun 2008 20:14:59
Message: <48643103$1@news.povray.org>
Halbert wrote:
> 
> Why doesn't the rest of the world understand that?
> 

But they do understand.  Each in his own way.


Post a reply to this message

From: Leroy Whetstone
Subject: Re: code readability
Date: 26 Jun 2008 23:48:53
Message: <48644299.3050707@joplin.com>
I'm a rebel I use both ways and other ways.
If the 'if' condition is short I put it all line.
if it's a little longer maybe the line below

Readable is minor compared to the total lack of documentation people use 
in their C and c++ programs.


Post a reply to this message

From: scott
Subject: Re: code readability
Date: 27 Jun 2008 03:19:49
Message: <48649495@news.povray.org>
> I, for one, find it much easier to read C++ code which is braced like 
> this:

Me too, that's how I code and how I code in POV too.  I think it looks much 
nicer spaced out like that, I think of the braces as a way to force a line 
of white-space (apart from the brace character, obviously) above and below 
blocks of code.


Post a reply to this message

From: Invisible
Subject: Re: code readability
Date: 27 Jun 2008 05:06:15
Message: <4864ad87@news.povray.org>
Stephen wrote:

> What happened to you? I thought that you were coming for a drink
> tonight?

Oh.

I thought I said I'd check whether I'm available and get back to you? 
[Which admittedly I never did...]

Turns out I had to move furnature around instead. Sorry about that...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Stephen
Subject: Re: code readability
Date: 27 Jun 2008 05:47:46
Message: <5pd964tqt0ev1988cec5cskuiv58g3q5rr@4ax.com>
On Fri, 27 Jun 2008 10:06:14 +0100, Invisible <voi### [at] devnull> wrote:

>Stephen wrote:
>
>> What happened to you? I thought that you were coming for a drink
>> tonight?
>
>Oh.
>
>I thought I said I'd check whether I'm available and get back to you? 
>[Which admittedly I never did...]
>
>Turns out I had to move furnature around instead. Sorry about that...

Good job we waited in the pub ;)
-- 

Regards
     Stephen


Post a reply to this message

From: Invisible
Subject: Re: code readability
Date: 27 Jun 2008 05:49:55
Message: <4864b7c3$1@news.povray.org>
>> Oh.
>>
>> I thought I said I'd check whether I'm available and get back to you? 
>> [Which admittedly I never did...]
>>
>> Turns out I had to move furnature around instead. Sorry about that...
> 
> Good job we waited in the pub ;)

Oh well - I hope you lot enjoyed yourselves even if I didn't. Heh. ;-)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Tim Nikias
Subject: Re: code readability
Date: 27 Jun 2008 09:13:31
Message: <4864e77b$1@news.povray.org>
Gail Shaw wrote:
[...]

> Whereas I find the first far too spread out to be able to read easily and
> use the second as my standard code layout in C-like languages

Heh, that reminds me... Some guy actually wrote code like this:

if (DoNot == 0)
{



	DoThis = true;



} else {



	DoThis = false;



}


This was a few years back and on old university monitors, so he didn't 
actually have much more than 10 commands TOTAL on screen at any given 
time. How you keep an overview over the entire algorithm in that manner 
is lost on me, and obviously on him, too: he didn't get his code working 
in three weeks.

Regards,
Tim


Post a reply to this message

From: Eero Ahonen
Subject: Re: code readability
Date: 27 Jun 2008 09:40:30
Message: <4864edce$1@news.povray.org>
Tim Nikias wrote:
> 
> Heh, that reminds me... Some guy actually wrote code like this:
> 

Somehow those variables remind me of what I've decided I'll do at work 
some day, when I'll have a place where it fits:

if (!successful) {
	try_harder();
}

> Regards,
> Tim


-- 
Eero "Aero" Ahonen
    http://www.zbxt.net
       aer### [at] removethiszbxtnetinvalid


Post a reply to this message

From: Mike the Elder
Subject: Re: code readability
Date: 27 Jun 2008 09:45:00
Message: <web.4864ee92b4d9c1875a8888d90@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Gail Shaw <initialsurname@sentech sa dot com> wrote:
> > Whereas I find the first far too spread out to be able to read easily
>
>   Compactness does not imply readability. On the contrary.
>
> --
>                                                           - Warp

IBELIEV
ETHATIN
THISCAS
EIAMCOM
PELLEDT
OAGREEW
ITHYOU!


BEST
REGA
RDSM
IKEC


Post a reply to this message

From: Invisible
Subject: Re: code readability
Date: 27 Jun 2008 09:47:37
Message: <4864ef79$1@news.povray.org>
Warp wrote:

>   Compactness does not imply readability. On the contrary.

I'd say that there is only a fairly weak correlation (positive or 
negative) between compactness and readability.

   x = 2*y*y*y - 3*a*b

is much more readable than

   t1 = y*y
   t2 = y*t1
   t3 = 2*t2
   t4 = a*b
   t5 = 3*t4
   t6 = t3-t5

despite being much more compact. Counter-examples in the opposite 
direction are not hard to find either.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Mike Raiford
Subject: Re: code readability
Date: 27 Jun 2008 10:29:01
Message: <4864f92d@news.povray.org>
Invisible wrote:

> is much more readable than
> 
>   t1 = y*y
>   t2 = y*t1
>   t3 = 2*t2
>   t4 = a*b
>   t5 = 3*t4
>   t6 = t3-t5
> 
> despite being much more compact. Counter-examples in the opposite 
> direction are not hard to find either.

Hey ... that looks familiar.

... I think someone here used to write code exactly like that! 0.o


Post a reply to this message

From: Mike Raiford
Subject: Re: code readability
Date: 27 Jun 2008 10:29:35
Message: <4864f94f$1@news.povray.org>
Stephen wrote:
> On Fri, 27 Jun 2008 01:26:58 +0300, Eero Ahonen
> <aer### [at] removethiszbxtnetinvalid> wrote:
> 
>> Warp wrote:
>>>   I disagree.
>>>
>> Good, 'cause you're wrong.
> 
> I can't help but agree with you.

I disagree.

Everyone's wrong!


Post a reply to this message

From: Mike Raiford
Subject: Re: code readability
Date: 27 Jun 2008 10:31:41
Message: <4864f9cd$1@news.povray.org>
Eero Ahonen wrote:
> Tim Nikias wrote:
>>
>> Heh, that reminds me... Some guy actually wrote code like this:
>>
> 
> Somehow those variables remind me of what I've decided I'll do at work 
> some day, when I'll have a place where it fits:
> 
> if (!successful) {
>     try_harder();
> }
> 
>> Regards,
>> Tim
> 
> 

try
{
    AcheiveYourGoals();
}
catch(DidntSucceedException ex)
{
   TryAgain();
}

:p


Post a reply to this message

From: Mike Raiford
Subject: Re: code readability
Date: 27 Jun 2008 10:33:58
Message: <4864fa56$1@news.povray.org>
stbenge wrote:

> If I worked for an organization, I would definitely change my style. Of 
> course if I were programming for a living, I would probably go to school 
> where they would teach me how to write code that people could decipher :)

Write code that others can decipher? Why would you do a thing like that? ;)

Everyone knows that if you code for a living, you code for job 
security... you wouldn't want the janitor to take your job, would you? :D

(Of course, I'm joking .... it doesn't work well in a team environment 
to code for job security)


Post a reply to this message

From: Mike Raiford
Subject: Re: code readability
Date: 27 Jun 2008 10:38:20
Message: <4864fb5c$1@news.povray.org>
Halbert wrote:
> How about Microsoft's engineers starting the whole Hungarian Notation 
> convention with Windows programing. (like lpstrFilePath or iRecursion, etc.) 
> There seems to be no set standard to it. While the intention is good,  a 
> beginner may have wonder why some variables have names like lpszDemung or 
> lpfnCBack.

There seems to be two standards, one which describes type: lpszString 
and one that defines function (sort of): instead of iOptions, it's fOptions.

You don't know how many times I've looked at a function signature, and 
seen fSomething on something that should receive bits and wondered why 
the hell they want a float, only to look a bit to the left and see that 
it is indeed an integer.


Post a reply to this message

From: Invisible
Subject: Re: code readability
Date: 27 Jun 2008 10:39:56
Message: <4864fbbc$1@news.povray.org>
Mike Raiford wrote:

> try
> {
>    AcheiveYourGoals();
> }
> catch(DidntSucceedException ex)
> {
>   TryAgain();
> }


try
{
   AchieveYourGoals();
}
catch (Failure e)
{
   CallAirStrike();
}

// With appologies for Murphy...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Eero Ahonen
Subject: Re: code readability
Date: 27 Jun 2008 11:34:04
Message: <4865086c$1@news.povray.org>
Mike Raiford wrote:
> 
> try
> {
>    AcheiveYourGoals();
> }
> catch(DidntSucceedException ex)
> {
>   TryAgain();
> }
> 
> :p

Would be great, too :). The thing about my code is that at work we have 
this department-wide habit that if someone says "this doesn't work" or 
"I can't do this" oslt, the first answer is usually "try harder".

-- 
Eero "Aero" Ahonen
    http://www.zbxt.net
       aer### [at] removethiszbxtnetinvalid


Post a reply to this message

From: Warp
Subject: Re: code readability
Date: 27 Jun 2008 11:41:11
Message: <48650a17@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> I'd say that there is only a fairly weak correlation (positive or 
> negative) between compactness and readability.

>    x = 2*y*y*y - 3*a*b

  The context was really a multilined program source code, not a
mathematical formula, which your line really is.

  Mathematical formulae can often be written compactly because they
a) aren't really program code, and b) there's an established syntax
to write it compactly.

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: code readability
Date: 27 Jun 2008 11:50:16
Message: <48650c38$1@news.povray.org>
Warp wrote:

>   The context was really a multilined program source code, not a
> mathematical formula, which your line really is.
> 
>   Mathematical formulae can often be written compactly because they
> a) aren't really program code, and b) there's an established syntax
> to write it compactly.

Perhaps you forget, the very word "computer" means "device for 
performing mathematical calculations". ;-)

Having programmed with Haskell for a while now, I would contest the 
"programs aren't mathematics" assertion. Having played with mathematics 
for even longer, I would contest the "established syntax" assertion too! 
[Rather, there are several incompatible and variously ambiguous syntaxes 
for writing any particular mathematical construct...]

Regardless, I would assert that how "readable" something is depends on 
how well it maps to your underlying mental processes - which is rather 
independant of the compactness or otherwise of the code. ;-)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Invisible
Subject: Re: code readability
Date: 27 Jun 2008 11:52:31
Message: <48650cbf$1@news.povray.org>
Mike Raiford wrote:

> Hey ... that looks familiar.
> 
> ... I think someone here used to write code exactly like that! 0.o

It's certainly what the compiler transforms your code into - this is 
what machines derived from the design of Turing expect. But it is not 
necessarily how humans think. ;-)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Gail Shaw
Subject: Re: code readability
Date: 27 Jun 2008 12:49:28
Message: <48651a18@news.povray.org>
"Eero Ahonen" <aer### [at] removethiszbxtnetinvalid> wrote in message
news:4864edce$1@news.povray.org...
> Tim Nikias wrote:
> >
> > Heh, that reminds me... Some guy actually wrote code like this:
> >
>
> Somehow those variables remind me of what I've decided I'll do at work
> some day, when I'll have a place where it fits:
>
> if (!successful) {
> try_harder();
> }

My honours project at university had a line of code in it

while (!hellFrozenOver) {
...


Post a reply to this message

From: stbenge
Subject: Re: code readability
Date: 27 Jun 2008 13:26:06
Message: <486522ae@news.povray.org>
Mike Raiford wrote:
> stbenge wrote:
> 
>> If I worked for an organization, I would definitely change my style. 
>> Of course if I were programming for a living, I would probably go to 
>> school where they would teach me how to write code that people could 
>> decipher :)
> 
> Write code that others can decipher? Why would you do a thing like that? ;)
> 
> Everyone knows that if you code for a living, you code for job 
> security... you wouldn't want the janitor to take your job, would you? :D

Around here it is highly unlikely that a janitor would know how to 
program a computer, let alone operate one. This isn't to say people 
around here are stupid or anything. They are just generally 
computer-illiterate.

> (Of course, I'm joking .... it doesn't work well in a team environment 
> to code for job security)

A bit off-topic, but this reminds me of a guy I worked with at the 
travel nurse agency. The man worked in the 'computer engineering' 
section, along with the manager. His job, as far as I could tell, was to 
keep the computers running smoothly, and to archive lists of available 
or potentially available nurses. Now maybe I'm missing something here, 
but do you really need your own server for that kind of work? Can't you 
do those things with conventional computers and storage? Why did we even 
need a server when there were only about zero or three people making 
travel reservations at any given time? I wonder things these because the 
'computer engineer' seemed very self-important, an active preserver of 
personal job security. He even cast a contentious look one time when I 
helped a lady with her computer's resolution! Odd situation at any rate.

Sam


Post a reply to this message

From: Orchid XP v8
Subject: Re: code readability
Date: 27 Jun 2008 14:22:02
Message: <48652fca$1@news.povray.org>
Gail Shaw wrote:

> My honours project at university had a line of code in it
> 
> while (!hellFrozenOver) {
> ...

...you realise that when hell freezes over, your program is going to 
fail in an undefined way, right? (YHF bug?)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Gail Shaw
Subject: Re: code readability
Date: 27 Jun 2008 15:09:28
Message: <48653ae8@news.povray.org>
"Orchid XP v8" <voi### [at] devnull> wrote in message
news:48652fca$1@news.povray.org...
>
> ...you realise that when hell freezes over, your program is going to
> fail in an undefined way, right? (YHF bug?)
>

In the case of that piece of code, it would just not do anything on that
fateful day
The loop in question was the program's main activity loop (Distributed VR
system)


Post a reply to this message

From: andrel
Subject: Re: code readability
Date: 27 Jun 2008 16:09:25
Message: <4865492A.20706@hotmail.com>
Mike Raiford wrote:
> Warp wrote:
>> Gail Shaw <initialsurname@sentech sa dot com> wrote:
>>> Whereas I find the first far too spread out to be able to read easily
>>
>>   Compactness does not imply readability. On the contrary.
>>
> 
> Case in point:
> 
> n=(i<12&&j>=i)?(sqrt(z)*y+j):(y+j*i);
> 
> vs
> 
> if( i < 12 && j >= i )
> {
>     n = sqrt(z) * y + j;
> }
> else
> {
>     n = y + j * i;
> }
> 
> ;)
I'd like to see the specification that gave rise to that snipped of code. ;)


Post a reply to this message

From: Darren New
Subject: Re: code readability
Date: 27 Jun 2008 16:29:17
Message: <48654d9d$1@news.povray.org>
Invisible wrote:
> Perhaps you forget, the very word "computer" means "device for 
> performing mathematical calculations". ;-)

Actually, it means "person whose job it is to do the arithmetic." Only 
after they automated it did it refer to a machine. :-)

-- 
Darren New / San Diego, CA, USA (PST)
  Helpful housekeeping hints:
   Check your feather pillows for holes
    before putting them in the washing machine.


Post a reply to this message

From: andrel
Subject: Re: code readability
Date: 27 Jun 2008 16:29:47
Message: <48654DF0.3030004@hotmail.com>
Gail Shaw wrote:
> "Eero Ahonen" <aer### [at] removethiszbxtnetinvalid> wrote in message
> news:4864edce$1@news.povray.org...
>> Tim Nikias wrote:
>>> Heh, that reminds me... Some guy actually wrote code like this:
>>>
>> Somehow those variables remind me of what I've decided I'll do at work
>> some day, when I'll have a place where it fits:
>>
>> if (!successful) {
>> try_harder();
>> }
> 
> My honours project at university had a line of code in it
> 
> while (!hellFrozenOver) {
> ...
> 
> 
was that before or after Lordi won?


Post a reply to this message

From: Gail Shaw
Subject: Re: code readability
Date: 27 Jun 2008 16:35:59
Message: <48654f2f@news.povray.org>
"andrel" <a_l### [at] hotmailcom> wrote in message
news:486### [at] hotmailcom...

> > My honours project at university had a line of code in it
> >
> > while (!hellFrozenOver) {
> > ...
> >
> >
> was that before or after Lordi won?

Lordi?

Sorry, reference to something I am not familar.


Post a reply to this message

From: Orchid XP v8
Subject: Re: code readability
Date: 27 Jun 2008 17:17:16
Message: <486558dc@news.povray.org>
andrel wrote:

> was that before or after Lordi won?

LMAO!

Sweet...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Orchid XP v8
Subject: Re: code readability
Date: 27 Jun 2008 17:17:37
Message: <486558f1$1@news.povray.org>
Gail Shaw wrote:

> Lordi?

Most improbable Eurovision winners in history.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Eero Ahonen
Subject: Re: code readability
Date: 27 Jun 2008 20:07:23
Message: <486580bb$1@news.povray.org>
Orchid XP v8 wrote:
> Gail Shaw wrote:
> 
>> Lordi?
> 
> Most improbable Eurovision winners in history.
> 

Yes. The only Finnish band ever made it so far (=to the finals, that is) 
with having even a slightest chance of winning.

-- 
Eero "Aero" Ahonen
    http://www.zbxt.net
       aer### [at] removethiszbxtnetinvalid


Post a reply to this message

From: John VanSickle
Subject: Re: code readability
Date: 28 Jun 2008 01:38:19
Message: <4865ce4b$1@news.povray.org>
Halbert wrote:

> Why doesn't the rest of the world understand that?

Because I learned to program on a machine with 8k of memory.  A byte 
saved is a byte earned.

Regards,
John


Post a reply to this message

From: andrel
Subject: Re: code readability
Date: 28 Jun 2008 04:42:50
Message: <4865F9C0.5040308@hotmail.com>
Gail Shaw wrote:
> "andrel" <a_l### [at] hotmailcom> wrote in message
> news:486### [at] hotmailcom...
> 
>>> My honours project at university had a line of code in it
>>>
>>> while (!hellFrozenOver) {
>>> ...
>>>
>>>
>> was that before or after Lordi won?
> 
> Lordi?
> 
> Sorry, reference to something I am not familar.
> 
> 
Sorry Gail, that was sort of eurocentristic. Indeed the winners of the 
Eurovisionsongcontest a few years back. 
(http://www.youtube.com/watch?v=p6VzdtmrP6Y is the best I could find). 
Finland was considered the country most unlikely to win the contest ever 
before this act. Especially by the Finnish themselves. On some webpages 
it was put down as an event even less likely than hell freezing over. 
Some publications the day after apparently opened with 'it is official: 
hell frozen over' or similar. IIRC Eero is from Finland.

Why Finland won: they couldn't so they send in a hardrock band because 
that is not what the songcontest was about. The band was dressed like 
monsters, again not exactly according to dress code. Very important 
contribution was that the voting was not done anymore by a geriatric 
jury with knowledge and taste but by SMS by mainly adolescents. And 
within it's genre it was a good song of course.


Post a reply to this message

From: Stephen
Subject: Re: code readability
Date: 28 Jun 2008 04:45:47
Message: <lhub64hc8d4a7jg7sj7ighugt2icsoblnf@4ax.com>
On Fri, 27 Jun 2008 13:29:17 -0700, Darren New <dne### [at] sanrrcom>
wrote:

>Invisible wrote:
>> Perhaps you forget, the very word "computer" means "device for 
>> performing mathematical calculations". ;-)
>
>Actually, it means "person whose job it is to do the arithmetic." Only 
>after they automated it did it refer to a machine. :-)

You are right of course but should it have been computor not computer.
-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: code readability
Date: 28 Jun 2008 04:49:52
Message: <8pub641devnfjp13324r616i6d0veimc90@4ax.com>
On Sat, 28 Jun 2008 10:43:44 +0200, andrel <a_l### [at] hotmailcom>
wrote:

>Gail Shaw wrote:
>> "andrel" <a_l### [at] hotmailcom> wrote in message
>> news:486### [at] hotmailcom...
>> 
>>>> My honours project at university had a line of code in it
>>>>
>>>> while (!hellFrozenOver) {
>>>> ...
>>>>
>>>>
>>> was that before or after Lordi won?
>> 
>> Lordi?
>> 
>> Sorry, reference to something I am not familar.
>> 
>> 
>Sorry Gail, that was sort of eurocentristic. 

Isn't Hell a town in one of the Nordic countries?
-- 

Regards
     Stephen


Post a reply to this message

From: Gail Shaw
Subject: Re: code readability
Date: 28 Jun 2008 05:00:57
Message: <4865fdc9@news.povray.org>
"andrel" <a_l### [at] hotmailcom> wrote in message
news:486### [at] hotmailcom...
> Gail Shaw wrote:
> > "andrel" <a_l### [at] hotmailcom> wrote in message
> > news:486### [at] hotmailcom...
> >
> >>> My honours project at university had a line of code in it
> >>>
> >>> while (!hellFrozenOver) {
> >>> ...
> >>>
> >>>
> >> was that before or after Lordi won?
> >
> > Lordi?
> >
> > Sorry, reference to something I am not familar.
> >
> >
> Sorry Gail, that was sort of eurocentristic. Indeed the winners of the
> Eurovisionsongcontest a few years back.

Ah. I'm also not a major music fan.
The code dates from well before that, 1998.


Post a reply to this message

From: Fredrik Eriksson
Subject: Re: code readability
Date: 28 Jun 2008 05:18:15
Message: <op.udgb4ori7bxctx@e6600>
On Sat, 28 Jun 2008 10:49:53 +0200, Stephen <mcavoysAT@aolDOTcom> wrote:
> Isn't Hell a town in one of the Nordic countries?

http://en.wikipedia.org/wiki/Hell%2C_Norway

Also:
http://en.wikipedia.org/wiki/Hell%2C_California
http://en.wikipedia.org/wiki/Hell%2C_Michigan
http://en.wikipedia.org/wiki/Hell%2C_Grand_Cayman


-- 
FE


Post a reply to this message

From: Warp
Subject: Re: code readability
Date: 28 Jun 2008 05:44:12
Message: <486607ec@news.povray.org>
John VanSickle <evi### [at] hotmailcom> wrote:
> Halbert wrote:

> > Why doesn't the rest of the world understand that?

> Because I learned to program on a machine with 8k of memory.  A byte 
> saved is a byte earned.

  You had a C compiler in a machine with 8k of memory? Which one was that?

-- 
                                                          - Warp


Post a reply to this message

From: Stephen
Subject: Re: code readability
Date: 28 Jun 2008 06:06:48
Message: <h83c64hi812iq7t637e8or2ahjl60ng32c@4ax.com>
On Sat, 28 Jun 2008 11:18:14 +0200, "Fredrik Eriksson"
<fe79}--at--{yahoo}--dot--{com> wrote:

>On Sat, 28 Jun 2008 10:49:53 +0200, Stephen <mcavoysAT@aolDOTcom> wrote:
>> Isn't Hell a town in one of the Nordic countries?
>
>http://en.wikipedia.org/wiki/Hell%2C_Norway

Thanks, I couln't find it on Google maps.
-- 

Regards
     Stephen


Post a reply to this message

From: Darren New
Subject: Re: code readability
Date: 28 Jun 2008 15:12:07
Message: <48668d07@news.povray.org>
Warp wrote:
> John VanSickle <evi### [at] hotmailcom> wrote:
>> Halbert wrote:
> 
>>> Why doesn't the rest of the world understand that?
> 
>> Because I learned to program on a machine with 8k of memory.  A byte 
>> saved is a byte earned.
> 
>   You had a C compiler in a machine with 8k of memory? Which one was that?

PDP-11?  I had a machine with a COBOL compiler that ran in 8K of 
real-live core memory.  And, like, it ran banks and stuff. :-)

-- 
Darren New / San Diego, CA, USA (PST)
  Helpful housekeeping hints:
   Check your feather pillows for holes
    before putting them in the washing machine.


Post a reply to this message

From: Warp
Subject: Re: code readability
Date: 28 Jun 2008 15:14:41
Message: <48668da0@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> >   You had a C compiler in a machine with 8k of memory? Which one was that?

> PDP-11?  I had a machine with a COBOL compiler that ran in 8K of 
> real-live core memory.  And, like, it ran banks and stuff. :-)

  An entire C or COBOL compiler which can run and compile with only
8 kilobytes of memory puts those 4k intros into shame, IMO. :P

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: code readability
Date: 28 Jun 2008 15:40:52
Message: <486693c4$1@news.povray.org>
Warp wrote:
>   An entire C or COBOL compiler which can run and compile with only
> 8 kilobytes of memory puts those 4k intros into shame, IMO. :P

What's a 4k intro?

(Of course, it had lots of passes. And a 50-line program took maybe 10 
or 15 minutes to compile. But there was no VM either, for what that's 
worth to the discussion. :-)

-- 
Darren New / San Diego, CA, USA (PST)
  Helpful housekeeping hints:
   Check your feather pillows for holes
    before putting them in the washing machine.


Post a reply to this message

From: Warp
Subject: Re: code readability
Date: 29 Jun 2008 03:08:59
Message: <4867350b@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Warp wrote:
> >   An entire C or COBOL compiler which can run and compile with only
> > 8 kilobytes of memory puts those 4k intros into shame, IMO. :P

> What's a 4k intro?

http://en.wikipedia.org/wiki/Demo_(computer_programming)#Intros

  It's rather incredible what you can squeeze into that amount of bytes.

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v8
Subject: Re: code readability
Date: 29 Jun 2008 04:53:42
Message: <48674d96$1@news.povray.org>
Warp wrote:

> http://en.wikipedia.org/wiki/Demo_(computer_programming)#Intros
> 
>   It's rather incredible what you can squeeze into that amount of bytes.

Yarr, back then, coders were *real* coders! Haharrr!

Mmm, can't see me entering any Haskell programs in a 4KB demo 
competition... The Haskell runtime engine alone is ~500KB, and that's 
before you add any *functionallity*. o_O

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Darren New
Subject: Re: code readability
Date: 29 Jun 2008 13:26:55
Message: <4867c5df@news.povray.org>
Warp wrote:
>   It's rather incredible what you can squeeze into that amount of bytes.

Indeed. It used to be 32K was plenty for some rather sophisticated video 
games. :-)  Lots of the old arcade games had less than that, too.

-- 
Darren New / San Diego, CA, USA (PST)
  Helpful housekeeping hints:
   Check your feather pillows for holes
    before putting them in the washing machine.


Post a reply to this message

From: Orchid XP v8
Subject: Re: code readability
Date: 29 Jun 2008 13:52:11
Message: <4867cbcb$1@news.povray.org>
For some reason I'm reminded of the demo of Uridium 2 I got to play on 
my dad's Amiga.

You insert the disk into the drive, you hear a click, and instantly the 
screen lights up in neon colours. First a set of blue bars appear, then 
a set of thinner, transparent green bars scroll down over the top of 
these, and then transparent red bars scroll up over both. The end result 
is a myriad of colours. And all the time this is happening, electronic 
music is playing, and the computer is still loading the *real* game from 
disk.

Basically, the entire audio-visual candy-fest fits into the boot sector. 
And well it might; the technicolour rainbow is just a trick of the 
Amiga's copper ship, which modifies the image palette on each raster 
scanline, yielding the effect of millions of colours at once, from a 
bitmap that only actually handles a handful. (Notice that all the colour 
bars are *horisontal*. This is not a coincidence.)

Ah, great days...

Damned TF2 takes 20 minutes to load up! o_O

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: John VanSickle
Subject: Re: code readability
Date: 29 Jun 2008 15:04:59
Message: <4867dcdb@news.povray.org>
Warp wrote:
> John VanSickle <evi### [at] hotmailcom> wrote:
>> Halbert wrote:
> 
>>> Why doesn't the rest of the world understand that?
> 
>> Because I learned to program on a machine with 8k of memory.  A byte 
>> saved is a byte earned.
> 
>   You had a C compiler in a machine with 8k of memory? Which one was that?

I didn't say that I programmed in C on this machine, only that I learned 
to program.  The habit of being very stingy with memory use carries on.

Regards,
John


Post a reply to this message

From: Warp
Subject: Re: code readability
Date: 29 Jun 2008 16:39:56
Message: <4867f31c@news.povray.org>
John VanSickle <evi### [at] hotmailcom> wrote:
> I didn't say that I programmed in C on this machine, only that I learned 
> to program.  The habit of being very stingy with memory use carries on.

  Nowadays when I code I sometimes stumble into situations like:
"Hmm... This data will take over 100 megabytes of memory... Should
I worry? ... Nah. That's nothing."

-- 
                                                          - Warp


Post a reply to this message

From: Mike Raiford
Subject: Re: code readability
Date: 30 Jun 2008 09:20:27
Message: <4868dd9b$1@news.povray.org>
andrel wrote:
> I'd like to see the specification that gave rise to that snipped of 
> code. ;)

Umm. Write a contrived example showing that compact isn't always readable?


Post a reply to this message

From: andrel
Subject: Re: code readability
Date: 2 Jul 2008 15:20:03
Message: <486BD519.4080602@hotmail.com>
Mike Raiford wrote:
> andrel wrote:
>> I'd like to see the specification that gave rise to that snipped of 
>> code. ;)
> 
> Umm. Write a contrived example showing that compact isn't always readable?
No that is more an assignment. A specification is where you specify what 
the possible inputs are and what relations exist between input and 
output...umm, ok, I know you were just kidding ;)


Post a reply to this message

<<< Previous 23 Messages Goto Initial 50 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.