Fabulous Adventures In Coding
Eric Lippert is a principal developer on the C# compiler team. Learn more about Eric.
A number of coincidences led to this post -- first, I got an email from one of the Mikes, who encouraged me to digress more from strictly technical topics. Thus I was going through some old email looking for anything off-the-wall and I ran into this old rant about mathematics that I wrote a while back. Not five minutes after re-reading it, I saw Gretchen's recent post on how her high school math teacher always told her that algebra would come in handy, and sure enough, it did. Go, algebra!
A while back a high school math teacher acquaintance of mine threw out a question to a mailing list I was on: does your job involve 'real world' applications of mathematics?
Sure, absolutely, all the time. I mean, basic arithmetic goes without saying. I don't think we need any examples of that. Let's think about harder stuff. Like, I could not do my job without a good working knowledge of logarithms. I often have to test the performance of my product in real-world server environments and that means understanding what happens when you throw 10, 100, 1000, 10000 and 100000 clients against a server farm. Being able to categorize, graph, and understand that data requires math ranging from the ability to do logarithmic graphs to understanding statistical concepts like variance and standard deviation. And that's not the only reasonably buff math that Microsofties use, not by far. I use linear algebra less in my own work, but anyone doing any kind of low-level three-d graphics needs to understand matrix transformations inside-out. My friends in the Windows Media team have a deep understanding of the mathematics of entropy, to make their compression schemes work better. I could go on, but you get the point.
And moreover, that stuff is just fancy arithmetic . Mathematics is all about designing algorithms and writing proofs that they work, and those skills go deep to the heart of computer programming. It's nigh impossible to understand recursive programming without also understanding proof by induction; they go together like hand in glove.
But there's a broader question lurking here. Why is a math teacher asking this question in the first place?
"When are we ever going to use this in real life?" has been the cry of bored math students since time immemorial. Though the vast majority mightn't a clue what "real life" entails, it's still a fair question that deserves an answer. Coming up with practical examples of math in real life is a reasonable approach.
But I would go further. I would deny the very implicit premises that the question is based upon : first, that the only really legitimate knowledge worth having is practical "real life" knowledge, second that anything which lacks an immediate, direct application is by definition impractical .
They seem like reasonable premises, no? After all, couldn't we all live perfectly good lives without knowing:
Proof by example -- billions of people have lived their lives knowing none of these things. But I can't help but think that the world would be a better place if more people did know these things, whether it was ever of direct, practical use or not . But that's just me: Eric Lippert, effete snob at large. To answer the practical question, we need to come up with practical reasons to know impractical things. Seven immediately come to mind.
First, learning impractical things is just plain good for you mentally. It teaches you new ways to learn other things, some of which may be practical. It teaches you new ways to solve problems, new ways to think. That is eminently useful! Mathematics in particular can be a wonderful way to combine intuitive and formal reasoning. Mathematics, contrary to popular belief, is a mostly intuitive. It's a creative process that is then justified by formal proofs -- which themselves require intuition and cleverness to create.
Show me a job where you don't have to think, you don't have to solve new problems in new ways, and I'll show you a job that is deathly boring. You want a deathly boring job, fine by me, but most people do not.
Second, human experience does not actually come to us neatly compartmentalized into "Biology" and "History" and "Physics" -- these are human-made compartments that we impose to try and put some order on the vast, tangled web of all knowledge. Those compartments are as artificial as lines of longitude. If you only know the bare necessities to keep yourself alive then your ability to traverse that vast web of knowledge is greatly diminished. There are connections . And the reason why mathematics is second only to writing as a tool for manipulating knowledge is because mathematics is applicable to almost every single human endevour.
Third, high school students today are probably going to live to be 120 and change jobs every couple years. How can anyone possibly know what skills are going to be useful someday? Limiting oneself to the "obviously practical" cuts off whole avenues of possible occupations. Maybe the only math you'll ever need is the math necessary to be a bank teller. That's fine -- there's nothing wrong with being a bank teller. But to willfully choose to know only that much is to restrict your choices in the future. Banking just might get dull after a few years, and you know what? It's easier to learn huge amounts of stuff when you're younger, believe me.
Fourth, it's a competitive world out there. Is the fact that the United States' information technology sector is about to have its lunch eaten by India's in any way correlated to the shrinking number of Americans getting math and computer science degrees? Enrollment has dropped again as the tech sector has languished. Does anyone honestly believe that there is no relationship between the value a society places on excellence in education and its viability in the information economy?
Fifth, having lots of "useless" skills is a way to manage risk. Think of some worst cases. What if you get fired? What if you get blinded? Lose use your legs? Having a few "useless" skills can really come in handy if suddenly you can't make a living on any of your so-called "useful" skills. This guy is a germane example.
Sixth, limiting yourself to only the obviously practical is essentially marginalizing yourself. Mathematics, particularly statistics, is everywhere in our technological world. To deny the practicality of mathematics is to say " I choose to be powerless in a world where a technological/political/scientific aristocracy understands and controls the systems upon which my life depends. I choose to be unable to understand those systems and unable to communicate effectively with the people who create them. I choose to be a person who cannot make a difference. "
Seventh, maybe you don't, but I live in a representative democracy. Americans are always going on about their beautiful system of checks and balances -- well, the ultimate check and balance from which all political power derives in the American philosophy is, at least in theory, the will of the people. Citizens in representative democracies are asked to make choices about mind-numbingly complex issues. Scientific, ethical, geopolitical, economic, you name it. Making informed choices is everyone's responsibility. And that means having at least a working knowledge of a vast quantity of "useless" information, much of which will be expressed in percentages, rates, etc. How can you manipulate those numbers correctly to arrive at meaningful conclusions without a strong working understanding of math?
my teacher gave me like a homework to find out some info for coding in math.i didnt know nothing about it because im still in the 10th grade in collage.but im very interested to know about this topic and i wish ill do the best for it!