Live data from Hacker News

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

news.ycombinator.com

1–10 of 54 posts

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

#1
Hello, Hope all is well. I love math but haven’t studied much of it.

I have only studied up to real analysis. But definitely not a whole semester worth; my experience with analysis has been analogous to Poor performance in a quarter based analysis course. I did some exercises but not many.

I have heard from an mit professor[1] that math is the way to learn to think rigorously. So I’m curious about this and I’d like to improve my thinking skills in the hope that I will become a better programmer.

In an article a math professor said that there was some evidence that math improved logical skills[2].

So I’m wondering if any of you noticed that your thinking skills improved thereby making you a better programmer after studying analysis or topology or some other proof based math course.

Also which math other than the math required in CS programs should one study to be a better programmer and thinker? Thanks [1] https://m.youtube.com/watch?v=SZF0MFm9pqw&pp=ygUTQWR2aWNlIHJ1c3MgdGVkcmFrZQ%3D%3D [2] https://www.nytimes.com/2018/04/13/opinion/sunday/math-logic-smarter.html

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

#2
Propositional and first-order logic along with Algebra and basic proofs by induction, reduction to absurdity, etc, should beat the logical, pedantic motherfucker out from your inner self. At least that is what we did at uni -- along with physics, calculus, discrete mathematics, and theory of computation -- but I'd argue the first list should be a sufficient starting point.

Not really sure about "better programmer", but I think it makes you at least more logical and helps develop a keener attention to detail. "Better programmer" entails an array of many other qualities outside of the scope of "better thinker".

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

#3
I don't think so. I remember most of my required math (for a CS degree) was proofs, and I mostly hated it. Discrete math was great, and anything else with practical applications in CS would be good too.

If you have a choice, I'd rather spend the time further studying algorithms and data structures instead of proofs. There's a ton to learn, and working through algorithms in pseudocode is always useful.

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

#4
Programming is improved by programming. Work on things increasingly out of your comfort zone and slowly grind your way up. Consume all programming related content you can that is written by experts. 5 years later you're much better. It's going to be a lot of mental blood and sweat though.

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

#5
It did not. Learning git in-depth beats any amount of proof-solving skills you might have in traditional, day-to-day software engineering. Doing proofs makes you a better thinker _in general_, but doing it in isolation (i.e without communication skills or team skills) can actually be detrimental.

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

#6
Mathematical proofs are in some way algorithms put in practice. And another useful thing they have is not leaving possibilities out.

I think that those two things are useful mental models to have when learning programming, things that would be useful to have more as built in patterns than thinking step by step. And in that sense is useful to have a background in math. Maybe it doesn’t need to be too advanced, but at least at the level of thinking naturally in that way.

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

#9
post #7

They overlap so much that it doesn't matter too much. Computer science is based on formalist logic. You'd probably get more out of learning breadboard computer engineering.

I'm following Ben Eater's building a 6502 computer casually and it has been a lot of fun. The thought that I can buuld my own computer! That's exciting.

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

#10
Yes, in the sense that "math is programming paper instead of computers", being better at one translates to being better at the other. This intuition can even be made precise via the "Curry-Howard isomorphism", upon which "proof assistants" such as Coq are built.
Post reply on HN