Linked Questions

515 votes
969 answers
188k 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
550 votes
241 answers
134k views

Showcase of Languages

Notes This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do not ...
234 votes
366 answers
65k views

Is this number a prime?

Believe it or not, we do not yet have a code golf challenge for a simple primality test. While it may not be the most interesting challenge, particularly for "usual" languages, it can be nontrivial in ...
Dennis's user avatar
  • 210k
172 votes
488 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
145 votes
333 answers
31k views

Shortest code to produce infinite output

Write the shortest code you can that produces an infinite output. That's all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code ...
tbodt's user avatar
  • 2,416
251 votes
82 answers
82k views

Code that will only execute once

Goal The goal of this challenge is to write code that will execute once and only once. This means basically that it damages the program, script, or environment in some way. If rebooting the system ...
ojblass's user avatar
  • 2,837
219 votes
89 answers
39k views

Make your language unusable

Try to write some code in your language and make it not satisfying our criteria of being a programming language any more. A language satisfies our criteria (simplified version for this challenge) of ...
jimmy23013's user avatar
  • 36.9k
78 votes
261 answers
25k views

Is this even or odd?

Note: There is not been a vanilla parity test challenge yet (There is a C/C++ one but that disallows the ability to use languages other than C/C++, and other non-vanilla ones are mostly closed too), ...
Matthew Roh's user avatar
  • 5,353
54 votes
198 answers
14k views

Scream very loudly

Write a script that outputs A to stdout infinitely. There should be no newlines or separators between the characters. Standard loopholes apply. This is code-golf. ...
Tornado547's user avatar
  • 1,133
77 votes
68 answers
23k views

Shortest program that throws StackOverflow Error [closed]

Write a program that throws a StackOverflow Error or the equivalent in the language used. For example, in java, the program should throw java.lang.StackOverflowError...
True Soft's user avatar
  • 1,085
154 votes
28 answers
20k views

Shortest Code to Legitimately Slack Off

I'm a developer, and I don't feel like doing my work. I know from XKCD that the best excuse for slacking off is that your code's compiling. Because of this, I think I need some code that will compile ...
Esolanging Fruit's user avatar
51 votes
71 answers
10k views

Shortest program that continuously allocates memory

Write a program which runs forever and allocates more and more memory on the heap the longer it runs, at least until you reach the limit of the operating system on the amount of memory that can be ...
tbodt's user avatar
  • 2,416
82 votes
41 answers
12k views

Non-discriminating Programming

We say a string is non-discriminating if each of the string's characters appears the same number of times and at least twice. Examples "aa!1 1 !a !1" is non-...
Laikoni's user avatar
  • 26.1k
46 votes
71 answers
5k views

Blinking twelve

Many electronic devices, specially old ones, will show a blinking 12:00 when the time has not been set. The purpose of this challenge is to recreate this. ...
Luis Mendo's user avatar
  • 104k
70 votes
43 answers
11k views

Tips for golfing in Bash

What general tips do you have for golfing in Bash? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Bash (e.g. "remove comments" is not ...
manatwork's user avatar
  • 20k

15 30 50 per page