Live data from Hacker News

"My current theory is that programming is quite literally writing."

ask.slashdot.org

31–40 of 199 posts

Re: "My current theory is that programming is quite literally writing."

#31

It's a nice theory but I disagree. Programming languages are really just a poor effort towards a mathematical notation. There are those adept in theory that can't practice well, but that's because to practice the art means dealing with a plethora of hacks, exceptions and miscellaneous trivia completely unrelated to the core problem at hand. Personally, I don't think the answer is becoming 'fluent' in handling the exc…

How is mathematical notation different from a written language like English? It conveys meaning using glyphs, uses nouns and verbs (and even adjectives). It expresses all sorts of ideas. One might even say that math's notation is a poor effort towards English.

Re: "My current theory is that programming is quite literally writing."

#32
post #8
post #3

I think he's right. In college, my CS 2 class was taught by a professor very different than the rest of the teachers there. He wanted all of your programming assignments on paper[1]. Then, you'd get it back with every possible bug marked in your program, and he very rarely missed any[2]. That was the first time in college I thought "I really need to learn how to do that!" I went to a state school, so maybe all you gu…

From what I've heard, professors in prestigious schools aren't any better at teaching. They're hired for their prestige and research ability.

More accurately, their grant-winning ability, which is a function of prestige etc sure, but it's not why they're hired.

Re: "My current theory is that programming is quite literally writing."

#34
post #16

Most code sucks because we have the fluency equivalent of 3 year olds trying to write a novel. Let's get a little more specific... Most code sucks because the programmer: - didn't name his variables what the really were - didn't understand variable state - didn't understand variable scope - didn't understand the basic concepts of iteration - didn't understand any of the algorithms he needed - wrote the same lines of…

All of those are absolutely true, and many of them reduce to one thing

    - didn't have a frickin' clue what the code was supposed to do
I remember reading the old cartoon (and it was already old when I saw it 25 years ago) of the manager saying "You guys start writing code, I'll go find out what they want", and swearing I would never be that kind of manager only to find, all those years later, that many of my programmers had already internalized the notion and routinely sat down to write code without having a clear idea of what the block of code was supposed to accomplish.

Re: "My current theory is that programming is quite literally writing."

#35
post #6

I'm a little suspect if this analogy goes beyond "theoretical understanding without practical experience is worthless". You could draw a similar analogy between architects who know everything about architecture but don't know how to design proper buildings because they have no experience. Or painter who knows everything about technique but can't paint a horse and so on. It is easy to find differences between good wri…

Uniformity in code is bad - it tells you that there's a common concern or pattern which should be factored out. Uniformity in code style is essential, the same way it is for prose.

Re: "My current theory is that programming is quite literally writing."

#36

This is a decent analogy, but still I cringe whenever I hear someone comparing computer languages to spoken ones. They are nothing alike, and I would be honestly surprised if we even used the same part of our brain for processing the grammars of human languages as we do for the rigid, formal computer ones. If this were true, how come not all great programmers are great writers? Why don't more great programmers become…

>If this were true, how come not all great programmers are great writers? Why don't more great programmers become fluent in other spoken languages?

Why doesn't Mark Twain have any novels written in French? Why would you hold computer programmers to a greater standard than any of the great authors?

Re: "My current theory is that programming is quite literally writing."

#37
post #29

I find it fascinating that Python seems to be the only language which created a word to describe idiomatic code: pythonic. Having learned Python as a first programming language I always try to gain an idiomatic understanding of the language which allows myself to think in Python.

Rubyish, perlesque, lispy are all words I've come across.

Re: "My current theory is that programming is quite literally writing."

#38

Programming isn't about writing. It's about logic. It's a series of instructions for a computer to follow. The old 'write down how to tie shoes' or 'write down how to make a peanut butter and jelly sandwich' projects show just how hard it can be to pin down exactly what needs to be done to do seemingly simple tasks. The writing is merely how to you transmit the logic.

Are you not contradicting yourself here?

Re: "My current theory is that programming is quite literally writing."

#39
post #20

His theory might be true if you were only talking about writing a program from scratch. But programming is a lot more than that, because except for the smallest, most trivial exercises, programming is a team sport. Which means you need to be able to understand somebody else's code, and you also need to be able to modify it in a way that makes sense. You can have a program which is beautifully structured, and factored…

Ask a novelist about the pains they have when the extremely clean, excellent plot fails due to some small point, and they have to adjust it.

Re: "My current theory is that programming is quite literally writing."

#40

It's a nice theory but I disagree. Programming languages are really just a poor effort towards a mathematical notation. There are those adept in theory that can't practice well, but that's because to practice the art means dealing with a plethora of hacks, exceptions and miscellaneous trivia completely unrelated to the core problem at hand. Personally, I don't think the answer is becoming 'fluent' in handling the exc…

How is mathematical notation different from a written language like English? It conveys meaning using glyphs, uses nouns and verbs (and even adjectives). It expresses all sorts of ideas. One might even say that math's notation is a poor effort towards English.

Language can be expressive in ambiguous ways, with multiple valid ways to express the same emotion. Notation should be definable, unambiguous, and precise. The fewer ways to express something, the better.
Post reply on HN