views:

469

answers:

19

I'm not looking for an outsider's definition of programming (which is easy enough to find). Rather I'm asking for an inside baseball answer. When you sit down in front of keyboard and screen and start working, what are you doing?


This question was inspired by: http://stackoverflow.com/questions/475072/how-exactly-do-you-judge-how-well-a-programmer-performs.

+4  A: 

Programming is the art and science of building and maintaining computerized models of ideas, concepts and systems.

Three points I'd like to pull from this definition:

  1. We can't really say that programming is strictly an art because there are definite right and wrong ways to accomplish a task. A programmer must know something about how their code will be interpreted by the machine that reads and executes it.

  2. Every program is a model of something. Perhaps, as in a simulation, it is a model of something physical. Often, however, the thing that is modeled is something abstract. For instance, a standard GUI paradigm is "windows" which have almost nothing to do with physical windows. Rather, GUI windows are modeled after an interface concept that has been developed over many years.

  3. Some people working with HTML may very well be programmers since they are creating a model of a document on the computer. If tags are used to improve the model of a document, it is in fact programming at a low level.

Jon Ericson
IMHO programming is about behavior, not static structure.
Robert Gould
Hmmm... HTML can produce different "behavior" on different browsers. The <h1> might make text large and centered on one browser and make it bold on another. In addition, most models are quite dynamic, though the code itself is largely static. I guess I don't understand what you mean.
Jon Ericson
HTML does not have flow control as such. There is no "if->else" or "routines(functions)" in HTML proper. So it has no behavior. Not more than a MS-Word document at least. So it's not programming. Using CSS and Javascript to give the document behavior on the other hand is programming
Robert Gould
+2  A: 

I see it as the flow of information. I think about elegant and readable ways in which I can channel and alter that information

Harry
A: 

Programming is solving word problems, just like those tough ones in eighth grade math. Except it's more difficult.

Accomplishing difficult things with skill and a bit of flair is one of the most fun things a person can do.

Zan Lynx
A: 

Programming is "writing software".

HTML is arguably data (input to a browser) rather than software.

Software itself is also, arguably, data rather than software (input to a compiler, intepreted by microcode), but then again not (software is software).

ChrisW
Then...what is software? :-)
Bryan Watts
Yes, that's the question implied by the OP: the reason why the OP was saying that writing HTML isn't programming was, presumably, that he judged that HTML is not software.
ChrisW
+1  A: 

I see a programmer as a person who implements software requirements.

The architech designs the software specification, the programmer implements it, the validation engineer tests the software against the spec.

BoltBait
+2  A: 

Programming is the practice of implementing algorithms.

Yes, I stole this almost verbatim from my programming and data structures professor ;)

thekidder
+4  A: 

I think this is sort of irrelevant pontification. It seems to be some attempt be inclusive of HTML as "programming." If you want to go down this line then we can contort our thinking to include the use of text editors (plain text editor like notepad) or playing a computer game (like minesweeper), or moving the mouse on the screen as "programming." However, that seems to be a strange view.

This gets talked about a lot and I just think it is not useful. If you want to have something that is not so inclusive as to be not demarcate "programming" from any other human endeavor then you could say something like:

A program is a set of procedures. A procedure may be formalized as a Turing Machine. Therefore, (arguably, this is not a strict implication) programming is working in some sort of problem space that can be recognized by a Turing Machine (or using a computer "language" that is Turing Complete, if you like).

BobbyShaftoe
I'm not sure if HTML is programming. At a point in the past, I would certainly have said it is not. But having gained a few more years as a programmer, I think it's harder to define than one might think. Is it useful to define? Given the current culture of SO, I'd say it's vital.
Jon Ericson
Would you consider XML a step closer to Programming?
Harry
Well, I refer back to my answer above. It seems very strange to call the act working with something that is not a Turing Complete system programming. You could certainly create such a language with XML. However, that's not typical XML and is certainly *not* HTML.Just because it's code doesn't matter
BobbyShaftoe
If you want to go down that path why not call simply typing on a computer keyboard to be programming since things like "Shift" and "Line Reed/Carriage Return" are just coded representations. It seems very weird and useless.
BobbyShaftoe
The difference between that is html is a codified represenation that is parsed and interpreted to produce a product, and we have many different VM's( web browsers ) that interpret the "code" differently.
Kent Fredric
Well, I sort of argee with that Kent. However, you could have 2 compilers that interpret same code differently (like a polyglot program). HTML does not have the facilities to be Turing Complete, or anything remotely "close," which I think is problematic. Why would you want to call that programming?
BobbyShaftoe
Given infinite memory and an appropriate set of rules, couldn't typing itself be a prototypical Turing machine? ;-)
Jon Ericson
"Given an appropriate set of rules." Yes. Any system, "given an appropriate" set of rules could be called a Turing Machine. But that is essentially tautological!
BobbyShaftoe
I consider HTML to be programming, if I didn't clarify earlier, however, most people making this statement don't know what they're talking about ;). If "html" is your "programming language" then you are a fool, but that doesn't stop html from being a very basic domain specific language.
Kent Fredric
I do think it is really a useless discussion. However, I wonder why you consider "writing HTML" to programming
BobbyShaftoe
http://www.defmacro.org/ramblings/lisp.html # html may not have many useful "functions" ( tags ), but it doesn't stop it from being a language. It has an API of sorts ( the W3C spec )
Kent Fredric
There's a big problem with the Turing-complete criterion: it happens to be true of today's popular programming languages, but it doesn't have to be. Programming in Charity or Coq, for instance, is real programming, not like HTML, but they make it impossible to get stuck in an unproductive loop.
Darius Bacon
@Kent-Fredric, I think that link shows the opposite. I freely admit you could develop a programming language with XML. No question. It's not that HTML doesn't have "useful" function; it doesn't have any (or "enough") programming constructs.
BobbyShaftoe
@Darius I believe Coq is Turing Complete but I may be mistaken. As for things like Charity, I would not say Turing Completeness is a problematic criterion.Certainly better than "its code. Perhaps there should be a distinction for languages like Charity that also differentiates from things like HTML.
BobbyShaftoe
@Darius Bacon: I believe that SQL is not Turing complete unless augmented with a PL/SQL type extension. Yet I imagine most programmers would consider work in SQL (or the languages you mention) to be programming.
Jon Ericson
Bobby, Coq can take your proofs and extract provably-terminating programs in other languages like Ocaml. If you take that as your programming language, it's sub-Turing.
Darius Bacon
Jon, yeah, good example.
Darius Bacon
A definition of sub-Turing programming languages that are still 'programming' could be interesting, though I'm not too hopeful of anything crisply capturing what we really mean by it.
Darius Bacon
HTML is not programming, because its purely descriptive, just like static writing and static design work, they lack behavior. DOM manipulation and Javascript is programming, organizing html into a website is programming, but html itself is not more so than using paint.
Robert Gould
A: 

Programming is knowledge capture and representation.

The representation must be so detailed that a few grams of beach sand understands it.

It must come in a rhetorical framework that allows managers, lawyers, QA, and users to believe in it.


edit

Requirements analysis, design documents and code all capture knowledge. They all describe how an actor interacts with a system to create something of value. Requirements and design are "high-level" and "fluffy" but all hsve the same purpose. They all capture knowledge about information, decisions, actions.

The rhetoric is "plans", "tests" and other evidence that the software "works". That it accurately captured the knowledge we expect (or paid for.)

S.Lott
I don't really understand this.
BobbyShaftoe
I have the feeling he's being Ironic. But I can't tell, internet doesn't transmit sarcasm. Need edit enhancement to clarify.
Kent Fredric
See http://r0ml.net/blog/ for more on this theme.
S.Lott
+1  A: 

Its not IT Specific

I don't believe Programming means 'Computing'.

Many people will argue the "problem solving" facet which is so commonly tied to IT, but its not distinctly correct.

There are many ways to solve problems without computers.

'Programming is the practice of implementing algorithms.'

Isn't accurate either, you can implement algorithms without programming. ( Get out a Rubicks cube ;) )

To me, programming is:

the act of specifying a sequence of instructions, that can be recorded and performed at a latter time by an entity.

This is why I consider "DNA" as a form of "Programming", and there is also "Social Programming" and all sorts of programming contexts that exist outside IT.

Although, its important to note, that while you are programming, you are also practising other skills from other schools, such as math, problem solving, and logic.

The only part of these which is the "programming" phase is the serialisation of your ideas and logic and reasoning into instructions for an entity ( in this case, a computer ) to perform.

Kent Fredric
You're kind going around the circle of talking about Turing Machines. I don't think anyone argues that you have to have one of those fancy devices called a "computer" to construct a "program."
BobbyShaftoe
+4  A: 

Programming is describing the solution, as a series of well defined steps, to some problem , in a language that both the computer and the programmer can understand.

At least that's the ideal.

justinhj
A: 

When you sit down in front of keyboard and screen and start working, what are you doing?

I'm coding, but not just that ..

I'm trying to figure out how to organize code so that I can run my program as a series of self-explanitory instructions (function/method calls), rather than a long spaghetti of nested if/else/switch/while structures.

Although technically that's design, but that's the interesting part of the process.

Mindlessly typing things down is what code monkeys do .. (I think)

hasen j
+1  A: 

Fighting the computer to do what you want it to.

Andrei Krotkov
+3  A: 

As explained by http://www.codinghorror.com/blog/archives/001130.html

Programming is all about knowing when to boil the orange sponge donkey across the phillipines with an orangutang gorilla crossed with a ham sandwich to the fourth power of twelve across the nile with an awful headache from the previous night when all of alfred's naughty jalapeno peppers frog-marched the nordic elves across the loom-lined geronimo induced swamp donkey over and above the fortran fortified kilomanjaro fence past the meticulously crafted anti disgusting sponge cake scenario where all the hats doth quoteth the milk which is not unlike the super werewolf from the infinite realm of ninja-step. it's hard to define, really.

Adam Bellaire
Exactly same gorrilla crossed sponge donkey!
Robert Gould
+3  A: 

When people ask me in real life, I tell them programming is writing the instructions for the computer to follow.

Ray Hidayat
Sometimes the simplest answer is best. That's a fine explanation in my opinion.
Jon Ericson
+2  A: 

Programming is refining informal ideas into code. Code is an executable formalization. The work of coding often feeds back into changing the informal ideas you started from, making the whole process a learning cycle. It's best when the code communicates what you learned to other people -- when it's not just executable.

So is writing HTML programming? It is by this definition: it's executable; you can start with a vague notion of a layout you want to see, and try to code it in different ways; and HTML coders can learn from each other's pages. But HTML tags just can't express much, by design, so it's not very interesting to think of it as such. Turing completeness is a natural boundary to the expressiveness of a code we can call programming, but our actual notion of programming doesn't respect it: see e.g. Charity and Coq.

This is pretty similar to Jon Ericson's answer.

Darius Bacon
All right, then the more interesting question is what is NOT programming under this reasoning?
BobbyShaftoe
Anything that doesn't involve a precise, executable notation. Figuring out an algorithm and writing ad-hoc pseudocode is not programming, according to this. But it's normally part of the work of reducing ideas to code, so I don't see this as a huge problem.
Darius Bacon
(Also, some academic algorists look down their noses at programming, I understand, so presumably they wouldn't mind the distinction.)
Darius Bacon
(Jon Ericson: sorry for misspelling your name! Looks like we were editing at the same time -- I didn't realize stackoverflow wouldn't notify me of race conditions like this.)
Darius Bacon
No problem. ;-)
Jon Ericson
Well, but you seem to have defined "executable notation" to be on the same level as what you define programming as. So, it's just restating the problem. What is NOT executable notation? I don't think you mean *actual* notation, doesn't seem like that is required.
BobbyShaftoe
Executable means we know how to make a computer interpret it. There's some context here in that the set of things we know how to make a computer interpret increases over time, yes.
Darius Bacon
A: 

Programming is inserting programmed behaviors into a system. Advertisement and "Mind control" is a form of wet programming, us, we do soft programming, hardware engineers do hard programming.

Addendum: HTML is not programming, because its purely descriptive, just like static writing and static design work, they lack behavior. DOM manipulation and Javascript is programming, organizing html into a website is programming, but html itself is not more so than using paint.

Robert Gould
What of SQL? It is purely descriptive. (Unless you mix in something like PL/SQL, that is.)
Jon Ericson
"Ideal SQL", is supposedly a descriptive language (though in reality the "abstraction is leaky"), so it is not programming. However SQL is normally used within programming contexts. And programmatically generating SQL is programming, no doubt, but SQL statements are simply resources, like images.
Robert Gould
SQL is certainly a language but it is a "query language" and not a programming language. It seems like you want to make anything that looks like cryptic commands or technical to the every day user, a programming language. Might as well call supplying command line arguments to programs, programming.
BobbyShaftoe
Perhaps I'm in the minority, but I feel the skills and abilities that help me write SQL or providing command line arguments are different only by degree from when I write a routine in PL/SQL, Perl or C. It is especially true that those skills help me write better SQL than non-programmer coworkers.
Jon Ericson
+1  A: 

A capital investment of effort into the logical structuring of a process so that it may be executed at lower cost.

HTML is tricky. On one hand, you might say it's not a process. On the other, you might say it's instructions for the browser's layout process.

Justin Love
+1  A: 

When you sit down in front of keyboard and screen and start working, what are you doing?

Expressing ideas in executable form.

Bryan Watts
+1  A: 

A program is just a long equation. Therefore, programming is the process of deriving that equation.

(concept from Dijkstra.)

Zach
Finally had a moment to read through the link. Very interesting and just the sort of thing I hoped to discover. Thank you.
Jon Ericson