| ▲ | smj-edison 4 hours ago | |
I think there's a pretty big conceptual difference between programming and math, which is that in programming we think about building up something over time by applying successive steps. In math though we have to think about the whole thing simultaneously, forwards and backwards. So when we prove a program, we're actually proving it forwards and backwards, with all possible inputs and outputs, at the same time. And either it's all true, or it blows up in your face. Another difficulty is with programming, we succeed by making abstractions that don't leak, where with math we're constantly opening up mathematical objects and messing around with their internals, chaining together the internals with theorems to get to our desired outcome. Since we so often need access to the guts of the objects we're working with to prove facts, it makes it really hard to interoperate with other systems, because either we have to make assumptions about those systems which can compromise correctness or we have to be able to plug in all the way. Signed, an undergrad in math with decent coding experience. | ||
| ▲ | somethingsome an hour ago | parent | next [-] | |
While I like your dichotomy, I find more similarity between maths and programming. you usually define the internals of your mathematical object based on the requirements of the 'rest of the system' and then you study the objects a lot to see it they even make sense or collapse. As soon as you have an object that does not collapse, you know you can use it. Take for example measure theory, you start with the basics axioms that are there to make the measure useful to others, then, based on the axioms you derive everything that you need to ensure that it's well defined, and then some more theorems that are like glue code to be able to use that measure for particular cases. In this view, the axioms are your basic API, and the 'glue' theorems for an application are your frameworks. Now a big difference between maths and programming is that maths is way bigger and more complex though | ||
| ▲ | random3 3 hours ago | parent | prev | next [-] | |
As a computer scientist with 20 years experience in software and last 3 shifting on math, I think I agree with how you describe the approach in SWE. I collected a ton of notes on the same process myself. I'd sum it up as starting to code before/without trying to get a proper* understanding of the end-to-end problem, and then incrementally adjusting along the way. This often solves a chicken and egg problem, of not being able to advance understanding before building. The problem is not rewriting or fully refactoring the code once your understanding persist. Often this is too late (aka "shipping the prototype"). Then everything expands into more complexity over more or less** time. I think this whole process can actually be described formally. I'm not sure how much it matters anymore, but I suspect agent generated code suffers from the same issue, just with different measures due to speed/memory advantages agents have. ---- * I say "proper" assuming "full" is likely unachievable in most settings ** the difference between many software projects can be reduced to how fast they become dead ends based on how fast complexity explodes. | ||
| ▲ | latentsea an hour ago | parent | prev [-] | |
> Another difficulty is with programming, we succeed by making abstractions that don't leak So, we basically fail then. | ||