[go: nahoru, domu]

Jump to content

Talk:Computer program: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
seriously, please don't nominate it yet. This article needs some work.
rate class=C -- not stable needs work on content
Line 38: Line 38:
| currentstatus=DGA}}
| currentstatus=DGA}}
{{WikiProjectBannerShell|1=
{{WikiProjectBannerShell|1=
{{WikiProject Computing|class=B|importance=top}}
{{WikiProject Computing|class=C|importance=top}}
{{WikiProject Computer science|class=B|importance=top}}
{{WikiProject Computer science|class=C|importance=top}}
{{WikiProject Software|class=B|importance=top}}
{{WikiProject Software|class=C|importance=top}}
}}
}}
{{Vital article|topic=Technology|level=4|class=B|link=Wikipedia:Vital articles/Level/5/Technology|anchor=General (67 articles)}}
{{Vital article|topic=Technology|level=4|class=C|link=Wikipedia:Vital articles/Level/5/Technology|anchor=General (67 articles)}}
{{American English}}
{{American English}}
{{Annual readership|days=90}}
{{Annual readership|days=90}}

Revision as of 15:09, 28 June 2022

Former good articleComputer program was one of the Engineering and technology good articles, but it has been removed from the list. There are suggestions below for improving the article to meet the good article criteria. Once these issues have been addressed, the article can be renominated. Editors may also seek a reassessment of the decision if they believe there was a mistake.
Article milestones
DateProcessResult
November 4, 2007Good article nomineeNot listed
November 9, 2007Good article nomineeListed
November 17, 2007Good article reassessmentDelisted
October 28, 2021Good article nomineeNot listed
June 7, 2022Good article nomineeNot listed
June 25, 2022Good article nomineeNot listed
Current status: Delisted good article

Template:Vital article


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.[1]

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)[reply]

References

  1. ^ ISO/IEC/IEEE International Standard - Systems and software engineering. ISO/IEC/IEEE 24765:2010(E). pp. vol., no., pp.1-418.

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 nomination page. —Community Tech bot (talk) 06:59, 30 June 2021 (UTC)[reply]

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)[reply]

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)[reply]

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)[reply]
See also WP:REFCLUTTER. --Kent Dominic·(talk) 05:55, 14 November 2021 (UTC)[reply]
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)[reply]
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)[reply]
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)[reply]

See also

Hey, Timhowardriley! You've reverted my edit in see also section without any justification. For such an important topic as computer program is, see also here is a pile of garbage. Why are a bunch of programming langs here? Utf-8? Bill Gates?! Please see WP:SEEALSO, and remove these junk, it doesn't help any reader. And to keep this more widespread I'll ping @David Eppstein:, who's the only admin I know knowledgeable in math and compsci.

Cheers. 37.214.79.163 (talk) 10:50, 13 February 2022 (UTC)[reply]

Hi 37.214.79.163. I built the 'See Also' list by extracting all the unique wikilinks from the articles 'Software' and 'Computer programming'. Personally, I use it as a reading list to keep up-to-date on technology. Timhowardriley (talk) 11:20, 13 February 2022 (UTC)[reply]
I removed 'Bill Gates'. Another editor added Utf-8 here: https://en.wikipedia.org/w/index.php?title=Computer_program&diff=1069134714&oldid=1069102066 . Timhowardriley (talk) 11:31, 13 February 2022 (UTC)[reply]
I can understand it, but by having so many links here you make it unreadable. If people would like to read about php, they can, but if it's not in text, it shouldn't be cluttered between dozens of other links. Ideally See also should be as small as possible, with not all relevant links possible as such list would be huge. You can, of course, place all the links to all the programming languages or algorithms or important people here, but that's not a purpose. If it's not linked inside lengthy article, maybe it just shouldn't be here? 37.214.79.163 (talk) 16:49, 13 February 2022 (UTC)[reply]
@Timhowardriley: The see also list is way way too long. And extracting all wikilinks from an article is not how they should be built. Generally, see also links are for topics that should be covered in the main text of an article, but aren't. There should only be a few of them (at most maybe half a dozen, often zero) in a well developed article. Please take a chainsaw to your list, or stop policing it and let others do so. —David Eppstein (talk) 17:38, 13 February 2022 (UTC)[reply]
Please don't encourage others to arbitrarily chainsaw. I consider every item germane. Here's another article with a long 'See also' list: Graph_theory#See_also. Timhowardriley (talk) 17:51, 13 February 2022 (UTC)[reply]
That list is also too long, for the reasons David Eppstein explained, and because it piles additional links on top of the no less than five lists of links with which it begins. XOR'easter (talk) 19:04, 13 February 2022 (UTC)[reply]

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)[reply]

  • 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 Wikipedia: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#Instruction_types. Another trivial fact was tagged that is just a transition sentence to the next section.
  • Wikipedia: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)[reply]

Most of the code throughout the article, specifically around Computer_program#Object-oriented_programming 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)[reply]

This post is a retribution because I failed this editor's GA request. See Talk:Binary_search_tree/GA2#Final_assessment. Timhowardriley (talk) 05:14, 11 April 2022 (UTC)[reply]
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)[reply]
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)[reply]
No, as quoted, and without context, it does not display anger. · · · Peter Southwood (talk): 07:40, 10 June 2022 (UTC)[reply]

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)[reply]

As per Wikipedia:Summary style, Computer program#Imperative languages and Computer program#Declarative languages 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)[reply]
I hope this edit satisfactorily solved the dilemma. Timhowardriley (talk) 01:36, 26 May 2022 (UTC)[reply]

Incorporating Computer programming and Programmer into this article

I have reservations about this edit to incorporate sentences from two other articles into this article:

  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.

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)[reply]

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)[reply]
Very good. However, one GA at a time. Timhowardriley (talk) 09:20, 28 May 2022 (UTC)[reply]
BTW, I tried to improve operating system. Unfortunately, it ended in this train wreck. Timhowardriley (talk) 11:09, 28 May 2022 (UTC)[reply]

Recommendations

(Note: I recently reviewed this article at GAN.) @Timhowardriley: 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)[reply]
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)[reply]
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)[reply]
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)[reply]
Fair enough. I'll research a better thesis statement. Timhowardriley (talk) 20:13, 9 June 2022 (UTC)[reply]
  • 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)[reply]
But it is not a "Hello World" program... Ovinus (talk) 14:54, 9 June 2022 (UTC)[reply]
  • 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 [1], 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)[reply]
  • 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 free(). But I assume the operating system performs garbage collection. Timhowardriley (talk) 14:45, 9 June 2022 (UTC)[reply]
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)[reply]
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#Examples and Declarative_programming#Examples. This section describes memory management and is intended to be a part of computer program: Imperative_programming#C. Timhowardriley (talk) 19:13, 9 June 2022 (UTC)[reply]
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)[reply]
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)[reply]
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)[reply]
Object-oriented programming is a programming method, not a language. The C code in this example is a parallel algorithm with the Imperative_programming#C++ 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)[reply]
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)[reply]
  • "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)[reply]
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)[reply]
I was snarky. Sorry. Timhowardriley (talk) 19:14, 9 June 2022 (UTC)[reply]
You're fine? We're having a good discussion. Ovinus (talk) 19:58, 9 June 2022 (UTC)[reply]
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)[reply]
  • "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)[reply]

Thank you for your time and feedback. Timhowardriley (talk) 14:45, 9 June 2022 (UTC)[reply]
  • "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)[reply]

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 x++ instruction is a postfix, increment operator. See Operators_in_C_and_C++#Arithmetic_operators. Therefore, the qualifier isn't warranted. Timhowardriley (talk) 15:39, 11 June 2022 (UTC)[reply]

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)[reply]
Dr. Stair is not being pedantic by saying statements are keywords. Operators in C and C++ is not being pedantic by saying x++ 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 x++ 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)[reply]
I changed the article's note to "C programming language operators like x++ 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)[reply]
Taken as an absolute (which I don't think he intended), Dr. Stair is wrong. [2] 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: [3] ("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)[reply]
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)[reply]
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)[reply]
I hope this edit fills in all the gaps. Timhowardriley (talk) 20:16, 12 June 2022 (UTC)[reply]

GA Review

This review is transcluded from Talk:Computer program/GA3. The edit link for this section can be used to add comments to the review.

Reviewer: Caleb Stanford (talk · contribs) 21:59, 25 June 2022 (UTC)[reply]


Starting review. Caleb Stanford (talk) 21:59, 25 June 2022 (UTC)[reply]

GA review (see here for what the criteria are, and here for what they are not)

The prose is well-written and the article surveys a lot of useful information. I haven't read this article before. This is also my first GA review so corrections/feedback appreciated. The main thing that would improve the article in my opinion is better organization, and clarity with respect to the different dimensions of computer programs considered. I will give some examples and details below.

  1. It is reasonably well written.
    a (prose, spelling, and grammar): b (MoS for lead, layout, word choice, fiction, and lists):
  2. It is factually accurate and verifiable.
    a (reference section): b (citations to reliable sources): c (OR): d (copyvio and plagiarism):
    The article is well-sourced throughout but the chosen reference style repeats the same references many times. For an article with this pattern of references, I would personally appreciate a different citation style that lists each reference only once: either the page number style (like [1]:25-32) or the short form style (Wilson, p. 394 with the full citation included only once in a separate list: Wilson, Leslie B. (2001). Comparative Programming Languages, Third Edition.). The actual references listed contain a relatively small number of books but that is not easily apparent from reading the reference list.
  3. It is broad in its coverage.
    a (major aspects): b (focused):
    Some key concepts are not covered, such as the semantics of computer programs. Also, coverage is difficult to assess due to article organization (more comments on organization below)
  4. It follows the neutral point of view policy.
    Fair representation without bias:
    The article seems to reflect an engineering and systems viewpoint and does not include a perspective from programming languages and programming languages theory. Viewpoints are generally listed fairly but I am not sure fair/due wait is given to each sub-concept and many concepts are missing. As with coverage, this is a bit hard to tell due to the organization of the article (more comments below). One particular example that I doubt is neutral is the delineation of a "5th generation programming language".
  5. It is stable.
    No edit wars, etc.:
    No problem here.
  6. It is illustrated by images and other media, where possible and appropriate.
    a (images are tagged and non-free content have non-free use rationales): b (appropriate use with suitable captions):
    Media/illustrations look great!
  7. Overall:
    Pass/Fail:
    See comments below.

Although it isn't directly one of the GA criteria listed above, my biggest concern with the article overall is its organization. Reading through the article, I don't get a clear sense of which sections should contain which information, and I don't know that the current section choices reflect a clarity of thought with respect to different aspects or features of computer programs.

Specific comments, by section. These thoughts are mostly unedited, please let me know if any comments are unclear:

  • Hello world program: missing some context on what a hello world program is (maybe a brief history) and how it relates to the key concept of a computer program. I'm not sure why the section is discussing concepts of variable declaration and use; that's specific PL syntax stuff, what we want to explain here is what a computer program is and how a Hello World program is used as an example of one to illustrate program syntax.
  • The History section is generally very good, but the last subsection "Programming environment" seems out of place as written (also, lacks references). Is this intended to discuss a development in the history of programs to more advanced GUIs and IDEs? Or does this belong in a different place? Also what is the criteria for what programs are going to be listed in the History section, e.g. why are we not include a COBOL program, a C program, a C++ program, etc?
  • The programming language section includes a view of PLs by "generation", which in my experience is not a common way to understand programming languages today and reads as obsolete. In particular, first through fourth generation programming languages seem like perfectly reasonable delineations, but the Fifth-generation programming language is a dubious concept that I don't think makes sense from a programming languages standpoint. This delineation needs some qualification. For example, who proposed this classification and when was it proposed, and how widely was it accepted?
  • Why does the PL section include "Imperative Languages" and "Declarative languages" but "Object-oriented programming" is in a different place?
  • I would suggest a different organization with a section on "programming paradigms", including imperative, declarative, OOP, Functional, statically typed, dynamically typed, and many other paradigms that are missing or not discussed currently.
  • It could make sense for PL to be a separate section from programming paradigms.
  • The article is missing a discussion of programming language syntax and semantics. The word ["semantics"](Semantics (computer science)) does not appear in the article.
  • The section "Computer programming" also lacks some clarity on what should be included here. Why is the "waterfall model" discussed but no other systems development paradigms or engineering methodologies? Is this section intended to be an overview of the Software development process? Rather than try to rehash specific paradigms/processes like Waterfall, perhaps it should summarize what computer programming consists of in relation to computer programs, and what are key concepts such as process models, development/code organization strategy, software lifecycle, etc.
  • Program modules: I am not sure why this is a top-level section. The word "module" can refer to sections of a program, or namespaces, or files. It does not necessarily have to do with software aging, but can be simply about software size and separation of concerns. Is this section about code organization more generally?
  • Functional categories: I like this section.
  • Other inclusions: The article mentions only a few programming languages and should at least mention, in a few sentences, different programming languages that exist and how computer programs differ in different languages. For example:
  • the article doesn't contain the words "static" or "dynamic"
  • the article never mentions "Python", "Java" except for a sentence in the intro, "Javascript", or many other popular languages.
  • The article lacks a discussion of what counts as a computer program, not an easy concept. E.g. HTML? LaTeX? Have computer scientists discussed what counts as a program and how have different scientists agreed/disagreed on basic inclusions?

Minor comments:

  • First sentence: I disagree that the difference between imperative and declarative programming is whether the instructions are a list or a set. This would only be true in certain languages, not in others. I would suggest: "In computer programming, a computer program is a set or sequence of instructions in a programming language that a computer can execute or interpret."
  • Is "The Free Dictionary: computer program" a reliable source? Didn't find it listed at WP:Reliable sources/Perennial sources
  • For a topic with a controversial definition like this, more work may be required to source the definition in the lead.
  • Program execution box at the top: Why do notable compilers only include GCC, LLVM, and CLang
  • "For examples of declarative languages, visit Declarative_programming#Examples." -- would be great to have a broad survey of a few examples, this can be pointed to with "see also" or another similar template rather than ad hoc text
  • "Example packages include accounts payable and payroll" -- This is a non sequitur. Examples of fifth generation languages include specific applications for accounts payable and payroll? I am not sure what the writer had in mind. (But I don't think the entire concept of a 5GL is accepted today, see comments above.)
  • Programming-in-the-small/programming-in-the-large: seems out of place, why is this discussed here and not e.g. under modules
  • "Utility programs detect computer viruses." Comment may be out of place / unreferenced / unexplained

Note that I didn't look at the article history or if there were any previous reviews so these are basically raw/unedited thoughts.

Good luck! Best, Caleb Stanford (talk) 23:06, 25 June 2022 (UTC)[reply]

Regarding Why does the PL section include "Imperative Languages" and "Declarative languages" but "Object-oriented programming" is in a different place?: My research categorizes Object-oriented programming as a programming method, not a programming language. Timhowardriley (talk) 07:12, 26 June 2022 (UTC)[reply]
Regarding Is "The Free Dictionary: computer program" a reliable source? No, it isn't a reliable source. However, the definition does properly introduce the rest of the lead section. This article has a history of contentious definitions of computer program. The current definition and its source are the result of collaboration. Timhowardriley (talk) 08:07, 26 June 2022 (UTC)[reply]
Regarding Some key concepts are not covered, such as the semantics of computer programs.: See User:Timhowardriley/sandbox. Timhowardriley (talk) 08:43, 26 June 2022 (UTC)[reply]
Thanks for the edits so far! Several major improvements IMO. If you want help editing the article, let me know. Caleb Stanford (talk) 13:32, 26 June 2022 (UTC)[reply]
The article could use a section titled, "Syntax and semantics". The guiding definition I plan to follow is from Comparative Programming Languages by Wilson and Clark. It says, "The syntax (or grammar) of a programming language describes the correct form in which programs may be written while the semantics denotes the meaning that may be attached to the various syntactic constructs." Timhowardriley (talk) 16:21, 26 June 2022 (UTC)[reply]
Thanks! I think that's a good idea, basing on Wilson and Clark seems fine, and I can help with those sections once you put in a placeholder. Other than Wilson/Clark, I think we may want 1-2 other good textbook sources from a programming languages/compilers perspective to complement the already excellent existing references. I'm not going to edit the article without your direction because I'd rather not contest informal "ownership" over the article content but there are plenty of places I see room for improvement and I'll continue to monitor and post feedback here on the talk page. Caleb Stanford (talk) 16:49, 26 June 2022 (UTC)[reply]

Status query

Caleb Stanford, Timhowardriley, what is the status of this nomination/review? It looks like this review was never formally failed by Caleb Stanford, and that although Timhowardriley added a failure to the Article history template and immediately renominated the article, the review seems to be proceeding above. If there is work to be done, then continuing it in the auspices of a GA review on this page, where work to improve the article is a regular part of the reviewing process (unless there's too much wrong with the article to set right in a reasonable number of days). Note that if Caleb Stanford is planning to do significant work writing/editing sections of the article, a new reviewer will ultimately be needed for those sections. BlueMoonset (talk) 23:43, 26 June 2022 (UTC)[reply]

@BlueMoonset: my assessment is fail with suggested revisions, but I am new to the reviewing process so I guess I did not follow the right protocol to formally resolve it above? In the talk page, User:Timhowardriley updated it but that caused to list as "nominated" for a 4th round on the nominations list, which was incorrect so I tried to roll that back to list the 3rd round target instead of 4. (Re writing/editing -- I haven't done significant edits yet to the article but will keep that in mind.) Caleb Stanford (talk) 23:57, 26 June 2022 (UTC)[reply]
Caleb Stanford, the big question when you do a review and decide that the article doesn't meet the criteria, is whether the places it falls short can be rectified during the review process. It is expected that the majority of nominations will have something wrong, and sometimes a number of things. If the ways in which it falls short can reasonably be fixed within about seven days, the usual thing is to place the nomination on hold rather than to fail it outright, specifying on the review page what needs to be done to improve the article to the point where it meets the criteria. However, if the article's shortcomings are such that too much is wrong for it to be fixed in that period, failing it is the proper thing to do. Note that the last two GA nominations have been failed immediately because of significant issues (GA1 and GA2), so if that isn't the case here, then reopening this is a consideration. However, if this time significant issues remain, then it would be appropriate to fail the article as you did; what would not be appropriate in that case is an immediate renomination by Timhowardriley without addressing said significant issues first. BlueMoonset (talk) 00:16, 27 June 2022 (UTC)[reply]
Thanks for clarifying! And especially for the overview of how the process works. Despite my generally positive review above (and positive view of the article's potential), the more I look into it the more problems and quibbles I find, so I expect that revisions will take more than 7 days. For that reason, I will list as failed for now and remove the GAN template. Caleb Stanford (talk) 00:46, 27 June 2022 (UTC)[reply]
This is okay. I'll describe BNF in terms that even I can understand it. Then I'll renominate it. Timhowardriley (talk) 18:08, 27 June 2022 (UTC)[reply]
If possible, please let me know before re-nominating. I'd like to do some work on the article organization first and the article may not currently be stable. Lots of things out of place. OOP shouldn't be its own section, place it under "Programming Paradigms". The list of PLs with details and syntax is probably out of place; this isn't list of programming languages by type, it should instead provide an overview of how different languages relate to the key concept of a program. The article's strength right now is the History section (aside from the last part) and the section on "functional categories". Caleb Stanford (talk) 19:15, 27 June 2022 (UTC)[reply]
Hack at it. I'll only be in my sandbox. Thanks for your help. Timhowardriley (talk) 20:03, 27 June 2022 (UTC)[reply]

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)[reply]

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#Features,_limitations_and_extensions says, "Unlike in Prolog, statements of a Datalog program can be stated in any order." Timhowardriley (talk) 16:15, 26 June 2022 (UTC)[reply]
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)[reply]
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)[reply]
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)[reply]