Live data from Hacker News

Mathematics for Computer Science (2024)

ocw.mit.edu

91–100 of 115 posts

Re: Mathematics for Computer Science (2024)

#91
post #63

Earlier quoted context omitted.

Well, I'm familiar with model theory and Church's simple theory of types, but I don't think things like that are useful in practice. Perhaps the concept of currying would be an exception, if I were a Haskell programmer.

I am not sure that you have really understood the topics you have named. All high-level programming languages give you a set of fundamental types and the ability to construct user-defined types. Currying is not an exception but falls under the same model if one considers it as a Relation between "sets of functions". Also by Curry-Howard correspondence you have "formula/proposition = type" and "proof = function". So y…

> The real value comes when you do it with the knowledge of the mathematics in hand because then it allows you to prove your Program as "Correct" (w.r.t. a specification).

At the risk of nitpicking:

Certainly it's a benefit to structure and understand code such that you can reason about it effectively, but prove goes too far. Almost no real code is proven correct, the ergonomics of formal methods are still far too poor for that.

Re: Mathematics for Computer Science (2024)

#92
post #85

Earlier quoted context omitted.

Interesting. I have studied computer science after working as a software engineer for several years, but I didn't become a better software engineer than I was before. And I have zero need for linear algebra, numerical analysis, or combinatorics. May I ask what you are working on? It sounds pretty advanced.

It’s really not advanced. I see more applications than time. Being able to determine when a mathematical framing is useful and apply it is harder than knowing how to do the math. It requires deeper internalization of the concepts. So your experience is common.

Or it may also be common because there is genuinely little need for higher mathematics for most SWEs.

Re: Mathematics for Computer Science (2024)

#93
post #83

Earlier quoted context omitted.

> LLMs dont have a deep enough understanding of theory of mind to see how someone is stuck and help them get unstuck. Many teachers cannot do that either. I find ChatGPT and the Gemini model quite good at problems whose solutions are already known. We just need the Wille—the will—to ask it.

> Many teachers cannot do that either. Of course there are bad teachers out there. The question wasnt "are there human yeachers as bad as an LLM" it was whether an LLM is as good as a good human teacher > We just need the Wille—the will—to ask it. Thats the thing. Its is a very good search resource. But thats not what a teacher is. A good teacher will help you get to the right questions, not just get you the right an…

> You need a sufficiently advanced, if incomplete, mental model of the sybject to know what you dont know.

I believe that through a few common prompts and careful reflection on the LLM's responses, this challenge can be easily overcome. Also, nobody truly knows what you're stuck on or thinking, unless you figure out the existence of unknown and seek it out. However, I do agree with your point that "a good teacher will help you get to the right questions," since a great teacher is an active agent; they can present the unknown parts first, actively forcing you to think about them.

- when people see some things as beautiful(best), other things become ugly(ordinary)....Being and non-being create each other. — Laozi, Tao Te Ching

Perhaps the emphasis on the greatness of an LLM gives the impression that it undermines the greatness of a great human teacher, which has already led to a few downvotes. I want to clarify that I never intended to undermine that. I have encountered a few great teachers in my life, whether during my school years or those teaching in the form of MOOCs. A great teacher excels at activating the students' wille to seek the unknown and teaching more than just knowledge. Also, the LLM relies heavily on these very people to create the useful materials it trains on.

Metaphorically speaking, the LLM is learning from almost all great teachers to become a great 'teacher' itself. In that sense, I find no problem saying "LLM could be the teacher, one of the best already."

Re: Mathematics for Computer Science (2024)

#94

Earlier quoted context omitted.

You can write proofs along with the course, and since they are machine checked you can have confidence that they are correct. If you don't know, writing a proof in isolation can be difficult, since you may be writing on that isn't actually sound.

Learning math is more about the big ideas. Behind each proof is an insight. Formalizing in a computer is like spell checking a document. It helps you catch small mistakes but doesn’t change the content, I just think this is a distraction unless your goal is to learn lean and not math.

Hard disagree.

Errors are found in human proofs all the time. And like everything else, going through the process of formalizing to a machine only increases the clarity and accuracy of what you’re doing.

Re: Mathematics for Computer Science (2024)

#95
post #92

Earlier quoted context omitted.

It’s really not advanced. I see more applications than time. Being able to determine when a mathematical framing is useful and apply it is harder than knowing how to do the math. It requires deeper internalization of the concepts. So your experience is common.

Or it may also be common because there is genuinely little need for higher mathematics for most SWEs.

Need is a strong word. That's why I said effective.

You can often iterate to something that kind of works by adding epicycles. What you're left with is something that fails in rare cases you can't explain, is difficult to change (we don't touch that code), and is slow.

Compare a complex homegrown data store to a relational database like postgresSQL. Both get the job done, but one has significantly more conceptual clarity and reliability.

Being able to come across a hard problem and say, ok this is how to frame it and here is how to go about it, turns months of fiddling into a direct route.

Re: Mathematics for Computer Science (2024)

#96

Earlier quoted context omitted.

Learning math is more about the big ideas. Behind each proof is an insight. Formalizing in a computer is like spell checking a document. It helps you catch small mistakes but doesn’t change the content, I just think this is a distraction unless your goal is to learn lean and not math.

Hard disagree. Errors are found in human proofs all the time. And like everything else, going through the process of formalizing to a machine only increases the clarity and accuracy of what you’re doing.

You are correct that mistakes are made all the time - but they tend to be "oh yeah let me fix that right now" mistakes. Or, "oh yeah that's not true in general, but it still works for this case". That's because the experts are thinking about the content of the material - and they are familiar with it enough to tell if an idea has merit or not. Formalism is just a mode of presentation.

Over-emphasis on formalism leads me to conclude you just don't understand the purpose of proofs. You are primarily interested in formal logic - not math.

I would invite you to read a few pages of famous papers - for example Perelman's paper on the Poincaré Conjecture.

Re: Mathematics for Computer Science (2024)

#97

Earlier quoted context omitted.

I am not sure that you have really understood the topics you have named. All high-level programming languages give you a set of fundamental types and the ability to construct user-defined types. Currying is not an exception but falls under the same model if one considers it as a Relation between "sets of functions". Also by Curry-Howard correspondence you have "formula/proposition = type" and "proof = function". So y…

> The real value comes when you do it with the knowledge of the mathematics in hand because then it allows you to prove your Program as "Correct" (w.r.t. a specification). At the risk of nitpicking: Certainly it's a benefit to structure and understand code such that you can reason about it effectively, but prove goes too far. Almost no real code is proven correct, the ergonomics of formal methods are still far too po…

It depends; the "proving" can be done at a gross high level function or fine grained at statement level. Thus in the former case one could use Meyer's Design-by-Contract (aka DbC) while in the latter case one might choose to follow a detailed Dijkstra methodology. For both of the above you don't need any special tools (eg. Z/VDM/TLA+/Coq/Lean etc.) but merely the knowledge to learn to think about a Program using Mathematical Concepts. For most "ordinary" software, DbC would be enough while for critical software one might want to go with the whole nine yards using chosen methodologies/tools. Note that usage of the methodologies/tools themselves require a knowledge of the above-mentioned Mathematics.

The point was that a knowledge of the requisite Mathematics gives you a very powerful way of viewing Programs and then you get to choose how to map/implement it using any number of tools and based on the needs of the software.

Re: Mathematics for Computer Science (2024)

#98
post #22

Earlier quoted context omitted.

I am about finished with my CS PhD and I taught databases at the university during covid. I, personally, would have failed in the remote learning environment we were providing. I am amazed at those wo fought or even flourished through that.

I’m currently enrolled in an online MS program, and I had never struggled so much in courses. The lack of social component might be what’s causing that. The material is mostly a recap of undergrad and things I already knew, so the coursework should not be so difficult for me, but it’s been incredibly difficult. Then again, William & Mary had some incredible teachers, and maybe the online program through a different s…

I'm a fourth-year W&M student considering an online MSCS program post-grad (possibly the same one you're in) - I'd love to hear more about your experience in it, as compared to traditional undergrad, if you'd be willing to share?

Re: Mathematics for Computer Science (2024)

#99
post #92

Earlier quoted context omitted.

Or it may also be common because there is genuinely little need for higher mathematics for most SWEs.

Need is a strong word. That's why I said effective . You can often iterate to something that kind of works by adding epicycles. What you're left with is something that fails in rare cases you can't explain, is difficult to change (we don't touch that code), and is slow. Compare a complex homegrown data store to a relational database like postgresSQL. Both get the job done, but one has significantly more conceptual cl…

> Compare a complex homegrown data store to a relational database like postgresSQL. Both get the job done, but one has significantly more conceptual clarity and reliability.

That's a good example of what I said. Most software engineers don't develop new database management systems. They just use one. And if they merely use it, they don't need or benefit from nontrivial math. The math is abstracted away behind the intuitive SQL syntax.

Re: Mathematics for Computer Science (2024)

#100
post #13

A lot of these topics sound interesting, though I think the average software engineer needs approximately none of that. When I first started programming, I was surprised how little mathematics was involved in practice. Of course, these MIT lectures are aimed at computer scientists, not software engineers, which US universities consider to be quite different.

[dead]
Post reply on HN