Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [popularity-contest]

A popularity-contest is a competition where the answer with the highest vote tally (upvotes minus downvotes) wins. As these are frequently closed, read the tag info and post your challenge to the sandbox first.

100
votes
95answers
11k views

Make an error quine!

Your challenge: write a "program", for a language of your choice, that causes the compiler/interpreter/runtime to produce error output when compiling/running your program which is identical to your ...
89
votes
10answers
4k views

Write a Programming language of Unknown Completeness

Determining whether a Language is Turing Complete is very important when designing a language. It is a also a pretty difficult task for a lot of esoteric programming languages to begin with, but lets ...
14
votes
18answers
2k views

Break some standards! [closed]

Everyone knows the phrase "Rules are made to be broken!", so here is your task: Write some code in any language that breaks a standard. This can be anything, from putting 240 volts down a USB cable, ...
114
votes
10answers
6k views

Patch the Image

In a popular image editing software there is a feature, that patches (The term used in image processing is inpainting as @mınxomaτ pointed out.) a selected area of an image, based on the information ...
97
votes
20answers
8k views

Sort a list and write some English!

Your boss managed to read the secret hidden message. He didn't end up firing you, though, he just made you a secretary and forbade you from writing code. But you're a programmer. You need to write ...
85
votes
28answers
21k views

Rearrange pixels in image so it can't be recognized and then get it back

Create a program which can rearrange pixels in image so it can't be recognized. However your program should able to convert it back to original image. You can write two functions - for encoding and ...
54
votes
29answers
12k views

Generate an understandable sentence

Problem: Generate a sentence that can be read and understood. It must contain a subject, verb, and object, and tenses and plurals must match. The program must also be able to generate several ...
5
votes
14answers
11k views

Divide Two Numbers Using Long Division [closed]

Your challenge is to divide two numbers using long division. The method we used to use in old days of school to divide two numbers. Example here You should NOT use ...
187
votes
85answers
32k 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 ...
72
votes
27answers
8k views

More is less and less is more

Anybody can make the output of a program bigger by adding characters, so let's do the exact opposite. Write a full program, an inner function or a snippet for a REPL environment in a language of your ...
169
votes
8answers
30k views

Draw an Image as a Voronoi Map

Credits to Calvin's Hobbies for nudging my challenge idea in the right direction. Consider a set of points in the plane, which we will call sites, and associate a colour with each site. Now you can ...
14
votes
57answers
17k views

Write a function that takes (x, y) and return x to the power of y WITHOUT Loops [closed]

This is a really neat short challenge. Write a function or a procedure that takes two parameters, x and y and returns the ...
3
votes
6answers
846 views

Polycops and Robbers (Cops' Thread)

This is the cops' thread, the robbers' thread is here A polyglot is a program, that without modification, can run in multiple languages. Allowed languages Any language that was made before the ...
17
votes
5answers
1k views

Lets take Beal's $1,000,000

Beal's Conjecture has a million dollar prize if you prove/disprove it. It states that if where A, B, C, x, y, and z are positive integers with x, y, z > 2, then A, B, and C have a common prime ...
33
votes
6answers
5k views

Photomosaics or: How Many Programmers Does it Take to Replace a Light Bulb?

I've compiled a mosaic of 2025 headshots from the avatars of the top Stack Overflow users. (Click the image to view it full-size.) Your task is to write an algorithm that will create an accurate ...
432
votes
47answers
146k views

Images with all colors

Similar to the images on allrgb.com, make images where each pixel is a unique color (no color is used twice and no color is missing). Give a program that generates such an image, along with a ...
27
votes
8answers
3k views

Cubify This! A lesson in grayscale… er… color… er… whatever

Being a big fan of the Rubik's cube and of cool art, I've been working on combining the two together to do some really cool stuff. Basically solving miniature Rubik's cubes to form rudimentary pixels ...
2
votes
0answers
127 views

Heart-shaped quine [closed]

As you may or may not know, Valentine's day is getting close. So today, my task for you is: Write a heart-shaped quine Rules: Code should look like an identifyable heart shape, i.e. Has two round ...
28
votes
6answers
7k views

Let's draw the flag of Nepal

Nepal’s flag (Wikipedia, Numberphile) looks very different from any other. It also has specific drawing instructions (included in the Wikipedia article). I want you guys to make a program which will ...
3
votes
6answers
283 views

Nested lists as printable 2D objects [closed]

I don't know if something like this exists already (and I'm not finding the right key words) but if not, it felt like it could be an interesting coding puzzle. The challenge is, to take an ...
3
votes
0answers
1k views

The World in the Future [closed]

In the future, the world will change, there's no doubt about it. For that reason, you have to produce a realistic map of the world n years in the future. The ...
8
votes
26answers
1k views

Halt with 50% non-Halting

Create a program that halts exactly 50% of the time. Be original. Highest voted question wins. By exactly I mean that on each run there is a 50% chance of it halting.
79
votes
71answers
15k views

Hello world! with limited character repetition

In a language of your choice, write a program that exactly outputs the characters Hello world! followed by a newline. The code: should not use any character more ...
22
votes
12answers
9k views

Dither a Grayscale Image

Dither a grayscale image into pure black and white with your own algorithm. Guidelines: You must come up with your own new algorithm. You cannot use pre-existing algorithms (ex. Floyd-Steinburg) but ...
24
votes
15answers
9k views

Create an analogue clock

Create an analogue clock Goal: To create a working analogue clock using any programming language. Requirements: Your clock should feature at least the hour and minute pointers. The produced clock ...
47
votes
35answers
41k views

Print a smiley face

Requirements For the sake of the challenge let's define a unit: A unit is defined as any point that compose the grid in which the face is drawn (pixels for screen, characters for ASCII art, etc..)....
44
votes
4answers
2k views

Sometimes I need a Lossless Screenshot Resizer

Sometimes I need to write more documentation than just comments in code. And sometimes, those explanations need screenshots. Sometimes the conditions to get such a screenshot are so weird that I ask a ...
3
votes
2answers
270 views

Polycops and Robbers (Robbers' Thread)

This is the robbers' thread, the cops' thread is here A polyglot is a program, that without modification, can run in multiple languages. Robbers' Challenge First, find a vulnerable cop's answer, ...
27
votes
9answers
3k views

Hello world! with NO repetition

In any programming language that existed before this question was asked, write a program (not a function) that outputs the characters Hello world! followed by a ...
28
votes
3answers
1k views

Design a One Instruction Set Computer!

Notice: I'm willing to give a bounty to any answer that I find interesting. Your challenge is to design a Turing-complete one instruction set computer (OISC): An OISC is an abstract machine that ...
3
votes
1answer
915 views

Draw a Fractal in Under 200 Characters [closed]

After noticing all the fractal submissions/questions, I thought it would be fun to start a contest where everyone submits their favourite fractal. The Contest Generate a fractal in under 200 ...
33
votes
18answers
3k views

Code Romanization

The challenge is to make any Roman numerals valid code in your chosen language. They should not appear inside of strings or anything similar, but work just like any other tokens, literals such as (...
85
votes
14answers
8k views

Create a programming language that only appears to be unusable

Robbers' challenge thread is here. Cops' challenge: Design a programming language that appears to be unusable for programming, but admits computation (or at least completion of the task) through some ...
43
votes
7answers
11k views

(Re)Implementing Tetris

In the spirit of re-implementing classic video games, I would like to invite the community to create their best implementation of Tetris. For reference, a screenshot of the official NES version of ...
19
votes
10answers
3k views

Create a programming language interpreter [closed]

Task: You must create an interpreter that can parse snippets of a programming language. The language does not need to be complex, but it must include the following syntactical elements: Ability to ...
25
votes
17answers
8k views

Print 1 to 1000 in C++ without semi-colons

Following this popular question, present your solution which prints the numbers 1 to 1000 (all of them, not the string "1 to 1000" verbatim or something funny) in C++ without using any semi-colons. ...
40
votes
86answers
7k views

What's my name? Produce the name of the language indirectly [closed]

Produce only the name of a programming language using only the facilities of the language itself. The name of the language can only be invoked indirectly, i.e., from non custom environment variables, ...
49
votes
7answers
4k views

Create a User-Profile Mini-Game

Yesterday, I stumbled on a very clever thing. Yes, that's a working implementation of Tic-Tac-Toe on a user profile page, from @minitech. Of course, the moment I ...
28
votes
3answers
7k views

Emulate a MOS 6502 CPU

This is kind of inspired by the Intel 8086 challenge that's also on here, but I thought a 6502 challenge would be interesting too. The challenge I thought this would be a fun one to see the results ...
56
votes
6answers
2k views

Paint by Numbers (using programming, not numbers)

Your task is to create a program which takes a black-and-white outlined image (example images are below) and fills it in with colour. It is up to you how you section off each region and which colour ...
165
votes
95answers
37k views

Programming Languages Through The Years

In this challenge, users will take turns completeing three fairly simple coding tasks in programming languages that are allowed to be progressively older. The first answer must use a programming ...
6
votes
1answer
257 views

Escape from the tarpit (Robbers)

This is a cops-and-robbers challenge based around defining languages and proving they are Turing complete. This is the robbers' thread. The cops' thread is here. Robbers The cops will post ...
9
votes
1answer
466 views

Escape from the tarpit (Cops)

This is a cops-and-robbers challenge based around defining languages and proving they are Turing complete. This is the cops' thread. The robbers' thread is here. Cops As a cop, you will prepare two ...
41
votes
14answers
8k views

Maze Generation [closed]

I know there is an (old) thread similar to this (here), but I'd like to reboot it with some modifications. The goal: generate a random-looking maze using an algorithm of your choice, then output the ...
21
votes
7answers
3k views

A completely fake reboot [closed]

This challenge is simple. Write code that produces what looks exactly like a full reboot of the computer. It must not show anything on the screen that indicates it is not a real reboot and should ...
7
votes
19answers
3k views

Approximate a Bell Curve

Create a program to display some approximation of a bell curve. You are free to use whatever method you wish for generating the data, but the data must be displayed vertically, as in oriented like so: ...
24
votes
4answers
3k views

Display the mouse pointer trails… of the future!

Inspired by this example of using d3js, I challenge you to create a canvas (or your language-of-choice equivalent) in which the mouse pointer trails will be displayed, with the following twist: The ...
15
votes
20answers
1k views

Quine…but shifted by one

Referring to the printable ASCII character codes in decimal, we know that from 32 to 126 we have the printable characters with 32 being (space). Your challenge is to write a program using only ...
30
votes
1answer
2k views

Confound my attempts to solve the halting problem

Please note: By its nature, the spec for this challenge is difficult to understand. It probably requires at least a freshman course in computability theory, or equivalent background reading. In ...
102
votes
157answers
15k views

Execute prints backwards

Your task is to reverse the order in which some prints get executed. Specs: Your code will be in this form: ...