POV-Ray : Newsgroups : povray.off-topic : code readability Server Time
7 Sep 2024 17:15:40 EDT (-0400)
  code readability (Message 44 to 53 of 73)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
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

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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