Live data from Hacker News

Parallels Between Math and Software Engineering

beta.oreilly.com

21–30 of 97 posts

Re: Parallels Between Math and Software Engineering

#21
post #19

The other day I realized that a man-made law is also a bit like mathematics or computer software. It is carefully designed and constructed. Ideally, it is intended to work like a machine with as little room for human discretion as possible. And just like mathematics, adding an another "axiom" to the law has far, far-reaching consequences.

[deleted]

Re: Parallels Between Math and Software Engineering

#22
post #19

The other day I realized that a man-made law is also a bit like mathematics or computer software. It is carefully designed and constructed. Ideally, it is intended to work like a machine with as little room for human discretion as possible. And just like mathematics, adding an another "axiom" to the law has far, far-reaching consequences.

> And just like mathematics, adding an another "axiom" to the law has far, far-reaching consequences.

Actually mathematicians virtually never do this. Almost all of mathematics (from arithmetic to calculus to category theory) operates in the confines of ZFC[1] and adds no further axioms. All of these fields may add definitions, but these are just shorthand; the are conservative and have no actual consequences. It is more like fixing Newton's laws and then experimenting with all the machines you can build with them.

[1]: https://en.wikipedia.org/wiki/Zermelo%E2%80%93Fraenkel_set_t...

Re: Parallels Between Math and Software Engineering

#23

I've had a similar thought as the author, and often wondered - could we develop alternative systems for intermediate-to-advanced mathematical concepts that would make it easier to parse?

Category theory?

It has been called many things ("general abstract nonsense", etc.), but I don't know if it has ever been called "an easier way to explain things to non-mathematicians." :)

Re: Parallels Between Math and Software Engineering

#24

I've had a similar thought as the author, and often wondered - could we develop alternative systems for intermediate-to-advanced mathematical concepts that would make it easier to parse?

Category theory?

Very much so. This has in recent times become something of a lingua franca for mathematicians in recent times. The most useful (and astounding) property is that it gives formal definitions that apply across disciplines, which often perfectly coincide with informal usages of the same names for similar constructs in different fields.

For example, in mathematics we often have the notion of a product of two structures. The simplest is the product of two sets A and B, which in computer programming terms would just be a structure containing a field of type A and a field of type B. There are more subtle and sophisticated examples in other fields like topology, but it turns out that the categorical definition[1] matches the definition of product mathematicians were already using in each of these fields, even though it came about much later!

[1]: https://en.wikipedia.org/wiki/Product_(category_theory)

Re: Parallels Between Math and Software Engineering

#25
post #19

The other day I realized that a man-made law is also a bit like mathematics or computer software. It is carefully designed and constructed. Ideally, it is intended to work like a machine with as little room for human discretion as possible. And just like mathematics, adding an another "axiom" to the law has far, far-reaching consequences.

> And just like mathematics, adding an another "axiom" to the law has far, far-reaching consequences. Actually mathematicians virtually never do this. Almost all of mathematics (from arithmetic to calculus to category theory) operates in the confines of ZFC[1] and adds no further axioms. All of these fields may add definitions , but these are just shorthand; the are conservative and have no actual consequences. It is…

Most mathematicians don't spend their time considering extensions of ZFC, but mathematicians are always adding axioms in a different sense. Add a commutativity axiom to group theory and you get commutative group theory. Add an axiom that "the space has total measure 1" to measure theory and you get probability theory. And so on.

Re: Parallels Between Math and Software Engineering

#26
post #4

Very nicely put. I'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…

I definitely think linear algebra has a lot of practical applications, but I'm not sure I would necessarily call it the "best" nor the "most valuable tool overall". It certainly provides the most bang for your buck if you are doing certain kinds of modeling, but even just within modeling which tool will be the most useful will depend a ton on what you are doing. For example, for dynamical systems you may be using linear algebra, but mostly as a computational tool for solving differential equations. In this case, analysis of your problem at the level of calculus is extremely important if you want to come up with an accurate and computationally feasible model.

Re: Parallels Between Math and Software Engineering

#27
post #25

Earlier quoted context omitted.

> And just like mathematics, adding an another "axiom" to the law has far, far-reaching consequences. Actually mathematicians virtually never do this. Almost all of mathematics (from arithmetic to calculus to category theory) operates in the confines of ZFC[1] and adds no further axioms. All of these fields may add definitions , but these are just shorthand; the are conservative and have no actual consequences. It is…

Most mathematicians don't spend their time considering extensions of ZFC, but mathematicians are always adding axioms in a different sense. Add a commutativity axiom to group theory and you get commutative group theory. Add an axiom that "the space has total measure 1" to measure theory and you get probability theory. And so on.

These are generally called axioms, but these are totally distinct from axioms in the sense of ZFC's axioms. They are simply part of the definition of a group, commutative group, etc. Since they are just part of the definition of the structure, choosing the "wrong axioms" will only result in a structure which has no actual instances, not in inconsistency of the underlying theory. As such, they most certainly don't have "far reaching consequences", except that some axioms may produce uninteresting structures.

Re: Parallels Between Math and Software Engineering

#30
post #19

The other day I realized that a man-made law is also a bit like mathematics or computer software. It is carefully designed and constructed. Ideally, it is intended to work like a machine with as little room for human discretion as possible. And just like mathematics, adding an another "axiom" to the law has far, far-reaching consequences.

Changes in law (almost) never add axioms because that would have global effects; instead, they tend to add folds to the manifold that law is. And many folds there certainly are. It is hard to find anything in law that holds universally. Examples (I’m picking mostly US law here, but I’m sure similar exceptions exist elsewhere):

- everybody can vote? Well, we have https://en.wikipedia.org/wiki/Felony_disenfranchisement and, on the other end of the spectrum, in the UK "Although the law relating to elections does not specifically prohibit the Sovereign from voting in a general election or local election, it is considered unconstitutional for the Sovereign and his or her heir to do so” (http://www.royal.gov.uk/MonarchUK/QueenandGovernment/Queenan...)

- everybody with a sufficiently high income must pay social security taxes? Not if you’re member of certain religious groups (https://faq.ssa.gov/link/portal/34011/34019/Article/3821/Are...)

Even the universal declaration of human rights (http://www.un.org/en/documents/udhr/) often has small exceptions. For example:

- "Everyone has the right to take part in the government of his country, directly or through freely chosen representatives"? Not quite in the USA, as one must be born in the USA to become president.

- "higher education shall be equally accessible to all on the basis of merit": questionable in many countries, given the costs.

It seems there’s no rule so universal that it doesn’t have some exception. That, IMO, makes law so different from math that any analogy is useless.

Post reply on HN