I have an undergraduate math degree. I also went to Berkeley for grad school, accepted to Math department, passed the Math graduate prelim exam, and took every graduate Theoretical Computer Science class, getting A minuses and As and one A+. I have co-authored in top conferences four articles that were either theory or at least half theory. Three of these papers contained new algorithms that I had done at least half the work in inventing. I have now been a professional programmer for several years, so I am qualified to speak from both perspectives of being educated in both theory and practice.
As measured by ability to produce results in reality, this math/theory stuff is rarely useful and certainly not so in comparison to practice with the reality of the machine. There is something about computer programming that people who have written code for years know that people who took math classes do not know.
The math *may* help, but very rarely; consider the *opportunity* cost: one year spent coding is going to help you much more than one year spent studying math. I *tried* this; this is not just an idea I have. Consider the author of the article; he's a math teacher! Don't take advice from programming from math teachers, take it from programmers!
Mathematicians like to talk about the "unreasonable usefulness of Mathematics". Is that why mathematicians tend to make such poor programmers? What usefulness? When did it help you when your girlfriend was angry? Did it help you debug your Makefile? Can you bench 200 lbs since you took Calculus? Given how much we invest in it and how little of my life it helps, I talk about the unreasonable uselessness of Mathematics.
Unfortunately in English we only have one word for "know", but on other languages there are two words, one for knowing intellectually, such as "savoir" in French, and one for knowing a person intimately, such as "connaitre" in French. People who have written code, especially people who started when they were 12 or so, know intimately, connaitre, software in a way that far exceeds people who took a bunch of theory and only know intellectually, savoir, theorems and algorithms.
My friends who wrote code for years and didn't specialize in theory can pick up enough of the theory they need when they very occasionally need it from, say, Cormen, Leiserson, and Rivest (the white book). Keep a copy of that on your desk and skip the Calculus and all the other stuff. You can learn it if you need to.
Therefore, do not get seduced by the Modernist lie that Mathematics is the highest, greatest, bestest thing. It is not; it is just another thing, and beyond arithmetic and high-school algebra, not often a terribly useful one at that. Modernism is an attempt of Mind to make a tyranny over Body; while Mind has its place, this is too one-sided and becomes painful for Body. As the Buddhists say, "Mind and Body are two, Mind and Body are one" and "Dark is a word for merging upper and lower; Light is a word for distinguishing pure and defiled. Right in Light there is Darkness, but don't confront it as Darkness; Right in Darkness there is Light, but don't see it as Light". You need both Dark and Light.
Larry Wall expresses this pain of Modernism very well in this article on Perl calling it "The Hammer of Modernism": http://www.wall.org/~larry/pm.html : "The funny thing is, Modernism itself was a kind of hammer, and it made everything look like something to be hammered. . . . In fact, at many different levels, Modernism brought us various kinds of dysfunction."
Math wants to tell you that the world is "just" some "details", some constants plugged into the Real Thing, the Equations and Theorems! [said gazing up at the sky with lots of resounding major chords playing in the background], that the Real Thing is ideas which are above the lowly mud of reality.
However, those who deal with reality, scientists, engineers, carpenters, gardeners, moms, etc. soon find out that the world is not dumb and lifele
I read your account of being an Election Judge in Baltimore County. In it you say:
Perhaps the lightest moment in the day came when one voter standing at his machine asked in the most deadpan voice, "What do I do if it says it is rebooting?" Head judge Marie turned white, and Joy's mouth dropped. My heart started to beat quickly, when he laughed and said "just kidding." There was about a two second pause of silence followed by roaring laughter from everyone.
This is not a joke, it happened to me. I also wrote up my experience; I hope you will forgive me for indulging my vanity terribly by suggesting that perhaps I might interest you in reading it. If you would like, it is off of my homepage, here: http://www.cs.berkeley.edu/~dsw/tue_2_march _2004.h tml
Daniel Wilkerson
---
Part of his reply: Subject: Re: Voting machine rebooting From: Avi Rubin
I have pushed on this one probably more than anyone. I lost my internship from Sun (I wasn't fired, I was "un-hired" since I never satisfied the hiring agreement). And this was a time when I needed the money.
I spent weeks on it, including talking to people like Gosling and the then CEO of JavaSoft. My conclusion is that at a place like Sun, you aren't going to get them to budge at all.
Remember you "submit" an application; in other words, you perform an "act of submission" to the corporation. It struck me during this time while waiting in a lobby in one of Sun's sprawling non-descript buildings that it was like in ancient Greece when people made an offering to the local gods. My high school History teacher pointed out to us that a temple of Athena was a collection point for a non-trivial amount of resources which were then used in various ways by the preisthood; it functioned as a means to route resources around the community. Now we have corporations instead. What struck me that the have in common was that humans are too weak to take care of themselves, so we invent these gods/corporations to take care of us and then we give them the means to do that. It only works if you submit your will to the local god. You may not like it, but that's the way it works.
I did manage after several hours to get one word changed in the agreement when I joined a startup at the very beginning: they dropped that they owned any thoughts that I "conceive", leaving just those that I write down somewhere in some sort of medium. I'm sure that I was able to do this only because it was the very beginning of the startup and I was important to them.
This is the thing Feynmann commented on, especially the improbability of one of these really being ancient, in one of his letters printed in "What do _you_ care what other people think?", pages 94 - 96:
Yesterday morning I went to the archeological museum. . . . Also, it was slightly boring because we have seen so much of that stuff before. Except for one thing: among all those art objects there was one thing so entirely different and strange that it is nearly impossible. It was recovered from the sea in 1900 and is some kind of machine with gear trains, very much like the inside of a modern wind-up alarm clock. The teeth are very regular and many wheels are fitted closely together. There are graduated circles and Greek inscriptions. I wonder if it is some kind of fake. There was an article on it in the Scientific American in 1959. . ..
I asked the archeologist lady about the machine in the museum -- whether other similar machines , or simpler machines leading up to it or down form it, were ever found -- but she hadn't heard of it. So I met her and her son of Carl's age (who looks at me as if I were a heroic ancient Greek, for he is studying physics) at the museum to show it to her. She required some explanation from me why I thought such a machine was interesting and surprising because, "Didn't Erastosthenese measure the distance to the sun, and didn't that require elaborate scientific instruments?" Oh, how ignorant are classically educated people. No wonder they don't appreciate their own time. They are not of it and do not understand it. But after a bit she believed maybe it was striking, and she took me to the back rooms of the museum-- surely there were other examples, and she would get a complete bibliography. Well, there were no other examples, and the complete bibliography was a list of three articles (including the one in the Scientific American) -- all by one man, an _American_ from Yale!
I guess the Greeks think all Americans must be dull, being only interested in machinery when there are all those beautiful statues and portrayals of lovely myths and stories of gods and goddesses to look at. (In fact, a lady from the museum staff remarked, when told that the professor from America wanted to know more about item 15087, "Of all the beautiful things in this museum, why does he pick out _that_ particular item? What is so special about it?")
Question: Optional strong type checking in Perl 6?
on
Ask Larry Wall
·
· Score: 1
Perl has many very useful language features that those "who should know better", such as Professors of Programming languages, have not thought to put into a language. Thank you for that!
However, there is one feature that, if made optional, could really improve the ease of writing less buggy programs: Could we please have some sort of optional strong type checking in Perl 6?
Without this feature, it is harder than it need be to write code to manipulate complex data structures without occasionally "falling out" of the graph. It is really nice to find that out at compile time, not runtime (or not at all!)
It could work something like inheritance: You can inherit everything from a scalar, so that by default it is all like normal Perl. But if you downcast, then stronger checking is there for you. You could put the downcast in the type signature of functions that want to know more about their arguments than that they are just scalars. This could be checked at run time. Compile time type checking could be available at request, but could still be restricted to a subset of your program.
There might be some sticky points, as I haven't tried to implement it, but please remark on the feasibility and utility of the idea.
I have an undergraduate math degree. I also went to Berkeley for grad school, accepted to Math department, passed the Math graduate prelim exam, and took every graduate Theoretical Computer Science class, getting A minuses and As and one A+. I have co-authored in top conferences four articles that were either theory or at least half theory. Three of these papers contained new algorithms that I had done at least half the work in inventing. I have now been a professional programmer for several years, so I am qualified to speak from both perspectives of being educated in both theory and practice.
As measured by ability to produce results in reality, this math/theory stuff is rarely useful and certainly not so in comparison to practice with the reality of the machine. There is something about computer programming that people who have written code for years know that people who took math classes do not know.
The math *may* help, but very rarely; consider the *opportunity* cost: one year spent coding is going to help you much more than one year spent studying math. I *tried* this; this is not just an idea I have. Consider the author of the article; he's a math teacher! Don't take advice from programming from math teachers, take it from programmers!
Mathematicians like to talk about the "unreasonable usefulness of Mathematics". Is that why mathematicians tend to make such poor programmers? What usefulness? When did it help you when your girlfriend was angry? Did it help you debug your Makefile? Can you bench 200 lbs since you took Calculus? Given how much we invest in it and how little of my life it helps, I talk about the unreasonable uselessness of Mathematics.
Unfortunately in English we only have one word for "know", but on other languages there are two words, one for knowing intellectually, such as "savoir" in French, and one for knowing a person intimately, such as "connaitre" in French. People who have written code, especially people who started when they were 12 or so, know intimately, connaitre, software in a way that far exceeds people who took a bunch of theory and only know intellectually, savoir, theorems and algorithms.
My friends who wrote code for years and didn't specialize in theory can pick up enough of the theory they need when they very occasionally need it from, say, Cormen, Leiserson, and Rivest (the white book). Keep a copy of that on your desk and skip the Calculus and all the other stuff. You can learn it if you need to.
Therefore, do not get seduced by the Modernist lie that Mathematics is the highest, greatest, bestest thing. It is not; it is just another thing, and beyond arithmetic and high-school algebra, not often a terribly useful one at that. Modernism is an attempt of Mind to make a tyranny over Body; while Mind has its place, this is too one-sided and becomes painful for Body. As the Buddhists say, "Mind and Body are two, Mind and Body are one" and "Dark is a word for merging upper and lower; Light is a word for distinguishing pure and defiled. Right in Light there is Darkness, but don't confront it as Darkness; Right in Darkness there is Light, but don't see it as Light". You need both Dark and Light.
Larry Wall expresses this pain of Modernism very well in this article on Perl calling it "The Hammer of Modernism": http://www.wall.org/~larry/pm.html : "The funny thing is, Modernism itself was a kind of hammer, and it made everything look like something to be hammered. . . . In fact, at many different levels, Modernism brought us various kinds of dysfunction."
Math wants to tell you that the world is "just" some "details", some constants plugged into the Real Thing, the Equations and Theorems! [said gazing up at the sky with lots of resounding major chords playing in the background], that the Real Thing is ideas which are above the lowly mud of reality.
However, those who deal with reality, scientists, engineers, carpenters, gardeners, moms, etc. soon find out that the world is not dumb and lifele
Email I wrote to Professor Rubin follows.
h _2004.h tml
---
Professor Rubin,
I read your account of being an Election Judge in Baltimore County. In
it you say:
Perhaps the lightest moment in the day came when one voter standing at
his machine asked in the most deadpan voice, "What do I do if it says it
is rebooting?" Head judge Marie turned white, and Joy's mouth dropped.
My heart started to beat quickly, when he laughed and said "just
kidding." There was about a two second pause of silence followed by
roaring laughter from everyone.
This is not a joke, it happened to me. I also wrote up my experience; I
hope you will forgive me for indulging my vanity terribly by suggesting
that perhaps I might interest you in reading it. If you would like, it
is off of my homepage, here:
http://www.cs.berkeley.edu/~dsw/tue_2_marc
Daniel Wilkerson
---
Part of his reply:
Subject: Re: Voting machine rebooting
From: Avi Rubin
Wow, thanks for sending that.
I have pushed on this one probably more than anyone. I lost my internship from Sun (I wasn't fired, I was "un-hired" since I never satisfied the hiring agreement). And this was a time when I needed the money.
I spent weeks on it, including talking to people like Gosling and the then CEO of JavaSoft. My conclusion is that at a place like Sun, you aren't going to get them to budge at all.
Remember you "submit" an application; in other words, you perform an "act of submission" to the corporation. It struck me during this time while waiting in a lobby in one of Sun's sprawling non-descript buildings that it was like in ancient Greece when people made an offering to the local gods. My high school History teacher pointed out to us that a temple of Athena was a collection point for a non-trivial amount of resources which were then used in various ways by the preisthood; it functioned as a means to route resources around the community. Now we have corporations instead. What struck me that the have in common was that humans are too weak to take care of themselves, so we invent these gods/corporations to take care of us and then we give them the means to do that. It only works if you submit your will to the local god. You may not like it, but that's the way it works.
I did manage after several hours to get one word changed in the agreement when I joined a startup at the very beginning: they dropped that they owned any thoughts that I "conceive", leaving just those that I write down somewhere in some sort of medium. I'm sure that I was able to do this only because it was the very beginning of the startup and I was important to them.
This is the thing Feynmann commented on, especially the
.
improbability of one of these really being ancient, in one of his
letters printed in "What do _you_ care what other people think?", pages
94 - 96:
Yesterday morning I went to the archeological museum. . . . Also, it was
slightly boring because we have seen so much of that stuff before.
Except for one thing: among all those art objects there was one thing so
entirely different and strange that it is nearly impossible. It was
recovered from the sea in 1900 and is some kind of machine with gear
trains, very much like the inside of a modern wind-up alarm clock. The
teeth are very regular and many wheels are fitted closely together.
There are graduated circles and Greek inscriptions. I wonder if it is
some kind of fake. There was an article on it in the Scientific
American in 1959. . .
I asked the archeologist lady about the machine in the museum -- whether
other similar machines , or simpler machines leading up to it or down
form it, were ever found -- but she hadn't heard of it. So I met her
and her son of Carl's age (who looks at me as if I were a heroic ancient
Greek, for he is studying physics) at the museum to show it to her. She
required some explanation from me why I thought such a machine was
interesting and surprising because, "Didn't Erastosthenese measure the
distance to the sun, and didn't that require elaborate scientific
instruments?" Oh, how ignorant are classically educated people. No
wonder they don't appreciate their own time. They are not of it and do
not understand it. But after a bit she believed maybe it was striking,
and she took me to the back rooms of the museum-- surely there were
other examples, and she would get a complete bibliography. Well, there
were no other examples, and the complete bibliography was a list of
three articles (including the one in the Scientific American) -- all by
one man, an _American_ from Yale!
I guess the Greeks think all Americans must be dull, being only
interested in machinery when there are all those beautiful statues and
portrayals of lovely myths and stories of gods and goddesses to look at.
(In fact, a lady from the museum staff remarked, when told that the
professor from America wanted to know more about item 15087, "Of all the
beautiful things in this museum, why does he pick out _that_ particular
item? What is so special about it?")
Perl has many very useful language features that those "who should know better", such as Professors of Programming languages, have not thought to put into a language. Thank you for that!
However, there is one feature that, if made optional, could really improve the ease of writing less buggy programs: Could we please have some sort of optional strong type checking in Perl 6?
Without this feature, it is harder than it need be to write code to manipulate complex data structures without occasionally "falling out" of the graph. It is really nice to find that out at compile time, not runtime (or not at all!)
It could work something like inheritance: You can inherit everything from a scalar, so that by default it is all like normal Perl. But if you downcast, then stronger checking is there for you. You could put the downcast in the type signature of functions that want to know more about their arguments than that they are just scalars. This could be checked at run time. Compile time type checking could be available at request, but could still be restricted to a subset of your program.
There might be some sticky points, as I haven't tried to implement it, but please remark on the feasibility and utility of the idea.