5 ms·
>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, which account
by leptons 2y ago
>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, which account for a lot of programming work. Sure, the underlying machine code is all based on math, but the higher level programming doesn't need to involve a single math equation for it to be useful. Let's see where the goalposts move now...
- voidspark 2y agoAll of that code is a series of logical statements and expressions. Mathematical logic. But the CRUD logic is so basic and boring, so obvious, that it doesn't require any thought.
- leptons 2y ago>All of that code is a series of logical statements and expressions. Mathematical logic. Which code? The machine code that underlies everything? Or the lines of simple high-level CRUD that don't even need a single number or logic statement to function? Not all programming has to be mathematical or even logical at a high enough level, and I say this as someone who's been coding assembly language for 40 years.
- voidspark 2y ago> Or the lines of simple high-level CRUD that don't even need a single number or logic statement to function? Those lines ARE mathematical logical statements. Each line defines logical operations that are executed by the computer. Same for high level or low level programming. It's all logic.
- leptons 2y agoStoring a string in some abstraction is not a mathematical operation. I'm done with this thread, it's going way too far down too many rabbit holes. The quarks that make up the matter that the computers are made of are pure "math". There, now I've moved the goalposts.
- voidspark 2y agoThat is a narrow perspective of mathematics and computer science. Assigning a variable is a mathematical operation. It is a logical state transition. This is formalized in Programming Language Theory. We are not talking about quarks. We are talking about lines of code which are objectively mathematical statements, no matter how non-mathematical they seem to you subjectively. You start with a practical problem to solve, and a computing machine that can perform logical operations on data. Your job is to figure out a correct sequence of logical operations that will solve the problem. The program that you have written is a mathematical structure. It is mathematics. https://en.wikipedia.org/wiki/Semantics_(computer_science) https://en.wikipedia.org/wiki/Semantics_(computer_science)
- GoblinSlayer 2y agoYou confuse map with the territory. By the same logic you can say quarks are mathematics, because they are modeled by a theory that has some mathematics in it.
- voidspark 2y agoThat may be true to some extent, but I think you are missing the point. Quarks are physical in nature, and code is logical in nature. Programs themselves are formal systems. Code isn’t just modelled by mathematics, it is defined by mathematics. In the case of code, we can argue that the map is the territory.
- GoblinSlayer 2y agoCode is logical if you define logic as reasoning in general, broader than mathematics, and since it runs in physical environment, it now interacts with a messy world. Code is defined by business requirements, and there's no mathematics for that.
- voidspark 2y agoNow you’re talking about the human activity of writing code, not the code itself. Those business requirements are inputs to the process of writing the code. Once the code is actually written, that exists as a formal logical system, defined by mathematics, not business requirements.
- godelski 2y ago> It doesn't take math to perform CRUD operation Yes it does. Just because the objects you are working with aren't numbers doesn't mean it isn't math. In fact, that's my entire point. It is why I quoted Poincare in the first place. He didn't say "numbers" he said "objects".
- leptons 2y agoSorry 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
- seba_dos1 2y agoJust because what you're working on specifically is an equivalent of middle-school math doesn't tell us much about the field as a whole. Though middle-school or not, it's still math.
- Shorel 2y agoMathematics is not "equations". Most of mathematics is not related with calculus either. For anything CRUD, you put the data into a database. The underlying database is relational, or a key->store. If it's relational, that's one branch of mathematics. If it's another kind of database, it's another branch of mathematics. Mathematics is extensive, and covers more things you can imagine at a glance. The main difference between writing mathematics and programming, and this applies to any form of programming, is that in mathematics writing a formal proof is amazingly close to: you write the program, and you are also the compiler, and you are the CPU, performing all operations yourself. With programming you only have to write the program. Source: On one hand I have studied pure mathematics (not the simplified applied mathematics that are taught in engineering, which is mostly equations), on the other hand I have been working as a software developer for over 15 years.