POV-Ray : Newsgroups : povray.advanced-users : movie within Server Time
29 Jul 2024 06:27:43 EDT (-0400)
  movie within (Message 61 to 70 of 100)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thorsten Froehlich
Subject: Re: movie within
Date: 4 Feb 2004 07:15:01
Message: <4020e245@news.povray.org>
In article <40207f73$1@news.povray.org> , Darren <dne### [at] sanrrcom>  wrote:

>> Remember that there is more than gaming.  And DirectX, from a programmer's
>> perspective is an impossible API.  It just changes 90% with each version.
>
> Actually, I'm curious about this. If the API changes 90% with each
> version, how is it that a game that runs with DirectX7 installed
> continues to run when upgrading to DirectX8 and DirectX9?

The API itself is versioned.  Using special dynamic linking rules (which is
what COM provides - a kind of semi-dynamic binding), backward compatibility
is mostly kept.  Yet, there are several pitfalls when mixing API versions in
the same application, specially when dealing with data structures that
changed.  For the most part this does indeed allow old applications to run
on newer versions of the API transparently.  Of course, there is a catch:
Certain features in older APIs eventually end up being deprecated because
their design does not fit well with modern hardware at API allows you to
interface to.  Shaders are a good example.

A good example of this backward compatibility thing is actually that of
Direct3D drivers.  Vendors put a lot of work in optimising for the new
versions of the API, yet at the same time neglect optimising older API
versions' features.  And eventually, while probably still around, those old
versions get less stable when running on new hardware.

With games of course this does not matter much.  You keep them around for
two or three years at most.  And you are unlikely to care in five years.
However, in big corporate setups with hundreds or thousands or workstations,
upgrading, even "just" software does take place less frequently.  So for
compatibility reasons you need to be using older versions of tools.  And
they better still run well on new hardware!

Back to the case of 3D rendering APIs, OpenGL is the closest to a common
standard.  It definitely isn't the ultimate, final and perfect standard, but
it does provide basic long-term stability of its API.  And it provides in
parts a much higher level of abstraction than Direct3D does.  In particular,
there are also high-quality OpenGL software renderers available (if you have
the money).

On the other hand, all major vendors of CAD applications have been in the
market for much longer than the lifetime of OpenGL or Direct3D.  So they got
their own abstraction layer on top of OpenGL.  And they could easily switch
to Direct3D if they wanted to.  Yet, Direct3D does not offer them much, if
anything for their application domain.  Programmable shaders are hardly a
use in a CAD application displaying a complex wireframe model.  There you
care more about about line antialiasing (which early Direct3D
implementations did not provide at all) than fancy texturing options.  And
if you want a high quality display, these applications use a software
rendering or export to 3D rendering applications anyway.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Dan P
Subject: Re: movie within
Date: 4 Feb 2004 09:48:17
Message: <40210631$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:4020bbb2@news.povray.org...
> Dan P <dan### [at] yahoocom> wrote:
> > I looked you up and, wow, I didn't realize how fresh out of school you
were.
> > You graduated with a BS in 2001?
>
>   I got my MSc degree in computing science last summmer. Are you going
> to tell me I'm "fresh out of school" as well?

Now we're getting somewhere. You're telling me I should make assumptions
about your competence based on your experience. Well, I agree! Thank you for
arguing my point. Perhaps you'll remember that before passing judgment on my
competence without knowing anything about /me/ as well.

>   I don't understand how the date of your university graduation has to
> do anything with your experience in 3D programming. It tells nothing
> about how many years of experience you have (or even your age). Someone
> can perfectly have 20 years of experience in programming and then
> get a university degree. I don't see anything strange in that.

Nope. Neither did I. TF is 25, however, so if he has 20 years of programming
experience, that's one impressive kid. But, Mozart...

>   Your personal attacks are not wise. Do you think you are going to gain
> respect with that?

Who said I was interested in respect? Only a fool taps a dry well. Don't
internalize my intentions; I don't want what you want, nor would I care if I
had it. My intentions are to be part of a community of interest and help
others get better if I can. I walk into a room, try and help by
demonstrating a concept with C code, and get ripped apart (not your
critique, Warp, that was very helpful and added to the conversation) for
doing so, gaining all sorts of personal attacks. And now you think I'm naive
enough to expect /respect/?

It really shocks me how "logical" people are so driven by emotion. Shocks
and entertains.


Post a reply to this message

From: Dan P
Subject: Re: movie within
Date: 4 Feb 2004 09:50:02
Message: <4021069a$1@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:4020e245@news.povray.org...
> In article <40207f73$1@news.povray.org> , Darren <dne### [at] sanrrcom>  wrote:
>

Thank you for the well thought out and constructive post, TF.


Post a reply to this message

From: Warp
Subject: Re: movie within
Date: 4 Feb 2004 10:03:21
Message: <402109b9@news.povray.org>
Dan P <dan### [at] yahoocom> wrote:
> Perhaps you'll remember that before passing judgment on my
> competence without knowing anything about /me/ as well.

  Well, I have seen some of your code and I have seen some of your opinions.
I have based my opinion on your competence in programming solely on those
things, not on how old you are or what is your academic degree.

  Forming an opinion on someone's programming experience based on when
he graduated is certainly something fool to do. Basing it on what he
*does* and *says* is a lot less prejudiced.

  I find it quite sad that you despise someone's programming experience
based solely on when he graduated.

> Who said I was interested in respect?

  Then what are you doing here?
  If you want people to talk to you and answer your questions and cooperate
with you, you should earn their respect. This is done largely by respecting
them yourself. If you don't respect people and don't care about them
respecting you and don't mind offending people at will, you are little
more than another troll.

> It really shocks me how "logical" people are so driven by emotion. Shocks
> and entertains.

  If you start insulting people you are going to make them angry. There's
nothing odd about that.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Dan P
Subject: Re: movie within
Date: 4 Feb 2004 10:07:00
Message: <40210a94@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:4020bd10@news.povray.org...
>   Don't take this too personal, but if your programming experience is
> at the level shown at the beginning of this thread, don't put your own
> expectations too high.
>
>   Making a graphical modeller is *DIFFICULT*, much much more difficult
> than a command-line image averaging program.

You think?

>   It's of course a good personal project, but don't expect it to be
> a good piece of software for wider audience. (Not even if you made
> it closed-source; you would probably not believe how difficult
> maintaining and upgrading a program of that magnitude can be, and
> you'll have to do that a lot if you expect it to become a popular
> program.)
>
>   Experience in developing and maintaining bigger programs is quite
> crucial in this kind of projects. This needs years of studying and
> programming experience.

Thank you for the encouragement. I believe my 15 years of studying and
programming experience will come in quite handy. But, that isn't something
to argue, that's something to demonstrate with the program itself, which
isn't a quick one-off program like the averager I posted.

Warp, I didn't argue with you about your coding styles because I didn't want
to get into a fight over something that is largely a matter of style. For
example, even though I used global variables, it makes it easier to take
that program and put it into a class that way -- I wouldn't have to change
all the references in the code so they were no longer in a struct when I
encapsulate it. Putting error handling before putting success handling is
very odd and makes the code harder to read (some people have that goal,
though), in my opinion, but I respected your style. Casting a pointer to
(void *) when freeing is actually a common practice and if you widened your
experience with C you'd see a lot of other people use it. I put fflush() in
there because I'm in the habit of flushing buffered streams -- habit -- let
me say that again, -- habit -- and so it was something I typed
automatically. Returning 0 instead of EXIT_SUCCESS is also standard, and if
you learned C when I did from the K&R book, you'd know that too. But, you
know what, I didn't want to make you look bad because your way of doing
things works as well and it is a matter of personal preference. Your coding
style is not the /RIGHT/ coding style, it is /YOUR/ coding style, Warp. If
you were argue /RIGHT/ coding style, then according to the fathers of C, I'm
actually closer to it than you.

As far as including variables I don't use, like the version, and the static
insecure char buffers, that was there for the same reason I didn't check the
command-line arguments -- I wrote it for personal use to put together an
animation quickly for a project I was working on and if I wanted to refine
the code to release to the public on a board like you did, I certainly would
have checked for those parameters. I understand that you're a perfectionist
about these things, but I'm more goal-driven than yourself, and the goal was
create motion-blur, and the goal of the post was to demonstrate how to do it
with sample code, not impress you. I understand how you might find that hard
to imagine.

Now, I have too much class to download your targa averager and nitpick over
your coding style and say it is wrong to a group of your peers. That would
be disrespectful and naive. When you get more experience working on
projects, you'll understand.


Post a reply to this message

From: Warp
Subject: Re: movie within
Date: 4 Feb 2004 10:57:41
Message: <40211675@news.povray.org>
Dan P <dan### [at] yahoocom> wrote:
> I believe my 15 years of studying and
> programming experience will come in quite handy.

  If 15 years of programming experience causes you to make programs with
the quality of the one you posted at the beginning of this thread, I find
that quite amazing.
  No offence, but the program looked like made by someone who has started
learning programming a month ago.

> Warp, I didn't argue with you about your coding styles because I didn't want
> to get into a fight over something that is largely a matter of style. For
> example, even though I used global variables, it makes it easier to take
> that program and put it into a class that way -- I wouldn't have to change
> all the references in the code so they were no longer in a struct when I
> encapsulate it.

  What I wonder is why you didn't create a class to start with. The fact
that the program is small is a lousy excuse to make it horrible, specially
if you are going to post it in public. If someone learning programming were
to study your code and enhance it he may well learn really bad habits and
get himself into trouble. In fact, by doing this you are learning bad
habits yourself.

> Putting error handling before putting success handling is
> very odd and makes the code harder to read (some people have that goal,
> though), in my opinion, but I respected your style.

  I don't understand how it is easy to read that you open a file and
handle its failure tens of lines later. The error handling was hard
to find and it was hard to associate with the line where the file was
opened.

  When opening a file success means that the program can continue normally.
That is, it doesn't have to interrupt its normal flow. Only failure means
that it needs to stop its normal flow.
  That is, the code is clear if it does something like this:

- Open the file.
- Did opening fail? If so, issue an error.
- Read the file.

  In your case what you are writing is this:

- Open the file.
- Read the file.
- Did opening fail? If so, issue an error.

  It makes no sense to keep the success check separated from the opening.

  Besides, by doing it that way you are needlessly introducing an extra
level of block nesting. The more nested blocks you have, the harder it
is to read the code.

> Casting a pointer to
> (void *) when freeing is actually a common practice and if you widened your
> experience with C you'd see a lot of other people use it.

  I have been programming C probably longer than you, and I don't remember
seeing anyone casting to void* to free memory. There's no need, it doesn't
make sense, and it's in fact dangerous.
  Consider this:

int a = 5;
free((void*)a);

  Kaboom?
  The compiler does not issue an error message, not even a warning. However,
the program will most probably crash.
  Granted, in this case it's easy to see what's wrong, but in a much longer
program a mistake like that can be pretty hard to find.

  If you, however, make "free(a)" the compiler will issue an error message.

  So I'm sorry, but you are simply wrong.

> I put fflush() in
> there because I'm in the habit of flushing buffered streams -- habit -- let
> me say that again, -- habit -- and so it was something I typed
> automatically.

  Not all habits are good.
  Certainly if you use fflush() too much when not needed you are only making
a slower program for no reason.

> Returning 0 instead of EXIT_SUCCESS is also standard, and if
> you learned C when I did from the K&R book, you'd know that too.

  No it isn't.
  There's nothing in the C standard that says that 0 is the return code
for success. The return code for success is system-dependant and that's
why EXIT_SUCCESS should be used instead. That's why EXIT_SUCCESS and
EXIT_FAILURE exist in the first place.

> But, you
> know what, I didn't want to make you look bad because your way of doing
> things works as well and it is a matter of personal preference.

  You seem to have this odd arrogant attitude. Don't you understand that
by trying so badly to make yourself sound competent you are only making
a fool of yourself?

> Your coding
> style is not the /RIGHT/ coding style, it is /YOUR/ coding style, Warp. If
> you were argue /RIGHT/ coding style, then according to the fathers of C, I'm
> actually closer to it than you.

  Yeah, I'm sure that the "fathers of C" suggest that you use tons of
global variables, never check the validity of input data, index out of
boundaries in tables (such as argv[]), read data to static buffers without
limits and make system-dependant code.

  Perhaps you should read the latest C standard and some good programming
design book.

> As far as including variables I don't use, like the version, and the static
> insecure char buffers, that was there for the same reason I didn't check the
> command-line arguments -- I wrote it for personal use to put together an
> animation quickly for a project I was working on and if I wanted to refine
> the code to release to the public on a board like you did, I certainly would
> have checked for those parameters.

  But you didn't add the checks, yet you still published the code in
a public forum. Yeah, sure.

> I understand that you're a perfectionist
> about these things, but I'm more goal-driven than yourself, and the goal was
> create motion-blur, and the goal of the post was to demonstrate how to do it
> with sample code, not impress you. I understand how you might find that hard
> to imagine.

  What I find hard to imagine is that someone who allegedly has 15 years of
programming experience can make such crappy code and isn't even embarassed
to post it in a public forum full of programmers.

> Now, I have too much class to download your targa averager and nitpick over
> your coding style and say it is wrong to a group of your peers. That would
> be disrespectful and naive. When you get more experience working on
> projects, you'll understand.

  Now you are being incredibly hypocritical. You explicitly ASKED ME to
comment on your code. Initially I did not, but then you asked so I did.
Now you are talking as if I had given you comments you didn't ask and
weren't interested in.

  As for my averager program, the code is crappy. I wrote it 6 years ago
and I certainly did not have as much experience as today. If I were to
write the same program again, it would certainly look completely different.
  I could better ask you to look at my newer code, but seeing your real
programming skills and your state of mind that would be only a waste of
time and resources since I will not be getting anything constructive.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Dan P
Subject: Re: movie within
Date: 4 Feb 2004 10:58:39
Message: <402116af$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:402109b9@news.povray.org...
> Dan P <dan### [at] yahoocom> wrote:
>   Forming an opinion on someone's programming experience based on when
> he graduated is certainly something fool to do. Basing it on what he
> *does* and *says* is a lot less prejudiced.
>
>   I find it quite sad that you despise someone's programming experience
> based solely on when he graduated.

Warp, what ballfield are you playing in, man? Did I ever say I despised
anybody's programming experience? Where are you getting these things? No
wonder this has been such a struggle -- who are you arguing with?

> > Who said I was interested in respect?
>
>   Then what are you doing here?
>   If you want people to talk to you and answer your questions and
cooperate
> with you, you should earn their respect. This is done largely by
respecting
> them yourself. If you don't respect people and don't care about them
> respecting you and don't mind offending people at will, you are little
> more than another troll.

You are literally describing yourself and Thorsten. Whom am /I/
disrespecting? It seems the both of you are interacting with some mental
idea of what I am. And I think this mental idea is constucted to bolster
your self-esteem.

> > It really shocks me how "logical" people are so driven by emotion.
Shocks
> > and entertains.
>
>   If you start insulting people you are going to make them angry. There's
> nothing odd about that.

Yes, yes, yes, yes, yes, Warp, can't you see you're arguing for me? It's
amazing how many contridictions you guys put in your postings. It's what
makes them so entertaining.

And troll? Trolls don't post source code and answer questions. Look at your
own responses to what I post and ask yourself who the trolls are.


Post a reply to this message

From: Warp
Subject: Re: movie within
Date: 4 Feb 2004 11:16:54
Message: <40211af6@news.povray.org>
Dan P <dan### [at] yahoocom> wrote:
> >   I find it quite sad that you despise someone's programming experience
> > based solely on when he graduated.

> Warp, what ballfield are you playing in, man? Did I ever say I despised
> anybody's programming experience? Where are you getting these things? No
> wonder this has been such a struggle -- who are you arguing with?

  This is a direct quote from a reply of yours to Thorsten:

"I looked you up and, wow, I didn't realize how fresh out of school you were.
You graduated with a BS in 2001? I'm really sorry, man, I didn't mean to get
old-school on you. I just assumed you had more experience based on your
attitude. When I said I've been working with POV-ray (and other 3D
applications) for almost a decade, I wasn't commenting on your experience or
anything. I really /was/ expecting a big long resume of amazing projects,
not a vague link to the Mac POV-ray site. You should take comfort in the
fact that you actually convinced me you must be all-that!!! Hey, maybe you
still are.

I know how Illinois can make some people jaded, being born in Wisconsin. We
think it's all that flat land. But, you're all our |F|riendly |I|llinois
|B|uddie|s|. It looks like you went to a good school, though. Things'll work
out. Hang in there, buddy. You'll make a big splash and laugh at all this in
five or so years."


  If that's not insulting someone based solely on the fact that he
graduated in 2001, then what is?


> You are literally describing yourself and Thorsten. Whom am /I/
> disrespecting?

  You are disrespecting Thorsten, for instance. Just read your own text
above.

> It seems the both of you are interacting with some mental
> idea of what I am. And I think this mental idea is constucted to bolster
> your self-esteem.

  The mental idea is based on your C code, your opinions on programming
which you have presented here and your arrogant attitude towards people.

> >   If you start insulting people you are going to make them angry. There's
> > nothing odd about that.

> Yes, yes, yes, yes, yes, Warp, can't you see you're arguing for me? It's
> amazing how many contridictions you guys put in your postings. It's what
> makes them so entertaining.

> And troll? Trolls don't post source code and answer questions. Look at your
> own responses to what I post and ask yourself who the trolls are.

  Blaming others for things you are being blamed is a typical braindead
troll technique and only shows that you lack the imagination of defending
yourself with rational and original arguments, besides being childish.

  5-year olds argue with "no, I'm not, you are!", not grown-ups.

  And yes, I am insulting you. I'm not even trying to deny that. You have
deserved to be insulted with your arrogant and hypocritical attitude.
But at least my insults are original and argumented, unlike yours.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Dan P
Subject: Re: movie within
Date: 4 Feb 2004 11:40:07
Message: <40212067@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:40211af6@news.povray.org...
> Dan P <dan### [at] yahoocom> wrote:
> "I looked you up and, wow, I didn't realize how fresh out of school you
were.
> You graduated with a BS in 2001? I'm really sorry, man, I didn't mean to
get
> old-school on you. I just assumed you had more experience based on your
> attitude. When I said I've been working with POV-ray (and other 3D
> applications) for almost a decade, I wasn't commenting on your experience
or
> anything. I really /was/ expecting a big long resume of amazing projects,
> not a vague link to the Mac POV-ray site. You should take comfort in the
> fact that you actually convinced me you must be all-that!!! Hey, maybe you
> still are.
>
> I know how Illinois can make some people jaded, being born in Wisconsin.
We
> think it's all that flat land. But, you're all our |F|riendly |I|llinois
> |B|uddie|s|. It looks like you went to a good school, though. Things'll
work
> out. Hang in there, buddy. You'll make a big splash and laugh at all this
in
> five or so years."
>
>   If that's not insulting someone based solely on the fact that he
> graduated in 2001, then what is?

First off, there are many facts there, not just the fact that he graduated
in 2001. Do you feel he should be insulted by them? That's really
disturbing. I'm responding to his point that I know nothing about him. Given
how insulting he was about my ignorance about him, I was honestly expecting
a lot more. Put yourself up on a pedestal like that and you better give
reason to crane their necks upwards, my friend. Oh, and by the way, I've
never asked you guys to put me on a pedestal, although I can understand that
you would feel I am because I don't cower in your omniscient presence.

> > You are literally describing yourself and Thorsten. Whom am /I/
> > disrespecting?
>
>   You are disrespecting Thorsten, for instance. Just read your own text
> above.

Respect begets respect. Disrespect begets disrespect.

> > It seems the both of you are interacting with some mental
> > idea of what I am. And I think this mental idea is constucted to bolster
> > your self-esteem.
>
>   The mental idea is based on your C code, your opinions on programming
> which you have presented here and your arrogant attitude towards people.

*Shrug* okay.

> > >   If you start insulting people you are going to make them angry.
There's
> > > nothing odd about that.
>
> > Yes, yes, yes, yes, yes, Warp, can't you see you're arguing for me? It's
> > amazing how many contridictions you guys put in your postings. It's what
> > makes them so entertaining.
>
> > And troll? Trolls don't post source code and answer questions. Look at
your
> > own responses to what I post and ask yourself who the trolls are.
>
>   Blaming others for things you are being blamed is a typical braindead
> troll technique and only shows that you lack the imagination of defending
> yourself with rational and original arguments, besides being childish.

I agree. Again, something you are doing. I'm not fooled by the troll-trick,
Warp. There is plenty of evidence that I'm not a troll on this board
already.

>   5-year olds argue with "no, I'm not, you are!", not grown-ups.

Again, I agree. We agree on so many things, Warp.

>   And yes, I am insulting you. I'm not even trying to deny that. You have
> deserved to be insulted with your arrogant and hypocritical attitude.
> But at least my insults are original and argumented, unlike yours.

Then argument them. Explain how I'm being hypocritical. Hell, explain my
assertions as you see them. Listen, I can understand why you would flame me
and after I went back and read my posts I got it. I answered this thread
but, at the same time, admitted that I didn't know everything. By the logic
of the tragically insecure, that means that I don't know anything.

And furthermore, what is all this hullabaloo about knowing things anyway?
Aren't the purpose of these boards to learn? How do you expect people to
learn anything if you disrespect them for your ignorant opinions of what
they know? This is just one of the many contridictions I keep reading: a
board to learn, yet you have to know everything before you start. And if you
have inperfections, better run, boy, because we's gonna whip you good!

It must be so hard to live that way, needing so bad for people to say, "ooh,
you're so smart." Needing it so bad that even when somebody comes along LIKE
I DID EARLIER IN THIS THREAD and said how smart you are and how much I
appreciated you with complete honesty and without provocation, you still
seem to fight for it, as if you have just done a double-take and didn't hear
it because it just couldn't be true!

What I think is going on here is that Thorsten is jealous because I didn't
say that about him. And since his opinion of himself is so astronomically
high, that means that I'm stupid and must be flamed. And I think you are
defending Thorsten because you think that if you get Thorsten's favor that
you'll be more important in the POV-ray community and meet your needs.

I know you imagine I have your needs, but I don't; I don't need your
respect. I do deserve apologies, though (although I'm not naive enough about
human nature to expect them). I also know that if I don't defend myself
against these attacks that you'll lose respect for me. Probably did because
I said I was going to respond by making the software.

I also think that you don't want me to make the software because you know it
will prove you wrong (beyond sin for you). So, you want to discourage me
because you perceive my success to be a threat to your self-esteem. That is
sad, man.

Also, I talk in active-voice, which means "A Person does Something". So, as
a result, I use "you" a lot. You're not used to this direct way of speaking
so you take it as me threatening you. It so incenses you that you don't even
read the posts and take the tone as challenge to your prowess.

What is truly ironic is that I basically do worship the ground you walk on
because your targa averager, yet you see me as some sort of disrespecting
child. I think it all comes down to the fact that I don't think that if I
acknowledge your greatness that I must therefore be diminished by that
acknowledgement. What fool would ever give a compliment in that environment?


Post a reply to this message

From: Dan P
Subject: Re: movie within
Date: 4 Feb 2004 12:03:32
Message: <402125e4@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:40211675@news.povray.org...
> Dan P <dan### [at] yahoocom> wrote:
> > I believe my 15 years of studying and
> > programming experience will come in quite handy.
>
>   If 15 years of programming experience causes you to make programs with
> the quality of the one you posted at the beginning of this thread, I find
> that quite amazing.
>   No offence, but the program looked like made by someone who has started
> learning programming a month ago.

Oh, no offense taken, Warp. I'm just surprised you gave me a whole month.

> > Warp, I didn't argue with you about your coding styles because I didn't
want
> > to get into a fight over something that is largely a matter of style.
For
> > example, even though I used global variables, it makes it easier to take
> > that program and put it into a class that way -- I wouldn't have to
change
> > all the references in the code so they were no longer in a struct when I
> > encapsulate it.
>
>   What I wonder is why you didn't create a class to start with. The fact
> that the program is small is a lousy excuse to make it horrible, specially
> if you are going to post it in public. If someone learning programming
were
> to study your code and enhance it he may well learn really bad habits and
> get himself into trouble. In fact, by doing this you are learning bad
> habits yourself.

I didn't create a class to start with because it wasn't a C++ program. Do
you mean posting code like that is a bad habit?

> > Putting error handling before putting success handling is
> > very odd and makes the code harder to read (some people have that goal,
> > though), in my opinion, but I respected your style.
>
>   I don't understand how it is easy to read that you open a file and
> handle its failure tens of lines later. The error handling was hard
> to find and it was hard to associate with the line where the file was
> opened.

You must write some pretty hard-to-read code if you can't find the end of
your blocks. Try indenting your code and putting in empty lines to break
parts of the program up. Also, if you have blocks that are that large, it
means that you need to add more methods. Only beginning programmers write
C++ programs like they are in BASIC.

>   When opening a file success means that the program can continue
normally.
> That is, it doesn't have to interrupt its normal flow. Only failure means
> that it needs to stop its normal flow.
>   That is, the code is clear if it does something like this:
>
> - Open the file.
> - Did opening fail? If so, issue an error.
> - Read the file.
>
>   In your case what you are writing is this:
>
> - Open the file.
> - Read the file.
> - Did opening fail? If so, issue an error.
>
>   It makes no sense to keep the success check separated from the opening.

Then why do programs like Java require you to write blocks of code like
this?

try
{
    Do something
}
catch (Exception ex)
{
    Failure
}

Are you saying all these people are wrong? I've never seen a person write
code like you describe in my lengthy career of programming in many different
languages. The difference between you and I is that I'm not saying YOU are
wrong for doing it that way. It's your thang... do whatchoowannado. As long
as you're consistent.

>   Besides, by doing it that way you are needlessly introducing an extra
> level of block nesting. The more nested blocks you have, the harder it
> is to read the code.

If you write blocks as lengthy as you describe, then you're right. Every
single person (without exception) who has read the... well, it's gotta be
more than a million now... lines of code that I've written have all said
that my code is so readable that they consider it "self-documenting".

> > Casting a pointer to
> > (void *) when freeing is actually a common practice and if you widened
your
> > experience with C you'd see a lot of other people use it.
>
>   I have been programming C probably longer than you, and I don't remember
> seeing anyone casting to void* to free memory. There's no need, it doesn't
> make sense, and it's in fact dangerous.
>   Consider this:
>
> int a = 5;
> free((void*)a);
>
>   Kaboom?

Well, duh, Warp; a isn't a pointer. Why would you even do that?

>   The compiler does not issue an error message, not even a warning.
However,
> the program will most probably crash.

However, without it, some compilers will report a warning that you are using
a pointer without cast because the free function prototype includes a
pointer type of void. Given that you use EXIT_SUCCESS for your return
values, I am assuming that you only program on one system, but that is just
an assumption; prove me wrong on that.

>   Granted, in this case it's easy to see what's wrong, but in a much
longer
> program a mistake like that can be pretty hard to find.

By saying something is self-evident does not support your argument. Read the
book "The Art of Deception". That's in chapter 1.

>   If you, however, make "free(a)" the compiler will issue an error
message.
>
>   So I'm sorry, but you are simply wrong.

No, I'm not.

> > I put fflush() in
> > there because I'm in the habit of flushing buffered streams -- habit -- 
let
> > me say that again, -- habit -- and so it was something I typed
> > automatically.
>
>   Not all habits are good.

I agree. However, one does not form habits without experience.

>   Certainly if you use fflush() too much when not needed you are only
making
> a slower program for no reason.

Wait... doesn't it have no effect? You're saying that those clock cycles NOT
IN A LOOP that equate to no more than a few milliseconds is making my
program slow? I've already admitted numerous times that I didn't know that I
didn't need to flush stdout and I've already said why I did; because it is a
buffered stream and I thought, because of that, it did.

> > Returning 0 instead of EXIT_SUCCESS is also standard, and if
> > you learned C when I did from the K&R book, you'd know that too.
>
>   No it isn't.
>   There's nothing in the C standard that says that 0 is the return code
> for success. The return code for success is system-dependant and that's
> why EXIT_SUCCESS should be used instead. That's why EXIT_SUCCESS and
> EXIT_FAILURE exist in the first place.

Go search the net for C programs and look for yourself. I'll wait. Some
people even use exit(0) as well. Since you don't do that, write them e-mails
and tell them they're all wrong. They'll love that.

> > But, you
> > know what, I didn't want to make you look bad because your way of doing
> > things works as well and it is a matter of personal preference.
>
>   You seem to have this odd arrogant attitude. Don't you understand that
> by trying so badly to make yourself sound competent you are only making
> a fool of yourself?

...huh? Again, you're arguing for my side against you.

> > Your coding
> > style is not the /RIGHT/ coding style, it is /YOUR/ coding style, Warp.
If
> > you were argue /RIGHT/ coding style, then according to the fathers of C,
I'm
> > actually closer to it than you.
>
>   Yeah, I'm sure that the "fathers of C" suggest that you use tons of
> global variables, never check the validity of input data, index out of
> boundaries in tables (such as argv[]), read data to static buffers without
> limits and make system-dependant code.

If they were running off a quick example like I did, they probably would do
the same thing because they understand the goal of the program was to
demonstrate a concept.

>   Perhaps you should read the latest C standard and some good programming
> design book.

Same to you.

> > As far as including variables I don't use, like the version, and the
static
> > insecure char buffers, that was there for the same reason I didn't check
the
> > command-line arguments -- I wrote it for personal use to put together an
> > animation quickly for a project I was working on and if I wanted to
refine
> > the code to release to the public on a board like you did, I certainly
would
> > have checked for those parameters.
>
>   But you didn't add the checks, yet you still published the code in
> a public forum. Yeah, sure.

Unlike yourself, I'm not insecure about my code, so I don't worry about
people like you picking it over.

> > I understand that you're a perfectionist
> > about these things, but I'm more goal-driven than yourself, and the goal
was
> > create motion-blur, and the goal of the post was to demonstrate how to
do it
> > with sample code, not impress you. I understand how you might find that
hard
> > to imagine.
>
>   What I find hard to imagine is that someone who allegedly has 15 years
of
> programming experience can make such crappy code and isn't even embarassed
> to post it in a public forum full of programmers.

Well, imagination isn't something everybody is born with.

> > Now, I have too much class to download your targa averager and nitpick
over
> > your coding style and say it is wrong to a group of your peers. That
would
> > be disrespectful and naive. When you get more experience working on
> > projects, you'll understand.
>
>   Now you are being incredibly hypocritical. You explicitly ASKED ME to
> comment on your code. Initially I did not, but then you asked so I did.
> Now you are talking as if I had given you comments you didn't ask and
> weren't interested in.

Yes, I did. And I thank you for your comments. The point is that I could
nitpick about your code in front of your peers as well, pointing out all
kinds of things that are a matter of style and saying you're WRONG, but I
don't because I have too much class and I understand that everybody is
different and I respect those differences.

>   As for my averager program, the code is crappy.

Well, well, well. To use your own argument, that's no excuse to post it on a
public web-site! All those bad coding habits you have -- you're going to
spread those, Warp!

> I wrote it 6 years ago
> and I certainly did not have as much experience as today. If I were to
> write the same program again, it would certainly look completely
different.
>   I could better ask you to look at my newer code, but seeing your real
> programming skills and your state of mind that would be only a waste of
> time and resources since I will not be getting anything constructive.

I see you realize my point now. You're not perfect and you're pre-emptively
defending yourself against my criticism about your code. You're so arrogant
that you think I actually: a. care enough about it to do so, and b. have the
time to bother.

All this and I STILL think you're talented and smart because you made the
effort to demonstrate it instead of spending all your time on boards telling
everybody how stupid they are.


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.