Content deleted Content added
m added another example of pseudocode |
m v2.04b - Bot T18 CW#553 - Fix errors for CW project (<nowiki> tags - Reference before punctuation) |
||
Line 61:
All, if not most programming languages have skeleton code used to assist in the definition of all built-in functions and [[Method (software engineering)|methods]]. This provides a simple means for newer programmers to understand the syntax and intended implementation of the written methods.
[[Java (programming language)|Java]], an [[Object-oriented programming|object oriented language]], focuses heavily on a structured documentation page with completely separated methods for each object part of Java’s packages.<ref>{{Cite web|last=|first=|date=|title=Object (Java Platform SE 8 )|url=https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html|url-status=live|archive-url=|archive-date=|access-date=2020-10-02|website=docs.oracle.com}}</ref>
Each method is defined in the same format, with the name of the method as well as the syntax to be used in an [[integrated development environment]] clearly visible at the top of a block. With Java’s focus on [[Scope (computer science)|scope]], [[data type]]
[[Python (programming language)|Python]] has a similar approach to document it’s in-built methods, however mimics the language’s lack of fixation on scope and data types
=== Class definition ===
[[Class (computer programming)|Classes]] written by third-party developers, primarily as a part of libraries, also showcase their programming in the form of skeleton code. This helps to inform any that are new to the library as to how the functions and methods operate. [[P5.js|P5.Js]] uses this format on their documentation page to explain the intended use of certain included functions.<ref>{{Cite web|title=reference {{!}} p5.js|url=https://p5js.org/reference/#/p5/alpha|access-date=2020-11-15|website=p5js.org}}</ref>
[[Natural-language user interface|Natural Language Interfaces]] (NLIs) are most typically found in situations where programmers attempt to take an [[Input/output|input]], usually [[Colloquialism|colloquially]] termed (without the use of programming language specific [[jargon]]) and use this to create a program or a method. An implementation of this uses a small set of skeleton code to imply the function running in the background.<ref>{{Cite web|last=Granger|first=Chris|date=2020-11-18|title=A first peek at something new we're working on.|url=https://twitter.com/ibdknox/status/1328797793138266113|url-status=live|archive-url=|archive-date=|access-date=2020-11-19|website=Twitter|language=en}}</ref>
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.|date=2004|title=GENERATING JAVA CLASS SKELETON USING A NATURAL LANGUAGE INTERFACE|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|via=}}</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.
Line 84:
== Parallel programming ==
[[Parallel computing|Parallel programming]] is the operation of multiple functions simultaneously most commonly used to increase efficiency. These are typically the hardest types of programs to develop, due to their complexity and interconnectedness with the [[Computer hardware|hardware]] in question as well. Many developers have attempted to write programs with this core functionality,<ref name=":1">{{Cite journal|last=González-Vélez|first=Horacio|last2=Leyton|first2=Mario|date=2010-11-01|title=A survey of algorithmic skeleton frameworks: high-level structured parallel programming enablers|url=http://dx.doi.org/10.1002/spe.1026|journal=Software: Practice and Experience|volume=40|issue=12|pages=1135–1160|doi=10.1002/spe.1026|issn=0038-0644|via=}}</ref>
[[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-Parallel ===
Line 92:
* ‘Maps’ are the most commonly used data parallel algorithms, and typically involve a single operation completed on a large set of data. To increase efficiency, a number of data sets have this operation applied to them simultaneously, before the data is structured together again at the end.
* ‘Forks’ are similar to ‘maps’ but they use a different operation for certain data types. This is known as [[Data parallelism|multiple data parallelism]].<ref name=":1" />
* ‘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.
Line 107:
=== Resolution Skeletons ===
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”
* ‘Divide and conquer’ uses a map skeleton as it’s basis, combining this with a while skeleton to solve the problem. In map algorithms, functions on data are applied simultaneously. In ‘divide and conquer’ the set of data provided has a function applied to it using the map skeleton, however this can be applied recursively using the ‘while’ algorithm. The ‘while’ is only broken when the entire problem is solved.
|