My programming didn’t improve much after high school but I’m still kind of proud of my not-totally-cheating cheating.
My programming didn’t improve much after high school but I’m still kind of proud of my not-totally-cheating cheating.
I showed it to my teacher and asked it if it would be considered cheating to use it on the test, and she said that if I knew the material so well that I could write a program that didn't just solve it, but showed the work, then clearly I knew the material so well that I'd ace the test even without the program, so I could go ahead and use it, just as long as I didn't share the program with my friends.
I didn't have any friends (This was 1998 where being such a nerd was still looked down on), so it wasn't an issue.
I got an A in that class both semesters, which was better than the B I often got in Math (and a C- once in AlgII) because I hated doing homework. But starting on the program as soon as I grasped the concept and usually blasting through the homework with it by the end of the period meant an A was easily in my grasp.
That teacher was the best damn math teacher ever. He would work hard to help every last student get it, he'd gladly spend his whole lunch helping a kid if they needed it.
PS. I did share some of my programs, mostly with one girl, but she's a successful nurse today so I guess I didn't ruin her future :D
As he was going through the tome that represented the CISC instruction set of a VAX system (long before easy search engines), he found POLY ( https://www.ece.lsu.edu/ee4720/doc/vax.pdf page 9-118).
So, his program, instead of doing all the calculations was setting up a few registers, a large comment block that explained it, a call to POLY, and reading out the registers.
He claimed to have gotten full credit and within a handful of semesters later the course was switched from CISC architectures to RISC.
- some kind of root finding (note that methods like Newton–Raphson don’t work when zeros have multiplicity)
- dividing polynomials by (X - a) after finding one root to find the next root
I do recall that it was something to do with polynomials.
It was also something that was fun to port.
float poly(int d, float x, float *c) {
c+=d;
float y = *c;
while(d--)
y = *c-- + y * x;
return y;
}
I also don’t see why you consider this to be the CISCiest instruction from an architecture that includes a substring-search instruction, a vaguely printf-like instruction with its own mini instruction set for the pattern strings it takes, and an instruction to do polynomial division in the ring of polynomials over F_2 (ok this is just CRC)Lol. So naïve. Half the point of programing and testing the software is so that you can then forget how to do the task yourself. I'd say that 90+% of the task-specific code I've written was for that I no longer remember how to do myself. Once upon a time I wrote a thing to calculate some of the specifics re water hammer effects in pipes. I still have the code but, for the life of me, I have totally forgotten the actual math.
I started using this username in...I think 2002? Well, actually, I started using just "Sohcahtoa" then. Then I tried signing up for some service a few years later and "Sohcahtoa" was already taken, so decided to just add my birth year to it, since that was a pretty common thing to do at the time, and now I'm Sohcahtoa82 everywhere except on EFnet, where nicks are limited to 9 letters. Still Sohcahtoa there.
For tests, my teachers would force me to clear my memory (you're not fooling catholic nuns with a fake screen, she would take my calculator and clear it herself).
But I got good at programming. I was so fast that I would just spend the first 30 minutes of a 1-hour test re-writing the programs and then spend 5 minutes completing the test and be excused to go to the computer lab for the remainder.
Eventually I got so annoyed of typing things out on the TI-83+ keyboard, and as I progressed the programs got more complex, that I bought a TI-92 with a qwerty keyboard and would be able to write solvers the test in 5-10 minutes and fully solve a test in 5-10 minutes. I mostly did it so I could have more time in the computer lab.
I still have those calculators too, I should see if they still work some day :)
It seemed ridiculous to me, since obviously I'd thoroughly learned the material, but it certainly scared me, and I never went on to study CS, though I kept programming and did eventually become a professional programmer. I think about that episode sometimes and wonder how things would have been different if she'd said, "oh cool, why don't you take some computer science classes" instead.
To give you an idea of what I mean: I used to maintain the content filter for a school. Students being students, they found all sorts of ways to get around it. I never took much issue with the students who found ways around it. They were exploring and learning. The issue was with the other students. The ones who just followed someone's instructions, never exploring and never learning.
I would imagine that calculators are much the same. Programming them to answer questions is a great way to reinforce concepts. Copying the program off of someone else and finding ways to hide thee program is just plain cheating (of the system and themselves).
Initially I was giving the programs to friends. Math teacher caught me and I thought I was getting in trouble for it. Nope! She said 'Never give away your work like that. Make them pay for it.'
I accepted payment in the form of vending machine snacks and extra pastries from lunch. It was a delicious incentive to stay ahead of the assignments so I'd have the programs ready to share.
Nginx/apache/whatever?
libc?
Firefox?
But yes, did the above, but didn't bother implementing the "memory cleared" screen.
Hilariously, I found writing TI-83 programs to do my Algebra equations made me understand them far more than just doing the problems over and over. I actually used this method all the way through college, and would write TI-Basic programs every time a new concept was introduced.
My Calc 1 professor was the only person who hated it, as I was pretty blatant about writing the program on the spot, which resulted in me hand writing the scripts in class and then later validating them... Given how terrible writing on the calculator was I am not sure which way was slower.
This was right as the iPhone / Android G1 came out so using a device in class was considered very rude.
[0] https://mitp-content-server.mit.edu/books/content/sectbyfn/b...)
I showed mine to my Calculus teacher and she let me use it because she had this same viewpoint, on the condition I never shared it with the other students.
Did it work?