Live data from Hacker News

Programming as a Way of Thinking

blogs.scientificamerican.com

21–30 of 133 posts

Re: Programming as a Way of Thinking

#21

I had a math teacher at my high school who used python and SAGE to teach us pre-calculus as well as programming, computational thinking and some mathematical logic. He was an absolute genius and I wouldn't be where I was if it wasn't for him - unfortunately the school saw him as a threat to the standard model of teaching and drove him insane before he just quit. I hope he's doing ok.

I've had thoughts like this, using sci-py to teach kids how to hack math. Our education system is kind of sad face.

Have you heard this Wolfram TED talk about the subject:

http://blog.wolfram.com/2010/11/23/conrad-wolframs-ted-talk-...

Re: Programming as a Way of Thinking

#22
This article starts to get at an idea that I've had for a while now -- that mathematicians are doing it wrong.

In the software business we learned a long time ago to name our variables properly, name our functions logically, and to control complexity by breaking ideas into modules and then hiding the details inside.

If you can't name something, then you don't know what it is, and that tells you that you should rethink your design.

Mathematicians don't do that. They name variables "a" or "x", or worse, they use some Greek letter I can't type on my keyboard. They are entirely inconsistent in their use of variables: "phi" or "theta" can mean a zillion different things. I can't tell you the number of times I've read a computer science paper, a paper that uses entirely unnecessary equations, and doesn't bother to define symbols. This practice wastes everyone's time.

It's laziness, pure and simple.

Mathematics needs a general overhaul. The language of math needs to a complete redesign with a focus on understandability. And the key to it is to force mathematicians to name their variables.

Yes, I realize that mathematics deals in abstractions that have little relationship to the outside world, and it makes little sense to call a variable a "dog" or a "car". So what? It just means that we need a new vocabulary, a vocabulary that includes terms like "fourier transform" or "hypotenuse". Pretty much every industry has it's own vocabulary. Chemistry has thousands of terms. Biology even more. Computer science is full of them. Math is full of symbols that have no inherent or well-understood meaning. That should change.

Re: Programming as a Way of Thinking

#23
post #22

This article starts to get at an idea that I've had for a while now -- that mathematicians are doing it wrong. In the software business we learned a long time ago to name our variables properly, name our functions logically, and to control complexity by breaking ideas into modules and then hiding the details inside. If you can't name something, then you don't know what it is, and that tells you that you should rethin…

Are you a mathematician? How much math have you studied?

Re: Programming as a Way of Thinking

#24
post #15

The canonical, award winning version of these ideas is described in Ken Iverson's seminal 1979 paper 'Notation as a tool of thought'[0] - highly recommended to anyone who finds the ideas discussed interesting (even if they find the scientific american article lacking ... because it is) [0] http://www.jsoftware.com/papers/tot.htm

Peter Naur's "Programming as Theory Building" (http://pages.cs.wisc.edu/~remzi/Naur.pdf) is also a closely related read.

Re: Programming as a Way of Thinking

#25
post #22

This article starts to get at an idea that I've had for a while now -- that mathematicians are doing it wrong. In the software business we learned a long time ago to name our variables properly, name our functions logically, and to control complexity by breaking ideas into modules and then hiding the details inside. If you can't name something, then you don't know what it is, and that tells you that you should rethin…

I don't like mathematical notation's ambiguity and opaqueness much either, but it is fairly important for the notation to be terse. It's more important than in software because so many proofs are about this being equivalent to that, and symbols give you a lot of room to work with, which you would not have with words. And I mean, the vocabulary already exists, papers just need to explain which symbol represents what. If a paper tells me that epsilon is the learning rate for some model, I know what that means and I can just keep it in mind when I read the math. I don't think I'd understand better if they write out "learning rate" over and over again.

Re: Programming as a Way of Thinking

#26
post #22

This article starts to get at an idea that I've had for a while now -- that mathematicians are doing it wrong. In the software business we learned a long time ago to name our variables properly, name our functions logically, and to control complexity by breaking ideas into modules and then hiding the details inside. If you can't name something, then you don't know what it is, and that tells you that you should rethin…

Are you a mathematician? How much math have you studied?

I'm a software developer. I need to understand computer science papers to get my work done.

I've studied enough. High school and several courses in college. Enough that I should be able to take it from here and learn on my own.

Re: Programming as a Way of Thinking

#27
post #22

This article starts to get at an idea that I've had for a while now -- that mathematicians are doing it wrong. In the software business we learned a long time ago to name our variables properly, name our functions logically, and to control complexity by breaking ideas into modules and then hiding the details inside. If you can't name something, then you don't know what it is, and that tells you that you should rethin…

Interestingly, 500 years ago, math was to your taste. There were not much symbols in it, but lots and lots of English (or, more often, French, German, or Latin) sentences that took paragraphs upon paragraphs of text to describe what today a couple of equations do...

Re: Programming as a Way of Thinking

#28
post #22

This article starts to get at an idea that I've had for a while now -- that mathematicians are doing it wrong. In the software business we learned a long time ago to name our variables properly, name our functions logically, and to control complexity by breaking ideas into modules and then hiding the details inside. If you can't name something, then you don't know what it is, and that tells you that you should rethin…

If a variable can be literally anything, what would you name it instead of 'a'? 'anything'?

Sometimes a variable does not refer to anything specific at all. For example, type variables in Haskell are often denoted using single letters, simply because they can be literally anything, and no sane human wants to type out 'anything' all the time, just so her code can be used as a beginner's intro to the language in question.

Re: Programming as a Way of Thinking

#29
post #22

This article starts to get at an idea that I've had for a while now -- that mathematicians are doing it wrong. In the software business we learned a long time ago to name our variables properly, name our functions logically, and to control complexity by breaking ideas into modules and then hiding the details inside. If you can't name something, then you don't know what it is, and that tells you that you should rethin…

I don't like mathematical notation's ambiguity and opaqueness much either, but it is fairly important for the notation to be terse. It's more important than in software because so many proofs are about this being equivalent to that, and symbols give you a lot of room to work with, which you would not have with words. And I mean, the vocabulary already exists, papers just need to explain which symbol represents what.…

But that's not our experience in software. We do write "learningRate" over and over again, because we've learned that that makes the code much more understandable that just writing "e". In fact, we've learned that excessive terseness in software is an anti-pattern.

Re: Programming as a Way of Thinking

#30
post #22

This article starts to get at an idea that I've had for a while now -- that mathematicians are doing it wrong. In the software business we learned a long time ago to name our variables properly, name our functions logically, and to control complexity by breaking ideas into modules and then hiding the details inside. If you can't name something, then you don't know what it is, and that tells you that you should rethin…

It's more standard than people realize. Offhand:

x: "some real-valued variable"

n: "a countable quantity, usually a total"

i: "an index"

k: "some kind of constant", often an integer, whose value doesn't change, "c" is also used for this

e: almost never used as a variable, it's Euler's number

p: some kind of probability, or a prime number, along with p and q

t: some kind of parameter, often goes from [0,1] or (0,1)

z: complex numbers

I have a Master's in EE so I've studied this a bit.

Post reply on HN