Live data from Hacker News

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

ask.slashdot.org

101–110 of 199 posts

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

#102
post #53

I actually subscribe to the theory put forth in Structure and Interpretation of Computer Programs by Abelson and Sussman http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-9.html#... Essentially, "computer science" is a myopic name for what is really "process studies." It just so happens that defining processes to run on computers is forwarding the field more than any other. But in the distant future we will all un…

Essentially, "computer science" is a myopic name for what is really "process studies." Actually the name isn't myopic at all. Computers are basically entities that follow instructions. There was a time when the definition for the word computer was a person who did computation processes.

James Gleick's The Information has a good description of those people, and is a great read otherwise as well.

http://www.amazon.com/Information-History-Theory-Flood/dp/03...

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

#103
post #56

Earlier quoted context omitted.

The worst code I've seen is from programmers who had no mental model of what they were doing, just changed things at random until tests passed. The worst writing I've seen: * is ungrammatical to the point of incoherency * loses its train of thought mid-sentence and talks about something unrelated * is full of irrelevant details * simply ignores everything above the sentence level, producing mere text, no argument, st…

Not really the same failure modes. Really? Because except for the first one (which we have compilers to thank for), your three remaining points apply equally well to a lot of code I've seen.

Even if you are working in a compiled language, you still can't always rely on the compiler. The compiler will not stop a programmer from writing invalid code, without any tests, and checking it into a repository, where it silently waits for an unsuspecting programmer to discover it months later....

"How do I do what I want here? Aha, someone already wrote ExactlyWhatIWantHere.... WTF, it doesn't even compile? But how is anyone using it? Oh, it's not being used anywhere? How the heck did it get here? Ugh..."

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

#104
I don't think they are the same thing at all. I've been practicing literate programming for a decade now, but my brain still has to switch gears when I go from writing up the English-language description of an algorithm to writing the algorithm. A good description of what an algorithm does (e.g. "This function finds the largest subset of edges in the graph which could be removed without disconnecting the graph") is very very different from the code which does that, and requires very very different kinds of thought.

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

#105
post #67

Earlier quoted context omitted.

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.

> The fewer ways to express something, the better. Your last sentence could be rewritten "It is better to express things in as few ways as possible", or "Having fewer ways to express something is better". English, however, allows you to omit the main verb for the causation in a parallel construction, you were able to write it shorter, and with a 3-syllable climax after a pause at the end for effect. Shouldn't program…

No, because that makes it harder to understand what it's doing. Remember that programming languages are not learned at a very young age and continuously trained for decades the way natural languages are.

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

#106
post #19
post #5

So what's good example code? Sadly (and tellingly) it's not necessarily the most successful code (success comes from meeting user needs, not from good code), but how else can you judge it, apart from reading it. This is made worse because it's hard to tell if code is necessarily complex without understanding the problem it solves, which may be complex. Further, if you don't yet know what good code is, how can you rec…

Sadly (and tellingly) it's not necessarily the most successful code (success comes from meeting user needs, not from good code), but how else can you judge it, apart from reading it. Schools have suggested reading lists. Do they have the same for code reading ? Fortunately, on the Internet, we have experienced people to help us: http://www.hnsearch.com/search#request/all&q=%22good+cod...

Beautiful Code: http://oreilly.com/catalog/9780596510046

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

#107
post #68

Earlier quoted context omitted.

I think you can check off everything on this list and still write inscrutable code. The worst code I've seen is code that was written so that only one person understands what's happening -- the author. Typically the code has too many branches and ridiculous call stacks. The writing analog is a run-on sentence. This usually happens when the programmer at fault is really smart but still hasn't learned that at some poin…

Titling people editors, the ones that are senior in an organization and might be titled as architects or senior engineers, now, would be incredible. With their current titles they are involved much more at the beginning of the process than at the end, when 'editor' implies the opposite. It would be nice to have the senior folk guide the developer as opposed to handing off a blueprint and getting out of the way. (Not…

Agreed. And here is an example where, without comment scores, it is impossible to know how many other people feel the same way.

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

#108

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.

I disagree so hard. Computer programs should be written primarily for humans to read, and only incidentally to be executed by computers. The connection between writing and programming is vital: they are both the practice of expressing structured ideas. It has nothing to do with the computer. It has nothing to do with the English language, or Vim, or Word. It's about starting with an idea and hacking away at it, removing ambiguities and possibilities, until only something unique remains.

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

#109

> Japan is somewhat famous for churning out students who know a lot about English, but can't order a drink at Mac Donald's. An old friend of mine had a master's degree in French literature. She used to live in Ottawa, Ontario and was fond of a pizza place just across the river in Hull, Quebec. One day she called to order a pizza, and when it came time to ask for it to be delivered she realized she didn't know how. Sh…

Translation?

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

#110
post #53

I actually subscribe to the theory put forth in Structure and Interpretation of Computer Programs by Abelson and Sussman http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-9.html#... Essentially, "computer science" is a myopic name for what is really "process studies." It just so happens that defining processes to run on computers is forwarding the field more than any other. But in the distant future we will all un…

processes == algorithms, right? Doesn't seem very mind-blowing to me.
Post reply on HN