Why leave the error handling to the caller?

R

Roland Pibinger

Yes. I am currently writing BabyX purely to avoid depending on Motif. Motif
is a far better toolkit than I could write, but I don't have it installed on
my machine. I can get it, but then that will mean that everyone who wants to
play about with my program will have to do the same. So I took the decision
to depend just on Xlib, hence BabyX.

So your users will depend on your BabyX instead of Motif? There's a
fine line between what you do and NIH syndrome.
 
M

Malcolm McLean

Roland Pibinger said:
So your users will depend on your BabyX instead of Motif? There's a
fine line between what you do and NIH syndrome.
Sure. But BabyX will ship as C source files bundled with the rest of the
code. So just typing gcc *.c will build it - admittedly you have to link in
Xlib, which took me about an hour to figure out how to do, and OpenGL, which
was easy, just -lGL will link it. If it is another hour to figure out how to
link in Motif, people won't do it. The users are mainly biochemists who do a
little bit of programming, not, like me, programmers who have learnt a bit
of biochemistry.
 
F

Flash Gordon

Malcolm McLean wrote, On 23/06/07 12:32:
Sure. But BabyX will ship as C source files bundled with the rest of the
code. So just typing gcc *.c will build it - admittedly you have to link
in Xlib, which took me about an hour to figure out how to do, and
OpenGL, which was easy, just -lGL will link it. If it is another hour to
figure out how to link in Motif, people won't do it. The users are
mainly biochemists who do a little bit of programming, not, like me,
programmers who have learnt a bit of biochemistry.

It has never taken me an hour to learn how to link in a library, I just
read the instructions. Then I write a makefile and others don't need to
even bother with that. This would take far less time that writing your
own library which you admit will not be as good. So you would be better
advised to do what most people do and select a good library to do your
common tasks and use it.

Of course, this is going far OT so you will have to go else where to
learn how to write makefiles for your system.
 
C

CBFalconer

Malcolm said:
I'm afraid the big console companies, but not the games programmers
themselves, have complete contempt for their customers.

We were allowed to show two error messages. "Drive door not open"
and "Disk dirty". So if the program encounters an internal error,
such as running out of memory, the customer has to take the disk
out, polish it, and restart the game, and that fixes the problem.
Says it all.

Maybe that policy was intended to force programmers to detect and
fix internal errors on the fly?
 
M

Malcolm McLean

CBFalconer said:
Maybe that policy was intended to force programmers to detect and
fix internal errors on the fly?
Games companies won't accept a single known bug - at least wouldn't when I
was in the business, nowadays programs are so complex they might have had to
relax on that one - but they certianly won't admit to a bug to the user.
 
M

Malcolm McLean

Flash Gordon said:
Malcolm McLean wrote, On 23/06/07 12:32:

It has never taken me an hour to learn how to link in a library, I just
read the instructions. Then I write a makefile and others don't need to
even bother with that. This would take far less time that writing your own
library which you admit will not be as good. So you would be better
advised to do what most people do and select a good library to do your
common tasks and use it.

Of course, this is going far OT so you will have to go else where to learn
how to write makefiles for your system.
Nothing OT on the library debate.
It took about an hour to get xlib linked in.
I'd forgotten everything I knew about xlib programming so first I had to
locate a "hello world" program. To be fair this was one that also used open
GL.
So I complied with -lX11 and -lGL
GL linked, X didn't.

Oh dear. Disk search to see if I could find the X library, which I
couldn't - there were lots of files under a folder marker X11 but I couldm't
make head or tail of them. So an internet search to see how to link in X.
Eventually I found out that it is -LX11/R611, capital L and a subdirectory
containing the files. So x linked.
At least an hour had gone by.
I then tried to compile with a toolkit, and failed again. I was pretty sure
there was no Motif on the system, but it would entail a call to tech support
to have it installed. I looked around to see what was available, but whilst
there are a few GNU toolkits out there, such as the one used to build the
GIMP, it is a performance to download and install each one.
The program might be used by biochemists who know a little programming, and
might want to tweak the biochemical internals and add a menu item of
something, but they are not confident GUI programmers.
Hence the BabyX project.
It is going to have a few routines for buttons, scrollbars, menus, input
fields and popups, but that is about it. It will be freely available in
source code form, which I expect to be about twenty files of maybe 1000
lines max.
 
J

Johan Bengtsson

Eric said:
Johan Bengtsson wrote On 06/21/07 13:04,:
[...]
I am mostly writing educational program that contains almost no really
valuable information [...]

Yes, we've all taken a few courses of that kind.

:)
Well, I don't really approve of the way you cut my text..., but you
certainly have a point there... and I do appreciate the humor...
 
F

Flash Gordon

Malcolm McLean wrote, On 23/06/07 16:22:
Nothing OT on the library debate.

<snip long explanation about the pains you had linking to X>

How to use makefiles so that the people you ship the source to don't
need to know how to link is OT, and that is what I am suggesting was the
better approach. Also the reason it takes you an hour to do what takes
me a few minutes is OT. Learning the interface to a library may take a
while, but linking to it only takes me minutes.
 
C

CBFalconer

Malcolm said:
Games companies won't accept a single known bug - at least wouldn't
when I was in the business, nowadays programs are so complex they
might have had to relax on that one - but they certianly won't
admit to a bug to the user.

Errors arise from other things than bugs, e.g. hardware failure.
 
M

Malcolm McLean

Flash Gordon said:
Malcolm McLean wrote, On 23/06/07 16:22:

<snip long explanation about the pains you had linking to X>

How to use makefiles so that the people you ship the source to don't need
to know how to link is OT, and that is what I am suggesting was the better
approach. Also the reason it takes you an hour to do what takes me a few
minutes is OT. Learning the interface to a library may take a while, but
linking to it only takes me minutes.
The details of makefiles are OT, but the reason you can link up a library in
minutes whilst it takes me an hour or more is certainly topical, and very
interesting.
 
M

Malcolm McLean

CBFalconer said:
Errors arise from other things than bugs, e.g. hardware failure.
Nintendo products never fail. Unless, obviously, you smash them up. Neither
do Sony's. The fault is always the user's for not cleaning his disk.
 
F

Flash Gordon

Malcolm McLean wrote, On 24/06/07 00:52:
The details of makefiles are OT, but the reason you can link up a
library in minutes whilst it takes me an hour or more is certainly
topical, and very interesting.

Either I am brilliant at finding, reading and understanding the
documentation and examples or you are terrible at it. Or, I suppose, it
could just be that I know how the systems work and how to ask it the
right questions and you don't.

Personally I don't think I'm as good as my colleagues do and certainly
don't consider myself to be brilliant, but our respective abilities are
not topical here.
 
D

David Thompson

Malcolm said:
[...]
Here's a class with exactly the same functionality written in Java.
(Breaking a string at commas into a variable number of (copied)
(varlength) strings.)
Good-oh. Got a COBOL version, too?
COBOL doesn't really support varlength strings at all, or variably
allocated anythings. If you'll settle for a variable portion of a
fixed (prespecified) array containing fixedlength strings as the
closest reasonable analog, it's one builtin statement (UNSTRING) for a
fixed number or two maybe three statements (PERFORM + UNSTRING ?+
MOVE) plus two variables (which in practice are nonlocal and usually
can be reused) for a variable number. But this advantage is particular
to this fairly specific case and thus not a good basis for comparison.

- formerly david.thompson1 || achar(64) || worldnet.att.net
 
C

CBFalconer

.... snipped it all ...

If you choose to answer one-month old Usenet articles, I suggest
you be very cautious and check that the thread is still recently
active. Otherwise most of the participants are gone, or satisfied,
or something.
 
R

Richard Heathfield

CBFalconer said:
... snipped it all ...

If you choose to answer one-month old Usenet articles, I suggest
you be very cautious and check that the thread is still recently
active. Otherwise most of the participants are gone, or satisfied,
or something.

David Thompson has, for as long as I can remember, done this kind of
sweeping-up operation on recent but dormant threads that still have
unanswered or uncorrected topical issues, and I for one regard it as a
useful service (even though I'm usually one of his victims).

Those participants who have gone are, I suspect, not the people David T
is aiming at. He is, rather, aiming at those more regular readers of
the group who are satisfied with the answers they got, by pointing out
why they shouldn't be.

Lang may his lum reek.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,439
Messages
2,571,700
Members
48,796
Latest member
Greg L.
Top