Linked Questions

515 votes
969 answers
189k views

"Hello, World!"

So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with hello-world, and counting). While this is not the most ...
Martin Ender's user avatar
172 votes
489 answers
35k views

Implement a Truth-Machine

A truth-machine (credits goes to this guy for coming up with it) is a very simple program designed to demonstrate the I/O and control flow of a language. Here's what a truth-machine does: Gets a ...
a spaghetto's user avatar
  • 11.2k
128 votes
201 answers
34k views

Sing Happy Birthday to your favourite programming language

Your favourite programming language has just had a birthday. Be nice and sing it the Happy Birthday song. Of course you should accomplish this by writing a program in that language. The program takes ...
David Frank's user avatar
  • 2,039
165 votes
128 answers
33k views

Trick or Treat polyglot

Since Halloween is coming up I thought I might start a fun little code golf challenge! The challenge is quite simple. You have to write a program that outputs either ...
BrainStone's user avatar
  • 1,531
45 votes
138 answers
11k views

Print invisible text

Given a string as input, output a number of whitespace characters (0x0A and 0x20) equal to the length of the string. For example, given the string Hello, World! ...
Mayube's user avatar
  • 11.6k
51 votes
128 answers
12k views

Create a program that prints the number of characters it has, in words

Create a program which prints the amount of characters its source has in English words. If your program is nine letters long it should print "nine". Capitalization is ignored: in case you're ...
AndrewTheCodegolfer's user avatar
102 votes
44 answers
12k views

Tips for golfing in <all languages>

The aim of this post is to gather all the golfing tips that can be easily applied to <all languages> rather than a specific one. Only post answers that its ...
ajax333221's user avatar
  • 3,634
233 votes
28 answers
24k views

DISARM THE B.O.M.B.!

You have been hired for your tech knowledge as a Secret Agent's sidekick to ensure that the good guy can get his job done and the world can be saved. This is your last mission before retiring with a ...
Averroes's user avatar
  • 4,077
48 votes
120 answers
9k views

Halloween Golf: The 2spooky4me Challenge!

A current internet meme is to type 2spooky4me, with a second person typing 3spooky5me, following the (n)spooky(n+2)me pattern. Your mission is to implement this ...
user avatar
57 votes
44 answers
17k views

All Your Base Are Belong To Us (Restricted)

Input must not be required, and output must read "All your base are belong to us". Restrictions No external resources. Plus a minimum of two of the ...
Eliseo D'Annunzio's user avatar
59 votes
35 answers
12k views

Print the phrase "And she said, 'But that's his.'" using only the alphabet

Print the phrase And she said, 'But that's his.' using only the following characters: ...
Blue-Maned Hawk's user avatar
119 votes
19 answers
63k views

"Hello, World!" in zero lines of code

NPM's sloc is a moderately popular tool for counting source lines of code in a file. The tool will attempt to strip out both single and multiline comments and count the remaining lines in order to get ...
Sisyphus's user avatar
  • 14.7k
35 votes
64 answers
7k views

'abc' and 'cba'

Your task is simple, write a single code snippet that when executed in one language outputs only the string 'abc' and when executed in another language outputs ...
Chris_Rands's user avatar
70 votes
28 answers
19k views

"As a child, I was told Spiders felt no emotion."

The challenge: output this exact ASCII art of a spiderweb in a window: ...
Kevin Cruijssen's user avatar
61 votes
31 answers
10k views

Output the text "Code Bowling"

Code-Bowling You've been hired by Brunswick Bowling to create a simple program to output the text Code Bowling on their monitors. This company is worth a pretty ...
Albert Renshaw's user avatar

15 30 50 per page