Hacker News new | past | comments | ask | show | jobs | submit login
Using Programming Language Concepts to Teach General Thinking Skills (2008) [pdf] (csail.mit.edu)
208 points by lainon on May 24, 2017 | hide | past | favorite | 30 comments



While I think programming can be a good way to teach general thinking skills like perspective, clarity, precision, and abstraction, I'm dubious about the claim that it is the best way to do so (§2.1).

Perspective - does learning multiple programming languages engender more awareness of different perspectives than say, learning multiple foreign natural languages?

Abstraction - does learning programming languages develop better use of conceptual abstraction than say, mathematics?

Precision and clarity - does learning programming languages develop better precision and clarity than studying philosophy and logic?

These are all empirical questions and no empiric data is provided. The lack of support in the argument for the conclusion given also hints that maybe learning programming isn't _the best_ way to learn clarity & precision after all.

Where I thinking learning to program stands out as superior is that it teaches a skill that is currently in high demand - programming.


Well, I think practical experience in programming can be[0] unparalleled in teaching one precision and clarity of thought. One could think that any hard science or engineering discipline would do, but the truth is, programming is unique - because as they say, you can't bullshit the compiler. You have to get the details perfectly right at all levels, or else your program either won't compile or won't work. In math, it's easy to just not realize your reasoning doesn't make sense. In science, it's easy to bullshit yourself with data. In engineering, well... you can't argue with nature, but your feedback loop is still much slower than in software.

I'd definitely say programming will teach you precision and clarity way better than logic and philosophy, because it's grounded in reality. If you want to build something cool and/or get paid, you have to actually think things through; the compiler won't be impressed by your long paper loaded with smart-sounding words.

Also, a side benefit here is that some time spent thinking about representing real world in programs lets one discover just how imprecise, messy and ad hoc everything is - doubly so if it involves humans. I'm sure I wouldn't internalize ideas like "map != territory" as well as I did if not for spending time thinking about modelling real world concepts in a computer program, and in the process realizing the "territory" they taught me in school was just a map (and a pretty shitty one).

> Abstraction - does learning programming languages develop better use of conceptual abstraction than say, mathematics?

I don't know. I haven't done much mathematics at the level when it gets interesting. I know algebra feels to me to require very similar kind of thinking as a lot of programming work.

--

[0] - I say "can be", not "is", because I've seen plenty of people who write code for a living, and yet their thoughts are as precise and reasoning as subtle as the Tsar Bomba. Somehow, some people don't seem to realize that the cognitive discipline they use when programming can, and should be applied to "normal life" too.


I think it works best with programming because you write your ideas in code and the compiler will quickly tell you that your idea is wrong, and you can't be mad at it because it is not a person. Now if a colleague tells you that you have no clue of what you are talking about... :)

But I agree that to reach a higher level, programming is not enough.


It is difficult to gather empirical data on human behavior and efficiency, so I wouldn't ding Rinard points for that (as a systems PL researcher from MIT, he surely knows how to measure numbers). You'll find the lack of useful empirical data for most any pedagogic technique (what we can measure is performance in simple tasks, by this doesn't scale up).

Math and philosophy are hella abstract, while learning through programming at least has the learner building something concrete that can be more gratifying. When maintaining the student's interest is much of the battle, it might not matter as programming is not better than the other approaches, it only needs to be good enough.


"[…] Students can work with them in an interactive setting that provides immediate feedback and requires completely precise thinking." --

Math and philosophy provide the latter but not the former. I guess the tight feedback loop programming provides guides us by reducing the solution space.


logic - not necessarily. But while math and most other sciences sprouted from philosophy, don't forget philosophy includes includes silly topics like "Is truth the same as beauty, and beauty the same as truth", or the nature of God. Personally I think these are bullshit topics. Philosophy definitely has capability for spending too much time on vague, subjective and poorly defined subjects. In contrast, there can be no ambiguity in a computer program.

Natural languages - in almost all cases they are used to describe the same concepts. Note books are are easy to translate to any language, even if you have to substitute lamb for guinea pigs in Bible. Everything else can be substituted almost word for word. Languages with substantially different syntax, like Japanese which uses reverse Polish notation (aka postfix), are rare. Verbs go to the end of the sentence in Japanese, that's why movies with Japanese often end up with characters screaming final bits of sentences. Without the end of a sentence, a Japanese can't be 100% sure what it's about. Now go ahead and translate Ruby to SQL, Rust to Javascript to Rust, Haskell to Python, HTML to vimscript, Logo/Processing to Bash, or Perl to anything else. I would say learning several languages with different paradigms and usage domains will be more useful for perspective.

I would say the value of programming is that it teaches being pragmatic, and using the right tool for the job. Math doesn't have to and often doesn't serve any practical purpose. Another big thing is it teaches problem solving and persistence.


> don't forget philosophy includes includes silly topics like "Is truth the same as beauty, and beauty the same as truth", or the nature of God.

That's like saying science includes silly topics like homeopathy and "conquering the seven signs of aging". Just because people claim they are doing science, doesn't mean that they are. The same applies to philosophy.


There is a middle way here. Currently-active fields in philosophy sometimes (usually?) lack bounded questions and precise answers, yet are not silly (ethics, for example.)

I don't think philosophy is about finding answers, the discussion itself is its purpose. Consequently, there is always the risk of generating closed, self-referential discussions in which the subject of the discourse is the discourse itself (post-structuralism vs. structuralism?) It also seems to be an accepted practice to hang an elaborate argument on nothing more than a personal opinion, as if doing so turned that opinion into an objective fact (I am thinking specifically of some of the arguments over consciousness.) For these reasons, I think you have to pick and choose from the offerings of philosophy if your goal is to teach general thinking skills.


>Just because people claim they are doing science, doesn't mean that they are. The same applies to philosophy.

No True Scotsman is not the way to go here. It never is, actually.


There are standards of science, where are the standards of philosophy?


>Perspective - does learning multiple programming languages engender more awareness of different perspectives than say, learning multiple foreign natural languages?

Honestly - I don't know. But I know from experience that learning different programming paradigms (structured, OOP, functional, logic, relational) is something very different from "Learning to write Fortran" in C, C++, Java, Python and Ruby. That learning Scheme without continuations or macros leaves most students with the impression that "[Scheme] can do everything C can [meaning iteration and if], but in a more weird way, so there is no use in this language whatsoever".


> Perspective - does learning multiple programming languages engender more awareness of different perspectives than say, learning multiple foreign natural languages?

Different perspectives on problem solving, absolutely. There is nothing comparable in natural languages to the paradigm shift required when first grokking logic programming or term rewriting.

> Abstraction - does learning programming languages develop better use of conceptual abstraction than say, mathematics?

You can think about the theorems involved in writing a todo list or balancing your chequebook, but to actually do these things you have to think programmatically. That makes programming far more applicable to most people's lives.

> Precision and clarity - does learning programming languages develop better precision and clarity than studying philosophy and logic?

Absolutely. Philosophy is muddied by the imprecision of natural language. You can't lie or confuse your computer, it's a strict task master.


Fascinating questions.

I am an applied mathematicians by educational background, while I am working more and more as a developer in my day-to-day job.

The answer that my personal experience gives to these questions is that programming has helped me a lot with precision and clarity. For me it probably boils down to the fact that a compiler is much more unforgiving than my own brain.


Math is over-abstract. At least programming often requires a concrete implementation. Mathematical expressions can easily have non-constructivity.


I don't know. I think general thinking skills are a pre requisite to understanding programming.

I've seen many people try hard to learn programming but fail miserably no matter how much they try.


Agreed. Furthermore, if programming can be a good way to teach general thinking skills like perspective, clarity, precision, and abstraction, why is there so much code lacking these properties?

I am particularly skeptical of the author's suggestion that developing a domain-specific language would be one of the ways to teach general thinking skills through programming. Absent an example to prove me wrong, I would think that writing a DSL is so laden with task-specific minutiae that those parts of the job that extend general thinking skills would be highly diluted.

On the other hand, I think programming helps with one thing: programs are, in some sense, half-way between the physical world of discrete objects, and the abstract world of words and symbols. I have seen it suggested (but I cannot find the reference) that all abstract reasoning developed from an ability to mentally model the physical world. If so, then programming may be a stepping-stone from the latter to the former (though only if it is taught as such; most programming instruction makes programming the goal, not a waypoint (which is not surprising))


I may be misreading the article, but the author doesn't suggest having the students write a DSL, but using DSLs with students so that they can focus on the specific problem domain. Think things like (classically) Logo, or recently Scratch.


I believe that approach is also mentioned, but I was referring to section 5, "Potential Teaching Approaches", and specifically 5.1, "Domain Specific Language": "This approach would organize the course around designing and implementing a language for computations in a particular domain."


It seems like there's an epistemic feedback loop. You have to have a certain baseline to learn to program, but programming, in turn, improves your cognitive abilities.


> I've seen many people try hard to learn programming but fail miserably no matter how much they try.

It's all about how you approach it. The vast majority of texts present programming largely the same way, but obviously that way just won't click with some people. These people might be much better with visual programming languages to begin with, for instance.


Taught on paper with psuedocode is the best way I've seen it introduced.


The problem is when the student tries to write their own code. I'm not talking about anything complicated. Just simple imperative logic.

You can explain to them an example code and they would nod and say they understand, but when it comes time for them to write code, they can't.


I'm Dutch, and in the Netherlands, for a certain level of high school, Latin and Greek are required.

Learning Latin, and its framework (grammar) has been very helpful to me in improving my German, Italian, French and Portuguese (I like languages). However: it's important to have a solid grasp on one (mother tongue) language.

If you look at LearnXinY, you can see a lot of semantic parallels between most programming languages.

I've been developing web apps since 1996 (Perl > ColdFusion > PHP and mainly Ruby/Rails these days) and found that, intuitively, it's not so much the programming language itself, but rather the act of programming itself that helps me think more clearly.


When programming you learn practical ways to distinguish between good and bad abstractions. A good abstraction should make it easier to reason about given problem and make you more efficient. A bad abstraction complicates the problem or even makes it impossible to solve because of the assumptions imposed by the abstract system.

The skill to tell apart working vs non-working abstraction is useful in real life. For example to distinguish a religion from a cult, you don't study the bible or some other holy book, instead you look how that abstract believe system has been working so far, e.g. by checking how many generations have been successfully raised with it and how much progress they made.

You also learn that almost every programming abstraction is leaky to some extent. You are very likely going to run into edge cases where the abstraction needs to be adjusted or replaced with a lower level one in order to get things done. Again, using the religion analogy, sticking to the dogma that the Earth is 6000 years old is going to make it impossible to reason about e.g. the theory of evolution.


> For example to distinguish a religion from a cult, you don't study the bible or some other holy book, instead you look how that abstract believe system has been working so far, e.g. by checking how many generations have been successfully raised with it and how much progress they made.

Note - I am not an expert in any of this, but that said:

“In a cult there is a person at the top who knows it's a scam. In religion that person is dead.” - Anon

Examples:

Mormonism - started by a known documented and convicted con artist

Scientology - started (apocryphally) because of a bet

Both of these new religions, both started within the last 200 years (1830 for Mormonism, 1954 for Scientology), the former having in common only certain general themes with Christianity, and then ret-conning new material in to complete the "history", and the latter making up everything out of whole, bad sci-fi cloth.

One could easily argue that all religions started out as cults; certainly what we know of the historical parts of Christianity makes it a likely candidate. Likely only the very earliest naturalism-based quasi-religions lost to pre-history are among the only ones which could honestly count as "pure".

Not that any of them have led to honest understanding of the world (I will allow for philosophical introspection and discussion, which definitely and ultimately led to our current scientific methods, though those methods too were influenced and pre-empted by earlier non-religious philosophical methods, particularly those by the early Greek societies).

Again - these are my (perhaps flawed) understandings, though I am open to learning more, even if that new knowledge contradicts what I already know...


An abstraction layer can be still useful even though its core assumptions don't reflect the reality and could be easily disproven by a scientific experiment. Take classical physics for example.

Just to be clear, I was not defending any religious system here, I just meant it's easier to judge their usefulness based on a practical basis because of their complexity.


The problem with this is that the level of thinking required to implement is a level below that required to give it context, context and nuance is the key differentiation for understanding vs rote memorization.

This is a skill which can still be developed though, through reflection and case study.


Factorio does an amazing job teaching programming concepts without even noticing.


Programming def helped me understand exactly what focus means - making sure all details are intentional.


General writing skills teaches thinking skills. We already have DSLs for humans to communicate human ideas.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: