I'm constantly amazed at the lengths some coders will go to in order to avoid doing a couple of lines of algebra. Have seen people code up complicated Monte Carlo simulations, with all the attendant estimation noise, when basic stats and algebra gives the exact answer, sometimes even as a one-liner.
Serious question: Is it simply a strong math phobia, or have people neglected the skill for so long that they've actually forgotten middle school level maths?
I think it's just lack of basic algebra skills. If you have never been taught to think about math in an abstract way, you will naturally approach problems this way instead.
In Ancient Egypt for example when they needed to explain things like the Pythagorean theorem they would give examples, because there was no concept of abstract variables yet. I think this is similar.
In the same way, many people are comfortable working with vectors, transforming them with matrices etc but they have never been taught to think of transforms in an abstract way. So if they want to check if a certain matrix actually performs the transformation they want, they apply it to a bunch of random vectors to see if it's reasonable instead of just checking what it does to the base vectors, because they have no real concept of linear transforms, and only vague ideas about dimensionality and degrees of freedom.
To some extent it IS phobia, because if you just want to rotate a vector 90 degrees you don't really need concepts of orthonormal transformations so you might be reluctant to look at it that way, but if on the other hand abstract algebra is very natural then the abstraction is trivial to do, it just makes things easier.
I'd like to shift this question a bit - there are plenty of resources for "linear algebra for coders" (since they're in high-demand in gamedev circles). But what about recommended books for the abstract, general algebra? You know, all those rings and stuffs.
Visual Group Theory by Nathan Carter is a great introduction. There's a free preview online with the first few chapters, and you can find the whole thing for free through the usual channels.
Abstract algebra is a massive field, the vast majority of which has little applicability to writing code, so it's hard to know what to recommend without knowing why you want to learn it.
If you're ready to get very serious with mathematics, I like Algebra by Mac Lane and Birkhoff. (Note that this is a different book from A Survey of Modern Algebra by the same authors, which I'm sure is okay, but... a different book.)
If you're not ready to get very serious with mathematics... well, then why do you want to learn algebra?
It may have little direct application to writing code but abstract algebra will definitely make you a better person... And like so many other things, it helps you indirectly to tackle problems in different ways and see them in a new light. Just being the most efficient coder possible is a pretty sad goal.
> Just being the most efficient coder possible is a pretty sad goal.
Well, I agree, but life is short. Why learn algebra rather than complex analysis or probability theory or functional analysis or differential geometry or mathematical logic or general relativity or quantum mechanics or any one of dozens of other topics from physics or mathematics that will almost surely seem more interesting and fun to a non-mathematician? (Not to mention non-mathematical topics...)
I think group theory is both very useful and interesting. There’s no need to get into Galois theory but the basics are definitely applicable in everyday life.
I agree there are tons of other things that people should study, like basic linguistics, relativity, quantum physics, optics etc. Geometry should be on top of the list, for as Plato said “let no one ignorant of geometry enter”.
But I don’t think time is an issue really, if you just spend an hour or so each evening reading you csn quickly get a basic understanding of lots of topics in not thst many years.
Abstract algebra is an old field so plenty of good options.I would recommend Abstract Algebra by Dummit and Foote. Clear theory, great examples and good writing:
I like Fraleigh's "Abstract Algebra", though some chapters can be a bit esoteric. Everyone should know the basics of group theory and the abstract vector notion.
I think it's that they don't have enough confidence in their mathematical ability to get to the correct answer. Programming lets you experiment and play around with the numbers more easily so you can convince yourself whether what you're doing is correct.
I know I've had a few situations where the "play around with the numbers" part happened first. Usually once the actual goal was known the algebra (or similar details) would be obvious... but sometimes the inefficient/toy implementation was good enough.
Sometimes half-assed is ok, if it's the the right half of the ass.[1] The wrong half becomes yet another type of technical debt to be refactored "someday".
(this is not an excuse to ignore algebra or blindly assume the easiest/most-fun method is correct/useful/sane)
I think it has as much to do with how math is taught as anything: it's easy to learn how to solve an equation, but convincing yourself that you didn't screw up without looking at the back of the textbook is another thing entirely.
Of course there are a lot of softer tricks (like checking limiting cases) which would boost people's confidence, but for some reason this is only really taught in college level physics.
I've seen both banking and consulting analysts try to solve this exact problem in excel. The ambitious ones will use circular references and let excel find the fixed point.
In (good) excel, most formulas you write have a clear input => output relationship. Solving a system of equations (no matter how simple) breaks this relationship down. I suspect a similar thing happens when programming.
I've done this exact thing before -- writing a Monte Carlo simulation where stats and algebra would have given me the same answer. I think it was less phobia and more that I'm completely out of practice with math and stats by hand, but spend enough time in code to be comfortable with it.
I knew my code would give me the right answer and I lacked the confidence in math, where even if I did do it by hand, I would have written the code to check it. The less time-risk way won.
> Serious question: Is it simply a strong math phobia, or have people neglected the skill for so long that they've actually forgotten middle school level maths?
One bit of anecdata - I started using computers because I was terrible with maths and they did the numbers thing for me.
It's not negligence. The hardest part about the above calculation is, as usual is, the first step. This is true in general in mathematics; the calculations of a proof are similiar to that of another proof, but the tricks are what makes them difficult to figure out the first time. Setting leavers = joiners is a trick. The rest is just arithmetics.
Serious question: Is it simply a strong math phobia, or have people neglected the skill for so long that they've actually forgotten middle school level maths?