The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
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 ...
55
votes
35answers
12k views

Could you please tell me the time? [closed]

You know that your language's clock/time API's are broken and they are not reliable at all. So you are not allowed to use any built-in API to access system time/date. But you also know that your ...
55
votes
21answers
5k views

Add a feature to a programming language [closed]

Your task is to tack on a feature to a programming language, either by implementing a very clever library, or by processing the input text and/or tweaking the compilation process. Ideas: Add PHP-...
54
votes
31answers
23k views

Create a memory leak, without any fork bombs [closed]

Your task is to create a memory leak. This is a program that uses loads of memory, until the computer runs out and has to do some swapping to save itself from running out. The only way that the memory ...
54
votes
7answers
7k views

Duct tape can fix Mother's Day

Based on the Duct tape can fix anything question, that was too broad, with very similar rules. Only this time the objective is very specific: The challenge Your mission is to make a program that ...
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 ...
53
votes
33answers
11k views

Avoid the evil integers! [closed]

You are developing some code to generate ID numbers. Policy requires that no ID numbers include the digit sequence 666. Create a function (or your language's equivalent) which takes a positive ...
53
votes
18answers
8k views

Program that adds all natural numbers and yields -1/12 [closed]

As you might know there is a mathematical fun-fact that if you add all natural numbers you end up with... -1/12 (see Wikipedia here). Of course this is very strange result and can not be obtained by ...
52
votes
3answers
5k views

Quiche Lorraine [closed]

Since it was Pi day recently, I have noticed a number of challenges that ask you to calculate pi. Of course, a quiche lorraine is not quite a pie (you can claim a Bonus Score¹ of +1 if you guessed ...
51
votes
69answers
20k views

“Creative” ways to determine if an array is sorted

Given an integer array, write a program that determines if it is sorted in ascending order. Remember that this is a code trolling question. I am looking for most interesting ways that people come up ...
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 ...
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 ...
49
votes
6answers
4k views

Language Design: 2-D Pattern Matching

This is Fortnightly Challenge #6. Theme: Language Design There's a chatroom for this challenge. Come and join us if you want to discuss ideas! And now for something completely different... This ...
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..)....
48
votes
3answers
4k views

Computer Generated Textured Wall Paint

The paint on the walls in my room has a random, almost fractal-like, 3-dimensional texture: In this challenge you will write a program that generates random images that look like they could be part ...
48
votes
6answers
4k views

MS Paint is underrated

MS Paint was always a great time waster, but it was shunned by most graphic designers. Perhaps people lost interest because of the jarring color palette, or because of limited undo levels. Regardless, ...
47
votes
15answers
6k views

Generate the Stack Overflow logo [closed]

The challenge is to generate an image similar to the StackOverflow logo: The output must contain: Image size 64*64 or greater A gray |__| shaped base A curved segmented stack coming up from the base....
46
votes
7answers
4k views

Who is this chatbot?

Objective: The task is to create a chatbot with whom you can spend your time discussing your deepest thoughts with. Create a chatbot with an AI that learns from your input. Your bot should inspire ...
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 ...
44
votes
26answers
6k views

Crash your favorite compiler [closed]

Write a perfectly legal code in a decent language of your choice whose compiling will either crash the compiler or send it into an infinite loop (infinite compile time). Restrictions: Use a standard ...
44
votes
3answers
4k views

What can you do in a 4k data URI? [closed]

Bounty is over, thephpdeveloper wins with Conway's Game of Life The web platform today is advancing at a rapid rate. Features like CSS3 animations, transforms, drop shadows and gradients, ...
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 ...
43
votes
52answers
9k views

Alphanumeric Hello World [closed]

Your goal is to write "Hello, World!" (minus the quotes). This is a popularity-contest, so most up votes wins. Code length will be used to break ties. Anything goes, as long as it is within the ...
43
votes
23answers
9k views

The answer to life, the universe, and everything [closed]

Introduction: Deep Thought calculated The answer to life the universe and everything in a period of 7.5 million years, the solution was 42. Write a program in any ...
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 ...
43
votes
4answers
2k views

Computer Generated Cracked Soil

Write a program that takes in an integer from 0 to 65535 (216-1) and generates a unique 500×500 pixel image that looks as similar as possible to these 6 real life images of cracked soil: ...
42
votes
41answers
21k views

Help!! How to do square root! [closed]

Hi guys, for my class I need to make a number square root but it doesnt work !!HELLPP! The challenge: ...
42
votes
47answers
7k views

Produce an unexpected word [closed]

The goal is to write program that will produce a word unexpectedly (program doesn't look like it is going to produce a word). Example (JavaScript): ...
42
votes
75answers
13k views

How do I write an adding function? [closed]

The problem: I am the lead developer for a big company, we are making Skynet. I have been assigned to Write a function that inputs and returns their sum RULES: No answers like ...
42
votes
15answers
9k views

99 Bottles of beer, 99 languages

The goal is to write a simple "99 Bottles of Beer" program .. that is valid in at least 2 distinct languages (e.g. not Python 2 and Python 3). It must be a complete file that will run or compile. ...
42
votes
4answers
5k views

Paint by Numbers

You're given a true colour image. Your task is to generate a version of this image, which looks like it was painted using paint-by-numbers (the children's activity, not nonograms). Along with the ...
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 ...
40
votes
32answers
4k views

Ridiculous Runtime Errors [closed]

Write programs that produce crazy, obscure, ridiculous, or just plain nutty runtime errors. Obfuscation and golfitude (shortness) not required. solutions that look like they should work fine are ...
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, ...
40
votes
50answers
11k views

Most creative way to reverse a positive integer [closed]

Provided an input as an unsigned integer: 13457 Your function/subroutine should return: 75431 Since this is a popularity ...
39
votes
86answers
9k views

Challenge: Write a piece of code that quits itself [closed]

I'm searching (am I?) for a piece of code that quits immediately - in an absolutely unconventional way. This does not mean: System.exit((int) 'A'); (Java). It ...
39
votes
49answers
6k views

Write an aphorism using valid code [closed]

Can you write an aphorism in at most 4 lines of code ? Code should read as much as possible as an aphorism in plain English and should return the boolean true. ...
39
votes
20answers
10k views

Love calculation

As a kid my sister showed me this little love calculation to see how much chance you have of getting in a successful relationship with your crush. All you need is 2 names and a piece of paper. John ...
39
votes
7answers
7k views

Animated drawing of a Bézier curve

Your job is to draw a Bézier curve given it's control points. The only criteria is that you actually have to show how to draw the curve from the initial control point to the last one. Criterias The ...
38
votes
32answers
10k views

Deletion of a blank line in source code which causes unexpected functionality [closed]

Write a script that works fine when a blank line is present in the flow of program logic, but breaks or causes unexpected behaviour when that line is removed. Avoid standard loopholes and stupid ...
38
votes
0answers
5k views

Deep learning Fizzbuzz [closed]

Inspired by the job-interview with Joel Grus, the goal of this challenge is to write a tensorflow (or other deep/machine learning) program that learns Fizzbuzz and correctly prints out the answers to ...
37
votes
2answers
2k views

Musical Tweet Challenge

This is the audio version of the Twitter image encoding challenge. Design an audio compression format that can represent at least one minute of music in 140 bytes or less of printable UTF-8-encoded ...
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 ...
35
votes
25answers
9k views

A program that ends but never ends [closed]

Write a program that starts itself again when finishes. There should be no more than one instance of the program running at same time. Not even for a slightest moment of time. You can ignore any ...
35
votes
9answers
2k 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 ...
34
votes
12answers
5k views

Code Golf of Death [closed]

Write some code that causes a BSOD or kernel panic! Rules: On Windows, you must cause a BugCheck (Blue Screen of Death), on Linux (or other *nix systems) you must cause a kernel panic. Must not ...
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 (...
33
votes
8answers
4k views

It's not who votes that counts; it's who counts the votes [closed]

The scenario You live in a country that is having a presidential election. Each voter gets one vote, and therefore there is a firmly-entrenched two-party system. (Third parties exist, but get ...
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 ...
32
votes
5answers
1k views

Patch the Paragraph

In the spirit of Patch the Image, here's a similar challenge but with text. Challenge Bit rot has afflicted your precious text! Given a paragraph composed of ASCII characters, with a rectangular ...