Do software engineers need mathematics? (2000)
maa.org
maa.org
So much of abstraction in SE is about chunk size - what's comfortable to fit in your head when thinking at any particular level - and minimizing surface area between modules, where enough experience with a wide selection of APIs to develop good taste is important.
Whereas I see a lot of mathematics as being about eliminating redundancy, seeing connections between things and reducing them to their most orthogonal and best factored form, with the minimal number of concepts; but with not a whole lot of concern for complexity specifically. The same approach applied to SE can be useful, but mostly only in central libraries that have the widest variety of uses. I'm thinking of collections in particular; there, you want a wide selection of querying and transformation primitives to make arbitrary data manipulation problems easier to express. But most libraries and APIs don't benefit from that kind of factoring; they are best approached from a UI perspective, looking at use cases and building in affordances that make all the common cases trivial, while making the edge cases possible. This makes them lop-sided and redundant, and probably would offend someone with a heavy mathematical orientation.
tl/dr: mathematical thinking is roughly the right kind of thinking, but practice of reading and writing code teaches thinking that's a better fit.
Classification of ideas does not lend the classifier ownership over the idea. Ferns were around long before mathematicians.
(To a certain degree, I'm taking a devil's advocate position. I'm not arguing against the worth of mathematics. But not a lot of SE requires much mathematics; what I am specifically disputing is that teaching a lot of abstract mathematics necessarily results in a better software engineer than deliberate practice. Solving simple combinatorial, tree and graph search problems teaches you more about the practical uses of recursion than any amount of recurrence relations, IMO.)
Like philosophy, mathematics is about ideas. Understanding the underlying philosophical and mathematical ideas are enlightening and often practical. Benefiting from understanding these ideas or methodology does not necessarily mean I have to be good at the level of philosophical writing, or solving proofs.
New ideas really pay off when the constraints are such that conventional composition of existing ideas won't work well. But those situations are rare.
It might sound like I'm arguing against talented software engineers, or against education, training etc., but really it's just business pragmatics and economics.
That said, a lot of the higher-level stuff I learnt the hard way, like the difference between tiers and layers. That's abstraction. And it's why I disagree with Keith's post in general, and this comment in particular:
"...mathematics was the only subject that gave them that experience..."
I don't need maths for 99% of what I write.
[Edit] I don't dispute that I'm doing it (mathematics). I do dispute that an expensive maths education is a requisite for good code.
Good of course is an interesting word - there's a difference between the best architecture, the right architecture, and a successful architecture. All can be termed as being "good" architectures, but no amount of maths is going to teach you the difference.
Lately I've been looking at using model checking in my work, which touches on much of the math I know. Advanced logic to give a specification, and automata theory to run it. Group theory to express symmetries that let it run orders of magnitude faster. Add a bunch of real analysis and statistics if you want to do it probabilistically. Apparently number theory crops up too.
Meanwhile, a friend of mine develops ImplicitCAD, a programming language for making 3D objects. How does he test whether his 3D models have holes? Algebraic topology.
def has_holes(s):
for c in all_loops(s):
try:
contract(c)
except:
return True
return False
isn't an effective algorithm (e.g., "all loops" is an infinite set). But algebraic topology shows how one might instead reduce the problem to computationally tractable linear algebra. Suppose, then, that you've implemented an (presumably nontrivial and therefore error-prone) algorithm to carry out this reduction. Then your patently correct constraint on all loops might be a useful source of tests.(disclaimer: I know nothing at all about computational algebraic topology, except that it's fascinating. So please take my example with an unbounded grain of salt.)
I've used calculus for physics simulations in games.
I had to do a bunch of performance analysis, and a little bit of knowing what distributions actually meant helped a lot. I regret not having taken more statistics in college.
I was talking with a philosophy prof once, and somehow we got to DeMorgan's theorem. "I use that nearly every day," I told him, and it kind of floored him -- apparently he considered it "advanced" logic.
If you're working with educated people, it's a lot easier to say, "apply DeMorgan," than to say, "why don't you negate the clause, remembering to negate each of the internal clauses, and switching the and's to or's and vice versa."
There exist people who use the names to sound intellectual, and these people are annoying, but just because some people enjoy spouting (in the general public) "obscure" rules and names, that doesn't mean that using such names is without value.
http://jasomill.at/DeMorgan.pdf
In the design of programming languages one can let oneself be guided primarily by considering "what the machine can do". Considering, however, that the programming language is the bridge between the user and the machine --- that it can, in fact, be regarded as his tool --- it seems just as important to take into consideration "what Man can think". (Dijkstra [1])
And this is why mathematics is useful to software engineering.
I remember having quite a time doing a doubly-linked-list, the first time I had to think it through. Always wondered why that wasn't named after some bloke . . . :-)
[0]By which I mean, Boolean, true/false, the sort you can use truth tables for. I.e., classical logic as opposed to, say, constructive logic. I don't mean, like, ancient Greek logic or whatever, which I'm told actually is pretty limited. Maybe he was coming at it from that perspective?
In Devlin's article, doing math is conflated with a formal education in it. He should know better as he has previously endorsed heavy criticism of the latter: http://www.maa.org/devlin/devlin_03_08.html
"...our present system of mathematics education is precisely this kind of nightmare. In fact, if I had to design a mechanism for the express purpose of destroying a child’s natural curiosity and love of pattern-making, I couldn’t possibly do as good a job as is currently being done— I simply wouldn’t have the imagination to come up with the kind of senseless, soul-crushing ideas that constitute contemporary mathematics education." (pg. 2 of Lockhart's article)
He has a point, but after learning about the numbers and basic arithmetic you certainly have enough knowledge to learn to code, and who really knows if you need to know more math than that.
As for the question. In english we have many words for those people who work on buildings and even cars because both go back thousands or hundreds of years each. So we have janitors, masons, carpenters, plumbers, architects and civil engineers. Each word clearly delineating a different expertise and scope.
Cars are newer so we have mechanics, automotive engineers and mechanical engineers. No one asks if the mechanical engineer or the mechanic needs math. The answer is obvious and contained in the Words. Electricity is from about the same time as cars and it too has electricians and electrical engineers. Not as many as houses but no doubt with more variations than common vocabulary implies.
Software has words like programmers, computer scientist and software engineer that are overly broad, ambiguous and interchanged indiscriminately. Leading to arguments about what really should be tautologies. I expect in time there will be terms like plumber, detective, architect, scientist, archaeologist and engineer for software and they will all mean something. And the subject will no longer be new and such questions will no longer be asked.
EDIT: I'd also like to chime in for it depends. If you are building a CRUD website it depends. For example: It depends on if you want to A/B Test your site in a non cargo cult manner. It is important if you want to compare A/B Test to multi armed bandits within a general framework. In general, you can only know not enough math.
The thinking is similar too, they're not isolated.
I personally think a large amount of value is in using artificial intelligence, machine learning and statistics to analyse data to optimise a business. I think future grads should be focused on that.
This isn't meant to disparage programmers; I am merely saying we should take note when we have our "programmer" hat on, vs. when we're wearing our software engineer fedora.
How do you know? It is not impossible to pick up (some of) that knowledge outside of college.
"Maybe that's why they call it a programming language"
Maybe, but it could also be because of the abstract concept 'language' as used in http://en.wikipedia.org/wiki/Formal_language