Parallels Between Math and Software Engineering
beta.oreilly.com
Parallels Between Math and Software Engineering
1–10 of 97 posts
Re: Parallels Between Math and Software Engineering
#2Re: Parallels Between Math and Software Engineering
#3Re: Parallels Between Math and Software Engineering
#4I'm a big fan of linear algebra because it's the best example of why learning math is useful. Sure knowing about equation and calculus come in handy, but linear algebra is pure modelling superpowers and a much more valuable tool overall.
Related: An awesome LA introductory lecture by Prof. Strang: http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-...
Related 2: A short tutorial on LA that I wrote: http://minireference.com/static/tutorials/linear_algebra_in_...
Re: Parallels Between Math and Software Engineering
#5Re: Parallels Between Math and Software Engineering
#6Re: Parallels Between Math and Software Engineering
#7Not trying to evangelize but FP was an great hint for that. Seeing 'tangible' (that I can create, see, step through) incarnations of groups, monoids, transitive relations etc gave an operational grounding to abstract algebra. Something needed for some of us before see the abstraction behind the notation, and understanding it.
Re: Parallels Between Math and Software Engineering
#8Not trying to evangelize but FP was an great hint for that. Seeing 'tangible' (that I can create, see, step through) incarnations of groups, monoids, transitive relations etc gave an operational grounding to abstract algebra. Something needed for some of us before see the abstraction behind the notation, and understanding it.
The perception of FP as being somehow more "math-y" is nothing but a bias. There is no intrinsic magical property of "mathiness", it's just that the operational semantics of functional languages are much more well-defined. Logic programming is itself firmly based in axiomatic semantics and has a similar a priori system of reasoning to it, though distinct from FP. Imperative languages can be modeled well on Hoare logi…
And describing pre / post invariants of imperative statements, turns them into typed functions isn't it ? I'm having a hard time seeing the difference.
Re: Parallels Between Math and Software Engineering
#9Not trying to evangelize but FP was an great hint for that. Seeing 'tangible' (that I can create, see, step through) incarnations of groups, monoids, transitive relations etc gave an operational grounding to abstract algebra. Something needed for some of us before see the abstraction behind the notation, and understanding it.
The perception of FP as being somehow more "math-y" is nothing but a bias. There is no intrinsic magical property of "mathiness", it's just that the operational semantics of functional languages are much more well-defined. Logic programming is itself firmly based in axiomatic semantics and has a similar a priori system of reasoning to it, though distinct from FP. Imperative languages can be modeled well on Hoare logi…
Re: Parallels Between Math and Software Engineering
#10In theoretical CS, people talk of catching and fixing "bugs" in proofs, namely, mistakes that make the proof fail but can hopefully be fixed while sticking to essentially the same idea.
One can "refactor" proofs, in superficial ways (e.g., renaming of concepts), but in deeper ways also, e.g., extract part of a proof to make it an independent lemma that you can reuse (or "invoke") from other parts of the proof. One often tries to "decouple" large proofs into independent parts with clearly defined "interfaces", that the reader can understand separately from each other, though this usually implies a tradeoff (a more tightly integrated proof requires more mental space but is usually shorter overall).
One can think of the statement of sub-results (lemmas) as providing an "interface" to invoke them elsewhere, which you try to "decouple" from the actual "implementation", namely, the way the lemmas are really proven. It takes practice to find the right way to abstract away the essence of a result to state it correctly, without burdening it with implementation details, but without forgetting an important aspect of the result that will be necessary later. As in software engineering, once a result is proven, you stop burdening your mind with the implementation and mostly think about the statement (i.e., what the result is supposed to be doing) when using it.
In software engineering, one must decide which part of the code is "responsible" for checking certain properties on the objects, and that code may "assume" some preconditions on its inputs and must "guarantee" some preconditions on its outputs. In the same way, in proofs, one often wonders where certain conditions should be verified. Should they be part of the definition of the object? Does this lemma enforce more conditions on the object than what is guaranteed by its statement?
The parallel is not perfect. In software engineering, you can rely on the computer to check that your code is correct, and to execute it. In mathematics you rely on other humans to do this and check that they are convinced by your proofs. This means you can get away with appeals to human intuition which are not fully formal, but on the other hand there is no safety net when you make an error in your reasoning, no reality check that you can invoke to avoid exploring erroneous consequences. Also, this does not apply to all types of proofs; but it applies especially well to proofs that describe a construction, i.e., a way to "build" a certain abstract object, often to justify that an object with a certain desirable set of properties exists.