Talk:Computer program/Archive 4

Defined as a "collection of instructions" confusion
It seems counter intuitive to consider computer programs as non-sequential. I'm assuming "collection" refers to declarative programming languages. I recommend this nuance be explained in the lead. Timhowardriley (talk) 16:02, 14 October 2015 (UTC)


 * Hello! I'm not really sure what's so wrong with using "collection of instructions"?  Surely, we might want to explain it further, but using "sequence" actually isn't better.  Almost no program is a plain linear sequence of instructions –  just think of various libraries, for example.  Moreover, the sequence is only one element of structured programming, besides the selection and iteration. &mdash; Dsimic (talk &#124; contribs) 16:22, 14 October 2015 (UTC)


 * Soon after the definition was changed, this edit was made: https://en.wikipedia.org/w/index.php?title=Computer_program&diff=685664350&oldid=685658307 I don't think I'm the only one scratching my head. Timhowardriley (talk) 16:31, 14 October 2015 (UTC)


 * See turing machine: "Despite the model's simplicity, given any computer algorithm, a Turing machine can be constructed that is capable of simulating that algorithm's logic." A turing machine has an initial state. The sequence has a starting point. Timhowardriley (talk) 16:34, 14 October 2015 (UTC)


 * Regarding "Surely, we might want to explain it further": What words would you suggest? Timhowardriley (talk) 16:38, 14 October 2015 (UTC)


 * That particular edit seems perfectly fine to me. Speaking about the Turing machine, the tape it operates on is just the data, while the instruction table is the actual program it executes.  Thus, it doesn't represent a plain sequence of something, if you agree.  At the moment, I don't see how to explain the "collection of instructions" further and whether we actually need to do that, but I'm open to discussing any proposals. &mdash; Dsimic (talk &#124; contribs) 16:46, 14 October 2015 (UTC)


 * I changed the definition in response to above. Only the simplest of programs can be said to be "sequences" in any interpretation of that claim. Some valid ways to claim that programs are sequences would be:
 * The machine code is stored as a sequence of instructions. (But that's no longer strictly true today, now we have fancy executable file formats and dynamic linking).
 * The execution trace of a program is a sequence. (But that's not how we "intuitively" think of a program, and is no longer true if we introduce multithreading or other forms of concurrency).
 * The source code of high-level languages is usually thought of as an abstract syntax tree (not as an abstract syntax sequence). The semantics of a program can be though of as a control-flow or dependency graph, or in terms of other fancy (fancier than a sequence, that is) mathematical structures.
 * In the end, I think, we just want to say that "a program is a bunch of instructions" and not go into to much more detail in the lede (elaborating in the body would be fine). And "collection" seems like a sufficiently formal synonym of "bunch" so that it can pass as an encyclopedic definition, and with just the right amount of vagueness, so that we neither say anything we don't want to say, nor say nothing at all. —Ruud 17:18, 14 October 2015 (UTC)


 * I suggest the following experiment: Google "computer program is a collection of instructions." Google "computer program is a sequence of instructions." Timhowardriley (talk) 17:56, 14 October 2015 (UTC)


 * I suggest the following experiment instead: Google "we did land on the moon." Goole "we did not land on the moon." —Ruud 18:08, 14 October 2015 (UTC)


 * This was a less than nice thing to say. Timhowardriley (talk) 18:24, 14 October 2015 (UTC)


 * Please, let's keep in mind the existence of WP:GOOGLEHITS guideline, which of course isn't directly related, but applies to a certain extent. &mdash; Dsimic (talk &#124; contribs) 18:29, 14 October 2015 (UTC)


 * WP:GYNOT would be the applicable guideline here. Google "comparisons" are problematic because they often give silly results depending on the exact way you phrase and interpret your queries. In this case we in particular don't know how many of those hits correspond to people simply having copied the Wikipedia definition, which has been in the article for several years, I think. And we're supposed to be educating people here, not simply repeat the same (mis)information that has been spreading among the hoi polloi. —Ruud 18:53, 14 October 2015 (UTC)


 * May I politely assert that I thought of using Google comparisons because I read this talk message: "Top hits on Google Books: [7] [8]. —Ruud 00:13, 13 October 2015 (UTC)". I know Ruud didn't mean to illustrate popularity. But when I made my suggestion to use Google, I should have said, "Google Books". Books.google.com matches published material defining Computer program as a sequence. Nonetheless, from my earliest computer education until I learned about Declarative programming, computer programs were sequential. They had a starting point, followed a sequence of instructions, then outputted the results. However, declarative programming "expresses the logic of a computation without describing its control flow." Declarative computer programs are sets of instructions; they don't express a computer algorithm. I'm going to keep thinking about how to explain the new definition of computer program to young readers of this article. Timhowardriley (talk) 17:49, 15 October 2015 (UTC)


 * Even programs as simple as computing a greatest common divisor or summing a list of numbers aren't sequential, as they require iteration or recursion. Only if you take the execution trace point-of-view can those said to be sequential (which I don't think is the mental model most people would have when thinking about programs), and then only because they don't use any form of concurrency (which is getting increasingly common nowadays). I don't mind including a few white lies in the lede, so as to keep it sufficiently simple (such as that programs are made up from "instructions"; radical declarative programmers would insist they are made up from declarations, and they are right to some degree, but that discussion belongs in the subsection on Programming languages, not in the lede). But claiming that programs are sequences seems to be making a rather strong commitment to how programs are stored and executed, and one that can be easily avoided by using slightly different terminology. —Ruud 18:09, 15 October 2015 (UTC)


 * I can reconcile iteration and recursion as sequential activities. Concurrency is an optimization that compiler and hardware designers provide – well, mostly. Pedantic declarative programmers probably appreciate the new definition. My motive is to effectively communicate computer program to the largest audience possible. Timhowardriley (talk) 18:34, 15 October 2015 (UTC)

How computer programs relate to algorithms
The following sentence is vague: "A small part of a computer program that performs a well-defined task is known as an algorithm." What does "a small part" mean? I found a textbook definition of algorithm and replaced this sentence with the definition. I also used words to couple algorithm to computer program. "A programmer implements algorithms with computer programs." Okay, maybe I should have written, "Programmers generally use algorithms to build programs." But that was reverted, also. What's wrong with my edits? Timhowardriley (talk) 15:37, 17 October 2015 (UTC)


 * I moved Ruud's personal talk page comment to here for discussion: He said, "Concerning the third paragraph of the lede of Computer program: the intention of mentioning algorithms there is to succinctly relate that concept to computer programs and direct the reader to the article Algorithm for further information. It does not intend to give a precise definition of an algorithm, as the quoted source tried to do.
 * —Ruud 16:43, 17 October 2015 (UTC)" Timhowardriley (talk) 17:47, 17 October 2015 (UTC)


 * However, I believe more specific information is better, if it's available. And a textbook definition of algorithm best serves the reader. There still can be a Wikilink to its article. Timhowardriley (talk) 17:58, 17 October 2015 (UTC)


 * Again, I moved Ruud's personal talk page comment to here for discussion: He said, "'Computer programmers implement algorithms with computer programs.' (or 'Programmers generally use algorithms to build computer programs.') is an awkward sentence. It doesn't feel natural in that paragraph. If I try to put the phrase 'computer program' back into 'An algorithm is a clearly specified set of simple instructions to be followed to solve a problem.', then I end up with almost the original sentence. —Ruud 18:59, 17 October 2015 (UTC)" Timhowardriley (talk) 20:34, 17 October 2015 (UTC)


 * Ruud, I interpret your viewpoint as: the current sentence, although a little white-washed, is sufficient enough information for the broadest audience to grasp, considering it's in the lead. Is this correct? Timhowardriley (talk) 20:40, 17 October 2015 (UTC)


 * Yes, I think it's accurate enough for its purpose. I don't immediately see a good way to make that sentence more precise, without it becoming very long-winded. But I'm open for suggestions. —Ruud 20:47, 17 October 2015 (UTC)

Number of digits in Analytical Engine store/memory words
There seems to be support for both 40 and 50 digit words in the Analytical Engine. I've started a discussion at Talk:Analytical Engine. As to what Babbage was thinking with such a large word size... My guess is he hadn't thought of floating point arithmetic, and 40 or 50 digits was what he thought was needed to cover the useful range of magnitudes of calculations. Rwessel (talk) 17:28, 30 October 2015 (UTC)
 * Very good. Timhowardriley (talk) 17:46, 1 November 2015 (UTC)

"Declarative programming language" is an Oxymoron
This text - Computer programs can be categorized by the programming language paradigm used to produce them. Two of the main paradigms are ... Imperative programming languages specify a sequential algorithm using declarations, expressions, and statements ... Declarative programming languages describe what computation should be performed and not how to compute it...

has a problem with the English language.

The word "program", handed down to us the ancient Greeks, is used for sequences of actions: what is to be played by the orchestra and in what order, the meeting rooms and their time, and so on.

We can write Fortran and Fortran language and Fortran programming language

The "-ing" attached to "program" turns it into an adjective, describing an attribute of "Fortran" - sequence.

But the "programming" following "Declarative" above is an oxymoron - there is no sequence. Unless, of course, the goal is to revise the English meaning of "program".

This article should be split into two articles: -- Computer imperative (programming) languages -- Computer declarative languages

If you look at the table of contents, much of the article applies only to programming languages; a split would benefit both sets of users. 50.136.242.131 (talk) 05:48, 11 January 2016 (UTC)
 * It's okay to not be too technical. Timhowardriley (talk) 21:29, 11 January 2016 (UTC)


 * Whatever the roots, "program" is used to describe a wide spectrum of techniques, including the declarative ones. You'd be hard pressed to find anyone, for example, to argue that Prolog is not a programming language or that something written in Prolog is not a program.  Rwessel (talk) 06:03, 12 January 2016 (UTC)

Added information needs development
I removed "(an intermediate representation of the decoded code, such as Python's .pyc files, may be stored for efficiency purposes)" and "(It is possible to build a REPL on top of a compiler, as the Scala REPL does, but this involves the overhead of full compilation.)" because the extra information needs to be developed. Timhowardriley (talk) 19:13, 27 March 2017 (UTC)
 * I also removed "(less relevant these days, when interpreters are typically redistributable without charge)". This is a point of view. And I removed "which compile Java code to native machine code ahead of time,". Information should be presented in pieces, not one long concept. Timhowardriley (talk) 19:22, 27 March 2017 (UTC)

DATA COMMUNICATION
what is the future of networking  ? ANS -based on the progress mode in the recent past networking seems to be moving ahead toward nomadic computing smart spaces. Nordic computing refers  to the technology that enables and  users who travel from place to places  to gain access to  internet  services in a transparent way. the availability of lightweight,   inexpensive. high performance, portable devices and   availability on internet has enabled us to become normads. — Preceding unsigned comment added by 106.203.31.57 (talk) 15:52, 9 October 2018 (UTC)

Moved two 'Simultaneous execution' paragraphs to talk
I moved these two paragraphs to talk because the sentences contain multiple subjects and need to be shortened.

Multiple lines of the same computer program may be simultaneously executed using threads. Multithreading processors are optimized to execute multiple threads efficiently, due to having more than one processor which can either be a Multi-core processor or a computer that has more than one CPU installed. These Multi-core processors will have multiple cores where each core is a processor that has it own set of threads. Multi-core processors are actually more energy efficient than a single core CPU, because multi-core processors have certain cores that are more energy efficient, which in turn with the ability to multitask and delegate tasks to different cores actually decreases the amount of energy used by the CPU.

Most programming languages include a certain Library (computing) that allows programmers to now execute their code in parallel using multithreading. Once a program is properly parallelized by the programmer, its up to the user of the software's CPU to determine which cores and threads are used. After the user reaches a certain amount of cores in their CPU, Diminishing returns occurs where the increase in core count has very little if any effect to increasing the speed of the execution of the program, these diminishing returns can be measured by Amdahl's law. Timhowardriley (talk) 13:56, 9 November 2018 (UTC)

"Computervprogram" listed at Redirects for discussion
A discussion is taking place to address the redirect Computervprogram. The discussion will occur at Redirects for discussion/Log/2020 May 16 until a consensus is reached, and readers of this page are welcome to contribute to the discussion. TheAwesome Hwyh  00:20, 16 May 2020 (UTC)

A Commons file used on this page or its Wikidata item has been nominated for deletion
The following Wikimedia Commons file used on this page or its Wikidata item has been nominated for deletion: Participate in the deletion discussion at the. —Community Tech bot (talk) 14:19, 19 October 2020 (UTC)
 * Hello World Brian Kernighan 1974.jpg

Moved Software Engineering's definition of computer program to talk
Moved removed this from the lead:

In software engineering, code refers to computer instructions and data definitions expressed in a programming language or in a form output by an assembler, compiler, or other translator to express a computer program in a programming language.

The lead should be a road map to the rest of the article. Moreover, why is the citation the entire book? Timhowardriley (talk) 17:45, 11 April 2019 (UTC)

Expand sections that are just stubs
The good article reviewer implied that each section should be balanced. He said, "Boot program and Embedded programs consists of only a few sentences each." Any help is appreciated. Timhowardriley (talk) 19:40, 28 October 2021 (UTC)

Citation organisation, uncited claims
A bit surprised to see some textbooks like Tanenbaum defined locally many times, rather than put into a list of Sources just once and reused with sfn links or something similar. A program written that way would attract ... quite a bit of wry amusement, I suspect. Meanwhile, if this article is a serious GAN candidate, some attention ought to be given to the multiple uncited claims in the article. Chiswick Chap (talk) 15:52, 26 March 2022 (UTC)
 * Whereas only two of Andrew S. Tanenbaum's books are referenced, each page number is individually cited. If there is an efficient way to express this, then an editor in good faith will make the change.
 * The "wry amusement" opinion is not germane.
 * The eight citation needed tags cover seven sections and constitute Tag bombing. The article may have a referenced source for the entire paragraph, but not every sentence in the paragraph is cited. One fact was tagged that is supported in this wikilinked article: X86_assembly_language. Another trivial fact was tagged that is just a transition sentence to the next section.
 * Tag bombing says, "Adding tags to articles should be accompanied by sufficient reasoning on the tagged article's talk page." This talk page reasoning is insufficient. Timhowardriley (talk) 20:40, 26 March 2022 (UTC)

A Commons file used on this page or its Wikidata item has been nominated for deletion
The following Wikimedia Commons file used on this page or its Wikidata item has been nominated for deletion: Participate in the deletion discussion at the. —Community Tech bot (talk) 06:59, 30 June 2021 (UTC)
 * Hello World Brian Kernighan 1974.jpg


 * I moved it to the Computer Programming paragraph. Timhowardriley (talk) 09:37, 8 October 2021 (UTC)


 * I removed it because I think it's a fake. Brian Kernighan said in a Linux Journal interview that Dennis Ritchie invented the language. Timhowardriley (talk) 02:19, 9 October 2021 (UTC)


 * I stand corrected. It's real. Timhowardriley (talk) 07:19, 9 October 2021 (UTC)

Housecleaning for computer program
moving from User talk:Fgnievinski:

You did indeed provide substantial housecleaning for computer program. I understand the logic to fork all the examples to imperative programming and declarative programming. However, I reverted your forks with apprehension. One good article criteria is the article should be thorough. Because the computer program subject is so vast, being thorough results in a large article. Maybe there's a way to entice the reader to the examples so computer program can be both thorough and bite-sized. Timhowardriley (talk) 22:03, 25 May 2022 (UTC)


 * As per Summary style, Computer program and Computer program should not have more detail than Imperative languages and Declarative languages, respectively. Furthermore, there are also other articles, such as Computer programming, Programming languages, and History of programming languages, where the comparison of programming languages would fit better. fgnievinski (talk) 23:22, 25 May 2022 (UTC)
 * I hope this edit satisfactorily solved the dilemma. Timhowardriley (talk) 01:36, 26 May 2022 (UTC)

WP:NOTREPOSITORY
Most of the code throughout the article, specifically around Computer_program should be removed per WP:NOTREPOSITORY. Articles aren't the place for a code dump of one's favorite language. WikiLinuz { talk } 🍁  03:21, 11 April 2022 (UTC)


 * This post is a retribution because I failed this editor's GA request. See Talk:Binary_search_tree/GA2. Timhowardriley (talk) 05:14, 11 April 2022 (UTC)
 * Doesn't change the fact that you were advocating for code farm, that's the only purpose this post serves - to make you aware of WP:NOTREPOSITORY. Definitely not a retribution. WikiLinuz  { talk } 🍁  06:00, 11 April 2022 (UTC)
 * Your personal statement of "I'm sorry, but I don't think you're well-versed with our policies on computer science ..." displays anger. Timhowardriley (talk) 06:08, 11 April 2022 (UTC)
 * No, as quoted, and without context, it does not display anger. &middot; &middot; &middot; Peter Southwood (talk): 07:40, 10 June 2022 (UTC)

Article's definition sentence.
I wish an author would publish, "Computer programs are the instructions for computers." Who could argue with this? However, computer textbook authors define computer program within the context of their book. Unfortunately, computer science now-a-days is so broad that any definition is going to have a flaw to at least one editor of this article. Dr. Wilson's definition best describes this article's essence. It succeeds because it limits the scope of the definition to modern computers, and it's broad enough to include any computer from the 50s onward. I like that it first defines the scope by using the passive voice. An active voice sentence would begin with "A computer program is ..." This is going to have a serious flaw to someone. It would need to be very long to include the broad spectrum of nuances. Timhowardriley (talk) 21:19, 13 November 2021 (UTC)
 * The recent reversions of my edit to the lede are in violation of the WP:DONTREVERT guidance and is, by the editor's own admission, edit warring. For all interested parties, please refer to WP:WHENNOTCITE: "Citations are often omitted from the lead section of an article, insofar as the lead summarizes information for which sources are given later in the article," which is the case here. Also, refer to virtually any article here (e.g. Common Sense, Stupidity, or Rock (geology)) to see that properly formatted ledes comprise the theme of the given article, not some collateral theme. Accordingly, for anyone who's dissatisfied with this article's current lede, please edit it in a manner that begins with, "A computer program is..." A lede that otherwise starts with an explanation of what a computer is smacks of circumlocutory foolishness. See MOS:LEAD as needed. --Kent Dominic·(talk) 05:40, 14 November 2021 (UTC)
 * See also WP:REFCLUTTER. --Kent Dominic·(talk) 05:55, 14 November 2021 (UTC)
 * Thank you for finding a sourced definition: https://www.thefreedictionary.com/computer+program . I'm fine with calling a computer program a sequence of instructions; however, declarative programmers have raised valid issues. By the way, your intimidating message on my talk page was counter productive. Timhowardriley (talk) 07:38, 14 November 2021 (UTC)
 * IMHO, the definition is dicey and the cite is superfluous. Let declarative programmers edit it however they want, with anything starting with "A computer program is..." Another FYI: Per WP guidance, the contents of any message on an editor's talk page is nonrelevant vis-à-vis an article's substance and talk page. Accordingly, whether anyone deems a notice of 3RR repercussions to be intimidating or counterproductive is similarly impertinent to the article's substance. --Kent Dominic·(talk) 08:25, 14 November 2021 (UTC)


 * See my comments in the new section below: the distinction between declarative and imperative programs is irrelevant to the definition of a computer program. A computer program describes instructions for computers to execute. Bringing in imperative vs declarative is no more relevant than talking about whether the program is statically or dynamically typed. Caleb Stanford (talk) 15:17, 26 June 2022 (UTC)

Incorporating Computer programming and Programmer into this article
I have reservations about this edit to incorporate sentences from two other articles into this article: The computer program article would be better served if an editor would paraphrase from a reliable source the skills of computer programming. Timhowardriley (talk) 22:53, 26 May 2022 (UTC)
 * 1) At least one incorporated sentence runs on and on and doesn't end nicely. For example, "Programming involves tasks such as analysis, generating algorithms, profiling algorithms' accuracy and resource consumption, and the implementation of algorithms (usually in a chosen programming language, commonly referred to as coding)."
 * 2) The sentences were generated by original research. Both sections combined only have three citations. Plus, two of the citations are from this blog -- not a reliable source.
 * 3) The blog doesn't support at least one of the assertions it purports to support. For example, one cited assertion is, "Programming involves tasks such as ... generating algorithms[.]" However, a search in each blog for "algorithm" returned no matches.
 * 4) At least one incorporated sentence is better explained in this article. For example, "The source code of a program is written in one or more languages that are intelligible to programmers, rather than machine code, which is directly executed by the central processing unit."
 * 5) At least one incorporated sentence is more confusing than informative. For example, "A programmer's most often-used computer language (e.g., Assembly, C, C++, C#, JavaScript, Lisp, Python, Java, etc.) may be prefixed to the aforementioned terms."
 * 6) The article already has wikilinks to both incorporated articles.


 * Ideally, the articles Computer programming and Programmer would be improved, instead of duplicating them here. We're here to build an encyclopedia, not just the present article. fgnievinski (talk) 07:23, 28 May 2022 (UTC)
 * Very good. However, one GA at a time. Timhowardriley (talk) 09:20, 28 May 2022 (UTC)
 * BTW, I tried to improve operating system. Unfortunately, it ended in this train wreck. Timhowardriley (talk) 11:09, 28 May 2022 (UTC)

Recommendations
(Note: I recently reviewed this article at GAN.) Thought I should put some more comments in addition to the ones I already made, considering you're renominating it immediately, also for a reviewer to consider:


 * "The interpreted language Basic (1964) has had the most impact on programming" – Really? I don't have the source but... it's strange to state it so unequivocally. Why not C, essentially the lingua franca of the programming world?
 * Yes, according to Dr. Stair. I added his quote to the citation. Dr. Stair's assertion resonates with me because without interpreted Basic, I wouldn't have become a programmer. I'd rank C at #2. Timhowardriley (talk) 14:45, 9 June 2022 (UTC)
 * But that is one opinion, and probably not an opinion shared by most programmers. The history of programming languages is sufficiently complex that it's probably impossible to single out one as the most influential. What about Lisp, C++, even Java? Ovinus (talk) 14:54, 9 June 2022 (UTC)
 * Most importantly, it's sourced. All unsourced arguments are original research. Another published author may state that language X has had the most impact. Well, then we have something to resolve. Timhowardriley (talk) 18:52, 9 June 2022 (UTC)
 * Common sense, fair presentation, and editorial discretion are also important. This book on the history of languages says for FORTRAN, "The importance of FORTRAN is sufficiently obvious not to need further justification here", while, of BASIC, "This language is widely used, and in many ways is the simplest of all the major languages in use today. It has wide educational use, and is a 'first language' for many students." (page xix). To put it bluntly: No, we should not state in wiki voice that BASIC is the most influential language. That is an opinion and definitely undue weight on one author's opinion. Ovinus (talk) 19:58, 9 June 2022 (UTC)
 * Fair enough. I'll research a better thesis statement. Timhowardriley (talk) 20:13, 9 June 2022 (UTC)


 * The given BASIC program is not a Hello World program.
 * It is the "Hello World" program of this article. Timhowardriley (talk) 14:45, 9 June 2022 (UTC)
 * But it is not a "Hello World" program... Ovinus (talk) 14:54, 9 June 2022 (UTC)


 * Just in case you don't know, MOS:PSEUDOCODE is an important guideline. For articles like these it's reasonable to have exceptions, including code samples, but that does not mean that they should be indiscriminate collections of code (e.g., the contents of "Object-oriented programming").
 * Microcode is... I suppose it's technically "programming", but really it's much closer to architecture design. I don't know much about this area, but I imagine that (say, Intel) CPU designers work on microcode concurrently with implementing the underlying uops manifest in hardware units. In any case, it deserves less attention.
 * Also, if mentioned at all, microcode needs a better description. In particular, it's important to know that it's much slower than non-microcoded instructions. Perhaps an illustrative example is, say, 64-bit integer multiplication vs integer division (the latter is microcoded and potentially a whopping 99 cycles on, say, Haswell, vs. probably only a handful of cycles for multiplication).
 * "At the hardware level, a microcode program controls the circuits throughout the motherboard." and "Microcode instructions move data between a CPU's registers and throughout the motherboard." Not true; the motherboard and its interactions with the CPU are controlled by firmware. Microcode is specific to the CPU.
 * Thank you. I fixed one assertion and removed the other sentence from the article. Timhowardriley (talk) 14:45, 9 June 2022 (UTC)


 * I just want to say that the BASIC program is much, much better for readers than the C program and its associated baubles. Even newbie programmers will not understand the C code, but the BASIC program is highly readable. I encourage you to use snippets of that type.
 * The C code is... idiosyncratic. Why should the Person's grade be heap-allocated and wrapped in a class rather than simply a char, or a struct containing const char*, etc? Same with the Person struct, too. C is not Java, and there are better simple examples of encapsulation and/or manual memory management that actually makes sense design-wise. As an aside, neither the person nor their grade is freed.
 * The Person's grade is heap-allocated and wrapped in a class because that's the essence of object-oriented programming. Maximizing the CPU's efficiency isn't the objective. CPU cycles are relatively cheap compared with the human labor of developing and maintaining the computer programs. Regarding freeing the memory: yes, it wouldn't be distracting to add . But I assume the operating system performs garbage collection. Timhowardriley (talk) 14:45, 9 June 2022 (UTC)
 * C is simply not an object-oriented programming language, and it does not have classes. I'm making no claim regarding efficiency, although you're right, heap allocation is slow. My point is that it is an anti-pattern to default to heap allocation. I can't speak for C programmers, but many new C++ programmers have a habit of allocating everything using new, which is annoying to maintain. Ovinus (talk) 14:54, 9 June 2022 (UTC)
 * Object-oriented programming is a method of programming. The method is to write operations on objects. Objects in an OOP language are called classes; objects in a non-OOP language are called abstract data-types. It doesn't require an object-oriented language to implement OOP. True, a major programming annoyance is managing memory. That's why it important to clearly understand which area of memory each variable is located. The areas are text (where constants are stored), register, static, stack, and heap. Object-oriented objects are always stored in the heap. When using non-OOP languages, the programmer is forced to know this. When using a non-OOP language, the compiler hides from the programmer that heap memory is used. Anyway, the computer program article forks to the example sections in two other articles -- Imperative_programming and Declarative_programming. This section describes memory management and is intended to be a part of computer program: Imperative_programming. Timhowardriley (talk) 19:13, 9 June 2022 (UTC)
 * But then why use C as an example of object-oriented programming, instead of an object-oriented language? It is misleading at best. Ovinus (talk) 19:58, 9 June 2022 (UTC)
 * Because the thesis statement is "Object-oriented programming need not be confined to an object-oriented language." Timhowardriley (talk) 20:12, 9 June 2022 (UTC)
 * Er... that should not be the thesis statement. (Indeed, Wikipedia articles don't really have a "thesis statement".) That's like saying, in an article about screws, bolts and nails, "Screws need not be used with a screwdriver; a hammer may also be used." The C code you are writing is an example of bad practice. Ovinus (talk) 16:48, 10 June 2022 (UTC)
 * Object-oriented programming is a programming method, not a language. The C code in this example is a parallel algorithm with the Imperative_programming example. The C++ example is object-oriented programming in an object-oriented language. The C example is object-oriented programming in a language that predates object-oriented languages. Independent of my use of the words "thesis statement", it's rational to illustrate an example of an object-oriented program using C. If you juxtapose the two examples, you will glean insight into the mechanics of an object-oriented compiler. Timhowardriley (talk) 00:45, 11 June 2022 (UTC)
 * Hm. There's a reasonable discussion to be had on how much the article should emphasize the broad categories of 1. program execution; 2. programs as essentially abstract devices (detached from a particular computer or compiler); and 3. what average programming looks like. I think this part you've written is quite heavy on (1), when people who have never heard of object-oriented programming need (3) and maybe (2). Anyway, the fact remains that there's no need to have C anti-patterns in the article Computer program, along with its lovely include guards and object files and linking procedures, when we could have, say, a straightforward Python object (perhaps a Person and Grade object, just as you've done). Ovinus (talk) 04:42, 11 June 2022 (UTC)


 * "Application software is the key to unlocking the potential of the computer system." – This isn't true for, say, little microcontrollers in a microwave
 * I added Dr. Stair's quote to the citation. A microwave isn't a computer system? Timhowardriley (talk) 14:45, 9 June 2022 (UTC)
 * Hm. Even if you deny that the chip in a microwave is a computer (personally I'd classify it as one), it's still reasonably common to run programs entirely in kernelspace. Ovinus (talk) 14:54, 9 June 2022 (UTC)
 * I was snarky. Sorry. Timhowardriley (talk) 19:14, 9 June 2022 (UTC)
 * You're fine? We're having a good discussion. Ovinus (talk) 19:58, 9 June 2022 (UTC)
 * Thank you for contributing your critical thinking. I also appreciate your open mind. Since 1989, I worked in the metaphorical trenches programming land mines with hairpin triggers. Researching for this article has raised my environment to the clouds programming art. Timhowardriley (talk) 22:49, 9 June 2022 (UTC)


 * "Labels allow the programmer to work with variable names." – Sure, but labels are also places to jump to

Ovinus (talk) 12:20, 9 June 2022 (UTC)
 * Thank you for your time and feedback. Timhowardriley (talk) 14:45, 9 June 2022 (UTC)


 * "Functional programming is executing functions just-in-time (JIT)" – What does this mean? Functional programming, among other things, is about treating functions as first class citizens, which the snippet of code doesn't do. Also, if you're not executing a function just in time then... are you evaluating it lazily? I'm confused. JIT compilation is a totally different beast than anything that can be reasonably shown in C. Ovinus (talk) 16:24, 11 June 2022 (UTC)

An operator isn't a statement
This edit qualified this sentence with "may": "Unlike assembly, these languages may[c] generate many machine language instructions for each statement." I added note [c] to say "C programming language statements like x++ will compile to a single instruction" because that was the claim in the edit reason. However,  are two symbols that together form an Operation (mathematics), not a statement. "Principles of Information Systems" (page 159) says, "[A] programming language [is] a set of keywords, symbols, and a system of rules for constructing statements[.]" Statements are keywords plus symbols. The  instruction is a postfix, increment operator. See Operators_in_C_and_C%2B%2B. Therefore, the qualifier isn't warranted. Timhowardriley (talk) 15:39, 11 June 2022 (UTC)
 * This is pedantic in the wrong direction. Indeed, the C language spec considers various things to be "statements", the most important one here being an expression statement. x++; is a statement that usually compiles to one instruction. y = x * 2 + 3; is a statement that usually compiles to one instruction. Conversely, statements may compile to no instructions at all; x += strlen("cow") - 3; will get optimized out. An unreachable return statement will lead to a ret being omitted. The "may" is important; languages and compilers are complex. Ovinus (talk) 16:21, 11 June 2022 (UTC)
 * Dr. Stair is not being pedantic by saying statements are keywords. Operators in C and C++ is not being pedantic by saying  is an operator. Furthermore, "Comparative Programming Languages" says (page 82), "Statements are the commands in a language which perform actions and change the state." Keywords and commands are the same thing. Most importantly, Dr. Stair says without qualification (page 160), "With third-generation and higher level programming languages, each statement in the language translates into several instructions in machine language." The article is paraphrasing this quote. Your assertion that   is a statement and it usually compiles to one instruction is original research until you can source it. Why did you qualify your assertion with "usually"? It's easier for the article's reader to go with Dr. Stair than to try to understand your usually exception. Timhowardriley (talk) 20:09, 11 June 2022 (UTC)
 * I changed the article's note to "C programming language operators like  will usually compile to a single instruction." The change reflects the new information from this thread. The article now conflates statement with operator. This is a mistake. Statements are keywords and operators are symbols. Timhowardriley (talk) 20:29, 11 June 2022 (UTC)
 * Taken as an absolute (which I don't think he intended), Dr. Stair is wrong. has 12 statements and only a handful of machine instructions out. The text is misleading without the qualifier; the takeaway is that there is a weaker correspondence between high-level statements and what's actually executed. Often, yes, that means that a single statement will generate "several" or even "many" asm instructions. But often, that means a statement will generate a single instruction, or get optimized out entirely. That is critical information. Ex:  ("When you specify a higher level of optimization for a compiler, the compiler will often move code around in the assembly output file, eliminate code entirely, and do other code transformations that obfuscate the correspondence between the high-level code and the assembly output"). It is categorically false that every C statement generates many machine code instructions after optimization; if compilers did that, no one would use them. Ovinus (talk) 21:44, 11 June 2022 (UTC)
 * Regarding Taken as an absolute (which I don't think he intended): True, Dr. Stair wasn't pedantic.
 * Regarding Dr. Stair is wrong.: Whew! Timhowardriley (talk) 22:15, 11 June 2022 (UTC)
 * Heh! Indeed those phrases shouldn't be divorced: I'm sure his writing is excellent and I haven't a hundredth his expertise. I also don't know the context for that sentence. It's just that the idea that "xyz languages turn my statements into many machine language instructions each" is not as accurate or informative (or even understandable, tbh, beyond a basic level) as "xyz languages have a weaker correspondence with the outputted machine code; high-level statements may be turned into several instructions, combined, or even entirely optimized out if doing so would not change the program's behavior". But maybe that's just me; I'd love to get a third opinion. Ovinus (talk) 22:57, 11 June 2022 (UTC)
 * I hope this edit fills in all the gaps. Timhowardriley (talk) 20:16, 12 June 2022 (UTC)

Definition
I think the first paragraph puts undue weight on the distinction between imperative and declarative. It's not relevant for the definition of a program, which is just some commands written in a language for a computer to execute. What is fundamental to a computer program is syntax and semantics, not the format that the commands are written in (which can be a list, a syntax tree, a set, or something else, as long as it is (at least in almost all cases) conforming to some Formal grammar.

For example, Datalog is a classic declarative language in which programs are written as sequences of commands. If I were describing the syntax of datalog, it would be a sequence. It's true that the semantics of Datalog doesn't depend on the order, but the distinction in the first paragraph is confusing. The definitions at Declarative programming and Imperative programming are much better quality and I would suggest those are used here, but I think the distinction should be removed entirely. Caleb Stanford (talk) 13:32, 26 June 2022 (UTC)


 * Forming a definition for this article has been as fun as chasing my own tail. Regarding Datalog is a classic declarative language in which programs are written as sequences of commands.: Datalog says, "Unlike in Prolog, statements of a Datalog program can be stated in any order." Timhowardriley (talk) 16:15, 26 June 2022 (UTC)


 * Thanks -- but I am aware of that (I referenced that in my post: "doesn't depend on the order") and my point is that it's not a set, it's a sequence that can be stated in any order. In other words, the syntax is a sequence, the semantics is a set. Also, the exact sentence you quote mentions Prolog as being order-dependent, which is another declarative language.


 * My contention is that the definition as currently stated is controversial, and it doesn't agree with definitions at either of the linked articles imperative programming and declarative programming. More importantly, the distinction between imperative and declarative is irrelevant for what a computer program is, violating WP:Undue and WP:Relevance. (Edit: though I think mentioning it somewhere in the intro is good, it shouldn't be part of the definition/scope.) By the way, programming languages is my area of research expertise, I'm not just making stuff up out of a hat. :) Caleb Stanford (talk) 16:26, 26 June 2022 (UTC)
 * Feel free to correct the definition. Also, that edit won't constitute the significant contribution necessary to preclude rating the article GA. Timhowardriley (talk) 16:55, 26 June 2022 (UTC)


 * OK, sounds good! Hope my message didn't come across as too strongly worded. Edited to add, I think mentioning declarative/imperative somewhere in the intro is good, it shouldn't be part of the definition/scope of the concept in the first sentences. I may make an edit at some point soon. Thanks Caleb Stanford (talk) 17:01, 26 June 2022 (UTC)

class=C
I think class=C is more appropriate for the article's present state. I'd like to request that you stop re-nominating the article in its current form (as you have now done twice) without a careful pass by someone else. I am happy to do a pass at some point but the article needs, in my estimation, more than 7 days of work. Caleb Stanford (talk) 15:18, 28 June 2022 (UTC)


 * For completeness sake, here are the B-class criteria and why I think it fails currently.


 * 1. The article is suitably referenced, with inline citations.




 * 2. The article reasonably covers the topic, and does not contain obvious omissions or inaccuracies.


 * The article coverage overlaps with, but does not exactly align with, what an overview of "computer program" should cover. Some ideas of what's not covered is in the suggested organization below.


 * 3. The article has a defined structure.


 * The current organization of the article is a bit of a mess, currently unstable, and lacks focus. An idea for how to improve it is below.


 * 4. The article is reasonably well-written.


 * Parts are well-written, others need editing and cleanup.


 * 5. The article contains supporting materials where appropriate.


 * ✅ For the most part.


 * 6. The article presents its content in an appropriately understandable way.


 * It's very hard to present a concept of such basic importance in an understandable way to a general audience -- I believe that the article is currently too technical, covering a technical overview of many important concepts, but should explain to a very basic level (e.g., to someone who has never written a computer program or never heard of what it is) what a computer program is.


 * Caleb Stanford (talk) 19:02, 28 June 2022 (UTC)

Request for comments on downgrade to Class=C
Was it appropriate to downgrade this article to Class=C on this edit? Timhowardriley (talk) 18:33, 28 June 2022 (UTC)
 * Why do you need a full-blown thirty-day formal WP:RFC for this? -- Red rose64 &#x1f339; (talk) 19:05, 28 June 2022 (UTC)
 * Article-class assessments aren't particularly formal, and the assignment of a letter which isn't even shown to the reader isn't important enough to warrant a site-wide RfC. Timhowardriley: The criticisms of the article are well-founded. Presenting such a broad topic in a broadly satisfactory way is a Herculean task, sure, but it can definitely be done better than how it currently is. Ovinus (talk) 19:31, 28 June 2022 (UTC)


 * Classing it as "C" isn't unreasonable, a full RFC to discuss it probably is. -Kj cheetham (talk) 19:46, 28 June 2022 (UTC)
 * Pinged into this discussion by yapperbot. After a quick skim, C-class seems reasonable to me. Suriname0 (talk) 02:38, 29 June 2022 (UTC)
 * Invited by bot. Would recommend to ask  for the required improvements to this article, which i believe will be a lot more productive than this rfc. Cheers, Captain Jack Sparrow (talk) 05:15, 29 June 2022 (UTC)
 * The change to C would have deserved a thread on the talk pageBefore the change, after the change, there is no need to have an RfC, you could have just made a thread. I got notified by the bot for this, and I don’t think it was worth the bot bothering. &#124; Zippybonzo &#124;  Talk &#124;  07:48, 29 June 2022 (UTC)

Suggested outline (2022-06-28)
Overall, the current article is well cited and has some good material, but its organization is a bit of a mess. It consists of a hodge podge of vaguely related topics, and the delineation between sections is unclear. Additionally, the article doesn't seem focused around "computer program" as a central theme. It contains several subsections now which elaborate on things of unclear relevance to computer programs -- for example the BNF discussion under "Syntax and semantics" uses linguistics as an example and is only tangentially relevant to what a "computer program" is. Recent edits have moved some things around and added material, and these have mostly been improvements I think, but there's still a ways to go.

Here is a draft suggested outline that I think would make sense. What do you think?

1. History (the earliest computer programs and overview of how the notion of a program has evolved)

2. Modern computer programs (survey of what a computer program means today)


 * This is a current major omission from the article. What I have in mind is illustrating through examples what today's computer programs are and look like. This section could incorporate much of the material currently under Imperative Languages and Declarative Languages as example programs.


 * The "hello world" section might also fit here. It's currently out of place but could instead be "examples" or something.


 * It would be great for this section to also include some empirical survey information such as: who writes programs today, what language(s) are they typically written in, etc.

3. Program elements


 * 3.1 Syntax and Semantics


 * This is currently under "programming langauges and paradigms" but it doesn't quite fit there. It's more fundamental to what a program is.


 * 3.2 ???

4. Programming languages and paradigms

5. Program development (current section titled software engineering & computer programming)

6. Classification of computer programs


 * 4.1 By language


 * 4.2 By platform (OS, architecture)


 * 4.3 By use case (e.g., embedded systems programs, mobile phone apps, web apps, etc.)


 * 4.4 By functional category

7. In popular culture (another section missing right now, could be nice to have)

Caleb Stanford (talk) 18:42, 28 June 2022 (UTC)


 * The current structure is just fine. Timhowardriley (talk) 19:02, 28 June 2022 (UTC)
 * I generally agree with Caleb Stanford's assessment. (Do you prefer Caleb, Mr. Stanford, something else?) This article should be mostly accessible to people with no programming experience, with occasional detail (perhaps in footnotes) to make it enjoyable for more-experienced folks. Your proposed scope and organization of the article makes sense and is highly navigable. There is just too much inappropriate content in the article at the moment, the most unfortunate being the sprawling C++ code and Makefile. Short snippets of code illustrating different levels of languages is best. I also agree with the emphasis on modern programming; as important as ALGOL, BASIC, etc., are, they are unrepresentative of what programmers do today, which again is very important for the layman. Ovinus (talk) 19:24, 28 June 2022 (UTC)
 * This article spends too much time covering things it shouldn't, I can agree on that much. In particular we devote way too much space to object oriented programming and technical details of C and C++ which should just be a brief summary and pointer to their own articles. I disagree that a modern definition of a computer program is much different from a historical one. We have other articles (lots of them! Software development, Computer programming, Software engineering) that can cover the process of programming or what specific tools and language variants are used today. This article should be general in scope - the parent of many child articles, in keeping with Summary style. Sections on particular platforms and use cases don't really belong here. Also, no popular culture section. This article will not be helped by a collection of cruft and trivia. MrOllie (talk) 20:19, 28 June 2022 (UTC)
 * Good point about separate articles, thanks! Ovinus (talk) 21:14, 28 June 2022 (UTC)
 * Thanks, you both put it better than I did. ("Caleb" is fine!) Re: modern definition, my point is that the modern notion of a program is very different from, say, Ada Lovelace's note G or the universal Turing machine currently surveyed under History. Explaining what a program is today and what it was historically are two very different things. About classification, I think it would be nice to overview some answers to the question: what are some of the ways that programs can be categorized? Those subsections are just some ideas. Caleb Stanford (talk) 22:17, 28 June 2022 (UTC)


 * The key sentence is, "Once the mechanics of basic computer programming are learned, more sophisticated and powerful languages are available to build large computer systems." Timhowardriley (talk) 22:15, 1 December 2022 (UTC)
 * The most profound passage is, "Object-oriented programming developed by combining the need for containers and the need for safe functional programming. This programming method need not be confined to an object-oriented language." Timhowardriley (talk) 10:25, 5 December 2022 (UTC)
 * The most difficult objective to achieve is, "To be effective, program modules need to be defined and distributed to team members. Also, team members must interact with one another in a meaningful and effective way." Timhowardriley (talk) 10:31, 5 December 2022 (UTC)
 * The most insightful sentence is, "C allows the programmer to control which region of memory data is to be stored." Timhowardriley (talk) 11:38, 5 December 2022 (UTC)
 * The "hodge podge" includes the sentence, "Software engineering is a variety of techniques to produce quality software." Timhowardriley (talk) 01:51, 12 February 2023 (UTC)
 * The "modern notion of a program is very different from, say, Ada Lovelace's note G" because "[a]t each stage in hardware's history, the task of computer programming changed dramatically." Timhowardriley (talk) 09:33, 12 February 2023 (UTC)
 * The "hello world" program in Basic at the beginning is is not "currently out of place" because "if a student didn't go on to a more powerful language, the student would still remember Basic." Timhowardriley (talk) 10:45, 22 February 2023 (UTC)
 * The "most unfortunate [inappropriate content is] the sprawling C++ code" which illustrates how "[i]n the 1970s, software engineers needed language support to break large projects down into modules. One obvious feature was to decompose large projects physically into separate files. A less obvious feature was to decompose large projects logically into abstract datatypes." Timhowardriley (talk) 12:59, 6 March 2023 (UTC)
 * With kindness, can you please stop editing the talk page of this article with non-constructive edits? I understand you disagree with the assessment of the article, but it doesn't help to repeatedly edit the talk page in this way. I also apologize if you took offense to the tone of my comments or felt that any of them are not actionable. My intention was to propose, in my view, how the article can be improved. Thanks, Caleb Stanford (talk) 04:42, 7 March 2023 (UTC)
 * So far, this thread has successfully dissuaded any editor from trying to implement any of these substandard suggestions. Timhowardriley (talk) 11:00, 7 March 2023 (UTC)
 * Follow up: an example of a quality suggestion would be, "Dr. Alpha from Bravo University wrote a computer textbook that has a chapter titled 'Program development'. In this chapter, software engineering and computer programming are discussed." Timhowardriley (talk) 12:51, 7 March 2023 (UTC)
 * Tim, your posts have not successfully dissuaded any editor; nor do they attempt to substantively address any points that were raised. Your edits here are WP:DISRUPTIVE. They are non-constructive and do not engage with the criticism. Please do not continue this behavior.
 * If you have any suggestions for how to improve the article in a different way, that is appropriate for the talk page. If you think the article is perfect as is, then simply let the page be. Caleb Stanford (talk) 16:51, 7 March 2023 (UTC)
 * Regarding About classification, I think it would be nice to overview some answers to the question: what are some of the ways that programs can be categorized?: The article currently describes a handful of program categories. They are: knobs and switches, first generation, second generation, third generation, fourth generation, imperative languages, declarative languages, functional languages, logical languages, object-oriented programs, application software, system software, utility programs, and microcode programs. What is your vision for an overview? Timhowardriley (talk) 17:32, 8 March 2023 (UTC)

Moved "program execution" template and top image to talk.
I'm moving the newly added "program execution" and the top image to this talk section.



The "program execution" template is too large and negatively affects the article's format. The top image has interesting information, but too much of it. Also, the image should be split in two. There are two concepts present, and the joining of them is unclear. Timhowardriley (talk) 07:31, 10 June 2023 (UTC)


 * @Timhowardriley The distinction between "Program", "Process" and "Thread" and the steps that a line of "instruction code of program" is delivered to a CPU for processing is important. So in my opinion the image can be restored. That is, the image says "What happens that a CPU processes a program?". Thanks, Hooman Mallahzadeh (talk) 11:01, 10 June 2023 (UTC)
 * This edit to move the image to the OS section was a good idea. Timhowardriley (talk) 22:10, 14 June 2023 (UTC)