HP Forums
The Role of the Graphing Calculator in 2021 and Beyond - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: The Role of the Graphing Calculator in 2021 and Beyond (/thread-16414.html)

Pages: 1 2


RE: The Role of the Graphing Calculator in 2021 and Beyond - John Keith - 04-12-2021 08:13 PM

(04-12-2021 05:33 PM)robve Wrote:  Yep. Surely Python and C require a full keyboard to get anything done. CASIO's "BASIC" does not require a full keyboard to enter programs quickly, but their BASIC dialect(s) are not standard so there is a learning curve. Python and C have non-trivial learning curves.

Just my 2c:

The loss of BASIC as a simple and easily accessible programming language is regrettable. Calculus textbooks used to have BASIC programs, so learning BASIC was "automatic" with the math stuff. And it was fun too, because the graphics and sound commands are all built-in. No stupid libraries to figure out and install on every damn machine.

With that in mind, Python is great, but NOT a replacement of what BASIC was able to do to encourage programming as a way to solve problems.

Opinions may vary but I don't find Python more difficult than BASIC. If there is anything that may make BASIC easier to learn is its oversimplification and relative lack of expressive power. It does take time and effort to become proficient in any programming language, and Python is a language that one can grow into.

Don't get me wrong, I grew up programming in BASIC on PC's and the HP-71 but I have no nostalgia for BASIC. Once I started using FORTH on the 71, and then got an HP-28S, I never looked back.

The idea that "every kid should learn to code" is just plain silly. Programming requires a certain mind set, and interest, that not everyone has. Every child should be exposed to programming but there is no point in forcing programming upon those with no interest or abilities in it.

I would bet that most users of the 50g and Prime never program them at all and just use their built-in features.

I do agree that any language used in a calculator must have graphics, plotting etc. but those are not inherent features of any particular language.


RE: The Role of the Graphing Calculator in 2021 and Beyond - robve - 04-12-2021 10:27 PM

(04-12-2021 08:13 PM)John Keith Wrote:  Opinions may vary but I don't find Python more difficult than BASIC. If there is anything that may make BASIC easier to learn is its oversimplification and relative lack of expressive power. It does take time and effort to become proficient in any programming language, and Python is a language that one can grow into.

The whole point of the Why Johhny Can't Code is that it used to be super easy to program. Debugging was very easy too allowing a language to be learned by trial and error. BASIC is simple enough start to learn to program without being bogged down or by trying to be perfect and have more power than what is ever needed to get started. BASIC was like a Cessna versus a Boeing 747. Which one would you prefer student pilots to pick to learn to fly? Like planes, the concepts between programming languages are the same and graduating to more powerful tools is only natural.

(04-12-2021 08:13 PM)John Keith Wrote:  I do agree that any language used in a calculator must have graphics, plotting etc. but those are not inherent features of any particular language.

Exactly. So what language do you propose to do this with a calculator? Even with a QWERTY keyboard (which seems mandatory to do anything useful), what alternatives do you have in mind that makes it easy to use graphics, plotting and sound without non-portable library installations of third-party APIs that one has to learn? And what about syntax? The syntax should offer functions, (local) variables, arrays/lists and structures and not require too many rules that makes entering and editing programs a frustrating chore.

Here is a simple example: Write a program to simulate a Galton board with 50 pins deep and 500 balls to drop. Each time a ball drops, a pixel on the screen should show and a beep should sound to indicate the position of the ball on the x axis.

In BASIC (e.g. on the SHARP PC-G850) this is super simple to "key in" right away, taking only a few minutes:

10 CLS: N=50
20 FOR I=1 TO 500
30 X=72
40 FOR J=0 TO 50: X=X+2*RND 2-3: NEXT J
50 FOR Y=47 TO 0 STEP -1: IF POINT(X,Y) NEXT Y
60 PSET(X,Y): BEEP 1,X,10
70 NEXT I

The BASIC commands are standard. The graphics and sound commands are just a few built-in (and easy to memorize or find in the manual if need be.)

Now do the same in Python or C++ and write the code in just a few minutes, debugged and all.

Some have proposed alternatives to learn about programming, such as Scratch and Alice. But I would argue that these are not for the "cool kids" that want to use something that the "grown ups" use. Unfortunately, the "grown ups" want kids to fly a Boeing 747... right?

Anyway, this is a side topic for another time perhaps.


RE: The Role of the Graphing Calculator in 2021 and Beyond - OlidaBel - 04-13-2021 06:52 AM

(04-12-2021 10:27 PM)robve Wrote:  In BASIC (e.g. on the SHARP PC-G850) this is super simple to "key in" right away, taking only a few minutes:

10 CLS: N=50
20 FOR I=1 TO 500
30 X=72
40 FOR J=0 TO 50: X=X+2*RND 2-3: NEXT J
50 FOR Y=47 TO 0 STEP -1: IF POINT(X,Y) NEXT Y
60 PSET(X,Y): BEEP 1,X,10
70 NEXT I

The BASIC commands are standard. The graphics and sound commands are just a few built-in (and easy to memorize or find in the manual if need be.)

Now do the same in Python or C++ and write the code in just a few minutes, debugged and all.

Some have proposed alternatives to learn about programming, such as Scratch and Alice. But I would argue that these are not for the "cool kids" that want to use something that the "grown ups" use. Unfortunately, the "grown ups" want kids to fly a Boeing 747... right?

Anyway, this is a side topic for another time perhaps.

Hi. Yes you can start easily with Basic.
My first programming experience was on HP 11C ;-) , later with RPL.
About Python : I think it's easy to use and discover, you can use is as a procedural language without the hassle of object oriented definitions.
But... the way the code is structured with spaces and without { } is (or could be..) an issue on a small calculator screen.
Maybe the reason HP why choose the PPL language written between BEGIN END...!

When I was in university, there was the HP RPL fans and ...the rest (Basic Casio FX850 for the majority). I never regret this choice, the flexibility of RPL helps a lot to write nice numerical methods simulations and solve scientific exercices. There was also the fun to use it, one reason of its success.

Scratch language is very interesting, I tested it a long time ago.


RE: The Role of the Graphing Calculator in 2021 and Beyond - toml_12953 - 04-13-2021 09:08 AM

(04-12-2021 10:27 PM)robve Wrote:  40 FOR J=0 TO 50: X=X+2*RND 2-3: NEXT J

What does RND 2-3 do? In standard BASICs, RND generates a random number in the range [0,1) but the 2-3 would be a syntax error.


RE: The Role of the Graphing Calculator in 2021 and Beyond - StephenG1CMZ - 04-13-2021 02:58 PM

(04-13-2021 09:08 AM)toml_12953 Wrote:  
(04-12-2021 10:27 PM)robve Wrote:  40 FOR J=0 TO 50: X=X+2*RND 2-3: NEXT J

What does RND 2-3 do? In standard BASICs, RND generates a random number in the range [0,1) but the 2-3 would be a syntax error.

If RND takes a single parameter I'd assume it would probably parse as
X +( 2*RND(2)) -3
On an interpreter where built-ins like RND do not need parentheses (pending verification on your selected interpreter)

But every basic is different so it needs checking.

It's IF POINT(X, Y) NEXT Y
that has my confused.

Whilst coding Python on a handheld isn't easy*, it is much easier than writing 3 different basic solutions, and trying to key those in on 3 different calculators each with their own idiosyncrasies.

*I have tried Pythonista on an IPhone (and Python-syntax-in-CAS on an emulated HP Prime)


RE: The Role of the Graphing Calculator in 2021 and Beyond - Didier Lachieze - 04-13-2021 04:05 PM

(04-13-2021 02:58 PM)StephenG1CMZ Wrote:  
(04-13-2021 09:08 AM)toml_12953 Wrote:  What does RND 2-3 do? In standard BASICs, RND generates a random number in the range [0,1) but the 2-3 would be a syntax error.

If RND takes a single parameter I'd assume it would probably parse as
X +( 2*RND(2)) -3

Yes, from what I can see on my G850VS and in the English manual:
RND 2 returns either 1 or 2 randomly
so:
2*RND 2-3 returns either -1 or +1 randomly
and:
X=X+2*RND 2-3 increments or decrements X by 1, randomly

(04-13-2021 02:58 PM)StephenG1CMZ Wrote:  It's IF POINT(X, Y) NEXT Y
that has my confused.
POINT return the status of the specified point on the screen, so this loop looks for the highest value of Y for which the point (X,Y) is not set, so it looks for the top of the pixel column related to X to add a new pixel with PSET(X,Y).

Here is an example of the program output on my G850VS:


RE: The Role of the Graphing Calculator in 2021 and Beyond - MNH - 04-16-2021 12:01 PM

(04-11-2021 10:24 PM)Eddie W. Shore Wrote:  Portable programming device (at least for Basic and Python, I hope they would try again with C++, at least with a simple version of it)
Why C++? Would this be an extension of Egan Ford's work, or do you anticipate something other than an ARM processor in future calculators?


RE: The Role of the Graphing Calculator in 2021 and Beyond - Hlib - 04-18-2021 04:48 PM

It has been more than seven years since the introduction of HP-Prime, and it is now obvious to me that this calculator rightfully occupies a leading position among modern graphing calculators. Especially pleased with the two latest versions of HP-Prime Pro. apk: finally, some minor issues that caused some inconvenience were fixed. In my opinion, in many practical applications, there will never be an alternative to graphing calculators.
HP-Prime is a very complex calculator, and often relatively simple tasks can be solved more efficiently on other calculators. Nevertheless, it is encouraging that HP-Prime can be a great assistant for many years to come. I`m not sure about the reliability of the HP physical calculator, so I prefer the app on my smartphone (which has a vibration response and keyboard sound). From this perspective, smartphones and tablets pose a threat to the HP-Prime calculator market by not promoting the purchase of a physical calculator.