Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
134
votes
28answers
11k views

Making Future Posts Runnable Online with Stack Snippets

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
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 ...
25
votes
3answers
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
3answers
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 ...
15
votes
1answer
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 ...
36
votes
3answers
2k 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
8answers
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 ...
5
votes
2answers
516 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". Still, I keep receiving down-votes from ...
53
votes
19answers
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
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 ...
2
votes
3answers
258 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
2answers
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
1answer
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 ...
100
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 ...
8
votes
2answers
535 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
7answers
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
9answers
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): ...
24
votes
4answers
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 ...
74
votes
5answers
12k 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 ...
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 ...
3
votes
2answers
810 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 ...
-4
votes
3answers
395 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 ...
1
vote
1answer
805 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 ...
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 ...
66
votes
8answers
6k 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
0answers
637 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 ...
330
votes
55answers
103k 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
2answers
625 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 ...
19
votes
4answers
2k 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 ...
7
votes
1answer
780 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
10answers
2k 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), ...
85
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 ...
28
votes
5answers
3k 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 ...
86
votes
15answers
15k 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
7answers
962 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. ...
15
votes
24answers
5k 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
11answers
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
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 ...
0
votes
4answers
1k 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, ...
-2
votes
2answers
1k 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. ...
85
votes
132answers
43k 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 ...
377
votes
36answers
66k 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
1answer
604 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: ...
49
votes
13answers
11k views

“Disprove” Fermat's Last Theorem [closed]

Write a program, in the language of your choice, that appears to successfully find a counterexample to Fermat's Last Theorem. That is, find integers a, b, c > 0 and n > 2 such that an + bn = cn. Of ...
-1
votes
1answer
181 views

Calculate number of characters in code [closed]

The task is to find the number of characters in your source code up to the previous line. You may do some addition of two integers, or whatever that comes to mind. But at the end of your logic, you ...
-1
votes
3answers
654 views

Hide your hash function

So you are tasked with creating an open source password authentication system but you want to reveal as little about the implementation of the hash function as possible. Can you write a function that ...
3
votes
0answers
475 views

Your lover cursed you into an ogre! [closed]

You're a programmer. You always work everyday and don't have time with your lover. One day, your lover was so angry with you that they cursed you into an ogre! Your fingers have grown big, and you ...
71
votes
17answers
20k views

What colour is this? [closed]

Given three number values - being the Red, Green, and Blue elements of a colour (eight bits per channel, 0 to 255) - your program must output the name of the given colour. For example; ...
27
votes
9answers
5k views

Convert English to a number [closed]

Short and sweet description of the challenge: Based off the ideas of several other questions on this site, your challenge is to write the most creative code in any program that takes as input a ...
8
votes
12answers
1k views

Function/macro that returns true if one of its arguments contains a call to itself

Write a function (or macro) that returns true if and only if at least one of its arguments contains a call to the function itself and false otherwise. For example: ...