10
atheist
3y

Me: "Some kind of algebra library would be really useful for this code/math course I'm doing, but it'd be hard to write"

Python devs: "Is this what you're looking for?"

https://www.sympy.org/en/index.html

Me: Yes. I'm now conflicted, coz on one hand I'm like, "I don't want to use any external hard to use libraries because that's the point of teaching it... But this makes the math easier to understand..."

Comments
  • 3
    I wish I knew about this earlier!
  • 2
    @electrineer "my entire first degree explained in one sentence".
  • 3
    At least I had wolfram alpha
  • 4
    I had paper and erasable pens 😅
  • 3
    First teach them the math using the lib.
    Then teach them how to implement parts of the lib from scratch.
  • 2
    @electrineer WolframAlpha, also my first degree explained in one sentence
  • 1
    @Oktokolo Ah, I was just gonna use the lib coz doin algebra is hard, the library isn't that useful for actual coding stuff.
  • 3
    Sympy is one of those things that should be taught in high school maths classes. Yes, knowing how to apply trig identities is useful, but do you know what's more useful? Giving people a tool that does it for them and then spending the time you saved explaining why trig identities are like that and how they interact with fundamental geometry, so that they will actually get closer to understanding the world around them.
  • 2
    This library helped me understand derivatives. I could just give it anything I could think of and get the answer immediately, observing 20 samples in the time it took my classmates to calculate two.
  • 1
    @lbfalvy ha, I learnt to derive the trig identities, then derived everything in the first 10 minutes of the exam.
  • 1
    @atheist Oh, I still don't know how to actually algorythmically calculate derivatives. I know what a derivative does and most of their interesting properties, and I have a vague instinct for them that helps me spot them in the wild. I don't have to, because if I need the derivative of something specific I can just plug it into sympy or wolframalpha or whatever.
  • 0
    Ah, derivatives are easy, just need the chain rule. Sin(x) differential IIRC can be derived from the Taylor expansion of sin x + cos x (you only need to remember a few terms).

    Integration I always hated. The best advice I had was "work out what would derive to that", instead of actually trying to integrate.
  • 1
    I always forgot how to derive and integrate during every summer vacation at school. Laplace transformations I never really learnt well enough. Those I would've actually needed for my first task at my first dev job, but I figured out another way that was faster than reminding myself how to math.
  • 4
    Reading this thread as a heathen who has no understandings of higher mathematics...

    Thought process:
    They're talking like they suffered multiple strokes. Maybe give them cookies? If they can eat them, they still have a higher brain function.

    Cookies anyone?
  • 0
    @atheist I know it's not complicated, neither is baking bread. I don't know either because I don't need to, derivative calculators and bakeries are both very common in the civilised world.
  • 0
    @atheist There's no upper bound to the difficulty of integration, no ultimate answer. I know some physicists with decades of experience who still do it by guessing at the general shape of the result, they just get better at spotting invariants and guarantees.
  • 0
    @IntrusionCM I’m right there with you. No clue what they’re saying. I just copy/paste/modify.
  • 1
    This has been a secret weapon of me during experimental math phases from quite some time. Many of the things that are taken for granted in deep learning understanding can really come to life from this particular set.

    i am no math wiz, It somehow makes more sense to me through coding, just wish i've had programming knowledge when going through high school. It did save me during my comp sci degree, for which i really don't feel it was a computer degree as much as it was a math degree with a few programming classes thrown in. Either way, the examples and docs provided in this lib can really help someone grasp certain calculus and algebra topics
Add Comment