Live data from Hacker News

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

ask.slashdot.org

171–180 of 199 posts

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

#171

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, remo…

I disagree so hard. Computer programs should be written primarily for humans to read, and only incidentally to be executed by computers.

The funny this is that the same is also true for mathematics.

Mathematicians writing proofs and theorems are communicating with other people, not (usually) with machines.

Mathematical notation is s means of human-to-human communication. Yet anything but the most trivial math soon becomes inscrutable to the untrained. As far as I can tell, mathematicians are mostly happy with this. The language used allows for precise, compact expression of complex (i.e structured) ideas. That understanding requires training and rigor is not considered inherently bad.

For whatever reasons the same terseness and concision is derided by many programmers who seem to believe that ease of understanding by the moderately skilled is highly important.

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

#172

Earlier quoted context omitted.

This is called taking an analogy too literally.

I'd say its called creating an analogy where one shouldn't. As a general rule, and maybe I'm too influenced by Dijkstra -- don't introduce metaphors/analogies where you can reasonably talk w/o one. In this case, no clarity was introduced by its addition. It's like adding gravy to mashed potatoes. Sure it may make the potatoes taste better, but now you can't put the gravy back in the gravy bowl, can you?

I saw what you did there ;-)

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

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

>in the distant future we will all understand the field to be about abstractly defining processes i.e. a series of repeatable steps to accomplish a task.

That's how CS started. Long before we had anything recognizable as computers, we had the likes of Turing providing formal mathematical formulations of abstractions that would be realized later.

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

#174

Earlier quoted context omitted.

The value of Stanford, MIT, CMU, etc. isn't that the professors are so good at teaching; it's that they are smart student aggregators. Nothing motivates you like not being the smart one anymore.

That might be true of some people. For someone coming from a small town where everyone told him that he would go on to do amazing, wonderful things, it can be very depressing for him to learn that he is nothing special.

It certainly motivated me.

(former small town kid, went to Carnegie Mellon and realized I wasn't "the smart one" any more)

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

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

First job out of school was Andersen Consulting. Went to their programming boot camp which was two or three weeks of 14-hour days learning their methodology and (sigh) COBOL. One of the final assignments was to write the code for a particular set of requirements. Then desk check it (i.e. on paper) until you were certain it was correct. Then you saved it and submitted the file. You got one chance, it had to compile cleanly and pass their suite of tests.

Most people passed; it was not a "gotcha" problem, you just had to be able to read carefully and pay attention to detail. Andersen hired a lot of liberal arts majors who had done a lot of writing, I was one of only a few in that group who had done a C.S. curriculum.

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

#176
It is known from an ancient times, that knowing a language does not make you a poet. Programming is like writing poetry - to put a known words in a some special order. We all know those words, but very few can manage that order without losing the meaning.

The second big thing is the difference between understanding and realization. Most people have understood something more or less, but very few have their own realization. There is huge literature on the subject.

And the big picture is very simple - the phenomena discribed is called the lack of practice. The major fallacy is that you cannot compensate the lack of practice by studying (reading HN) more theories.

I know that, because I was suspended exactly for lack of practice in English, co I cannot convey my views and put my opinions in pleasant words. Reading and writing is two very different cognitive tasks..

So, they think I'm a troll. That is how it works.

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

#177

Earlier quoted context omitted.

meh. i work at a small shop. most of the code i see that sucks was written by competent programmers under high schedule pressure. the code is clearly not well understood anymore, but if you trace the history you can see it's due to a few years of tacking on features as quickly as possible. the technical debt surely slows us down sometimes, but hey that was a business decision, maybe even a correct one! core business…

I get tired of the "blame the shitty programmers" line of thought. We're all shitty programmers. Yet we all "understand variable scope" and "what the code was supposed to do." Some of us have such a large ego that we think it's others. No, Sancho. It's you. Code gets complex as hell very quickly. If it was building a house, it would be built in a week and architected on the fly. The person mixing the concrete, who ha…

That's SENIOR Sancho to you, bub. :-p

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

#178

Earlier quoted context omitted.

"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 an…

Of course, the French Academy tries to crack down on this; I remember cases like trying to push out "email" in favor of the native "courrier électronique" (literally: "electronic mail").

AFAIK in Quebec the preferred term is "courriel", which is a portmanteau of "courrier électronique" in the same manner that "email" is a portmanteau of "electronic mail". (Funny that we're talking about Anglicisms in French, given the vast number of English words of French origin - like "portmanteau".)

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

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

If you don't work in the code you shouldn't get an opinion and giving one to someone like that is asking for trouble. At the end of the day, it will be a developer who feels the pain, not the architect. There really is no incentive to do a professional job if it doesn't make your life harder later (sometimes that isn't even true).

*professional means good quality balanced with maintenance and time available during development.

Just putting this out there, besides the undoubtedly negative sentiment it will bring. Try pairing. You don't have to do it all the time, but if you are working on something that you have to think about, bring another developer over. The best way to ensure what you are writing is good is to get another set of eyes on it. Preferable a set that will actually need to do something with the code at some point.

Post reply on HN