Confusion reigns

Sometimes you just have one of those days.  I had my Python class compute some Taylor Series where the input was number of iterations and the x value.  One of the students was working on sin x and was getting really weird results.  We sat there together trying to figure out what was wrong with her algorithm.  We tore it apart and put it back together half a dozen times.  No luck.  Everything was correct except the solution.  The partial sums were not even close.  It was driving me batty.  It was not that hard an algorithm.  OK, maybe Python was computing powers weird so I switched from (-1)^n to pow(-1,n).  It worked.  Thirty seconds later I figured out the carrot (^) does not work in Python.  I knew that.  Yes I did.  But it is correct for the TI-84 calculator.  Too many platforms and I am getting them all mixed up.  I put something on the board the other day, stepped back and thought, “No, wait.  That is Small Basic”.  I am getting my colon and semi-colons mixed up.  Python is colons, C# (Unity) is semi-colons.  Small Basic does not use “Print” to print, “print” is lowercase in Python.  I have three different “For” syntaxs to remember.  I am so glad I am not teaching a Java class.  Must be the early onset of Alzheimer’s.  Well, maybe not so early.


5 Responses to “Confusion reigns”

  1. gasstationwithoutpumps Says:

    Most of the programming languages I use have ** for exponentiation, and I *still* sometimes forget and use ^ (which works in LaTeX).

  2. Alfred Thompson Says:

    Back in the old days before WYSIWYG editors I was switching back and forth between one editor that used the command d for delete and another editor that used d for display. You can easily imagine the costs of getting that one wrong. No undo back then either.

  3. gasstationwithoutpumps Says:

    I remember that “d” was delete in vi, though you needed to add another letter to say how much was being deleted. But what editor used “d” for display?

  4. gasstationwithoutpumps Says:

    Correction to my previous reply: Alfred was probably talking about ed, not vi, since he said “before WYSIWYG” and vi was a crude approximation of a WYSIWYG editor, using essentially the same editing commands as ed. I’ve still not figured out what editor used “d” for display. Perhaps it was one I never used (I did use ed and teco, before vi and emacs extended and replaced them).

  5. gflint Says:

    We are all dating ourselves here. Almost anyone under 40 would be confused by this conversation.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: