Live data from Hacker News

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

ask.slashdot.org

11–20 of 199 posts

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

#11

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.

  The writing is merely how to you transmit the logic.
The author of the post seems to me to be saying that, given that logic of a great number of programs can be pretty simple, the way you express the logic becomes more of a concern.

Take the following:

  @post.comments
Compare it to:

  $this->post->findDependentRowset('Comment');
Both mean the same thing, but the latter seems like the programming equivalent of purple prose by comparison.

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

#13
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 exceptions and idiosyncrasies of the chosen language, framework and platform. Rather we need to work on building a notation that provides better abstraction mechanisms.

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

#14
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.

All true facts unfortunately. To get better teachers you have to attend a "teaching" college/university. This name is detrimental, as most students would probably be happier at such a place. The "research" university really isn't for everyone but they get the most prestige and people think, oh I should go there learn from the "brightest mind in the field".

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

#15

He is right. Good writing is sussicint, concise, and says a lot with a little. Good programming is clear and does a lot with a little.

In some cases good writing says a lot with a little, but by no means is that always a requirement for good writing.

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

#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 code multiple times
  - didn't know enough about the language to find a better construct
  - didn't understand concurrency
  - didn't understand fundamental data base concepts
  - refused to follow well worn standards
  - didn't have any well worn standards to follow
  - built code on top of hopelessly designed data structures
  - didn't understand deeply enough what was going on under the hood
  - built to requirements that changed too dramatically to recover from
  - didn't even consider the concerns of the "next" programmer
But most of all:

  - was just good enough to get "something" (no matter how bad) deployed on time

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

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

> I actually don't know of any case where he did, but I'm not saying "never."

If he missed it, chances are, pretty much any student would have as well.

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

#18
post #10

Oh come on. Programming is not writing. When you're reading a novel you don't have to worry about concurrent access to a resource, threads, asynchronous events, or even much less conditional branching. With all due respect, I think this is just an inane post. That said, I can't blame the guy for dropping software development and moving to Japan to teach ESL. I often entertain similar fantasies all the time - programm…

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 thing, which I don't think anyone is saying, but there are some similarities there, especially the aspect of writing readable code.

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

#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...

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

#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 in an extremely clean way. But what happens when you have to modify it in response to a change in requirements? And what if you have external code that depends on the existing interfaces? At that point, the skills needed to be a good programmer are quite different from that of a writer.

Post reply on HN