Live data from Hacker News

Ask HN: Did studying proof based math topics make you a better programmer?

news.ycombinator.com

31–40 of 54 posts

Re: Ask HN: Did studying proof based math topics make you a better programmer?

#31
No. In fact, I didn't study any of that. I'm bad at math. I took a required Calculus course (again) about 5 years ago, and struggled mightily, although I did achieve an "A".

For the things I've programmed, I barely needed any math. I found it more beneficial to study things like systems architecture and computer science. Knowing theories behind data structures, functional/imperative programming, algorithms, networking, file manipulation and more, that was the sort of thing I studied and exercised in my programming days.

For the record, I programmed Unix systems and services in C, Bourne shell, Perl, and similar languages. That was my professional career. Of course I got a real early start with BASIC, LOGO, and a little bit of assembly.

Re: Ask HN: Did studying proof based math topics make you a better programmer?

#32

I received a Ph.D. in pure math (number theory) from Berkeley, and then worked as an academic mathematician for 20 years, so wrote a few dozen research papers and some books. My ability to write software for doing mathematics was obviously better as a result of studying mathematics, e.g., I started SageMath ( https://sagemath.org ) and wrote a big chunk of it. Now I mostly do full stack web development (I have goals…

I've always been intrigued by higher math, but I never got further than Calculus III, differential equations, and proofs by induction in discrete math.

Do you have a suggestion on how to get into real math?

Could taking a class in Abstract Algebra be a first step? I've thought about auditing the class at a local college, but the syllabus scared me. Groups? Rings? I've never heard about these things in any class.

Any suggestions?

Re: Ask HN: Did studying proof based math topics make you a better programmer?

#33

I received a Ph.D. in pure math (number theory) from Berkeley, and then worked as an academic mathematician for 20 years, so wrote a few dozen research papers and some books. My ability to write software for doing mathematics was obviously better as a result of studying mathematics, e.g., I started SageMath ( https://sagemath.org ) and wrote a big chunk of it. Now I mostly do full stack web development (I have goals…

Responding to William here because I was once a student and collaborator of his.

I was long considered "bad at math," a thing my dad said about himself* and an excuse that I readily took on when I got bad grades. I got a career in web development straight out of high school, and that carried me for several years until I got bored and resumed community college classes for enrichment. I took calculus and a beginning algorithms/data structures class my first semester. At the time, I still wasn't ready to jump back into calculus, and only showed up to the algorithms class. I was intrigued -- proofs had a direct application to my life! Later I would realize that programming taught me the basics of rigor and abstraction in a language I was willing to hear.

Thus began my mathematics career. I always had one foot in the computer science, and one foot in the mathematics. The proofs I saw in analysis were... fine, I guess, I got good grades because I did my homework with enough time to focus on it. But William exposed me to a world of computational mathematics that really carried my interest. From there, I learned new classes of algorithms, hairy implementation details, and more. My experience there was incredibly beneficial to my programming experience.

So my path was crooked: programming, then math, then back to programming. It is undeniable that these skills are heavily intertwined. Even if that undergrad analysis course feels like an inapplicable stumbling block along the way. Most mathematicians I know only used calculus to hone their symbolic manipulation skills.

* parents: watch your &$%&@@&$ mouth

Re: Ask HN: Did studying proof based math topics make you a better programmer?

#34
post #20

If your goal is become a better programmer, your time is better spent working on challenging programming problems. If you enjoy math, go do some math. It might help you see problems differently. If you don't enjoy math, don't grind through it. In general, the best advice for the question "I want to get better at $skill, should I study $subject?" is "just do $skill"

That’s also how you end up with a narrow mindset and limited value-add.

Exploring adjacent skills/subjects can have tremendous value!

Re: Ask HN: Did studying proof based math topics make you a better programmer?

#35

No. In fact, I didn't study any of that. I'm bad at math. I took a required Calculus course (again) about 5 years ago, and struggled mightily, although I did achieve an "A". For the things I've programmed, I barely needed any math. I found it more beneficial to study things like systems architecture and computer science. Knowing theories behind data structures, functional/imperative programming, algorithms, networkin…

> For the things I've programmed, I barely needed any math.

I understand that countless engineers have this opinion, but really (and bluntly) all it means is that you’re unaware or ignorant of how maths applies to what you’re doing.

Re: Ask HN: Did studying proof based math topics make you a better programmer?

#36
post #32

I received a Ph.D. in pure math (number theory) from Berkeley, and then worked as an academic mathematician for 20 years, so wrote a few dozen research papers and some books. My ability to write software for doing mathematics was obviously better as a result of studying mathematics, e.g., I started SageMath ( https://sagemath.org ) and wrote a big chunk of it. Now I mostly do full stack web development (I have goals…

I've always been intrigued by higher math, but I never got further than Calculus III, differential equations, and proofs by induction in discrete math. Do you have a suggestion on how to get into real math? Could taking a class in Abstract Algebra be a first step? I've thought about auditing the class at a local college, but the syllabus scared me. Groups? Rings? I've never heard about these things in any class. Any…

Taking a course in abstract algebra is a good first step. A first course in abstract algebra is supposed to introduce you to groups and rings, so you won't be out of place.

You might also consider taking a proof-based course in linear algebra.

Re: Ask HN: Did studying proof based math topics make you a better programmer?

#37
post #32

I received a Ph.D. in pure math (number theory) from Berkeley, and then worked as an academic mathematician for 20 years, so wrote a few dozen research papers and some books. My ability to write software for doing mathematics was obviously better as a result of studying mathematics, e.g., I started SageMath ( https://sagemath.org ) and wrote a big chunk of it. Now I mostly do full stack web development (I have goals…

I've always been intrigued by higher math, but I never got further than Calculus III, differential equations, and proofs by induction in discrete math. Do you have a suggestion on how to get into real math? Could taking a class in Abstract Algebra be a first step? I've thought about auditing the class at a local college, but the syllabus scared me. Groups? Rings? I've never heard about these things in any class. Any…

If you've already done diff eq and calculus, you're ready for real analysis.

Abstract algebra has little prerequisites, so you can definitely do that. However, if calculus clicked with you, then you may find real analysis more to your liking. If you've done enough physics/engineering that requires calculus, you probably won't have trouble connecting the analysis material to your experience.

For me (engineering/physics), abstract algebra was ... abstract. It felt like a bunch of abstract ideas and structures that mathematicians invented to occupy themselves. Of course, that's not at all true in reality, but it was mostly irrelevant to my real world problems.

PS: If you've forgotten your calculus, don't worry - most real analysis courses/books start from scratch and don't assume prior knowledge.

Re: Ask HN: Did studying proof based math topics make you a better programmer?

#38
post #35

No. In fact, I didn't study any of that. I'm bad at math. I took a required Calculus course (again) about 5 years ago, and struggled mightily, although I did achieve an "A". For the things I've programmed, I barely needed any math. I found it more beneficial to study things like systems architecture and computer science. Knowing theories behind data structures, functional/imperative programming, algorithms, networkin…

> For the things I've programmed, I barely needed any math. I understand that countless engineers have this opinion, but really (and bluntly) all it means is that you’re unaware or ignorant of how maths applies to what you’re doing.

> I understand that countless engineers have this opinion, but really (and bluntly) all it means is that you’re unaware or ignorant of how maths applies to what you’re doing.

I disagree.

I am aware of trigonometry, for example. Sines, cosines, tangents. Circles, curves, parabolas. Degrees and radians. None of that stuff is even encountered in systems programming.

Calculus I know. Derivatives and integrals. Rates of increase and decrease, acceleration, calculating areas and volumes. Totally unnecessary for systems programming. Or is it? Of course, if you're into profiling programs, taking metrics, observing historical trends, then you'll need calculus to make sense out of that type of monitoring data. But if you're slinging code to make an authentication server work, it's irrelevant.

Now, the math that I have handled in programs is basically integer operations. Floating-point math is likewise nonexistent in systems programming. Simple arrays in one or two dimensions, usually. Pointer arithmetic and making sure you're dereferencing the right thing. Bitwise logic with AND, OR, XOR. Different numerical bases: binary, octal, decimal, hexadecimal; converting among those formats and reading them in and out. Exponents, certainly. I learned all the powers of two so early in life!

Again, my background is in Unix systems programming and text manipulation. You just don't need trig or calc in those domains. Not to put a basic program together and get it debugged and deployed, or hack someone else's code.

I think the last time I must have run into trigonometry or floating point in code was in college when I was ftp'ing and installing a bunch of Unix adventure games. Wasn't my code, though; I didn't touch those sections.

And an interesting case in point is LOGO: how do you draw a circle in that language? All you need to do is

  REPEAT 360 [FD 1 RT 1]
Now you may protest that knowing 360 degrees is a tenet of trigonometry, but it seems just like common sense to me.

Re: Ask HN: Did studying proof based math topics make you a better programmer?

#39
post #35

No. In fact, I didn't study any of that. I'm bad at math. I took a required Calculus course (again) about 5 years ago, and struggled mightily, although I did achieve an "A". For the things I've programmed, I barely needed any math. I found it more beneficial to study things like systems architecture and computer science. Knowing theories behind data structures, functional/imperative programming, algorithms, networkin…

> For the things I've programmed, I barely needed any math. I understand that countless engineers have this opinion, but really (and bluntly) all it means is that you’re unaware or ignorant of how maths applies to what you’re doing.

As someone who has studied a lot more math than CS (including grad level physics and math courses), and does SW for a living, this is nonsense.

I mean, sure, algorithms involve math. If you're dealing with trees/graphs, that's math. If you're compiling a program there is math behind the scenes. But for the majority of SW engineers, actually knowing the math is of little benefit to most problems that SW engineers need to solve. As long as you know the rudiments of algorithmic complexity (big Oh notation, etc), you're good.

(I am excluding trivial things like arithmetic and very basic algebra, as clearly this submission is speaking of more advanced math).

Re: Ask HN: Did studying proof based math topics make you a better programmer?

#40
post #20

If your goal is become a better programmer, your time is better spent working on challenging programming problems. If you enjoy math, go do some math. It might help you see problems differently. If you don't enjoy math, don't grind through it. In general, the best advice for the question "I want to get better at $skill, should I study $subject?" is "just do $skill"

If you want to get better at DSP programming, then you will need to study calculus, complex variable theory, linear algebra, and linear systems theory. There is such a thing as pre-requisite or foundational knowledge.
Post reply on HN