|Clearing facts and a challenge (long)|
Message #19 Posted by Vieira, Luiz C. (Brazil) on 8 June 2003, 1:05 p.m.,
in response to message #15 by Vieira, Luiz C. (Brazil)
Hi, folks; let's go again.
It's a "big guy" and I'd ask you please: read it all before getting to a conclusion, O.K.?
Focussing over a particular problem sometimes leads to a leak of specific information that may be interpreted as general case.
I mentioned: a big HP41 program. There are programs written for the HP41 that take lots and lots of memory and are many steps long. A few days ago, Valentin mentioned Othello, a 1,000 steps long program for the HP41... It is RPN. I do not know what Otlhello does, but porting it to an HP48 might reduce part of its structure in order to use enhanced HP48 features, although enhancing functionality might also cause it's RPL version to be a lot longer than the original RPN one.
Not to extend the subject any farther than it should go, in my case I had to identify what was going on the HP41 program so I could reproduce the same thing in the hP48. And I believe a single translation is sometimes trivial, so I decided to do what is supposed to do: enhance functionality. I rebuilt all loops, I used HP SOLVE instead of custom RPN loop control (by far, the worst part of all), I created a new, friendly in/out interface that used the LCD to show the complete (six values) answer at once, impossible to be done in a single-line LCD. And I did not mention it, but the about eight books were three manuals (HP41CX, HP48 UG and AUG) plus four or five specific books, subject related (surveying).
What for? I'm a teacher, if I can't do the thing or if I don't understand the thing I cannot explain how to do the thing. The only book I wrote (at least so far) and published is titled "From the HP41 to the HP48" (Da HP41 para a HP48), and I wrote because I think if I can do the thing, I can explain how to do the thing and go further: allow others to be able to do the thing, too. That's what teachers are primarily for.
I explain to my students that programming and using a program language are related tasks, instead different ones. You first learn how to program, like communicate, and improve your own programming skills and methodology and this goes with you forever. Some languages come and go, learning them is up to each one of us and the task we're performing. There are some situations where RPN programs need specific structures to be created, while RPL may already have them. And this eases the job.
We're dealing with calculators, but we can extend this "analysis" to computers and their O.S. Let's be honest and think both as users and programmers: whom of us would gladly and spontaneously migrate "back" to plain, old text interface instead of graphical one? Some "classical" programmers would gladly accept the task of getting back to their own roots and do magic with assembly language, plain C/C++ and Pascal. I would (I still have two 586 desktops and one 386 laptop to cry over when I'm nostalgic). But as a user I would not like to get rid of high-quality graphics environment, and I have already seen "today's" programmers that are not even aware of what's going on inside their boxes for as long as they command and the box obey.
C'mon, let's face it: there was a time when first computers and handheld calculators were "cool". Many of us lived those days, some did not. I read here that, in some cases, calculators do not even call for curiosity anymore, and we come from a "time" (twenty, twenty five years ago?) when RPN users and programmers were reverenced. Today, youngers do not have the feeling for it anymore. Calculators are no longer "cool", being able to understand problems and solve them is not "cool", survive against tech challenges is neither "cool"...
The HP41 series showed a drastic claim for their own "cool" inner parts when HP decided to call them computers instead of calculators. Coconuts and Voyagers where the last Hewlett-Packard "calculators" made by human hands; Clamshells, Pioneers and 48/49 series were CAD/CAE assisted, they have no "soul" to be maintained. I think Xpanders had passion in their design, and their disastrous hammered finale could not be avoided: they were not part of HP's plans for "the future", whatever it is. In time: I have a feeling that Xpanders would not find their place amongst RPN/RPL addicted, I don't know.
I wrote too much.
My challenge is: write the smallest program in any RPN/RPL calculator that computes interception coordinate P(x,y) of two lines L1 and L2 given line's angles Ø1 and Ø2, both related to the same reference (bearing, trigonometric, clockwise, whatever) and coordinates of two points P1(x1,y1) and P2(x2,y2) belonging to each line, respectively. I found my own solution in an HP48 using matrices and linear system solution, but the program has to handle original values a bit before "building" final matrices. When I tried direct values manipulation I found some "gaps" when lines were parallel to each other and when angles were closed to 90 or 270 degrees (PI/4 or 3*PI/4), so my program does not use any conditional structures. If you already have your own solution let me know it, I'd like to see what others are doing.
Finally, when I pointed out that I used eight books I intended to show that using books is always a good practice. I also want Richard Garner, Erik Ehrling, Raúl Lion and anyone else reading not to take this post as anything but a clearer exposition of the same thoughts expressed in this post. I agree with all views based on personal, particular, professional experiences and analysis. I just thought I should improve the way I expressed my own.
Thank you and forgive me writing too much. I'll accept and read all comments, suggestions, flames, blames without complaining... too much. d;^)
Luiz C. Vieira - Brazil
Edited: 8 June 2003, 4:14 p.m.