Skeleton (computer programming): Difference between revisions

Content deleted Content added
m replaced: it's → its (2)
MOS:HEAD
Line 38:
This method of programming is easier than writing a complete function, as these skeleton functions do not have to include main functionalities and can instead be hardcoded to use during development. They usually involve syntactically correct code to introduce the method, as well as comments to indicate the operation of the program. This is not always necessary to call a piece of text skeleton code.
 
== Relation to Pseudocodepseudocode ==
[[File:PXL 20201120 092248538.jpg|thumb|A generic example of pseudocode]]
[[Pseudocode]] is most commonly found when [[Plan|developing]] the structure of a new piece of [[software]]. It is a plain English portrayal of a particular function within a larger system, or can even be a representation of a whole program. Pseudocode is similar to skeleton programming, however deviates in the fact that pseudocode is primarily an informal method of programming.<ref name=":0">{{Cite journal|last=Bellamy|first=Rachel K. E.|date=1994-06-01|title=What Does Pseudo-Code Do? A Psychological Analysis of the use of Pseudo-Code by Experienced Programmers|url=https://www.tandfonline.com/doi/abs/10.1207/s15327051hci0902_3|journal=Human–Computer Interaction|volume=9|issue=2|pages=225–246|doi=10.1207/s15327051hci0902_3|issn=0737-0024}}</ref> Dummy code is also very similar to this, where code is used simply as a placeholder, or to signify the intended existence of a method in a class or interface.
Line 65:
Other forms of NLIs use different forms of input, ranging from other users speaking different languages, to gesture based input to produce a very similar result. With programming languages being developed and written primarily in English, people speaking other languages find it hard to develop new software. NLIs have been used in some studies <ref>{{Cite journal|last=Özcan|first=E.|title=Generating Java Class Skeleton Using a Natural Language Interface |date=2004|url=http://dx.doi.org/10.5220/0002683301260134|journal=Proceedings of the 1st International Workshop on Natural Language Understanding and Cognitive Science|publisher=SciTePress - Science and Technology Publications|volume=1|pages=126–134|doi=10.5220/0002683301260134|isbn=972-8865-05-8}}</ref> to assist people in these situations. The study showed classes written in Java through the use of NLIs. This removed the need for learning syntactical rules, however meant that the class was written using a basic set of skeleton code.
 
=== Polymorphism -based definitions ===
[[Polymorphism (computer science)|Polymorphism]] is an ideology that follows with the [[Object-oriented programming|object oriented programming]] [[paradigm]], where methods can be overridden or [[Overloaded method|overloaded]] (methods with the same name in a child class which will take priority over a method written in a parent class). The definition of methods is based on a skeleton framework defined by the [[syntax]] of the language.<ref>{{Citation|last1=Benaya|first1=Tamar|title=Understanding Object Oriented Programming Concepts in an Advanced Programming Course|url=http://dx.doi.org/10.1007/978-3-540-69924-8_15|pages=161–170|place=Berlin, Heidelberg|publisher=Springer Berlin Heidelberg|isbn=978-3-540-69923-1|access-date=2020-11-18|last2=Zur|first2=Ela|series=Lecture Notes in Computer Science |year=2008 |volume=5090 |doi=10.1007/978-3-540-69924-8_15 }}</ref>
 
Line 79:
[[Algorithmic skeleton]] frameworks are used in parallel programming to abstractly describe the methods in question for later development. The frameworks are not limited to a single type, and each of these types have different purposes to increase the efficiency of the developer's program. These can be categorised into three main types: [[Data parallelism|data-parallel]], [[Task parallelism|task-parallel]] and resolution.<ref name=":1" />
 
=== Data-Parallelparallel ===
These skeleton algorithms are used to develop programs that work on large data based software, usually identifying the connections between data for later use. Data parallel algorithms include ‘maps’, ‘forks’ and ‘reduces’ or ‘scans’.
 
Line 86:
* ‘Reduces’ or ‘scans’ are used to apply prefixes to a set of data, before then applying an operation upon the data. These are different to ‘maps’ as they have a set of partial results during the runtime of the method itself.
 
=== Task-Parallelparallel ===
These operations, as their name suggests, work on tasks. Each type of algorithm under this is different due to a change in the behaviour between tasks. Task parallel algorithms include ‘sequentials’, ‘farms’, ‘pipes’, ‘if’, ‘for’ and ‘while’.
 
Line 96:
* ‘While’ is an algorithm very similar to the operation of a ‘for’ algorithm, where a task is completed a number of times. However, in ‘while’ algorithms, the program computes the task a number of times before a conditional statement is met. This means that the ‘while’ algorithm can perform its task a different number of times for each time it is run.
 
=== Resolution Skeletonsskeletons ===
These skeletons are very different to the typical skeletons found above. ‘Resolution’ algorithms use a combination of methods to solve a specified problem. The algorithm's given problem can be a “family of problems”.<ref name=":1" /> There are two main types of these skeletons, ‘divide and conquer’ or ‘brand and bound’.