Code golf: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
m (Recreation category)
m (two minor "typos")
Line 1: Line 1:
'''Code golf''' is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that solve a given problem. While the exact origins of this sport is lost to history, it is known to have been popular with early APLers. While dedicated ''golfing languages'' (programming languages constructed expressly for the purpose of winning code golf competitions) usually can accomplish the goal with shorter code than APL can muster, APL does almost always have the upper hand when compared to other production languages. This is thanks to APL's array comprehension and common operations being represented by [[glyph|single character]]s.
'''Code golf''' is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that solves a given problem. While the exact origins of this sport is lost to history, it is known to have been popular with early APLers. While dedicated ''golfing languages'' (programming languages constructed expressly for the purpose of winning code golf competitions) usually can accomplish the goal with shorter code than APL can muster, APL does almost always have the upper hand when compared to other production languages. This is thanks to APL's array comprehension and common operations being represented by [[glyph|single character]]s.


For production code, one normally shouldn't just strive for code that is as short as possible, as code clarity, execution speed, and memory usage usually are more import. However, engaging in code golf can serve to:
For production code, one normally shouldn't just strive for code that is as short as possible, as code clarity, execution speed, and memory usage usually are more import. However, engaging in code golf can serve to:
Line 11: Line 11:
Stack Exchange's ''Code Golf'' site has a very active group of APL golfers, with a significant percentage of new posts receiving APL answers within a relatively short time. They tend to convene in the [[APL Orchard]] to ask for help, discuss solutions, and challenge each other.
Stack Exchange's ''Code Golf'' site has a very active group of APL golfers, with a significant percentage of new posts receiving APL answers within a relatively short time. They tend to convene in the [[APL Orchard]] to ask for help, discuss solutions, and challenge each other.


Several formal code golf tournaments have been conducted during recent years. For example, have a couple of [[Dyalog User Meeting]]s hosted half-day code golf workshops.
Several formal code golf tournaments have been conducted during recent years. For example, a couple of [[Dyalog User Meeting]]s have hosted half-day code golf workshops.


== External links ==
== External links ==

Revision as of 22:58, 20 November 2020

Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that solves a given problem. While the exact origins of this sport is lost to history, it is known to have been popular with early APLers. While dedicated golfing languages (programming languages constructed expressly for the purpose of winning code golf competitions) usually can accomplish the goal with shorter code than APL can muster, APL does almost always have the upper hand when compared to other production languages. This is thanks to APL's array comprehension and common operations being represented by single characters.

For production code, one normally shouldn't just strive for code that is as short as possible, as code clarity, execution speed, and memory usage usually are more import. However, engaging in code golf can serve to:

  • encourage exploration of the programming language's facilities
  • learn cutting edge techniques
  • become more comfortable with the lesser known features of one's programming language
  • become accustomed to think out-of-the-box which may lead to realising better ways of approaching problems
  • have fun while programming leading to a better state of mind and thus better code and higher effectivity

Stack Exchange's Code Golf site has a very active group of APL golfers, with a significant percentage of new posts receiving APL answers within a relatively short time. They tend to convene in the APL Orchard to ask for help, discuss solutions, and challenge each other.

Several formal code golf tournaments have been conducted during recent years. For example, a couple of Dyalog User Meetings have hosted half-day code golf workshops.

External links


APL community [edit]
Conferences and activities Advent of CodeAPL CampfireAPL CultivationAPL Meetup (Portuguese) ∙ APL Notation As A Tool Of ThoughtAPL Problem Solving CompetitionAPL QuestAPL SeedsArray CastBAA sessionsCode golfDyalog user meetingsDyalog webinarsIverson AwardSharing code
Chat rooms and forums APL FarmAPL Orchard
User groups APL Borealis (Canada) ∙ APL et J (France) ∙ APL Germany (terminology) ∙ APL ∊ BCN (Spain) ∙ BAA (UK) ∙ FinnAPL (Finland) ∙ JAPLA (Japan) ∙ SAUG (Switzerland) ∙ SIGAPL (USA) ∙ SwedAPL (Sweden) ∙ Tokyo APL/J/K Meetup (Japan)
People Phil AbramsBrian BeckerBob BerneckyLarry BreedCharles BrennerJim BrownAdám BrudzewskyGitte ChristensenPeter DonnellyJohn EarnestAdin FalkoffGarth FosterLib GibsonAaron HsuRoger HuiKen IversonMorten KrombergMarshall LochbaumEugene McDonnellJon McGrewDonald McIntyreRoger MooreAlan PerlisHenry RichAl RoseWilliam RutiserJohn ScholesIan SharpBob SmithGeoff StreeterRoy SykesArthur Whitney
Other APL Quote QuadAPL WikiBlogsBooksCase studiesFamous APL usersHumourJobsMerchandisePapersTryAPLTry It OnlineVideo channels