Live data from Hacker News

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

ask.slashdot.org

111–120 of 199 posts

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

#111

> 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?

"Yes, delivery. We can do it."

Edit: - I should point out that the French word for delivery is livraison; but like most languages, day-to-day Quebecois French is porous enough to borrow words from other languages where expedience warrants. Hence le week-end (not le fin-de-semaine), frencher (to French kiss), etc.

As a further digression, I should point out that it seems less common (i.e. less acceptable) to drop anglicisms into informal Quebec French than in Europe, where native French speakers do not feel threatened by a dominant continental Anglo culture. I was amused on a recent trip to France to learn that the French word for wifi is "wifi" (pronounced wee-fee). Since wifi is short for "wireless fidelity", a more canonical French term would be something like fidélité sans fil.

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

#112
post #18

Earlier quoted context omitted.

And in programming you don't have to worry about capturing the audience, the development of the characters, the story arch, being clear but not being obvious, etc. Both in programming and writing, the actual writing part is the easiest part. And while bad programmers can make a program work, and bad writers can tell a story, it takes good ones to do it coherently, efficiently and enjoyably. It's not the exact same th…

They're not nearly the same thing. The scope of modern literature has hardly moved in hundreds of years. Compare Updike, Roth, or Mitchell to Dante or Shakespeare -- they'd seem like near contemporaries in programming. In contrast, in the past, programs to do Newtons method or compute trig tables were often the full scope of a program. You certainly never had a Halo 3, Windows 7, Google Search, or WordLens applicatio…

They have one more thing in common; the text is read by other people. And the better written, the more effortless it is to understand.

I think this aspect of it is what the slashdot author is mostly talking about, suggesting that if you write code as if you were writing to the next programmer, rather than to just the computer, your code will be better for it.

Clearly, programming and writing isn't the same thing. Nobody is claiming that and, guaranteed, nobody here thinks that. It's a metaphor and like any other metaphor it breaks if you bend it enough.

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

#113

> 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?

"Yes, Delivery, We can do that"

Or at-least I think that is what it means.

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

#114
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…

At Georgia Tech up until 2000 or so.

In the class it was often referred to as psudocode, but unlike psudocode in examples in random books/specs, it had a real syntax and you had to put everything you would in a real language or you'd get points off.

It was a great way to learn programming (and teach it too).

*(To disambiguate for the left cost people, GT isn't like ITT, it's of quality closer to Caltech, but much cheaper. Best salary for the tuition school in the nation apparently today)

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

#115
post #52
post #44

Earlier quoted context omitted.

Is it? In prose you say "first he rushed to the exit door, then he leaped down the stairs, finally he ran to get the train" while in programming it is better to write socket.close(); window.close(); file.close()

Better prose is: "He rushed to the exit, leaped down the stairs, and ran for the train." Better programming is to factor out the action: [socket, window, file]*.close()

Indeed. Programming is more like writing math than natural language.

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

#116
I disagree.

Programming definitely requires writing skills (expressiveness and concision most importantly)

However it's about structurally combining that writing into maintainable code, using idioms of the past to build upon to gain error free use. It's about mentally modeling what parts of the machine are doing, and correctly understanding those interactions. It's about risk assessment, experimentation, knowing when to call something quits. It's about going back over old world to do it a better way. It's about decomposing a complex process into many simpler steps. It's about reading, reading lots in fact, usually reading to find out details of the bits of your mental models.

Programming really isn't anything other than programming. It's not any field like it or near to it that knowing a nearby field plays well into it (electrical engineers can make horrible programmers but brilliant electronics guys same goes for web designers), but lots of other skills parlay well into getting you partway into the panoply of skills that get you past the finish line.

People make bad programs code when they only have part of those skills (or when they do not put out the effort to use the skills they have, due to time or willpower restraints).

Another reason some programs suck: they picked the wrong problem to code.

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

#117
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…

At Georgia Tech up until 2000 or so. In the class it was often referred to as psudocode, but unlike psudocode in examples in random books/specs, it had a real syntax and you had to put everything you would in a real language or you'd get points off. It was a great way to learn programming (and teach it too). *(To disambiguate for the left cost people, GT isn't like ITT, it's of quality closer to Caltech, but much che…

As in, you didn't get to execute code on a computer at all?? That seems kinda odd--I think a large part of the pleasure of programming, for most people, is seeing your code actually do something. I think Logo was captivating because made this aspect especially prominent.

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

#118
post #117

Earlier quoted context omitted.

At Georgia Tech up until 2000 or so. In the class it was often referred to as psudocode, but unlike psudocode in examples in random books/specs, it had a real syntax and you had to put everything you would in a real language or you'd get points off. It was a great way to learn programming (and teach it too). *(To disambiguate for the left cost people, GT isn't like ITT, it's of quality closer to Caltech, but much che…

As in, you didn't get to execute code on a computer at all?? That seems kinda odd--I think a large part of the pleasure of programming, for most people, is seeing your code actually do something. I think Logo was captivating because made this aspect especially prominent.

Yup. The point was to make people not randomly throw guesses at the compiler like the monkies flinging poo experience many people have, but instead you had to learn how it worked, and think the right way to write the right thing.

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

#119
post #107

Earlier quoted context omitted.

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.

The best approach — with or without upvotes — would be to ask people if you want that information. Upvotes wouldn't reliably provide it — I and many others feel the best use of the voting system is to promote insightful and thought-provoking comments even if I don't believe they're ultimately THE right answer, and we vote accordingly.

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

#120
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…

I usually recommend the source to Lua, SQLite, and the BSD userland utilities (grep, awk, etc.). For C, at least.
Post reply on HN