Hacker News new | ask | show | jobs
by robot_no_421 1016 days ago
"In hight school your math teacher may have started a treatment of linear algebra by making you solve a system of linear equations, at which point you very sensibly zoned out because you knew you’d go on to program computers and never have to solve a system of linear equations again (don’t worry, I won’t be talking much about them here)."

No offense but I stopped reading there. Too many software developers have this weird superiority complex when it comes to math. When they struggle with math, I've seen devs criticize everything from naming conventions to curricula to it being "useless". A lot of them seem unwilling to acknowledge that math is sometimes... simply hard.

If your attitude to math is "I don't need any of this useless stuff, so I'll zone out", then I kindly suggest you first at least try to learn Linear algebra for mathematicians first.

9 comments

Or write a flight simulator from scratch.

I followed a book in the 90's to create a flight simulator from scratch. Besides learning Bresenham's line algorithm, I learned a lot of linear algebra.

Probably this book: https://archive.org/details/build-your-own-flight-sim-in-c-d...

Really interesting recommendation! I had never seen this before, I’ll definitely give this a read.

I always recommend “Ray Tracing in One Weekend” [1] series of books for some light coverage of linear algebra/geometry/graphics.

[1] https://raytracing.github.io/

I spent a ton of time with this book too! It really lays everything out. The feeling of building something like that from absolute scratch was amazing. I can’t get motivated to do that again these days — ready-made, better implementations are too accessible.

I was 13 at the time, so I struggled with the math (this was pre-internet so I couldn’t just search stuff). I’d never seen matrices and wasn’t able to figure them out from that book. I distinctly remember hitting a wall in the chapter on lighting because it mentioned taking the dot product of two vectors, but I didn’t understand why that would give you the cosine of the angle between them because I’d never heard of the dot product before.

Edit: right at the bottom of page 405. I reread that sentence so many times.

As a programmer, I like maths and find it very useful, albeit difficult at times.

However, the naming conventions and syntax overloads/ambiguities really can be a pain as a non-mathematician.

I get it. Everything has warts, and the mathematical syntax is as much for thinking and experimentation as it is for communication, and verbosity hinders understanding. I'm also aware computing has its horrible dark corners. But from the outside, it seems like maths practitioners often oppose any attempts to make it any clearer, even to people in other mathematical subfields.

Papers leave variables undefined because everyone working in that subfield is expected to just know what that variable means in that context, possibly derived from on some book that everyone in that field knows about so nobody feels the need to specify it. I mean just a stupid but simple example, I learnt maths from an applied engineering school so the imaginary unit was j. Always j. Never specified that it could be anything else nor was it ever specified anywhere that j was the imaginary unit. Then I start exploring the topic outside textbooks and everyone's using i. Again, no indication that this is the imaginary unit, it's just a given. Obviously in this particular case it's easy to notice that it's been swapped over, but there are plenty of other much more subtle ambiguities that can make trying to understand anything a real slog.

As someone who is currently on a path to self-study maths I understand what you're saying and sympathise. This is my predicament at the moment to a certain extent. And of course it all depends heavily on context- In the context of \frac{\sum^n x_i}{n}, i isn't the imaginary unit, it's the looping variable over the elements of x so we can compute the average, and everyone just knows (or is expected to), just like r^2 means the square of some variable r, or the extent to which one variable is explained by another in a regression etc whereas R^2 means a two-dimensional space over the real numbers.

That said, I think and hope that I may in the future feel differently as my skills improve. My theory is that if everyone always added in that foundational knowledge to each paper etc it would make everything really verbose and make trying to get to the point of what you're saying a real slog for the author and the experienced practitioners. Being able to be consise means you get to the heart of the new stuff quickly without having to slog through a bunch of "C is the set of complex numbers a+bi where a and b are in R and i^2 = -1" first.

>My theory is that if everyone always added in that foundational knowledge to each paper etc

Except once someone did that, you could literally just cite their paper or book.

Software is frankly worse. Take javascript. What does that even mean? ECMAScript, CommonJS, something else? Almost nobody clarifies what they mean precisely when they use an ambiguous, overload term like "javascript".

Does the "es" in ESLint mean it only works for ECMAScript? Or does the "ES" mean something entirely different? The homepage doesn't say. Are eslint, ESLint, and Eslint the same thing? Capitalization usually matters in software after all, but nobody is consistent here, not even eslint.org. Why do are ES6 and ES2015 used interchangeably? That's unnecessarily confusing.

All of this is far more confusing than "i" vs "j" for sqrt(-1).

Author here.

The point is to teach it to people who never understood its value but now want to learn, and to do that it helps to relate to their experience.

Nice to see you back @coffeemug. I haven't touched linear algebra for 10 years since data science jobs are hard to come by in my country, and data jobs are rarely outsourced. Really nice refresher and well written. Btw, I have been trying to get ahold of you on signal. What platform you are active on these days.
coffeemug@gmail.com
That’s how I was in high school, and immediately regretted it the minute I found interest in a domain where strong math ability was required.
Many devs who "zone out" because they won't "need math" still manage to do just fine?

Software is a big field and there's room for folks with different interests and talents.

The thing about math is that developers live in a well specified world. The moment they have to deal with mathematical notation, not only is there no way to look it up, it is inherently ambiguous and arbitrary and nobody tells you that. No math teacher on this planet is going to tell you "alpha beta gamma usually refers to angles, by the the way this is completely made up. In fact, it is the result of a popularity contest. If you see anyone else use the same symbols it is sheer coincidence as all mathematic notation is made up on the spot. The moment you read another book, they are free to do things as they see fit."

But here is the thing. As a software developer, there IS a "higher being" aka a designer for the programming language or library and they try and try and try their best to maintain "rhyme and reason". With math? There is no such thing, or rather, everyone pisses in the pool of math notation but nobody wants to admit that and so you get confused people, people who mistakenly look for the "rhyme and reason" and they find none, they find no pattern.

So the first lesson about math notation that you need to learn is that there is no such thing. There is this chicken scratch that makes it easier to write on the blackboard or on paper and that is about it.

Math isn't "hard..." it is abstract.

I don't understand why you take issue with that statement, it sounds descriptive as an attitude that may be common in the audience but perhaps you are interpreting it as the author endorsing that view? i.e. I imagine they might agree with you.
I was nodding in agreement until "naming conventions". Naming conventions and common notation is really bad. To the point, that it's sometimes easier to invent your own for personal use.
It's not a criticism over math. It's a criticism over high school math education.

> criticize everything from naming conventions

A programmer criticizing naming conventions. a.k.a another Tuesday.