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.

Filter by
Sorted by
Tagged with
191
votes
78answers
34k 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 ...
104
votes
99answers
12k 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 ...
85
votes
15answers
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 ...
20
votes
18answers
4k views

Write a short story using only valid code

What I'd like to see is your attempts at writing a kind of "story" that has a fairly easy to read meaning, but also creating a valid code fragment. For example, this (BBC) BASIC code: ...
98
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 ...
116
votes
42answers
16k views

Write a program that always outputs “2012” - even if it's modified!

This idea is not mine, though I don't know where it originated. I once met it in a programming contest very long ago (1998, if I remember correctly). The task is to write a program in your favorite ...
31
votes
3answers
2k 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 ...
24
votes
16answers
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 ...
79
votes
72answers
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 ...
66
votes
21answers
12k views

Translate your English source code into a foreign language [closed]

I have noticed that there are a disproportionate number of computer languages based on English. I propose to fix this by translating existing computer languages into foreign languages! Pick a ...
31
votes
4answers
2k views

Reproduce an image using lines

Write a program that takes in a true-color RGB image I, the maximum number of lines to draw L, and the minimum m and maximum M length of each line. Output an image O that looks as much as possible ...
71
votes
8answers
9k views

Is it dark outside? Draw a sun map!

Our closest star, the sun, is quite fidgety. The times it rises and sets depend on where you are, and whether it is winter or not. We would like to be able to deduce if the sun is shining outside ...
433
votes
47answers
148k 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 ...
24
votes
15answers
10k views

Generate a 1920 x 1080 graphic with 2,073,600 unique colours

Challenge: Write a program that outputs a graphic file 1920 pixels wide by 1080 pixels high. Every one of the 2,073,600 pixels within the graphic must be a unique colour and no colour values should ...
20
votes
20answers
3k views

Print a Variable's Name [closed]

Write a function (not a full program), so that if the function is called with a single global variable (or your language's closest equivalent) as its argument, it outputs (i.e. prints or returns) the ...
167
votes
96answers
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 ...
91
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
17answers
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 ...
86
votes
28answers
22k 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 ...
55
votes
29answers
13k 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 ...
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 ...
170
votes
8answers
31k 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
917 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 ...
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
165 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
304 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.
23
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 ...
48
votes
35answers
42k 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
305 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
8answers
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 ...
3
votes
1answer
923 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 (...
43
votes
7answers
12k 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 ...
29
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 ...
6
votes
1answer
289 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
509 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 ...