Striking parallels between mathematics and software engineering
radar.oreilly.com
Striking parallels between mathematics and software engineering
1–10 of 36 posts
Re: Striking parallels between mathematics and software engineering
#2Abstract algebra and category theory give you incredibly useful program and API structuring techniques; you can get lots of nice properties for free by following these well-worn existing patterns, even more so than OOP design patterns. We make use of them a lot in Haskell, but they’re basically language-agnostic.
Even simple algebraic manipulations, like noticing that “return” is distributive over a conditional:
if x then return y else return z
return (if x then y else z)
Are very useful for restructuring programs to be more readable.Re: Striking parallels between mathematics and software engineering
#3Linear algebra got a lot easier for me when I realised that matrices are just linear functions, and matrix multiplication is function composition. Abstract algebra and category theory give you incredibly useful program and API structuring techniques; you can get lots of nice properties for free by following these well-worn existing patterns, even more so than OOP design patterns. We make use of them a lot in Haskell,…
http://www.haskell.org/haskellwiki/Curry-Howard-Lambek_corre...
Re: Striking parallels between mathematics and software engineering
#4Software engineering is much worse in terms of useless complications developed by people who don't know previous solutions (angular.js? Great! Have you ever heard of dataflow programming? Constraint satisfaction? Dynamic binding? No? No wonder angular is such a piece of shit).
Re: Striking parallels between mathematics and software engineering
#5(Disclaimer: I'm a Sage developer.)
Re: Striking parallels between mathematics and software engineering
#6The other theme in the article about algebra and minimally acceptable abstractions for accomplishing a goal is unfortunately nowhere to be found in software.
Re: Striking parallels between mathematics and software engineering
#7There's a concrete object-oriented Python implementation of much of abstract algebra is Sage. You can see some of that here: https://github.com/sagemath/sage/blob/master/src/sage/struct... (Disclaimer: I'm a Sage developer.)
Re: Striking parallels between mathematics and software engineering
#8Re: Striking parallels between mathematics and software engineering
#9It's about math as a human construction. Very comforting to see ones inner metaphores and mental models of math "legitimised" and exposed in a scientific framework. One could hope for a companion: Where Software Engineering Comes From.
Re: Striking parallels between mathematics and software engineering
#10On the other hand, while I am always cognizant and amazed by the POV of math as a human construction, there's something a little otherworldly about it from time to time. In the same way that you sometimes hit a code design which feels so damn good, Math, especially older math, is just a huge collection of these. Somehow, despite this all coming, apparently, from our minds, we hit on these design decisions that are just so sweet that they last millennia. This is what inspired things like Voyager---maybe it's hubris, but it just has to be the case that aliens speak mathematics.
So, I encourage anyone excited by this: math isn't "hard", it's just big and wonderful. You'll never finish learning it, but the journey will be incredible.
I'll leave this linking two more great resources (edit: to be clear, really the first one is the great resource... the second is just me talking, not really great at all). First, Paul Erdös, a famous mathematician who perhaps specialized in combinatorics, loved this idea I espouse above. In his mind, God had a small number of "proofs" in his mind when he designed mathematics. These are so wonderful that their beauty is completely self-evident. After Erdös "stopped doing math" (passed away) people compiled some of his Proofs from The Book along with others they imagine he would have so regarded into a great text book called, unsurprisingly, Proofs from The Book [0].
Finally, I'll self plug a little essay I wrote, actually in another HN comment, a while ago about learning mathematics.
http://jspha.com/posts/there_is_no_royal_road_to_mathematics...
[0] http://www.amazon.com/Proofs-THE-BOOK-Martin-Aigner/dp/36420...