Talk:Computer program/Archive 4

From Wikipedia, the free encyclopedia

Archive 1Archive 2Archive 3Archive 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.  Dsimic (talk | 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)
(edit conflict) 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.  Dsimic (talk | contribs) 16:46, 14 October 2015 (UTC)
I changed the definition in response to #Less specific intro 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.  Dsimic (talk | 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

Timhowardriley 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#Number of digits in store/memory words. 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 Wikipedia:Redirects for discussion/Log/2020 May 16#Computervprogram until a consensus is reached, and readers of this page are welcome to contribute to the discussion. TheAwesomeHwyh 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 nomination page. —Community Tech bot (talk) 14:19, 19 October 2020 (UTC)

Moved Software Engineering's definition of computer program to talk

Expand sections that are just stubs

See also

Citation organisation, uncited claims

A Commons file used on this page or its Wikidata item has been nominated for deletion

Housecleaning for computer program

WP:NOTREPOSITORY

Article's definition sentence.

Incorporating Computer programming and Programmer into this article

Recommendations

An operator isn't a statement

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

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.


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

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)

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)
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)
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)
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)
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)
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)

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)

@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)
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)
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)
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)
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)
Hack at it. I'll only be in my sandbox. Thanks for your help. Timhowardriley (talk) 20:03, 27 June 2022 (UTC)

Definition

class=C

Suggested outline (2022-06-28)

Moved "program execution" template and top image to talk.

Prolog rewrite

Correct results for Prolog numeric grade example

Prolog example use of word "clause"

Related Articles

Wikiwand AI