Back Up Next

40. A: How long does it take to write an aplet and does this decrease with time? I don't have any great programming experience.

Question submitted by: Chris Patterson
Answer: It is a pity that you don't have any programming experience because that would make it much easier but the language is very limited and that makes it fairly easy to learn.  The main advantage of programming experience is that you know the tricks to make programming quicker and more efficient (and more user friendly).  Once I have the idea clearly worked out it generally takes me only an hour or two to write and debug the program.  Generally the documentation takes much longer to write.  I really must emphasise to you how important the documentation is though.  If you're only producing aplets for your friends or students then you can get away without it but please try to ensure that you include documentation like mine if you make them available on the web.  It's just part of the job.
 

B: I am teaching fulltime so my only "free" time is weekends and holidays. Is there a learning curve?  (Will my second aplet only take half as long to write?).

Yes - graph F1(X)=(2*e^(-0.5*X^2)+1)/(X>0) to see it!   ;-)

Seriously though, for me there was a definite curve like the above one but that may be because I already program in a few languages and so the main time for me was just learning the oddities of a new one.  My main hassle now is in coming up with the ideas for new aplets - I've used all the obvious ones and some of the others I would like to be able to do are not possible due to limitations on memory and on the language itself (it has some VERY frustrating lacks!).

C: How many people do you know (or know of) who are actively writing aplets?  Are they teachers or do they work for HP?

Umm... there's me and .... um... there's....    Actually there are about a few of us in Western Australia world wide but that's about all.  For people who have written more than one or two aplets, there's only me.

If you have a look at my Maths aplets download page you'll see that there are a few aplets which have been written by others but most are by me.  The original set of 50 aplets made available by HP when the HP38G was released were written under contract and I have no idea who wrote them.  Some are very good, some are not.  One of the people in HP (Charles Lim) was a bit more visionary than the others and had Quadratic Explorer and Trig Explorer written by some HP programmers (programmed by Jean-Yves Avenard & Cyrille de Brebisson and designed by me, Charles Lim & Bob Parker) but this is all there are ever likely to be from HP since their focus has shifted to other things.
 
  

41. Why do the Aplets on your webpage not have a .SV program whereas the HP ones do?

Question: I was recently zapped an aplet. It works OK but what surprises me is that it has 5 programmes associated with it, and I can see what each of them does, but none of them is a set views although there is a customised views with the aplet, and none of them seems to be the overall control programme, so where would these be hidden?  They are obviously there because they're working, but I can't find them.
Submitted by: Shiela Byfield

Answer: It has to do with whether you write the aplet using the the ADK (Aplet Development Kit) or on the calculator.  If you write it on the calculator then the process is to copy a standard aplet and then run the SETVIEWS command in a program with an extension of .SV to modify the VIEWS menu.  Although all the aplets in HPs collection keep this .SV program, it is in fact no longer needed once the VIEWS menu has been altered - the changed version becomes part of the aplet and is preserved in SENDing from one calculator to another or to a computer. Hence, once an aplet is written, you can delete the .SV program with no effect, except that the way the SETVIEWS command is written in most of the HP aplets, it includes the .SV program in the list of views it expects and so there is potential for it to report a missing program if you were to delete the .SV program as I mentioned.

If, on the other hand, you use the aplet Development Kit, then it sets the VIEWS menu directly into the structure of the aplet and no SETVIEWS command is ever needed (or normally desirable).  Hence there is no .SV program in any of my aplets (except one or two that I wrote on the 38G before I found the ADK). The only exception to this is one I wrote which modifies the VIEWS menu 'on the fly' and so requires extensive use of the SETVIEWS command to do this.
 

42. (38G only) Is there a way to free up more than 23K on the HP38G?

Question: Is there a way to free up more that 23K  on the HP 38G? Thats all it starts with, and I need more! Is it possible to delete some built in programs that I never use?
Submitted by: Matt Reichert

Answer: It can't be done without physically modifying the calculator.  The six built in aplets are there to stay and, when they are in action, their 'environment variables' take up so much room that there's only 23K left.  There's a guy in Germany, Detlef Muller, who is able to modify a 38G so that it has 64K of memory instead of 32K.  This would mean that there would be 55K left after the environment is subtracted.  Unfortunately the problem is that the process is not cheap (requires special knowledge and equipment) and you run a chance of losing your whole calculator in the process - a very expensive way to end up with a hunk of plastic.  There's also another person (also in Germany) who can modify your calculator so that it has up to 128K (256K?) but still only in 'banks' of 32K - you have to flip a switch to change from one bank to another and the different banks are invisible to each other.  Although I've not had formal contact with him I would assume that the same risk of damage applies.
 
 

43. Are there any games for the calculator?

Yes - you can find some of them on my Games page.  Beware - your teacher is NOT going to be impressed if you play them in class!

Note: A lot of these games were written specifically for the 39G/40G and may not run on the 39g+, 39gs or 40gs. See the warning on the Games page.
 
 

44. I'm having problems downloading aplets with the cable.

Question: I've got the cable and I got the Connectivity Kit, but I can't seem to get things to transfer.  I can take a screen shot just fine so it must be connected but when I do a file transfer it says "unsuccessful transfer"  where do I put the files which are going to be transfered??
Submitted by: Dan Smith

Answer: Firstly go to my Utilities page and download the help file. It's for an old Connectivity kit but try looking at my trouble shooting instructions. They may help.

In your case the fact that you can do a screen capture is encouraging in that it indicates that you must have your port configured correctly. You may have a computer on which you can capture screens but not download aplets but in 10 years I've only found one computer like this.  On the other hand, you may just have low batteries - even before the low battery warning appears the first thing that goes is communication.

Test whether you can upload an aplet.  Create an aplet on the calculator (SAVE in APLET view under a different name).  Create an empty folder on your PC.  Run the Connectivity software, change into that empty folder and SEND from the calculator.  When it asks if it should initialise say 'Yes'.  See if the transfer works.  If it does then try downloading using RECV and see if you can get it back. You may now find that you can. On my old computer I could sometimes download aplets that I had just uploaded, but not ones that had been downloaded from the web. I really don't know why - it was very annoying! Seriously though, the most common problem is batteries.

A remote possibility is that your USB port is locked out by the system administrator (if it is part of a network).  That's almost unheard of because most people want to be able to use things like flash drives and also, if that were the case then I would not expect you to be able to do screen captures either. 
 

45. (38G only) How can I find out the available memory on the HP38G?

Question: Hello, I'm 16, I live in France and I'd like to know the avilable memory on my HP38G. I hope you'll be able to answer my question...
Submitted by: Chris Triton

Answer: Try looking here for a small program to show the available memory.

Warning: DON'T USE THIS ON AN HP39G!  IT WILL LOCK UP THE CALCULATOR AND CAUSE MEMORY LOSS.
 

46. What are all of the beeps when translated into music notes?

Answer: The best method of investigating this is to have a look at a program that I wrote to play our school's hymn (don't laugh - it was a joke & you haven't lived until you've heard a massed choir of calculators playing instead of an organ).  You can download the program from my Misc Aplets page.  Download the ZIP file and look at a file called HYMN3890.000

Basically the idea is to establish a base note (in the example below I've used C at 400Hz) and then use a geometric ratio to create the rest of the notes in the scale.  The length of a note is also established and stored.  Doing it this way has a number of advantages.  Firstly, you can change the speed of the music by just changing the one line which stores the basic length of a note into Z.  Secondly,  you can very easily change scale by changing the base frequency.  Thirdly, you can really easily see what notes you're using when you're recording the music because you're using the correct letters instead of the frequencies.  This makes it easier to find errors and saves a lot of room in the program.  It also looks better to any music student. To enter this program press SHIFT PROGRAM, then NEW, give it a name and type it in. Don't put in the comments.

Note: In the code below, means the symbol found at the bottom left of the HOME screen (and other places).

0.5Z:             The length of one note.
400C:             The scale is C major so load the base freq.
12 NTHROOT 2R:    This is the freq ratio between two semi-tones.
Rē*CD:            C to D is a tone.
Rē*DE:            D to E ditto.
R*EF:             E to F is a semi-tone.
Rē*FG:
Rē*GA:
Rē*AB:

BEEP G;Z:           Play G for one note.
BEEP C*2;Z:         Play C one octave up
                    (divide by 2 for one octave down).
BEEP D;Z/2:         Play D for a half note.
BEEP A*R;2*Z:       Play A sharp for 2 notes.
WAIT 2*Z:           Pause for two notes.
 

47. How can I graph piecewise defined functions?

Question: I wonder if you can help.  I have been trying to plot piecewise functions on the HP and cannot work out how to enter functions with a restricted domain.  Maybe the instructions are somewhere in the Manual, but I cannot find them.
Submitted by: Marg Clark

Answer: Originally I used to use the IFTE function (IFTE(condition, function1, function2)) but a much better technique is to make the function undefined outside the specified domain.  To do this, simply divide the function by the domain.  The advantage of this is that in the areas where the domain evaluates as false (false=zero) then you get an undefined answer which means that the calculator does not show a vertical line where it drops to zero.

For example:
      f(x) = x^2-2 for x>-2
would become  F1(X)=(X^2-2)/(X>-2)

and

      f(x)=3x+4  for -2<x<4
becomes  F2(X)=(3X+4)/(X>-2 AND X<2)

Note:  I've used < and > but it applies equally to <= and >=.  Just use the CHARS menu to get the appropriate symbol.
 

If you have a function that has, for example, three parts to it then just enter it as three separate functions F1(X), F2(X) and F3(X), giving each the appropriate domain.


 

48. Why does entering a function of X(X+2) give an error message?

Answer:  Normally the calculator will realise when you are using an 'implied multiplication' such as '3X' meaning '3*X', but sometimes gets confused (see right).  You are probably already aware of the MATH button which contains a list of functions that can be used on the calculator.  If so, then you must have noticed that each of them has to be used with brackets, like ROUND(3.23764,2) or SIN(35).
 
The problem is that when you write X(X+2) the calculator thinks that you are trying to use a function called X, rather than multiply by X, and tries to evaluate the function X at the point X+2 along the same lines as evaluating f(x+2).  When it finds that there is no such function it puts up the error message shown. The solution is simply to remember to put in the multiplication sign.
.
Most people also run across this problem in the Solve alplet at some stage.  For example, if you enter the equation S=A(1-R^N)/(1-R) in order to solve a geometric progression problem then you will find that you will only get error messages when you try to SOLVE in the NUM view.  In this case you have to remember to specifically put a * between the A and the (1-R^N).
.
 

49. How can I get "lower tail" instead of "upper tail" values for the Normal distribution using the UTPN function?

Question:  Did you know that (mean, variance, value) gives the upper tail of the normal distribition but if you change the order to; (value, variance, mean) it gives the lower tail of the normal distribition?
Submitted by:  Alan Cadby (H.o.D. at Hale School, W.Aust.)

A nice tip!  The UTPN function gives the "Upper-tailed Probability: Normal"  value, which is the top one of the two diagrams on the right.  The manual states that the correct order of the parameters is UTPN(mean, variance, value) and that this gives P(x>=value).
.
On the other hand, most of the tables books which used to be used in teaching the Normal distribution in Australia gave the "lower-tailed" probability instead - the bottom diagram.  Most of your teacher's notes and many of the text books may assume that this is the case, and this may cause small confusions.
.
The solution, as Alan says, is to reverse the order of the parameters and use UTPN(value, variance, mean) instead.  Simple!
.
.
.
.
The reason why this works is that the first thing the calculator does is to calculate the z score for the distribution, using the first formula on the right.  Reversing the parameters swaps the roles of the mean and the value, which results in the sign of the z score being reversed (see second calculation).  Because of the symmetry of the Normal curve, the upper tail of -z is the same as the lower tail of +z.  Q.E.D.
.

Last modified: 19 Dec 2007                                             Sitemap        Home        Contact Me