3 ms·
I am starting to get sick of these things. > Doing Riemann sums in Fortran is about as math-oriented an introduction to programming as you can get. No. Math i
by mcguire 12y ago
I am starting to get sick of these things.
> Doing Riemann sums in Fortran is about as math-oriented an introduction to programming as you can get.
No. Math is not calculus. Math is more than calculus, more than arithmetic. If anyone asserted that "Programming is arithmetic" (or "...is not..."), they'd get their buttocks laughed off of them. But that is exactly what Sarah Mei is arguing against here.
> You might be able to say that math skills are required for computer science success, but you can’t necessarily say that they’re required for developer success.
I suppose you can't. But if you want to stay in this field for more than a few years, you might indeed want to know some of that background, mathy, computer-sciency stuff. Or does somebody need to go through that Java Generics and subtyping discussion again?
> As an example, consider whiteboard interview staple big-O notation.
Yes, let's. I had a conversation with a friend and cow-orker a while back like this:
"Why is this so slow: string1 + string2 + ... + stringn?"
"Because that's an n^2 operation. You copy string1, then you copy string1 and string2, then you copy string1 and string2 and.... Try sticking all of the strings in a list or array or something and then joining them all together at once."
"But this other JS interpreter isn't slow...."
"Because it's doing that array optimization for you, behind your back. I suppose you could limit our appy to that one browser if you are really attached to +'s...."
> But the same logical concepts are embedded in our human languages.
I would like to just note that
1. The best definition of mathematics that I know is something like "the study of abstraction as a fundamental." You can learn abstraction anywhere; it's indeed everywhere. But math is all about it.
2. If I go up to a native Japanese speaker and tell them, "Arigato!" they'll (I hope) pat me on the head and say "You're welcome". They'll probably think I'm an idiot, but they'll know what I'm trying to get across. If I try a similar feat while programming, the magic smoke will leave me blinded and with serious lung damage on its way out of the computer and into the ventilation system.
- felipellrocha 12y agoThis. I loved that string concatenation example! I still don't understand how people can be so against big-O notation when it's such a simple idea, with so many applications.
- TheLoneWolfling 12y agoThat being said, in some languages string1 + string2 + ... + stringn isn't an O(n^2) operation. (Notably, if your string type is a rope, or if the language has a nary string concatenation operator, or is guaranteed to use something along the lines of a StringBuffer intermediary object)