Sponsored Links
-->

Tuesday, February 6, 2018

Golf de Saint-Cloud - Dress code
src: www.golfdesaintcloud.com

Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that implements a certain algorithm. Code golf should not be confused with sizecoding, a contest to achieve the smallest binary executable code. Playing code golf is known as "golf scripting". Code golf tournaments may also be named with the programming language used (for example Perl golf).


Video Code golf



History

The length of the shortest possible program that produces a given output (in any fixed programming language) is known as the Kolmogorov complexity of the output, and its mathematical study dates to the work of Andrey Kolmogorov in 1963. Code golf, however, can be more general than this, as it often specifies a general input-output transformation that must be performed rather than asking for a single output with no input.

Whilst the term "code golf" was apparently first used in 1999 with Perl, and later popularised through the use of Perl to write a program that performed RSA encryption, similar informal competition was known to have been popular with earlier APL hackers. Today the term has grown to be applied to a wide variety of languages, which has even triggered the creation of dedicated golfing languages.


Maps Code golf



Etymology

The term "code golf" is derived from the similarity of its goal with that of conventional golf, where participants seek to achieve the lowest possible score, rather than the highest, as is the standard in most sports and game scoring systems. While the conventional golf players are trying to minimize the number of club strokes needed to complete the course, the code golfers are striving to reduce the number of key strokes necessary to write the program.


Sneak Peak of The Skill Code with Cameron McComrick | Golf Channel
src: www.golfchannel.com


Dedicated golfing languages

Several new languages have been created specifically with code golfing in mind. The most well-known examples include GolfScript and Flogscript, which are Turing-complete languages which provide powerful constructs for concisely expressing ideas in code. Because golfing languages compete for extreme brevity, their design sacrifices readability which is important for practical production environments, and therefore they are often esoteric. Sometimes, however, a language is designed for a practical purpose, but turns out to be suitable for code golf. An example is binary lambda calculus, designed to make algorithmic information theory more concrete, but providing a scheme suitable for code golf. A list of dedicated golfing languages can be found on the wiki for esoteric programming languages.

An example of GolfScript code to print 1000 digits of pi:

Code golf websites have users constantly creating new and unique golfing languages to win code golf challenges.


Etiquette & Dress Code - Youghal Golf Club
src: www.youghalgolfclub.com


Types of code golf

Some code golf questions, such as those posed on general programming sites, may not require implementation in a specific programming language. However, this limits the style of problems that it is possible for the problem designers to pose (for example, by limiting the use of certain language features). In addition, the creation of such "open" questions has resulted in the design of code golf specific programming language dialects such as REBMU (a dialect of REBOL). Both online and live competitions may also include time limits.


Preview of The Skill Code with Cameron McCormick | Golf Channel
src: www.golfchannel.com


Tournaments by language

Ongoing

  • Multiple programming languages
    • Anarchy Golf (online): Most well-known programming languages including several esoteric programming languages.
    • JAGC (online): Perl, Python, Erlang, Ruby, Haskell, Bash, PHP.
    • Shortening codes at SPOJ (online): Most well-known programming languages.
    • Programming Puzzles & Code Golf on Stack Exchange (online): Any programming language allowed. Also includes other types of programming challenges.
    • CodinGame (online): Most well-known programming languages.
    • Code Golf (online): Bash, JavaScript, Lua, Perl, Perl 6, PHP, Python, Ruby.
  • Clojure
    • 4clojure.com (online)
  • K
    • Kona code golf (online)
  • Vim
    • VimGolf

Historical

  • Perl
    • 2000, July: Perl Golf Apocalypse at Perl Conference 4.0, Monterey California.
  • Perl, PHP, Ruby and Python
    • CodeGolf (online)

Front TAROX Brake Discs - Volkswagen Golf Mk7 1.4 TSI (312mm ...
src: www.tarox.co.uk


See also

  • Data compression
  • Perl pastimes
  • Code poetry

Report: LPGA sets strict new dress code regulations for players ...
src: cdn-s3.si.com


External links

  • StackOverflow.com: Questions tagged with 'code-golf'
  • CodeGolf.StackExchange.com: Questions and answers on programming puzzles and code golf
  • regular expression golfing: a fun variant to code golf
  • ShortestWikiContest

Dress Code
src: d2tbfnbweol72x.cloudfront.net


References

Source of article : Wikipedia