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.
405 questions
12
votes
7
answers
3k
views
Reverse the Polarity [closed]
The aim of this challenge is to write a program that satisfies the following conditions:
The program is not palindromic, or essentially palindromic (meaning that it is possible to remove characters ...
16
votes
1
answer
798
views
Optimum Letter Cards for Spelling Words [closed]
Let's say you have a list of words and you want to be able to use letter cards to spell each word. For example, to spell cat, you would use three cards labelled C, A, T.
Assuming each card is double-...
31
votes
7
answers
3k
views
Write a C / C++ Polyglot [closed]
This challenge's concept is pretty simple. All you have to do is write a program that will compile as both valid C and valid C++! Well, there are some catches. The program must behave differently when ...
8
votes
0
answers
2k
views
Break Stack Exchange [closed]
Trick the user that StackExchange is broken:
It can be done in several ways:
Your program starts a browser in some certain way (with a proxy server, for example);
Your program shows static picture;
...
35
votes
9
answers
3k
views
Sabotage the coding standards [closed]
There are various coding standards enforced at software companies which have the goal of increasing code reliability, portability, and, most importantly, readability in code written jointly by ...
6
votes
4
answers
762
views
Underground geek rock band names
We have a group of stealthy computer-savvy geeks who are also musicians with a very subversive element to their songs that the authorities in their totalitarian country just can't stand, and are ...
0
votes
1
answer
404
views
Program an Artistically Rich Comic Strip [closed]
The Challenge
Program a comic strip. As artistically rich and detailed as you can possibly make it, so long as it complies with the following rules:
the comic must be your own original work, not a ...
137
votes
29
answers
12k
views
Making Future Posts Runnable Online with Stack Snippets [closed]
Stack Snippets were recently added to PPCG! Reminiscent of JSFiddle, Stack Snippets allow HTML, CSS, and JavaScript to be run directly in posts!
Here is a very simple Stack Snippet:
...
3
votes
1
answer
1k
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 ...
26
votes
3
answers
2k
views
Generate Realistic Maps
I drew this map of the regions of an imaginary word in a few minutes in MS Paint:
I think that being able to generate maps like this programmatically would be really cool.
Challenge
Write a program ...
45
votes
3
answers
3k
views
Create xkcd-Style Narrative Charts
In one of the more iconic xkcd strips, Randall Munroe visualised the timelines of several films in narrative charts:
(Click for larger version.)
Source: xkcd No. 657.
Given a specification of the ...
16
votes
1
answer
2k
views
Sabotage a Train to Make It Run Late [closed]
"I want to go to the Araby bazaar to buy a present for the one I have fallen in love with. However, if I arrive too late all the stores will be closed and I won't be able to buy anything. Can you help ...
40
votes
3
answers
4k
views
Paint a still life (or a moving one) - draw an image in the Game of Life
You are given as input a greyscale image. Your task is to find a static or looping pattern in Conway's Game of Life that resembles the input image as closely as possible.
Your output can be either a ...
11
votes
8
answers
1k
views
Practical Golf - US States [closed]
My family has an e-commerce business. On our own site, we force people to choose their state from a dropdown menu when they enter their address, but through some other channels we use, customers can ...
4
votes
2
answers
592
views
Copy-paste master
EDIT: I posted this question searching for a beautiful, original solution to this problem. Therefore, I accepted a user's edited category "popularity-contest". Making this a search for ...
51
votes
19
answers
7k
views
Improvise a Hardware Random-Number Generator
Your task is to improvise a hardware random-number generator with whatever hardware you have lieing around.
Challenge
Write a program with the following properties:
It prints either ...
3
votes
0
answers
2k
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 ...
2
votes
3
answers
269
views
Writing Phrases with Code [closed]
This is my first contest, so please tell me what I can do to improve.
The object of this contest is to write program lines in your language of choice that are both valid code and self-descriptive in ...
13
votes
2
answers
1k
views
Underhanded Bank Account [closed]
You are working as a programmer for a bank.
Your task is to write a program that handles the transactions from one bank account to another.
The program should do the following:
Run in an infinite ...
28
votes
1
answer
2k
views
Animation of Code Golf
When I see code-golf entries that knock a few characters off, whittling down the code, I go look at the edit history for a side-by-side diff. See and learn :)
This challenge is to make a program ...
118
votes
28
answers
10k
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 ...
8
votes
2
answers
599
views
Generate the outline of an island from a seed [closed]
The challenge is to draw the outline of an 'island', generated using a seed as input.
Input (seed): string of 6 characters (exactly) allowing only lowercase letters (i.e. abcdefghijklmnopqrstuvwxyz) -...
78
votes
7
answers
9k
views
Start a revolution in Oceania
Winners (decided 14/09/14)
Winning answer by Markuz (Python) - 63 votes
Runner up by kuroi neko (PHP) - 55 votes
Introduction
You are in the world of the book Nineteen Eighty-Four by George Orwell....
22
votes
9
answers
1k
views
Musical Quines on an ASCII Piano
There are 88 keys on a standard piano and 95 printable ascii characters (hex codes 20 through 7E):
...
25
votes
4
answers
4k
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 ...
81
votes
5
answers
15k
views
Redraw an image with just one closed curve
Inspired by vi.sualize.us
Goal
The input is a grayscale image and the output is a black and white image. The output image consists of just one closed curve (loop) that is not allowed to intersect ...
125
votes
134
answers
17k
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 ...
3
votes
2
answers
871
views
Print all multiples of 32 from 0 to `n`...imperfectly [closed]
Objective: Print all multiples of 32 from 0 to an arbitrary number n.
Rules:
One argument will be given: a single integer from 0 to 231 - 1. This will be n here ...
-3
votes
3
answers
441
views
write an undefined behavior [duplicate]
Header:
this question has a very close duplicate, but the other question requires a difference between versions of the languages, instead of a difference between different implementation. this means ...
2
votes
1
answer
1k
views
Create a program that output's itself as a series of punch cards
Create a program that output's itself as a series of punch cards:
Rules:
You can use any programming language.
The output (i.e. punch cards) can be ASCII art.
Each line of code must be able to be ...
32
votes
4
answers
3k
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 ...
69
votes
8
answers
7k
views
Draw random black-and-white forest
Your task is to write program which will draw 800x600 black-and-white image with something resembling a forest.
Like this (it is dithered photo):
Rules
You are disallowed to use any existing images ...
9
votes
0
answers
731
views
Create a popular penrose tiling [closed]
The recent question about Wang tiles has led me to think that creating Penrose tilings might be an interesting popularity contest.
Background
Wang tiles are tiles that can tile the plane, but only ...
326
votes
55
answers
112k
views
Tweetable Mathematical Art [closed]
Integer math can generate amazing patterns when laid out over a grid. Even the most basic functions can yield stunningly elaborate designs!
Your challenge
Write 3 Tweetable (meaning 140 characters ...
6
votes
2
answers
1k
views
Collatz Graph Plotting [closed]
Write a program that outputs a graph of the collatz sequence any way you want (ASCII Image Video etc). You have to implement it that way that you can adjust the size of the graph by either the maximum ...
18
votes
4
answers
3k
views
Forest - A Simulated Ecosystem
NOTE
This problem was taken from this reddit thread (spoiler alert!), and I have adjusted it to make it fit with this site's format. All credit goes to reddit user "Coder_d00d".
In this problem, we ...
8
votes
1
answer
1k
views
The Mouse's Tale
Write a program that outputs Lewis Carroll's poem The Mouse's Tale from Alice in Wonderland, drawn in its distinctive tail-like shape.
Plain text of the poem:
Fury said to a mouse, That he met in ...
5
votes
10
answers
5k
views
Make a webpage where it looks like the browser is hanging / crashing
Your task today is to create a HTML page.
This page, when opened in a browser, behaves as if the browser has a problem (hanging, crashing, network error, virus, etc.)
You can use all the HTML(5), ...
88
votes
28
answers
31k
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 ...
33
votes
5
answers
4k
views
Draw an Image with a Snake
Imagine a continuous 2-dimensional path that can only turn left, right, or go straight, cannot intersect itself, and must fill a rectangular grid such as the grid of pixels in an image. We'll call ...
92
votes
15
answers
21k
views
Make a circle illusion animation
Your job is to animate this circle illusion. It looks like the points rotating inside of the circle, but they are actually just moving in straight lines.
Criterias
The result has to be animated. The ...
2
votes
7
answers
1k
views
Break out of a loop [duplicate]
Now that we have over a hundred ways to get stuck in a loop, the next challenge is to get out.
Specifically, write a piece of code with a (seemingly) infinite loop, but somehow manage to break out.
...
17
votes
24
answers
6k
views
Generate me some appropriate license plates!
The scenario: You are a software designer working for a gov't-run company that designs license plates for cars and other vehicles. You've been asked to develop software that generates license plates. ...
0
votes
11
answers
1k
views
Implement map()...with bugs [closed]
EDIT: The behavior may be inconsistent. Also, associative arrays are permitted.
Make a function that iterates through an indexed array, mapping a function of a single argument to each member of the ...
33
votes
6
answers
6k
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 ...
1
vote
4
answers
2k
views
Calculate the most digits of pi [closed]
There are a lot of challenges on this site regarding pi, but none that challenge you to calculate as many digits of pi as possible.
As you all may know, pi in its decimal form goes on for infinity, ...
-3
votes
2
answers
2k
views
Create an autocorrect program [closed]
People sometimes make spelling eorrors. A lto. Your challenge is to write a program that can take a string with certain spelling errors, such as the switching of I and E, and correct those mistakes. ...
83
votes
132
answers
53k
views
Loop without 'looping' [closed]
A question similar to this has been asked a couple of years ago, but this one is even trickier.
The challenge is simple. Write a program (in your language of choice) that repeatedly executes code ...
390
votes
36
answers
72k
views
American Gothic in the palette of Mona Lisa: Rearrange the pixels
You are given two true color images, the Source and the Palette. They do not necessarily have the same dimensions but it is guaranteed that their areas are the same, i.e. they have the same number of ...
1
vote
1
answer
743
views
Fake infinite loop [closed]
The challenge is to write a fake infinite loop in any imperative programming language.
At first sight, the code should seem not to halt at all.
As a naive example:
...