Live data from Hacker News

Programming as a Way of Thinking

blogs.scientificamerican.com

101–110 of 133 posts

Re: Programming as a Way of Thinking

#101
post #44

Earlier quoted context omitted.

This article starts to get at an idea that I've had for a while now -- that mathematicians are doing it wrong. And you're making a typical programmer mistake in thinking that. Programming is geared towards having people who are experts in programming, but not in a specific subject area, be able to develop and maintain code. Therefore practices like descriptive variable names help provide context to people who cannot…

True, much of math is relegated to experts. This is _exactly_ the problem. Why do you think so many adults have such little understanding of math and will proudly proclaim that they haven't used algebra or geometry in their adult life? Yes, there are are some areas of mathematics that are extremely specific and do require experts but a lot of math is useful to people in general and anything we do to make it easier fo…

The problem is that you can't really "think mathematically" without concise notation. Your brain won't hold the ideas.

The more that you get to stuff that you juggle around, the more that conciseness matters. So an important concept like "eigenvector" can have a lengthy name, but your vector is v, linear transform is T and the matrix representing the transform is M. Any other choice is actively harmful.

Re: Programming as a Way of Thinking

#102
post #99

"The computer revolution is a revolution in the way we think and in the way we express what we think.", SICP, 2nd Edition. The article misses what I believe is the most important point, which is the concept of the abstraction of a function. A function is more than a computer concept: a function is a hammer, a violin, and a microscope; you put an input and you get an output.

Not only that, but you can then realise that functions are manipulable objects too, and have operations of their own--eta abstraction, reduction, composition, etc., and can be used to build all of modern mathematics pretty much from scratch.

Re: Programming as a Way of Thinking

#103

Not sure what I was expecting from the title, but for sure not what I read. Maybe I'm quite old now, but working with latches and switches was always a way of thinking. Writing awful BASIC with GOTO and subroutines was not that different. Writing OO code is quite different at first impact but then you discover that it is basically the same way of thinking. The real way of thinking of programmers doesn't have anything…

Good point, I think it's about finding the 'correct' ways to break small parts together into a solution for your problem. We certainly have some tools to help us along the way--OOP, FP, etc.--but there's definitely an element of craftsmanship to it.

Re: Programming as a Way of Thinking

#104
post #9

The author focuses on the algorithmic and computational aspects of programming. Yet, nowadays programming is much more than this beautiful classical view on programming. Programming is more about describing a complex system by taking into account such aspects as concurrency, cross-cutting concerns, asynchronous events, transactionality, distributed computations etc.

You might want to check out the author's book titled Think Complexity....

Re: Programming as a Way of Thinking

#105
post #58

Earlier quoted context omitted.

What about symmetric vs antisymmetric? My professor even warned us about how the names can be misleading (it is possible to have a relation that is both symmetric and antisymmetric).

In this case there's not really a naming problem either. The confusion comes from the idea that ((A -> B) && (A -> ~B)) is sometimes true. Capturing that subtlety in a name doesn't seem practical to me.

I'm not sure I understand. The problem with symmetric/antisymmetric is that the names make students think they are related and this can lead to misunderstanding (e.g. "since this relation is antisymmetric, it cannot be symmetric"). Arguably, this confusion would not exist if they were named differently.

Re: Programming as a Way of Thinking

#106

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.

Did anyone else, other students, find his methods effective?

For sure - I can think of several other students who took his class and are now doing extremely well in Computer Science careers. Of course I don't have statistics on that or anything, but there's a large group of graduates from my school who were extremely upset when they found out what the school did to him.

Re: Programming as a Way of Thinking

#107

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.

You should try to find him and say hello.

I'll have to email him - I was planning on doing so once I finish my senior honors thesis in CS education (which I'm dedicating to him).

Re: Programming as a Way of Thinking

#108

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.

It was definitely cool - he had us writing python functions to estimate the area under a curve (and then visualize it), and other things I don't quite remember at this moment. Once he made us define math functions just based on there being a 0, and a successor function, which happens to be what I'm doing in a graduate Math Logic course at my university.

Re: Programming as a Way of Thinking

#109
Pete Naur's "programming as theory building" is an excellent read on the topic. Not only on the executable code front, I've also found the type notation used in Haskell to be a great modeling tool using which I can check the consistency of what I'm designing. I'm not talking Coq level proofs here - just an elegant notation that you can use on paper as effectively as in code.

Re: Programming as a Way of Thinking

#110
"With a computational approach, we can go “top down”, starting with libraries that implement the most important algorithms, like Fast Fourier Transform. Students can use the algorithms first and learn how they work later."

The "Learn how they work later" part sends out alarm bells to me. I don't have a lot of confidence that students will be particularly motivated to dig into how an algorithm works after their problem has been solved I fear this will lead to a generation of "just use $x package" and people blindly plugging in "magic algorithms" without understanding their choice. "Quicksort for everything" or "include leftpad" if you will...

I see it a little in my industry (Engineering) "oh your data is noisy just apply a kalman filter" never mind if it is appropriate or not.

Post reply on HN