5 ms·
All 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
by voidspark 1y ago
All 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 1y 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 1y 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 1y 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 1y 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 1y 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 1y 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 1y 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 1y 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.
- GoblinSlayer 1y agoThe discussion started about whether human needs math skills to write code. That's what I mean when I say programming isn't mathematics. Meaning of code is defined by human, how do you intend code to be defined by mathematics? The human first imagines mathematical formulas, then by some unknown process they become code? I don't think anybody does it like that. You start with requirements, intuitively guess architecture, then decompose it, it works more like Cauchy problem (but less numeric, more conceptual, you have an owl, now draw it), but I don't think anybody models it like that. >Once the code is actually written, that exists as a formal logical system, defined by mathematics I still think that's not code, but your favorite model of code. For spellchecker language is defined by mathematics too: it splits text into words by whitespace, then for each word not found in dictionary it selects best matches and sorts them by relevance. Oh and characters are stored as numbers.