4 ms·
Sorry but you are wrong. "CREATE, READ, UPDATE, DELETE" operations are not mathematical in nature. It doesn't matter what the data is or how esoteric you want t
by leptons 2y ago
Sorry but you are wrong. "CREATE, READ, UPDATE, DELETE" operations are not mathematical in nature. It doesn't matter what the data is or how esoteric you want to get with it - a programmer doesn't need any math at all for simple CRUD. You're trying to move the goalposts all the way back to the 1800s to win a pointless internet argument.
- voidspark 2y agoCREATE, READ, UPDATE, DELETE are fundamentally mathematical in nature. In a typical implementation these are database operations. That involves relational algebra operations, state transitions, boolean logic. The READ part can be a very complex SQL query (composed of many algebraic operations) but even the simplest query (SELECT * from t where ID = 1) is filtering a set based on a predicate. That is mathematics. No one is moving goalposts. Set theory and logic are at the foundations of mathematics.
- seadan83 2y agoIt's almost the argument of programming vs computer science coming out here. This is math: {x | x.id = 1} OTOH, a SQL query is a SQL query. This thread is hilarious though. It's like - Cashier: here is your change. - Customer: you did math! - Cashier, no, I gave you change. - Customer: that IS math! - Cashier: You mean, I used math to give you change? - Customer: No, giving change doesn't use math, it IS math!!!!" [2] = D Moving along.. FWIW, indeed SQL was created to model set theory (relational algebra and tuple calculus), the close relationship is no accident of course [0][1]) > No one is moving goalposts I feel too they are. First goal post: > Coding IS math. >> No, not always. Quite a lot of high-level code doesn't require any math at all. It doesn't take math to perform CRUD operations Second goal post: > CREATE, READ, UPDATE, DELETE are fundamentally mathematical in nature CRUD is closely related to SQL, and SQL is closely related to various mathematics. Are they identical and therefore equivalent? No - because your database is not going to like it when you write "{x | x.id = 1}", and the Oracle DB might not like something that you can write for your Postgres DB. [0] https://simpleprogrammer.com/mastering-sql/ https://simpleprogrammer.com/mastering-sql/ [1] https://en.wikipedia.org/wiki/SQL https://en.wikipedia.org/wiki/SQL [2] To quote: """Not "coding uses math", I mean it is math""" @ https://news.ycombinator.com/item?id=43872771 https://news.ycombinator.com/item?id=43872771
- voidspark 2y agoCode is logical in nature and is defined by mathematics.
- seadan83 1y agoI'd agree code is usually governed by mathematics, not defined by it though. Goes back to this ridiculous proposition: - Cashier: You mean, I used math to give you change? - Customer: No, giving change doesn't use math, it IS math!!!!" [2] The proposition is that "code IS math", not defined by, not uses, not inspired by, not relies on, not modeled after, but IS.
- ndriscoll 2y agoThe problem you're running into is that people who have some "mathematical maturity" don't get bogged down in notation, so it's difficult for them to see the distinction you're trying to draw between e.g. `{ x∈S | x.id = 1}` and `select x from S where x.id = 1`[0]. You say "a SQL query is a SQL query" and they just think "yes, which is also obviously a mathematical expression". Computer programs are proofs[1]. This is intuitively and also formally true. You would agree writing proofs is doing math, yeah? Then obviously writing a computer program is also doing math. Like I have a degree in math and have been a software engineer for over a decade. I do not know what distinction people are trying to get at. It's like trying to argue about the distinction between U(1), the complex numbers with magnitude 1, and the unit circle, and getting upset when the mathematicians say "those are 3 names for the same thing". Or saying that writing C is programming but writing in a functional language like Scala or Haskell (or Lean) is not. [0] Modulo details like NULLs and multi-set semantics, but surely that's not the distinction? [1] Up to isomorphism
- seadan83 1y agoA better analogy is if someone got upset that someone else said "the set of natural numbers is the set of real numbers." One is a subset of course, and when that is highlighted, the response is "yeah, by 'is', I actually mean subset", therefore indeed: the set of natural numbers is the set of real numbers. This is an interesting example: "Or saying that writing C is programming but writing in a functional language like Scala or Haskell (or Lean) is not." The first part is everything we need to look at. Are we saying that writing C is equivalent and equal to the entirety of all programming? That if you're programming then you are writing C code. No, there is an implied "is a form of" in there. Given the other clarifications and that so many people are claiming to be mathematicians, I would have expected the precision to say exactly "C is a form of programming" rather than "C is programming." Turns out, the analogy of saying "the set of reals is the set of naturals" is more fitting compared to sets that are actually equal.
- godelski 2y agoI understand you have strong opinions, I just don't understand why. In math are highly concerned with structures and abstraction. We have things called operators. They aren't just addition and multiplication. We also use those words to describe different operations. They have things like groups, rings, fields, and algebras. Yes, plural. The purpose of these things is to create logical frameworks. It matters not what the operators are. Nor does it matter what objects we operate on. Poincaré is explicitly saying this. The part you're not understanding is the abstraction. This is what math is about. It is also why the Programming Language people are deeper in the math side and love Category Theory (I have a few friends who's PL dissertations are more math heavy than some math dissertations I've seen). It's no surprise. What's a function? How do you abstract functions? How do you define structure? These are shared critical questions. PL people are more concerned with types but I wouldn't say that makes them any less of a mathematician than a set theorist. We can perfectly describe the CRUD operations with set theory. Do most programmers need concern themselves with this? Absolutely not. But is it something people designing those operations and systems is thinking about? Yes. I'd encourage you to learn some set theory, abstract algebra, and maybe a bit of cat theory. It'll make these things pretty clear. But I'd caution about having strong opinions on topics you aren't intimately familiar with. Especially when arguing with those that are. Frankly, CRUD is a terrible example. I'm confident a quick google search (or asking a GPT) would quickly point you to relational algebra. It's discussed in most database classes. It certainly was in the one I was an assistant for.
- leptons 2y agoYou could say that math is behind the structure of a leaf, but the farmer doesn't care about that. Keep moving the goalpost all you want, I don't have time to argue these pointless things, and I stopped reading after the first sentence of your comment. I'm done here.
- voidspark 2y agoYou seem really angry at the field of Computer Science for some reason. We are talking about textbook CS fundamentals. https://en.wikipedia.org/wiki/Semantics_(computer_science) https://en.wikipedia.org/wiki/Semantics_(computer_science)
- ndriscoll 2y agoA while back I made this[0] as a quick demo of generic batching for CRUD requests. It's very much practically oriented (it's for performance optimization while making the code nicely reusable/not muddying up the business logic), but also felt quite a bit like the same sort of things I did in my math degree. Actually I'm starting to wonder whether the thing that made university math easy for me was I quickly developed a good internal "type checker"/"type inference engine" in my head, and that helped make the next steps of proofs seem straightforward. [0] https://gist.github.com/ndriscoll/881c4f5f0398039a3a745434509ee80a https://gist.github.com/ndriscoll/881c4f5f0398039a3a74543450...