Talk:Pseudocode
![]() | Computing Start‑class Mid‑importance | |||||||||
|
![]() | Computer science Start‑class High‑importance | ||||||||||||||||
|
- See also Wikipedia:Algorithms on Wikipedia - Wikipedia guidelines for mathematical style pseudo code.
Archives
PHP code stub format
Is it really a good idea to give a piece of bad-practice code as an example? Wouter Lievens 08:19, 29 August 2005 (UTC)
- Nope, so please feel free to improve! :) [I'm no PHP programmer myself.] --Wernher 08:31, 29 August 2005 (UTC)
- I've removed the extraneous code stub and improved the PHP stub. It's still simple to the point of simplisticness, but it's better. The original was just horrible though. — Ambush Commander(Talk) 04:34, 30 December 2005 (UTC)
Is there a standard pseudocode format?
If there is, then it should be mentioned. If not, then the more popular ones should be. Gflores 03:08, 31 October 2005 (UTC)
- As far as I know, there is no standard or even a popular pseudocode format. There are some well-known ones that have appeared in major publications such as the CLRS pseudocode, but these were not emulated to any extent that I know of. It seems like pretty much everyone invents their own pseudocode. Deco 20:01, 31 October 2005 (UTC)
Just for my own reference, I'm going to mention a few things here:
- Wikipedia:Algorithms on Wikipedia -- general pseudocode guidelines
- Wikipedia:WikiProject Computer science/Manual of style (computer science) Wikipedia talk:WikiProject Computer science/Manual of style (computer science) -- more pseudocode guidelines
- Category:Articles with example pseudocode -- good examples
- User:Dcoetzee/Wikicode: Wikipedia:WikiProject_Computing/Pseudocode -- more detailed guidelines that suddenly got far too specific.
I think I'm not allowed to mention them in the article, because of some silly rule claiming that Wikipedia articles are not supposed to mention Wikipedia. --68.0.120.35 20:47, 5 March 2007 (UTC)
- Actually I created Category:Articles with example pidgincode and Category:Articles with example pseudocode in October 2006, with very similar content as the above category (created by user:Quuxplusone), but it was deleted. I never understood the arguments. One argument was that there should be no "articles with example code" at all. Very strange, they still remain. See Wikipedia:Categories_for_deletion/Log/2006_October_17#Category:Articles_with_example_pidgincode
- After that I tried to make a list of those articles in the pseudo code article, but that was also deleted.
- Someone suggested on my user talk page that I should retag those articles with example code category, but I gave up.
- I hope the category will be kept. The main argument for keeping it is of course not that it is helpful when creating wikipedia articles, but that it is helpful when creating academic articles including pseudo code.
- I have now added some mathematical style psuedo code examples in the category. Mange01 (talk) 10:43, 4 February 2008 (UTC)
Dummy code
I got redirected to "pseudocode" after clicking on a link for "dummy code" on the disambiguation page for "dummy." From the description given there, it doesn't seem like that redirect should happen. —Preceding unsigned comment added by Blueyoshi321 (talk • contribs) 17 October 2006
- Good comment. I have created a new dummy code stub. Please feel free to add information. Mange01 16:17, 17 October 2006 (UTC)
Why PHP?
Why is the examle in PHP? To me, it doesn't represent a general programming language. Could we use C? Gutworth 01:48, 30 April 2007 (UTC)
Why not just put an example of booth in the article? 12:13, 08 November 2007 —Preceding unsigned comment added by 141.241.188.50 (talk)
Quality
This article is, on the one hand, very poorly sourced, and the other, a sketchy treatment of pseudocode that seems to rely on original research and the understanding of the authors, not independently documented public knowledge. Should it be flagged? KenThomas (talk) 18:54, 31 January 2008 (UTC)
- Please be less sketchy in your criticism. :) Or suggest concrete improvements. Is four sources poor? The PHP example perhaps originates from someones own work. Except from that, the article is not based on original research. I have contributed especially to the mathematical style pseudocode issues, and to the definitions. I started out from a large number of definitions that I found on the net and rephrased them. (None of them were authorities, so I did no mention them in the reference list.) The sentences about i/o varibles in the lead (I did not write that) could be improved and made more generic since it is very application specific. Mange01 (talk) 11:19, 4 February 2008 (UTC)
"Category:Articles with example pseudocode" is nominated for deletion
Category:Articles with example pseudocode is nominated for deletion. You can vote Keep or Delete at the CfD debate. Mange01 (talk) 15:33, 5 February 2008 (UTC)
- The result of the discussion was Keep. Mange01 (talk) 22:38, 21 February 2008 (UTC)
Pseudo-code Machine Disambiguation
Being a somewhat older generation of programmer, I came to this article looking for what's actually called a pseudo-code machine. Can I suggest that this article be disambiguated from p-code machine, or at least have one of those intro lines they have in some articles saying "if you meant p-code machine, click here"? I'm not a big-time Wikipedia editor, so I'm not sure what standards are in cases like these. --Rob (talk) 00:08, 23 January 2009 (UTC)
Global data var Km,Miles:Real Begin Input Km Mile=1.6*Km Display Miles End; —Preceding unsigned comment added by 124.43.136.209 (talk) 03:43, 15 March 2009 (UTC)
- First we should clarify in what contexts p-code means pseudo code, and where it means precompiled byte code? I suppose the latter is more common today, for example in Java and Matlab. I don't understand in what sense the p-code is pseudo code. Mange01 (talk) 13:15, 24 March 2009 (UTC)
P-code short for pseudo code
Pseudo code or pseudo machine code is produced by some compilers.
An sssembly macro is also referred to as a pseudo code instruction. A compiler may produce pseudo code that is then translated to machine code by a pseudo code definition in the target matchine code instruction.
Pseudo code used in this way is an abstraction allowing the translation of a high level language to an intermediate pseudo code instruction set that can then be defined for a specific target: processor.
This is the same as the p-code instructions. The p-code is pseudo-code. It can be interpreted or translated to machine code.
There should a section covering this usage of pseudo code. — Preceding unsigned comment added by Steamerandy (talk • contribs) 18:51, 4 December 2014 (UTC)
Python?
203.129.48.197 wrote: "Python is commonly used in place of psuedocode due to its ease of human readability and conciscion. Examples of this can be seen in other wikipedia articles." The same we could say about Pascal etc. I am sure this has to be removed!--Tim32 (talk) 18:39, 4 November 2010 (UTC)
- Agree. I addressed that issue a while ago.Mange01 (talk) 22:32, 13 March 2011 (UTC)
- Actually Python pseudo-code often introduces confusion as it typically relies on Python syntax elements rather than human language. Pseudo-code should be thought of as language agnostic and avoid operator soup and specific block conventions as much as possible 82.67.45.232 (talk) 07:06, 23 June 2015 (UTC)
Why mention bytecode in the first sentence?
Why was the following added in the top of the article:
- This article is about human-readable pseudocode article. For the compressed binary code used by run-time software interpreters, see bytecode.
Pseudocode is not mentioned in the bytecode. Is bytecode really commonly confused with pseudocode? Perhaps you have p-code in mind, i.e. precompiled code? I suggest a removal of that sentence. Mange01 (talk) 13:01, 14 February 2011 (UTC)
- Agreed. I removed it.--Tim32 (talk) 21:54, 13 March 2011 (UTC)
- Great! Mange01 (talk) 22:32, 13 March 2011 (UTC)
Why the commercial for Donald Knuth's book
Commercial for Donald Knuth's "seminal" book has not much to do with pseudo-code. His MMIX code is assembler code rather than pseudo-code. I have tried to remove the text but it reappeared. Mange01 (talk) 22:58, 13 March 2011 (UTC)
- Ok: very important remark! MMIX assembler is not pseudo-code! We can find any MMIX simulator in Internet, but it would be impossible to find any interpreter program for an original pseudo-code. Moreover, it would be impossible to implement such simulator for any pseudo-code (except trivial cases).--Tim32 (talk) 18:30, 14 March 2011 (UTC)
- Thnx for the support. I have now removed the text.Mange01 (talk) 23:48, 15 March 2011 (UTC)
- Ok.--Tim32 (talk) 19:49, 16 March 2011 (UTC)
- Thnx for the support. I have now removed the text.Mange01 (talk) 23:48, 15 March 2011 (UTC)
"Pascal"-style pseudocode
In my opinion that piece of pseudocode resembles Basic more than Pascal. It's not really similar to it either, but I've seen pseudocode that had a lot more in common with Pascal. sdaj
Isn't this a bit misleading?!?
Pseudocode is a design step which, in many if not most cases, takes place prior to the language being selected. It really acts as a high level language interpretation of a flow chart. In fact, language is considered to be a secondary thought to a solution. For example, not all programs are best fit for an Object Oriented approach. In these cases, it would be counterproductive to presuppose the use of Java before you knew what was needed, only because Java was what you knew best or was most comfortable with. So, in other words, there should not be any examples of pseudo being any where near any language. If, else, while, do - while and for are aspects of all languages and therefore acceptable. But aside from a few examples it should be able to be passed from a designer/consultant to an engineer without regard to any language and then be translated into what ever language best suits the program's requirements. Some solutions are even best handled with multiple languages. An engineer or programmer who understands the fundamentals to PROGRAMMING can learn any language in short order. Syntax is really the only difference between languages, because for the most part all languages do the same thing IPO. Therefore, all pseudocode should be completely syntax neutral. Also, variable declaration should be included in pseudocode, but again without language preference. 12.56 would be a "float" in C/C++, but if declared in pseudo it would be a "real" or a "floating point" number. Basically, I would argue that the article needs heavy editing. There would be no point in using the examples presented. Why get 3/4 of the way there just to leave off the the important things that would be necessary for compilation?
— Preceding unsigned comment added by 98.208.32.192 (talk) 09:22, 7 July 2012 (UTC)
- Agreed. 75.85.52.233 (talk) 20:43, 23 February 2013 (UTC)
Consider mentioning the PlusCal language
Hello! In the moment I do not have the time to do it myself, but I suggest that you folks add a mention to PlusCal: it is a precise language for writing algorithms (not programs), developed by Leslie Lamport (the creator of LaTeX). Algorithms written in PlusCal can be formally checked for bugs, so they are precise in a sense, but one may use the power of mathematical notation to keep from writing excessively detailed code. PabloMayckonSilvaFarias (talk) 00:46, 7 May 2013 (UTC)
Functional pseudocode
If anyone knows anything about this, it would be nice to have your input. Almost all pseudocode I ever encounter is in imperative style. Functional solutions do exist, and, in some (if you're like me, all) fields (e.g. computational geometry), can be desirable. This page gives some examples, but it's the only thing I could find online.
As an example, see the mergesort algorithm. Implemented naively in a functional language, it is quite inefficient. Thus, being given the algorithm in imperative style is not always much help when implementing with a functional language. — Preceding unsigned comment added by Surement (talk • contribs) 19:33, 16 May 2013 (UTC)
What is APDT?
The external link to a "pseudocode generation tool" appears to be nothing more than advertising for a company called gnstudio. The APDT tool is not available for download or inspection through this link, and I gather that it is a paid-for commercial tool as well. I think this link should be deleted. — Preceding unsigned comment added by 31.210.131.206 (talk) 11:17, 30 October 2013 (UTC)