Talk:"Hello, World!" program

From Wikipedia, the free encyclopedia
  (Redirected from Talk:"Hello, world!" program)
Jump to: navigation, search
WikiProject Computing (Rated C-class)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 

External link removed[edit]

I removed the following external link:

because it's a mere copy (and one that gives no credit to the original author) of the Hello World Collection at http://www.roesler-ac.de/wolfram/hello.htm which doesn't add any original content. wr 80.137.174.130 (talk) —Preceding comment was added at 21:43, 20 May 2008 (UTC)

Update: Someone put in the same link again, probably in order to promote this copycat site (which has ads). I removed the link again. Seems like this person has been busy reverting attempts to remove the link to his site. Hundreds of people have contributed to the original Collection, and this guy copied it, removed all the credits and wants to promote it as if it was his original work, and possibly make money from it. The original site has all the credits, no ads, and (by now) more languages. wr 80.137.168.174 (talk) 20:13, 18 June 2008 (UTC)
Another update: This seems to be turning into an undo war. Although his link has been removed several times, he always returns to put it back in. Anyone know how to stop this abuse? wr 80.137.168.125 (talk) 22:17, 4 July 2008 (UTC)

Just get a admin to ban the user. Besides, if the roesler-ac.de one is on the web, why do we need this? Kelton2 (talk) 13:27, 21 May 2013 (UTC)

Picture is not representative[edit]

A GUI "Hello World" program, written in Perl

Hello world is essentially supposed to be the simplest program in a given language. The one in the picture goes beyond its remit and is not representative. I'll be back with a counterproposal if no objections. 218.221.177.69 (talk) 03:16, 14 July 2014 (UTC)

Hi. I agree. It needs cropping. Best regards, Codename Lisa (talk) 12:11, 14 July 2014 (UTC)
Done, thanks. 121.103.176.27 (talk) 11:20, 23 July 2014 (UTC)

I've replaced it with File:TI_BASIC_HELLO_WORLD.png, which is the simplest, clearest example I could find on Commons. --McGeddon (talk) 14:16, 24 July 2014 (UTC)

@McGeddon: hi. You know, I find it extremely strange that an article chokeful of source code samples must also show an image that has a source code in it.
Best regards,
Codename Lisa (talk) 01:33, 25 July 2014 (UTC)
It is a bit strange, but there should probably be a code example in the lead somewhere to convey just how simple "one of the simplest programs possible" is in practice, so that the lead can stand alone. A code example in text and a less oblique output photo would also work. --McGeddon (talk) 07:50, 25 July 2014 (UTC)
No, it is totally strange. Lead section is supposed to be a simplified summary of the entire article and since source codes are gobbledegook to most people, they mustn't be in the lead, image or not.
Best regards,
Codename Lisa (talk) 08:39, 25 July 2014 (UTC)
Good point. But in the absence of any simple, clear, thumbnail-legible screenshots of a hello-world program's output on Commons, I think this may be our best illustration of what a hello world program looks like on a screen, for now. (The PSP image further down is non-standard and cluttered, and the machine-tool photo too oblique.) I'll see if I can find anything better out there. --McGeddon (talk) 09:02, 25 July 2014 (UTC)
Oh, don't you worry about that. I can create one easily enough. I have JavaScript example ready. Best regards, Codename Lisa (talk) 10:20, 25 July 2014 (UTC)
P.S. There is also File:Msgbox.png. Codename Lisa (talk) 11:19, 25 July 2014 (UTC)
The caption ('A "Hello World" program...') is not correct because the image shows the output from a program. I'm afraid I don't have a suggestion about fixing the caption as I'm not convinced that showing "Hello World" is very useful. Johnuniq (talk) 10:43, 25 July 2014 (UTC)
I choose that caption because it matches the article's lead. The lead defines such a thing as 'a "Hello world" program'. Program itself is an abstract concept; only its output or source code can be captured. Best regards, Codename Lisa (talk) 11:19, 25 July 2014 (UTC)

FWIW, I disagree that the pic in the lead shouldn't show any code. The article is about a program, not an application. Showing window with a string and an OK button is meaningless and not representative of most hello world programs, which would have a command-line interface. Lastly, I object to the claim that a code example is gobbledegook in this context. This is an article about programming, not about end-user applications. So I'd rather have File:TI_BASIC_HELLO_WORLD.png. 31.185.238.99 (talk) 09:22, 10 September 2014 (UTC)

A program is an application by definition. It doesn't matter how simplistic or how extensive the coding it, it's still an application. And I agree with not having a picture of an example hello World program being shown. Showing the code for the benefit of the non-programmer who reads the entry won't make them understand the point of the Hello World program any better. And for those of use who have written the program in a class, it wouldn't any any further benefit.

--RayGhost-Use way as no way; Use limitation as no limitation 19:06, 12 July 2015 (UTC)

Full listings or not?[edit]

I notice for the Java example a full listing is given, including class declarations etc. Then for other others (with the exception of assembly) this is not the case. I am guessing full code listings would be more useful and interesting to people :) — Preceding unsigned comment added by 82.11.218.214 (talk) 14:06, 19 August 2014 (UTC)

They're at List of Hello world program examples. --McGeddon (talk) 11:18, 1 October 2014 (UTC)

Missing comma in historical C sample[edit]

The historical hello world program, adapted from Programming in C: A Tutorial, is missing the canonical comma after hello, which is demonstrated in the tutorial. — Preceding unsigned comment added by 50.168.241.168 (talk) 05:59, 1 September 2014 (UTC)

Examples[edit]

If one looks at the history of this article, one sees that it was at one point an utterly unnavigable mess of mostly non-working pieces of example code. The existance of one example in a particular language quickly resulted in fans of other languages wanting their own represented, and the entire thing spiralled utterly out of control. It was repeatedly culled, and each time someone came back and reinserted "just one example" or "just a few". But it never would stay "just a few".

The result was a broadbased consensus at that time to move the entirely too huge list of hello world examples to wikibooks, and keep only two examples: the original (in B) and the first widely known (in C). In order to keep well-intentioned editors from putting back in their pet languages, an explicit hidden comment was inserted into the text.

Now, it appears that in the years since (it really has been that long) someone moved the Wikibooks content to a WP article, List of Hello world program examples, and some of those examples were placed here. And the list became long, and it was again culled. And then it became long again, and I have just removed it again.

User:Andy Dingley did not exactly revert my removal: instead he came back and replaced "some" examples, producing an even longer section than the one I removed. I think this is not appropriate, given in particular the list of hello world programs article, which any user wanting specific examples can obviously peruse.

The other general concern I have is about code in Wiki articles. In my opinion, the wiki is not a good place for code snippets, because they invariably end up being "corrected" or "refactored" by persons who are not necessarily terribly competent when it comes to programming. The result is that after some time has passed, many of the examples in fact end up not working properly.

There are numerous sites and resources on the internet with huge lists of hello world programs and I see no reason why we should not link them here. But putting them on WP is wrongheaded. Consensus for many years was that we have no examples on this page other than the original two. Has consensus changed? Eniagrom (talk) 11:18, 1 October 2014 (UTC)

I would agree that "a mess of examples" is not a good thing. If you read the history and the talk: archives here, you might also note that I'm one of the editors who has been most active in removing such.
"a broadbased consensus" [to only] "B & C". Where? There has been no such consensus.
This article does not need a list of "my favourite language", but at the same time it does need true examples. Not as language samples, but as examples of what a Hello World program looks like, for the benefit of the general principle. Readers of this article need to see what such a program looks like, and (most importantly) why one would bother. Hello World in JavaScript is trivial - why would any programmer even care to write it? It makes much more sense for more difficult languages like assembler.
My edit was to re-add examples for JavaScript, Java and Assembler. I have no particular attachment to these languages but JavaScript is contemporary and as simple as it gets, Java is contemporary and demonstrates how a modern language might still need to be more verbose. Assembler is obscure these days, but it highlights just how much work can still be needed to get Hello World up and running. I believe these three limited examples convey something of value at the level of a general article on Hello World and thus belong here.
You also removed the note on the Arduino and the use of non-text output devices in the Hello World context. Why?
Finally, I'd point out that it's not Bold - Revert - Edit war again because I KNOW I'M RIGHT. Andy Dingley (talk) 11:33, 1 October 2014 (UTC)
I don't actually agree that examples add anything whatsoever to the article, but for the purposes of discussion, let's assume that I did. We are then in a position where we pick a few languages, a few examples, as representative. How do you decide which languages to choose? Maybe you WP:DGAF and just choose a few arbitrarily, trying to get good coverage of programming lengths or styles or what have you. Good on you! But then someone who is less DGAFy than you comes along and wonders, why is Java here, but not C#? Why is C here, but not C++? Or D?
The thing about the previous consensus -- and it was a consensus, as evidenced by the block comment that has been in the article text ever since we all made the decision years ago, and which has been mostly the status quo for this article since that time -- is that it was a hard and fast rule that was perhaps too limiting, but it was fair. The two examples had *objective* justification. When someone asked why C and not C++ -- as they did, you can see it in talk page archive -- there was an actual response to be had. C was the first widely published example that launched the general trend. Similarly so for B: it was not widely published but it is the first extant example. No one could accuse the editors of playing language favoritism. We weren't choosing Java over C# for political reasons -- and among programmers, language choice is nearly always political -- and so there was never any need to justify that decision.
Because there is no objective reason to prefer Java over C#, there is no objective reason to complain when someone adds a C# example. The list of examples has just increased by one. Since you DGAF, maybe you remove the Java example, but then a Java affecionado will ask the same question in the opposite direction. This is not idle supposition on my part: the current content of the list of hello world program examples is a derivative of what this page used to look like. It had several versions of Hello World in x86 assembler, because why should MASM syntax be better than TASM, or NASM, or GAS? It gets out of hand. It did not come under control until we decided to be serious about not letting anyone put their pet language in.
This is why, even if I agreed that a few choice examples improve the article, I would be forced to say no to adding them. But I don't actually think they add anything. I would not hold this opinion if repositories of hello world examples were difficult to find on-line. But they aren't. Much to my own chagrin, WP currently has a huge list of them at another article. And even if it didn't, there are many, many, many sites with lists of code in every single language under the sun already out there. And better maintained and spam-free repositories of such programs can even be linked here, at no cost to us.Eniagrom (talk) 12:41, 1 October 2014 (UTC)
I have no objection, other than a weak one to pointless churn, if someone replaces a comparable Java example with a C## one. Adding another example though would be a problem as it would fail to add any value from the standpoint of this article (Java practice is largely comparable to C##). You seem to have little faith in WP's ability to maintain an article. You claim that code can't be kept valid, you claim that having one example leads to a plethora. What evidence do you have for this, or that they can't be pruned? Andy Dingley (talk) 13:33, 1 October 2014 (UTC)
I think I covered all of this in my previous comment quite adequately. You may not care which, but many programmers definitely do. They will object to one over the other, and growth or churn will be the only ways to prevent warring over what is included and what isn't. As for evidence, as I believe I stated, I have this article's entire history. Do you want diffs?Eniagrom (talk) 13:59, 1 October 2014 (UTC)

Purpose section should have major modification[edit]

The first paragraph is decent enough. But the rest of the paragraphs.. they don't make much sense to me. In the programming and computer systems courses I've had, I've never heard the Hello World program used as a "sanity test" for the compiler and system. Yes..the section needs a major modification in not just accurate sourcing and just how the section is worded.


--RayGhost-Use way as no way; Use limitation as no limitation 19:06, 12 July 2015 (UTC)