How did you learn web development?

a girl can dream :brain:

5 Likes

Do any of you have any recommendations for learning math as an adult?

I’m not really sure what areas of math are especially relevant and helpful for programming.

But the other day…

[long-winded, not-entirely-essential backstory]

… i played a tile-based board game called “Mechanical Beast”. It consists of dynamically building and altering the gameboard by placing tiles, rotating individual tiles, rotating groups of tiles, shifting tiles, or shifting rows or columns of tiles. I thought it might be fun to implement it with javascript, so…

…i started writing some functions that rotate and transform flattened matrixes. It’s fun and I’m getting it to work, but it’s taking a lot of staring at different shapes and sizes of arrays until i can find patterns, and even then, i’m not always able to figure out how those patterns are helpful.

It feels like everything I’m doing would be a lot easier if I understood some basic mathematical principles, but I’m not sure where to look for those. Since I’ve forgotten most of my high school math, I can’t really even think of good search terms.

I’m not even sure if I remember everything from my Algebra 1 class in 8th grade :thinking:

( ( -b ± √b ) ^ 2 - 4ac) / 2a

^-- that’s something i remembered but i haven’t the slightest clue what it is for. also i have no clue if the parentheses are in the correct place, since the song about it that lives rent-free in my head does not specify groupings

4 Likes

I think high school math is more than enough for most programming tasks.

In my work I also use matrix manipulations because our software is doing a lot of spatial/geometrical calculations, but I think this is already a bit niche.
Business software in general is mostly about transaction record keeping and financial administration where basic arithmetic suffices for most tasks.

That looks like the formula to solve quadratic equations of the form ax^2 + bx + c = 0, but with some parenthesis errors. It should be x = ( -b ± √( b^2 - 4ac ) ) / 2a

5 Likes

Oh, this reminds me. I have studied physics (with a lot of maths obviously). When I got my first job (in software development) my math knowledge helped me to come up with the correct matrix when having to display an anolog clock as a screensaver within 5 minutes. Without my 9 years studying this might have taken me a full hour!

9 Likes

I think generally applicable is getting used to base-2/base-16 math, also understanding floating point operations. Neither really has a class though. Also there’s asymptotic complexity, though that’s more CS than math.

I feel l like I bump into a lot of different maths subjects during development. Linear algebra (matrix math) is important for video games. Trigonometry pops up a lot, especially in DSP. Calculus can help approximating non-linear functions with linear ones. Statistics of course for data. Finite math/probability helps if you want to redistribute RNG. Set/Category theory doesn’t come up too much, but underlies type systems.

I’d say, let the project guide your study. If you’re working in 2D or 3D, absolutely go deeper into lin alg! Also for a more broad survey of high school/college math, I remember Khan academy was super useful.

7 Likes

Yes, classic. LinAlg is not just matrix math, though. I don’t know if Eigenvectors and stuff like that is important.

Additionally there are also discrete mathematics for cryptography, graph stuff and more.

5 Likes

Maybe it’s similar to learning programming. Pick something you’re interested in or need for something you’re interested in and go from there.

You could tell someone to learn JavaScript and learn jest for testing, but then whether someone would want or need to do that, if only learning some basics of coding is not clear. If they just want a few basics skills or a few specifics skills, it makes sense to focus on that. (But of course if they’re interested and it’s relevant to what they’re doing, like this thread, why not :slight_smile: )

If you find yourself wanting to rotate and flips sets of points or objects, or warp or reshape objects, a lot of linear algebra, matrices and geometry, possibly projective geometry can be useful for computer vision.

Again though, if there’s something specific to do, it might make sense to find some books or videos or notes tailored to it, as the examples might click or transfer better.

Otherwise you can fall into the problem of wanting to read book A, then feeling that book B is a prerequisite so you try to read book B. It could be that book B is difficult, or not fully relevant, or has difficult sections, or you lose interest or it just takes a long time and you never circle back to book A or the reason you went to book A in the first place :slight_smile:

^^ I would be guilty of this. I like books, I like random sections and bits of math, but sometimes I need a bit of motivation and focus to pick up and read the book these days.

6 Likes

I’d argue that, since game theory is a subfield of math and Go is an example of a perfect information game … I conclude that learning go is learning math :stuck_out_tongue_winking_eye:

Don’t trust AI with math. Also math is often very abstract, so looking at examples is important, both to get a feeling for what the stuff means, and for motivating the subject. Many books have ample examples for this reason.

3 Likes

You could study encoding. With autocorrecting codes, secret codes etc… This relies mostly on finite group where you define a x^n=1 and primary numbers.

2 Likes

only often very abstract? :smiling_face:

2 Likes

I think learning math is very beneficial for programming, but often by improving the way you think rather than being directly applicable. Being able to do a quick mental proof that an algorithm will produce the right result helps me a ton. Learning math helps you get good at turning an idea into a precise formal statement, which is super useful for writing code (I imagine this would help for the matrix transformations). Math even helps with just seeing patterns and being able to generalize them.

I think algebra, linear algebra, and calculus will be the most directly applicable to programming. I would also recommend learning some combinatorics and number theory, mostly to train problem-solving (and because it’s fun).

You could try some of the books from AOPS (the art of problem solving). I worked through several of those in high school. They have difficult problems and clear explanations. The book titled “counting and probability” is a great introduction to combinatorics. These should all be pretty accessible.

I am not sure how much preparation you have, but if you are ready for a challenge you might want to consider getting a good textbook on a topic you’re interested in. I can recommend Munkres for topology and Herstein for abstract algebra. My approach to reading these is to read until I get to a theorem, pause and think about it until I can prove it on my own, and only then read the proof in the book.

4 Likes

You could try register at the uni too, maybe not for a full cursus but to follow what interest you

2 Likes

Then again:

Amounts in € (€1.00 = $1.06) USA England South Korea Netherlands France Denmark
Cost of becoming a Civil Engineer 127,124 48,845 21,171 12,153 8,023 0
Cost of becoming a Teacher 106,006 49,842 10,556 8,839 5,427 0
Salary of a Civil Engineer 69,974 42,900 44,039 50,270 43,618 69,810
Salary of a Teacher 47,942 36,201 29,988 42,305 30,444 51,084

[Opinion Poll: Plan to Abolish Myongji University's Dep. of Go Studies - #82 by gennan]

2 Likes

I think some basic Uni courses should be available online for free.

3 Likes

Usually the content is more or less free, if all you want is the skills and knowledge. All you are really paying for is the paper at the end.

4 Likes

I think it depends a lot on what one wants to learn and what learning styles one prefers. As for topics, I think that various topics of discrete mathematics, such as logic, boolean algebra, algorithms and complexity theory, number theory, combinatorics, graph theory, are quite useful for programmers to be familiar with. Also, linear algebra, calculus, statistics and probability, and differential equations are foundational for many algorithms.

There are a lot free course materials online, such as https://ocw.mit.edu/ and https://oyc.yale.edu/

As an alternative to looking things up on Wikipedia, https://mathworld.wolfram.com/ is also very useful

There are tons of educational math videos on YouTube, from course lectures to specific tutorials. Here are some specific channels that are very well produced and quite enjoyable for presenting things in an engaging manner: https://www.youtube.com/@3blue1brown and https://www.youtube.com/@numberphile

4 Likes

I loved to learn maths with a teacher much more as with books and such. My way.

1 Like

Today I learned about the bitwise XOR operator while I was trying to understand Zobrist hashing, and I think it’s the neatest thing. I’m not confident I understand the hashing thing, but I tried implementing it in JavaScript and ran into the surprise of large numbers suddenly being negative.

So this evening, I learned about signed integers and (on a very, very shallow level) Two’s complement! I was only able to grok the first bit of the Wikipedia page, and I completely gave up when I saw this:
image
but understanding as much as I did was still a really good feeling :slight_smile: a lot of this computer science and math stuff is feeling like I’m a ddk finally understanding enough shapes to understand certain basic joseki, and it’s a really satisfying experience :fire:

9 Likes

I’ve never really enjoyed math Wikipedia pages on the whole while studying maths.

It’s always felt that they’re either too advanced to the point that very little people understand them, or can verify them, or they’re written in a way that isn’t very pedagogical. As in it’s not written in a way to teach you (mostly), and so most of the time it’s been very unhelpful to me over the last 25 years let’s say.

It’s great when you want to read or check something quick like Hairy ball theorem - Wikipedia

but actually learning about it, it’s most likely better to find a video, or if possible (and if it suits your style of learning of course) a book on the topic that includes it.

So generally, I would just learn something elsewhere, from books, videos, lecture courses, and then use Wikipedia to double check something or maybe some formula quickly.

5 Likes

This book talks about coding zobrist hashing a little bit in python

and maybe in the morning I can reread what it says.

Or if reading about two’s complement, sometimes having a person that wants to explain about it, writing about it helps - I was quickly reading

https://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html

for example.

While Wikipedia is written an edited by many people, probably with no level in mind on who it’s aimed at. It’s just cataloging random related information in some order. On the twos complement articles talk page for example, there’s a discussion

:slight_smile:

2 Likes