4 ms·
Interesting idea, and indeed there are a lot of parallels between writing arguments and writing programs. But the title gives me pause, because the acts feel s
by rauljara 15y ago
Interesting idea, and indeed there are a lot of parallels between writing arguments and writing programs. But the title gives me pause, because the acts feel so very different. A gigantic difference is that, in an essay, your idea can still be communicated even if it is expressed ungrammatically, even if you skip certain steps. Your audience can often correct your grammar, and fill in your gaps. A computer is far more dumb, and simply will not be able to run your program if you use illegal syntax or forget to actually write a function.
The absolute demand for precision makes the two acts feel very different. Rigor is enforced in programming. Rigor is the responsibility of the writer when it comes to presenting an argument. And I don't even know if it would be desirable for a writer of words to exercise as much rigor as a writer of programs.
Not that I'm necessarily disagreeing with the author. Just thinking out loud.
- skermes 15y agoA lot of people bring up the idea of rigor when I compare prose and code, and I think it's really overemphasized. Just think of English as a language with a really flexible type system that lets you duck type the hell out of everything. In Python, I can write a method that expects a file object, and (at least the last time I used urlopen, which was a while ago) you can pass it something you open from across a network, and a lot of it will still work. Accidentally using a network resource instead of a local resource isn't particularly rigorous, but Python makes it work. English is that, but more so. The key line for me is "... it's hard to use metaphors in writing. It's simply more abstract." I have this working theory that abstraction in programming language is more or less equivalent to metaphor in person language. The core idea behind metaphors is to create a convenient lie that helps expose some aspect of what you're talking about by comparing it to some other domain. Consider my last paragraph. English has no type system. Telling you that it's duck typed is a lie, in the sense that it isn't true. But as a metaphor, it's convenient because lets me unify two ideas (programming languages and regular languages) under one aspect (things that have degrees of rigor). Similarly, having an abstraction over local files and network files lets me take two things that are accessed very differently, and let me pretend they're the same. It's a lie, but it works. I'm not really sure how the abstraction==metaphor relation holds under closer scrutiny. I'm also not certain that it's particularly useful in terms of helping me make better programs, but I like it.
- rauljara 15y agoI don't think English as a duck typed system works either. You can make a logical leap in an argument and nothing crashes. Many people have made very successful careers based on logical leaps, in fact. But you can't make leaps with computers. If you forget to tell the computer which file to load, it either crashes, or nothing happens.
- yew 15y agoOn the other hand, it's definitely possible for a language's interpreting infrastructure to deal with ambiguity in code. The difference between "natural language vs type inference" and "type inference vs assume it's an int" strikes me as quantitative rather than qualitative. You'd need a monstrously complicated system of logic to make it work, though. I'm not sure whether that thought's interesting or frightening...